]> git.donarmstrong.com Git - lib.git/commitdiff
add command to replace ids
authorDon Armstrong <don@donarmstrong.com>
Wed, 31 Jan 2018 00:51:45 +0000 (16:51 -0800)
committerDon Armstrong <don@donarmstrong.com>
Wed, 31 Jan 2018 00:51:45 +0000 (16:51 -0800)
emacs_el/configuration/don-configuration.org

index 57eb668ea00411faa9549fa399005599593b5808..8ff96f79db1be3dc1836d1edfafbd6eb8367d0ec 100644 (file)
@@ -1433,6 +1433,11 @@ From http://julien.danjou.info/projects/emacs-packages#rainbow-mode, this colori
   do not already have one."
     (interactive)
     (org-map-entries 'org-id-get-create))
+  (defun dla/org-update-ids-to-headlines-in-file ()
+    "Add or replace ID properties to all headlines in the current file 
+  (or narrowed region)."
+    (interactive)
+    (org-map-entries '(lambda () (org-id-get-create t))))
   ; if we wanted to do this to every buffer, do the following:
   ; (add-hook 'org-mode-hook
   ;           (lambda ()