[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Orgmode] [PATCH] Fix org-refile-cache-check-set
From: |
Matt Lundin |
Subject: |
[Orgmode] [PATCH] Fix org-refile-cache-check-set |
Date: |
Fri, 21 May 2010 23:53:26 -0400 |
Org-refile-cache fails when org-refile-use-outline-path is set to file.
Specifically, org-refile-cache-check-set throws a markerp error when it
encounters file targets, since they have nil instead a marker object.
This patch applies the test only to targets with markers (i.e.,
headings).
---
lisp/org.el | 15 +++++++++------
1 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/lisp/org.el b/lisp/org.el
index 496eceb..38e6a30 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -9537,13 +9537,16 @@ on the system \"/address@hidden:\"."
(defun org-refile-cache-check-set (set)
"Check if all the markers in the cache still have live buffers."
+ (let (marker)
(catch 'exit
- (while set
- (if (not (marker-buffer (nth 3 (pop set))))
- (progn
- (message "not found") (sit-for 3)
- (throw 'exit nil))))
- t))
+ (while (setq marker (nth 3 (pop set)))
+ ;; if org-refile-use-outline-path is 'file, marker may be nil
+ (when marker
+ (if (not (marker-buffer marker))
+ (progn
+ (message "not found") (sit-for 3)
+ (throw 'exit nil)))))
+ t)))
(defun org-refile-cache-put (set &rest identifiers)
"Push the refile targets SET into the cache, under IDENTIFIERS."
--
1.7.1
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Orgmode] [PATCH] Fix org-refile-cache-check-set,
Matt Lundin <=