From a77a4549a1750690ac64ede9be1a801b6c21a4ac Mon Sep 17 00:00:00 2001 From: Jeremy Dormitzer Date: Tue, 4 Feb 2020 11:21:56 -0500 Subject: [PATCH] Add function to put ids on every heading in an Org file --- emacs/init.org | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/emacs/init.org b/emacs/init.org index 2afad2e..722ee66 100755 --- a/emacs/init.org +++ b/emacs/init.org @@ -1390,6 +1390,17 @@ Always open directory links in Emacs instead of Finder: (add-to-list 'org-file-apps '(directory . emacs))) #+END_SRC +A function to add ids to every heading in an Org file: +#+BEGIN_SRC emacs-lisp + (defun org-get-create-ids-all () + (interactive) + (save-excursion + (goto-char (point-max)) + (while (outline-previous-heading) + (org-id-get-create)))) +#+END_SRC + + ** Agenda files #+BEGIN_SRC emacs-lisp (defun agenda-files (&optional file)