Explorar el Código

lisp/org.el (org-ctrl-c-ctrl-c): Set tags for headlines whose text is a link

* lisp/org.el (org-ctrl-c-ctrl-c): 'C-c C-c' on a link is usually a
  no-op. If that link is in a headline, act as if the 'C-c C-c' was
  called on the headline, not the link.
Eric Abrahamsen hace 12 años
padre
commit
e45701beff
Se han modificado 1 ficheros con 6 adiciones y 0 borrados
  1. 6 0
      lisp/org.el

+ 6 - 0
lisp/org.el

@@ -20171,6 +20171,12 @@ This command does many different things, depending on context:
 	    (when (and (eq (org-element-type parent) 'item)
 		       (= (point-at-bol) (org-element-property :begin parent)))
 	      (setq context parent type 'item))))
+	;; When heading text is a link, treat the heading, not the link,
+	;; as the current element
+	(when (eq type 'link)
+	  (let ((parent (org-element-property :parent context)))
+	    (when (and (eq (org-element-type parent) 'headline))
+	      (setq context parent type 'headline))))
 	;; Act according to type of element or object at point.
 	(case type
 	  (clock (org-clock-update-time-maybe))