summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <n.goaziou@gmail.com>2013-10-03 13:44:20 +0200
committerNicolas Goaziou <n.goaziou@gmail.com>2013-10-03 13:44:20 +0200
commit2020009cc93dd1320775fe57c29d2c831b056a3e (patch)
treeef554ef1f93570d0f4d876da65a5e009382442bc
parent6f5180bd9fc230a31913cbdb9a4dd48cc247adc2 (diff)
parent79ee98d755094814f999f686d942eb0ff4478952 (diff)
downloadorg-mode-2020009cc93dd1320775fe57c29d2c831b056a3e.tar.gz
Merge branch 'maint'
-rw-r--r--lisp/org.el10
1 files changed, 4 insertions, 6 deletions
diff --git a/lisp/org.el b/lisp/org.el
index 8c87ff3..5ff9969 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -20221,6 +20221,10 @@ This command does many different things, depending on context:
(if (save-excursion (beginning-of-line) (looking-at "[ \t]*$"))
(or (run-hook-with-args-until-success 'org-ctrl-c-ctrl-c-final-hook)
(user-error "C-c C-c can do nothing useful at this location"))
+ ;; When at a link, act according to the parent instead.
+ (when (eq type 'link)
+ (setq context (org-element-property :parent context))
+ (setq type (org-element-type context)))
;; For convenience: at the first line of a paragraph on the
;; same line as an item, apply function on that item instead.
(when (eq type 'paragraph)
@@ -20228,12 +20232,6 @@ 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))