docs(Emacs org): better auto tangling of my config files
This commit is contained in:
parent
4d25ef6b5b
commit
9c1fe06d26
@ -2,5 +2,4 @@
|
||||
;;; For more information see (info "(emacs) Directory Variables")
|
||||
|
||||
((org-mode . ((org-list-allow-alphabetical . nil)
|
||||
(org-confirm-babel-evaluate . nil)
|
||||
(eval . (add-hook 'after-save-hook #'org-babel-tangle)))))
|
||||
(org-confirm-babel-evaluate . nil))))
|
||||
|
@ -1245,6 +1245,18 @@ which is really nice! However, most of my configuration will be stolen
|
||||
(org-present-mode-quit . my/org-present-quit)))
|
||||
#+end_src
|
||||
|
||||
** Tangle config org files on save
|
||||
Something really, really useful is tangling all my configuration files
|
||||
on save. For this, a dedicated function will do the trick.
|
||||
#+begin_src emacs-lisp
|
||||
(defun my/tangle-config-file ()
|
||||
(when (and (eq major-mode 'org-mode)
|
||||
(f-ancestor-of-p (f-full "~/.nosync/org/config") default-directory))
|
||||
(org-babel-tangle)))
|
||||
|
||||
(add-hook 'after-save-hook #'my/tangle-config-file)
|
||||
#+end_src
|
||||
|
||||
** Visual Configuration
|
||||
While most modes of Emacs are dedicated to development, and therefore
|
||||
are much more comfortable with a fixed-pitch font, more literary modes
|
||||
|
Loading…
Reference in New Issue
Block a user