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.
This commit is contained in:
Bastien Guerry 2014-05-30 19:28:04 +02:00
parent 0ce93879d7
commit 9f5e698679
1 changed files with 4 additions and 1 deletions

View File

@ -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)))))