Kaynağa Gözat

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.
Bastien Guerry 11 yıl önce
ebeveyn
işleme
9f5e698679
1 değiştirilmiş dosya ile 4 ekleme ve 1 silme
  1. 4 1
      lisp/org-agenda.el

+ 4 - 1
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)))))