Hello, I want to implement a particular feature in org-mode that depends upon some functionality being added to outline-mode. (org-mode is derived from outline-mode.) The feature concerns display of ancestor and sibling headings when an isearch has come to successful completion in a hidden part of the file. The function whose job it is to decide what to display when an isearch has completed is called `outline-isearch-open-invisible'. Currently, it simply calls `(show-entry)'. The following patch changes that function, and adds a new variable, to allow derived modes or motivated users to implement alternate behavior. The default behavior remains the same, but can more easily be reprogrammed by a derived mode.
Please comment, criticize, or enlighten. Thank you, John Foerch
Index: lisp/outline.el =================================================================== RCS file: /cvsroot/emacs/emacs/lisp/outline.el,v retrieving revision 1.24 diff -r1.24 outline.el 745a746,757 > (defvar outline-isearch-open-invisible-fun > 'outline-isearch-open-invisible-show-entry > "Function that will be called when a successful isearch > finishes in an invisible overylay. The overlay will be passed > to the function as its sole argument.") > > ;; Default function for outline-isearch-open-invisible-fun. Makes only the > ;; single entry containing point visible. > (defun outline-isearch-open-invisible-show-entry (overlay) > ;; We rely on the fact that isearch places point on the matched text. > (show-entry)) > 751c763,764 < (show-entry)) --- > (if outline-isearch-open-invisible-fun > (funcall outline-isearch-open-invisible-fun overlay)))
_______________________________________________ Emacs-orgmode mailing list Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode