Browse Source

Fix id creation bug when remember is called from agenda

* lisp/org.el (org-store-link): Don't call org-store-link
interactively when called through remember from the agenda

Samuel Wales writes:

> For months, I found ID properties where they didn't belong.
> Finally I found that they are added when I do M-x
> org-remember in an agenda buffer, to the headline under
> point.  Feels like a bug.  [...]
Carsten Dominik 15 years ago
parent
commit
a9a5e6b848
1 changed files with 3 additions and 1 deletions
  1. 3 1
      lisp/org.el

+ 3 - 1
lisp/org.el

@@ -7973,7 +7973,9 @@ For file links, arg negates `org-context-in-file-links'."
 		   (get-text-property (point) 'org-marker))))
 	(when m
 	  (org-with-point-at m
-	    (call-interactively 'org-store-link)))))
+	    (if (interactive-p)
+		(call-interactively 'org-store-link)
+	      (org-store-link nil))))))
 
      ((eq major-mode 'calendar-mode)
       (let ((cd (calendar-cursor-to-date)))