Browse Source

Tweak drawer visibility after isearch

* lisp/org-macs.el (org-flag-region): Control visibility state after
an isearch.
* lisp/org.el (org-mode): Remove an unused variable.
Nicolas Goaziou 4 years ago
parent
commit
a3f01e183f
2 changed files with 3 additions and 5 deletions
  1. 3 1
      lisp/org-macs.el
  2. 0 4
      lisp/org.el

+ 3 - 1
lisp/org-macs.el

@@ -715,7 +715,9 @@ SPEC is the invisibility spec, as a symbol."
     (let ((o (make-overlay from to nil 'front-advance)))
       (overlay-put o 'evaporate t)
       (overlay-put o 'invisible spec)
-      (overlay-put o 'isearch-open-invisible #'delete-overlay))))
+      (overlay-put o
+		   'isearch-open-invisible
+		   (lambda (&rest _) (org-show-context 'isearch))))))
 
 
 

+ 0 - 4
lisp/org.el

@@ -4864,10 +4864,6 @@ The following commands are available:
       (regexp . "^[ \t]*#\\+[A-Z_]+:\\(\\s-*\\)\\S-+")
       (modes . '(org-mode)))))
 
-  ;; Make isearch reveal context
-  (setq-local outline-isearch-open-invisible-function
-	      (lambda (&rest _) (org-show-context 'isearch)))
-
   ;; Setup the pcomplete hooks
   (setq-local pcomplete-command-completion-function #'org-pcomplete-initial)
   (setq-local pcomplete-command-name-function #'org-command-at-point)