summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Guerry <bzg@altern.org>2014-05-30 19:28:04 +0200
committerBastien Guerry <bzg@altern.org>2014-05-30 19:28:04 +0200
commit9f5e698679aecbed872a2030e4157e5e2b1d87e0 (patch)
tree00b01aa02d3cef79d569ae6008fb91fdda9ffc57
parent0ce93879d7c3e4d2875d1ff96c454fdd6377b692 (diff)
downloadorg-mode-9f5e698679aecbed872a2030e4157e5e2b1d87e0.tar.gz
org-agenda.el (org-agenda-goto): Go to the beginning of the true heading of the entry at point
* org-agenda.el (org-agenda-goto): Go to the beginning of the true heading of the entry at point. Update docstring.
-rw-r--r--lisp/org-agenda.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 0e88a70..9a26d31 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -8352,7 +8352,7 @@ When called with a prefix argument, include all archive files as well."
(message "No tags associated with this line"))))
(defun org-agenda-goto (&optional highlight)
- "Go to the Org-mode file which contains the item at point."
+ "Go to the entry at point in the corresponding Org-mode file."
(interactive)
(let* ((marker (or (org-get-at-bol 'org-marker)
(org-agenda-error)))
@@ -8370,6 +8370,9 @@ When called with a prefix argument, include all archive files as well."
(when (outline-invisible-p)
(show-entry)) ; display invisible text
(recenter (/ (window-height) 2))
+ (org-back-to-heading t)
+ (if (re-search-forward org-complex-heading-regexp nil t)
+ (goto-char (match-beginning 4)))
(run-hooks 'org-agenda-after-show-hook)
(and highlight (org-highlight (point-at-bol) (point-at-eol)))))