From 9f5e698679aecbed872a2030e4157e5e2b1d87e0 Mon Sep 17 00:00:00 2001 From: Bastien Guerry Date: Fri, 30 May 2014 19:28:04 +0200 Subject: [PATCH] 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. --- lisp/org-agenda.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index 0e88a700a..9a26d31d8 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)))))