Browse Source

Remove properties from `initial' text in remember.

This is to make sure that no bad properties end up in the remember buffer.

Report by Richard Riley.
Carsten Dominik 17 năm trước cách đây
mục cha
commit
d5b9c3e04f
2 tập tin đã thay đổi với 8 bổ sung0 xóa
  1. 5 0
      lisp/ChangeLog
  2. 3 0
      lisp/org-remember.el

+ 5 - 0
lisp/ChangeLog

@@ -1,3 +1,8 @@
+2008-09-29  Carsten Dominik  <dominik@science.uva.nl>
+
+	* org-remember.el (org-remember-apply-template): Remove properties
+	from `initial'.
+
 2008-09-27  Carsten Dominik  <dominik@science.uva.nl>
 
 	* org-wl.el (org-wl-open): Remove useless call to

+ 3 - 0
lisp/org-remember.el

@@ -312,6 +312,9 @@ RET at beg-of-buf -> Append to file as level 2 headline
   "Initialize *remember* buffer with template, invoke `org-mode'.
 This function should be placed into `remember-mode-hook' and in fact requires
 to be run from that hook to function properly."
+  (when (and (boundp 'initial) (stringp initial))
+    (setq initial (org-no-properties initial))
+    (remove-text-properties 0 (length initial) '(read-only t) initial))
   (if org-remember-templates
       (let* ((entry (org-select-remember-template use-char))
 	     (ct (or org-overriding-default-time (org-current-time)))