summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2015-08-10 00:18:16 +0200
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2015-08-10 00:18:16 +0200
commit3b20eed34ab39a91bb3922574c750724427966c8 (patch)
tree9e23aefec125a0ec85ee30ba79a06a96929ed7f9
parentc9ac8f6956446ad196f4d1f2b8ac0f58993379aa (diff)
downloadorg-mode-3b20eed34ab39a91bb3922574c750724427966c8.tar.gz
Open timestamps also on CLOCK lines
* lisp/org.el (org-open-at-point): CLOCK are a valid location for timestamps. Reported-by: Christoph LANGE <math.semantic.web@gmail.com> <http://permalink.gmane.org/gmane.emacs.orgmode/99754>
-rwxr-xr-xlisp/org.el13
1 files changed, 10 insertions, 3 deletions
diff --git a/lisp/org.el b/lisp/org.el
index f2e1b99..685489e 100755
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -10676,9 +10676,9 @@ link in a property drawer line."
;; the closest one.
(org-element-lineage
(org-element-context)
- '(comment comment-block footnote-definition footnote-reference
- headline inlinetask keyword link node-property
- timestamp)
+ '(clock comment comment-block footnote-definition
+ footnote-reference headline inlinetask keyword link
+ node-property timestamp)
t))
(type (org-element-type context))
(value (org-element-property :value context)))
@@ -10710,6 +10710,13 @@ link in a property drawer line."
(org-open-at-point))
(require 'org-attach)
(org-attach-reveal 'if-exists))))
+ ;; On a clock line, make sure point is on the timestamp
+ ;; before opening it.
+ ((and (eq type 'clock)
+ value
+ (>= (point) (org-element-property :begin value))
+ (<= (point) (org-element-property :end value)))
+ (org-follow-timestamp-link))
;; Do nothing on white spaces after an object, unless point
;; is right after it.
((> (point)