mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-09-29 19:37:52 +00:00
Speed improvement for `org-goto'
* lisp/org.el (org-goto-local-search-headings): Do not rely on `org-context' just to check if point is on a headline but not on its tags. Reported-by: Gregor Zattler <telegraph@gmx.net> <w> <http://permalink.gmane.org/gmane.emacs.orgmode/99111>
This commit is contained in:
parent
216a53d6cc
commit
985420eceb
|
@ -7535,9 +7535,12 @@ or nil."
|
|||
(while (if isearch-forward
|
||||
(search-forward string bound noerror)
|
||||
(search-backward string bound noerror))
|
||||
(when (let ((context (mapcar 'car (save-match-data (org-context)))))
|
||||
(and (member :headline context)
|
||||
(not (member :tags context))))
|
||||
(when (save-match-data
|
||||
(and (save-excursion
|
||||
(beginning-of-line)
|
||||
(looking-at org-complex-heading-regexp))
|
||||
(or (not (match-beginning 5))
|
||||
(< (point) (match-beginning 5)))))
|
||||
(throw 'return (point))))))
|
||||
|
||||
(defun org-goto-local-auto-isearch ()
|
||||
|
|
Loading…
Reference in a new issue