diff options
| author | Miquel Sabaté Solà <msabate@suse.com> | 2017-02-03 10:31:05 +0100 |
|---|---|---|
| committer | Miquel Sabaté Solà <msabate@suse.com> | 2017-02-03 10:31:05 +0100 |
| commit | a16ea495b499e5c7c7fc16a447ddaf11a0136bc5 (patch) | |
| tree | ed64549c905fc6c6676caf7dd5bc02ca889eed8f /emacs/init.org | |
| parent | ec3f02ce0ff4e9fa24d924738a86a62a373394a9 (diff) | |
| download | dotfiles-a16ea495b499e5c7c7fc16a447ddaf11a0136bc5.tar.gz dotfiles-a16ea495b499e5c7c7fc16a447ddaf11a0136bc5.zip | |
emacs: require 'org
I was not explicitely requiring org, and so GNU Emacs apparently freaked
out. Moreover, I've also fixed a couple of warnings.
Signed-off-by: Miquel Sabaté Solà <msabate@suse.com>
Diffstat (limited to 'emacs/init.org')
| -rw-r--r-- | emacs/init.org | 44 |
1 files changed, 25 insertions, 19 deletions
diff --git a/emacs/init.org b/emacs/init.org index 8a9feb9..4e7fc22 100644 --- a/emacs/init.org +++ b/emacs/init.org @@ -488,7 +488,7 @@ buffers. "Returns a list with the ERC buffers." (mapcar 'buffer-name (erc-buffer-list))) -(setq mssola-helm-source-erc-channel-list +(defconst mssola-helm-source-erc-channel-list '((name . "ERC Channels") (candidates . mssola-erc-helm-buffer-list) (action . switch-to-buffer))) @@ -640,28 +640,27 @@ expands the region of selection with a single key chord. Even if evil covers most of my uses, it's convenient to have this tool anyways. #+BEGIN_SRC elisp - (use-package expand-region - :ensure t - :config +(use-package expand-region + :ensure t + :config - ; Set C-e as the expand command (mnemonic: expand). This command will - ; supercede the evil binding for "move one line", which I never use anyways. - (global-set-key (kbd "\C-e") 'er/expand-region) - (with-eval-after-load 'evil - (define-key evil-normal-state-map (kbd "\C-e") 'er/expand-region) - (define-key evil-visual-state-map (kbd "\C-e") 'er/expand-region))) + ; Set C-e as the expand command (mnemonic: expand). This command will + ; supercede the evil binding for "move one line", which I never use anyways. + (global-set-key (kbd "\C-e") 'er/expand-region) + (with-eval-after-load 'evil + (define-key evil-normal-state-map (kbd "\C-e") 'er/expand-region) + (define-key evil-visual-state-map (kbd "\C-e") 'er/expand-region))) - (defun er/add-text-mode-expansions () - "This way we can also expand the region into paragraphs & pages in text mode. - Directly taken from: https://github.com/magnars/expand-region.el." +(defun er/add-text-mode-expansions () + "This way we can also expand the region into paragraphs & pages in text mode. +Directly taken from: https://github.com/magnars/expand-region.el." - (make-variable-buffer-local 'er/try-expand-list) - (setq er/try-expand-list (append - er/try-expand-list - '(mark-paragraph - mark-page)))) + (set (make-local-variable 'er/try-expand-list) (append + er/try-expand-list + '(mark-paragraph + mark-page)))) - (add-hook 'text-mode-hook 'er/add-text-mode-expansions) +(add-hook 'text-mode-hook 'er/add-text-mode-expansions) #+END_SRC Last but not least, =YASnippet=. This package allows people to define shortcuts @@ -1247,6 +1246,13 @@ And finally define a proper shortcut. * org +[[http://orgmode.org/][org mode]] is an incredible tool that keeps me organized: TODOs, notes, agenda, +etc. Moreover, it's built in GNU Emacs: + +#+BEGIN_SRC elisp +(require 'org) +#+END_SRC + ** General settings First of all, let me define some helper functions. |
