aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--emacs/.emacs.d/GNUmakefile5
-rw-r--r--emacs/.emacs.d/init.org55
-rw-r--r--emacs/.emacs.d/init/oni-org-init.org65
3 files changed, 52 insertions, 73 deletions
diff --git a/emacs/.emacs.d/GNUmakefile b/emacs/.emacs.d/GNUmakefile
index dd2bf07..a6b3f25 100644
--- a/emacs/.emacs.d/GNUmakefile
+++ b/emacs/.emacs.d/GNUmakefile
@@ -5,12 +5,15 @@ include ../../dotfiles.mk
AUTOLOADS_FILE = site-lisp/site-autoloads.el
UNWANTED = $(AUTOLOADS_FILE) site-lisp/flycheck_% site-lisp/flycheck-%
SITE_LISPS = $(addsuffix c,$(filter-out $(UNWANTED),$(wildcard site-lisp/*.el)))
-INIT_LISPS = $(addsuffix .elc,$(basename $(wildcard init/*.org)))
+INIT_LISPS = init/oni-org-init.elc $(addsuffix .elc,$(basename $(wildcard init/*.org)))
VENDOR_DIRS = $(wildcard vendor-lisp/*)
.PHONE: all snippets
all: $(SITE_LISPS) init.elc $(INIT_LISPS) $(AUTOLOADS_FILE) snippets
+init.el init/oni-org-init.el: init.org
+ $(call tangle,emacs-lisp)
+
%.el: %.org
$(call tangle,emacs-lisp)
diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org
index 0cb730d..d56e8a5 100644
--- a/emacs/.emacs.d/init.org
+++ b/emacs/.emacs.d/init.org
@@ -1163,13 +1163,6 @@ Computing Environment".
(with-eval-after-load 'gnus (load "oni-gnus-init"))
#+END_SRC
- - [[file:init/oni-org-init.org][Org]] :: Org is the craziest and most flexible organizational
- application anyone's ever seen.
-
- #+BEGIN_SRC emacs-lisp
- (with-eval-after-load 'org (load "oni-org-init"))
- #+END_SRC
-
- [[file:init/oni-eshell-init.org][Eshell]] :: The best shell on the planet.
#+BEGIN_SRC emacs-lisp
@@ -1351,6 +1344,54 @@ Computing Environment".
(add-hook 'jabber-chat-mode-hook 'oni:set-default-directory)
#+END_SRC
+** Org mode
+ :PROPERTIES:
+ :header-args: :tangle "init/oni-org-init.el"
+ :END:
+
+ Since Org mode is a big package and I end up customizing it /a lot/
+ I always keep its settings in a separate file since it might be
+ awhile before org-mode is loaded.
+
+ #+BEGIN_SRC emacs-lisp :tangle yes
+ (with-eval-after-load 'org (load "oni-org-init"))
+ #+END_SRC
+
+ To keep the byte-compiler from complaining, require any libraries
+ that are used by my configuration when this file is loaded.
+
+ #+BEGIN_SRC emacs-lisp
+ (require 'org)
+ (require 'org-bullets)
+ (require 'org-capture)
+ #+END_SRC
+
+ Fontify source code blocks in Org mode natively, meaning that they
+ should be fontified using the major mode specified in the source
+ block language.
+
+ #+BEGIN_SRC emacs-lisp
+ (setq org-src-fontify-natively t)
+ #+END_SRC
+
+ Follow the link at point when {{{key(RET)}}} is pressed.
+
+ #+BEGIN_SRC emacs-lisp
+ (setq org-return-follows-link t)
+ #+END_SRC
+
+ Automatically fill paragraphs while editing text.
+
+ #+BEGIN_SRC emacs-lisp
+ (add-hook 'org-mode-hook 'auto-fill-mode)
+ #+END_SRC
+
+ Show pretty bullets instead of the default asterisk characters.
+
+ #+BEGIN_SRC emacs-lisp
+ (add-hook 'org-mode-hook 'org-bullets-mode)
+ #+END_SRC
+
* Custom
Put the customize settings in a different file so that Emacs doesn't
diff --git a/emacs/.emacs.d/init/oni-org-init.org b/emacs/.emacs.d/init/oni-org-init.org
deleted file mode 100644
index c72601f..0000000
--- a/emacs/.emacs.d/init/oni-org-init.org
+++ /dev/null
@@ -1,65 +0,0 @@
-#+TITLE: Org mode configuration
-#+STARTUP: content
-
-#+BEGIN_SRC emacs-lisp
- (require 'org)
- (require 'org-capture)
-#+END_SRC
-
-Tell org-mode to fontify code blocks in their specified languages.
-
-#+BEGIN_SRC emacs-lisp
- (setq org-src-fontify-natively t)
-#+END_SRC
-
-Pressing RET on a link should really follow that link.
-
-#+BEGIN_SRC emacs-lisp
- (setq org-return-follows-link t)
-#+END_SRC
-
-Enable automatic text filling for org-mode.
-
-#+BEGIN_SRC emacs-lisp
- (add-hook 'org-mode-hook 'auto-fill-mode)
-#+END_SRC
-
-* Bullets
-
- Show pretty bullets instead of the default asterisk characters.
-
-** Load the contrib module
-
- Org bullets isn't loaded when Org mode is by default, so I should
- do that here.
-
- #+BEGIN_SRC emacs-lisp
- (require 'org-bullets)
- #+END_SRC
-
-** Enable bullets in Org mode
-
- Enable =org-bullets-mode= whenever =org-mode= starts.
-
- #+BEGIN_SRC emacs-lisp
- (add-hook 'org-mode-hook 'org-bullets-mode)
- #+END_SRC
-
-* Org protocol
-
- Load org-protocol to let external applications add information to
- org.
-
- #+BEGIN_SRC emacs-lisp
- (require 'org-protocol)
- #+END_SRC
-
- This template is used by Conkeror to capture a bookmark into my
- bookmarks file.
-
- #+BEGIN_SRC emacs-lisp
- (add-to-list 'org-capture-templates
- '("b" "Bookmark" entry (file "~/documents/org/bookmarks.org")
- "* %c\n\n %i"
- :empty-lines 1))
- #+END_SRC