summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Guerry <bzg@altern.org>2010-05-19 11:37:08 +0200
committerBastien Guerry <bzg@altern.org>2010-05-19 11:37:08 +0200
commit0515ae29c01fa299a53cabab12b54b7464e3b0c8 (patch)
treecbbe8143083086d9b34bc3b927c30edb9dcc249f
parent245b300a2eb7c43a68079081d54bd6cf82421691 (diff)
downloadorg-mode-0515ae29c01fa299a53cabab12b54b7464e3b0c8.tar.gz
Fix `org-refile-cache-get' error.
This patch fixes the problem first reported by Tassilo Horn in [mid:87y6fhxc47.fsf@thinkpad.tsdh.de]. Problem was that `org-refile-cache-get' returned an invalid refile target table after the refile cache was cleared.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/org.el2
2 files changed, 6 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 7cc28e4..01672a0 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2010-05-19 David Maus <dmaus@ictsoc.de>
+
+ * org.el (org-refile-cache-get): Return empty list of targets
+ when cache was cleared.
+
2010-05-17 Carsten Dominik <carsten.dominik@gmail.com>
* org.el (org-refile-use-cache): New option.
diff --git a/lisp/org.el b/lisp/org.el
index d002dab..4ede91f 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -9526,7 +9526,7 @@ on the system \"/user@host:\"."
"Retrieve the cached value for refile targets given by IDENTIFIERS."
(cond
((not org-refile-cache) nil)
- ((not org-refile-use-cache) (org-refile-cache-clear))
+ ((not org-refile-use-cache) (org-refile-cache-clear) nil)
(t
(let ((set (cdr (assoc (sha1 (prin1-to-string identifiers))
org-refile-cache))))