From a5a1d90a3763fa43a06c88c80e1b659f317a5b21 Mon Sep 17 00:00:00 2001 From: fpi Date: Fri, 12 Jun 2020 15:04:17 +0200 Subject: Make relevant src blocks linkable from readme --- emacs-init.org | 2 ++ 1 file changed, 2 insertions(+) (limited to 'emacs-init.org') diff --git a/emacs-init.org b/emacs-init.org index 645d315..2f5e448 100644 --- a/emacs-init.org +++ b/emacs-init.org @@ -36,6 +36,7 @@ disable ~buffer-auto-save-file-name~ for the files. I use =.org= configuration files also for my other dotfiles. To ensure they are tangled upon save I use this function. +#+NAME: tangle-hook #+BEGIN_SRC emacs-lisp (defun fpi/tangle-dotfiles () "If the current file is in '~/.dotfiles' tangle all code blocks." @@ -52,6 +53,7 @@ saved again. The latter part is not directly supported by =org=. ~org-babel-post-tangle-hook~ is executed in the created tangled files and not inside the source =.org= file. Instead I add an advice to ~org-babel-tangle~. +#+NAME: org-crypt-tangle-setup #+BEGIN_SRC emacs-lisp (defun save-without-hook () (let ((before-save-hook nil)) -- cgit v1.2.3