(org-add-hook 'isearch-mode-end-hook 'org-isearch-end 'append 'local)
;; Emacs 22 deals with this through a special variable
(org-set-local 'outline-isearch-open-invisible-function
- (lambda (&rest ignore) (org-show-context 'isearch))))
+ (lambda (&rest ignore) (org-show-context 'isearch)))
+ (org-add-hook 'isearch-mode-end-hook 'org-fix-ellipsis-at-bol 'append 'local))
;; Setup the pcomplete hooks
(set (make-local-variable 'pcomplete-command-completion-function)
(put 'org-mode 'flyspell-mode-predicate 'org-mode-flyspell-verify)
+(defsubst org-fix-ellipsis-at-bol ()
+ (save-excursion (goto-char (window-start)) (recenter 0)))
(defun org-find-invisible-foreground ()
(let ((candidates (remove
(not (bobp)))
(org-flag-heading nil)
(when siblings-p (org-show-siblings)))))
- (save-excursion (goto-char (window-start)) (recenter 0))))
+ (org-fix-ellipsis-at-bol)))
(defvar org-reveal-start-hook nil
"Hook run before revealing a location.")
isearch-mode-end-hook-quit)
;; Only when the isearch was not quitted.
(org-add-hook 'post-command-hook 'org-isearch-post-command
- 'append 'local)))))
+ 'append 'local)))
+ (org-fix-ellipsis-at-bol)))
(defun org-isearch-post-command ()
"Remove self from hook, and show context."