Start moving to an Org-based config

This commit is contained in:
2018-07-29 18:38:44 +02:00
parent a0df2bbc2b
commit c16ff8cbc0
3 changed files with 109 additions and 45 deletions

46
init.el
View File

@@ -22,25 +22,8 @@
'("org" . "http://orgmode.org/elpa/") t)
(package-initialize)
(setq-default use-package-always-ensure t)
(unless (package-installed-p 'use-package)
(package-refresh-contents)
(package-install 'use-package))
(use-package use-package)
;; Set up my personal keymap early so I can use it in use-package
;; calls
(defvar gpolonkai/pers-map (make-sparse-keymap)
"My own, personal, keymap!")
(define-prefix-command 'gpolonkai/pers-map)
(define-key ctl-x-map "t" 'gpolonkai/pers-map)
;; Add path to my custom lisp functions
(add-to-list 'load-path (concat
user-emacs-directory
(convert-standard-filename "lisp/")))
;; I started moving my configuration to this Org file. Its easier to document this way.
(org-babel-load-file (expand-file-name "configuration.org" user-emacs-directory))
;; Load my own functions
(load "gnu-c-header")
@@ -55,21 +38,6 @@
(load "xdg-paths")
(load "utils")
;; Define aliases
(defalias 'yes-or-no-p 'y-or-n-p)
(set-face-attribute 'default t :font "Hack-10")
(set-frame-font "Hack-10" nil t)
;; UI hacks: turn off the scroll bar (thats why Nyan-cat is here),
;; the toolbar (I dont really use it), and the menu bar (I rarely use
;; it, and in those rare occasions I can simply turn it on)
(if (fboundp 'scroll-bar-mode) (scroll-bar-mode -1))
(if (fboundp 'tool-bar-mode) (tool-bar-mode -1))
(if (fboundp 'menu-bar-mode) (menu-bar-mode -1))
;; Maximize the frame
(set-frame-parameter nil 'fullscreen 'maximized)
(defun termux-p ()
"Check if Emacs is running under Termux."
(string-match-p
@@ -505,9 +473,6 @@
("M-g w" . avy-goto-word-1)
("M-g e" . avy-goto-word-0)))
(use-package diminish
:defer t)
(use-package focus
:bind
(([f8] . focus-mode)))
@@ -736,10 +701,6 @@
:config
(global-hungry-delete-mode))
(use-package hl-line
:config
(global-hl-line-mode))
(use-package eww
:config
(setq eww-search-prefix "https://www.google.com/?q="))
@@ -1240,9 +1201,6 @@ INFO plist."
(push-mark isearch-other-end)
(activate-mark))
;; Set up some global minor modes
(global-prettify-symbols-mode t)
;; Enable some functions
(put 'downcase-region 'disabled nil)
(put 'upcase-region 'disabled nil)