Re: New package `outline-occur'
Juri Linkov <[email protected]>
| Newsgroups | gmane.emacs.devel |
|---|---|
| Organization | LINKOV.NET |
| Message-ID | <[email protected]> |
>> If you find it useful, and given that it only depends on built-in >> functionalities (Outline and Occur), would it make sense to add it to >> core? Otherwise, what about GNU ELPA? > > I think this is a strong candidate for the core, since the actual code > (excluding documentation) is about 10 lines of code. I've CC'ed Juri > for a second opinion, but I think you can already draft up a patch > against emacs.git. Indeed, it's completely suitable for core since it's just one command 'outline-occur'. But we need to make minor changes before installing it in outline.el. Since 'outline-mode' and 'outline-minor-mode' use dedicated keymaps, we need to bind a new key (the suggested key 'M-o' is the most intuitive) under the existing prefix keys 'outline-mode-prefix-map' and 'outline-minor-mode-prefix'. Also instead of 'outline-occur-regexp-override-alist', the proper way is to add a new buffer-local variable (e.g. 'outline-occur-regexp' nil by default) that can be set in the mode hooks. Also overriding 'occur-hook' with 'pop-to-buffer' is not the right way to customize the buffer display behavior. Either the command can override with 'display-buffer-overriding-action', or we can leave the customization to users with 'display-buffer-alist'.