From 2980cd31a05a7b2accc04ce431842a6bf27f6c6c Mon Sep 17 00:00:00 2001 From: Eric Abrahamsen Date: Sun, 21 Apr 2013 17:32:26 +0800 Subject: [PATCH] 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. --- lisp/org.el | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lisp/org.el b/lisp/org.el index 691f880..74d9d61 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -20106,6 +20106,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)) -- 1.8.2.1