From 00179c97b7ad0efefe13e06eb32a7d77a9cc2bc7 Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Thu, 10 Dec 2009 12:19:41 +0100 Subject: [PATCH] Only write id locations if any are defined This is to avoid an empty file when no id's have been used at all. --- lisp/ChangeLog | 3 +++ lisp/org-id.el | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a52f108a..ce900bd2 100755 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2009-12-10 Carsten Dominik + * org-id.el (org-id-locations-save): Only write the id locations + if any are defined. + * org-archive.el (org-archive-all-done): Make this work in a file with org-odd-levels-only set. diff --git a/lisp/org-id.el b/lisp/org-id.el index 3f04d3f3..b057faad 100644 --- a/lisp/org-id.el +++ b/lisp/org-id.el @@ -466,7 +466,7 @@ When CHECK is given, prepare detailed information about duplicate IDs." (defun org-id-locations-save () "Save `org-id-locations' in `org-id-locations-file'." - (when org-id-track-globally + (when (and org-id-track-globally org-id-locations) (let ((out (if (hash-table-p org-id-locations) (org-id-hash-to-alist org-id-locations) org-id-locations))) -- 2.11.4.GIT