Explorar o código

org-capture.el (org-capture-fill-template): Fix bug

* org-capture.el (org-capture-fill-template): Deactivate
region while trying to align tags on the current headline.

Thanks to Alex Kosorukoff for reporting this.
Bastien Guerry %!s(int64=11) %!d(string=hai) anos
pai
achega
3104f7de7b
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      lisp/org-capture.el

+ 3 - 1
lisp/org-capture.el

@@ -1674,7 +1674,9 @@ The template may still contain \"%?\" for cursor positioning."
 		(or (equal (char-before) ?:) (insert ":"))
 		(insert ins)
 		(or (equal (char-after) ?:) (insert ":"))
-		(and (org-at-heading-p) (org-set-tags nil 'align)))))
+		(and (org-at-heading-p)
+		     (let ((org-ignore-region t))
+		       (org-set-tags nil 'align))))))
 	   ((equal char "C")
 	    (cond ((= (length clipboards) 1) (insert (car clipboards)))
 		  ((> (length clipboards) 1)