summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2015-03-15 12:08:24 +0100
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2015-03-15 15:49:05 +0100
commit8cdb2eef0f9f98f9e00a5e689decfe341fe0c6ec (patch)
tree3f2d5529568bacf6bacb9fbe05c1e6b159ec517d
parent269b68090052fbc92c7a8bff96cbabd1bd736fb4 (diff)
downloadorg-mode-8cdb2eef0f9f98f9e00a5e689decfe341fe0c6ec.tar.gz
Fix `org-find-entry-with-id'
* lisp/org.el (org-find-entry-with-id): Ignore false positive ID properties when looking for a specific ID.
-rwxr-xr-xlisp/org.el15
1 files changed, 3 insertions, 12 deletions
diff --git a/lisp/org.el b/lisp/org.el
index dcfea74..cc3e93a 100755
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -16430,19 +16430,10 @@ Return the position where this entry starts, or nil if there is no such entry."
(interactive "sID: ")
(let ((id (cond
((stringp ident) ident)
- ((symbol-name ident) (symbol-name ident))
+ ((symbolp ident) (symbol-name ident))
((numberp ident) (number-to-string ident))
- (t (error "IDENT %s must be a string, symbol or number" ident))))
- (case-fold-search nil))
- (save-excursion
- (save-restriction
- (widen)
- (goto-char (point-min))
- (when (re-search-forward
- (concat "^[ \t]*:ID:[ \t]+" (regexp-quote id) "[ \t]*$")
- nil t)
- (org-back-to-heading t)
- (point))))))
+ (t (error "IDENT %s must be a string, symbol or number" ident)))))
+ (org-with-wide-buffer (org-find-property "ID" id))))
;;;; Timestamps