Browse Source

Fixed bug with remember to non-org files

Carsten Dominik 15 years ago
parent
commit
bfa5ec12d3
2 changed files with 5 additions and 1 deletions
  1. 4 0
      lisp/ChangeLog
  2. 1 1
      lisp/org-remember.el

+ 4 - 0
lisp/ChangeLog

@@ -1,5 +1,9 @@
 2009-11-02  Carsten Dominik  <carsten.dominik@gmail.com>
 
+	* org-remember.el (org-remember-handler): Set
+	text-before-node-creation even if this already looks like a node,
+	because the string might be needed on non-org-mode target files.
+
 	* org-agenda.el (org-agenda-open-link): Make this work in agenda
 	clocktables.
 	(org-agenda-switch-to): Follow a link at point if

+ 1 - 1
lisp/org-remember.el

@@ -887,9 +887,9 @@ See also the variable `org-reverse-note-order'."
       	    ;; remove empty lines at end
       	    (replace-match "")))
       (goto-char (point-min))
+      (setq text-before-node-creation (buffer-string))
       (unless (looking-at org-outline-regexp)
 	;; add a headline
-	(setq text-before-node-creation (buffer-string))
 	(insert (concat "* " (current-time-string)
 			" (" (remember-buffer-desc) ")\n"))
 	(backward-char 1)