emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re[2]: ill-advised changes [was key bindings in hideshow.el]


From: Eric M. Ludlam
Subject: Re[2]: ill-advised changes [was key bindings in hideshow.el]
Date: Mon, 12 Feb 2001 10:33:53 -0500

>>> Per Abrahamsen <address@hidden> seems to think that:
>Richard Stallman <address@hidden> writes:
>
>> You may be getting at a good idea here.  But I think that "folding
>> modes" may be too narrow a category.  Can you find a somewhat more
>> general description which still distinguishes them from the other
>> alternatives?
>
>Overview modes?  It would keep the 'O' mnemonic.
>
>If we assume people only use one overview mode at a time, we could use
>'M-o' as prefix all of them.  The current prefix for
>outline-minor-mode 'C-c @' is very hard to type, at least on a Danish
>keyboard. (@ is AltGr-2).
  [ ... ]

I like that idea.  Perhaps outline-mode, and outline-minor-mode could
become a base behind folding modes the way comint is a base behind
various interactive shells.  That would help things remain consistent.
outline-mode already provides a spiff interface for mode-authors for
building foldable interfaces.  If hideshow has additional requirements
(beyond the regex already provided) perhaps Thi could offer
suggestions on what might be required from outline mode to do
that. Maybe allowing a function in addition to the regexp for finding
folding boundaries would be good enough?

If things work out, perhaps outline-minor-mode would be "always on"
the way `set-selective-display' or `vc' is always on.  Specialized
folding modes would then change the folding behavior for the situation
needed.

If outline-mode is too restrictive, then a more general
`overview-mode' may need to be designed with the correct scope.  Here
are some examples of `overviews' I found.  Not all are directly
related to folding.  I tried to apply a very broad mask.

Name             Category
-------          --------
allout           outline
apropos          summary
arc-mode         summary: archives
bookmark         summary: filesystem
buff-menu        summary: buffers
custom           summary: configuration
dired            summary: filesystem
elide            folding: hide headers
facemenu         summary: faces
finder           summary: emacs lisp
foldout          outline/folding  (this also uses `bad' keybindings)
forms            summary: DB type summary
gnus             summary: News
imenu            tags
rmailsum         summary: mail
midnight         summary: file-system
ebrowse          summary: c++ tags
etags            tags
hideshow         folding: code blocks
hideif           folding: #ifdefs
speedbar         summary: filesystem & tags
tar-mode         folding?
texinfo          summary: document structure

Things not in Emacs21 that come to mind:

oobr             tags/summary
semantic         tags
folding          folding
edb              summary: database

Interestingly, tags, summaries, and folding could be considered
interdependent.  For example, which-mode uses imenu tags to figure out
what the current function is.  A folding mode could just as easily
use imenu tags for something similar.  A fully folded buffer is like
an rmail or tar-mode summary.

For a very broad overview mode, perhaps the following features could
be provided via a common interface:

1) tagging w/ menu & speedbar (like imenu)
2) folding (like outline-mode)
3) linked summary buffer (like rmail/gnus/occur)

Imagine browsing a C or Elisp file with an rmail like summary updating
in the distance... Neat.  Folding from the summary.  Tag jumping via
imenu.  Finding a definition may look like this:
  M-o h  ; jump to summary
  C-n    ; next some number of lines
  RET    ; jump to that definition

Would an indirect buffer which is fully folded do the right thing?

Since I am working on a super-tagger program (semantic) which is
already assigned to the FSF but not yet in Emacs, I would be
interested in using and possibly developing such a library.
Unfortunately, Semantic is too restrictive to include things like
hideif, or showhide so someone else might want to involved. ;)

Lastly, I can imagine using hideif, and showhide at the same time,
though I have actually used neither myself.  Perhaps a shared library
needs this additional feature:

4) arbitration between different folding tools

though I don't know what that means yet.

Other thoughts?

Sorry if I rambled off again.
Eric

-- 
          Eric Ludlam:                 address@hidden, address@hidden
   Home: www.ultranet.com/~zappo            Siege: www.siege-engine.com
Emacs: http://cedet.sourceforge.net               GNU: www.gnu.org



reply via email to

[Prev in Thread] Current Thread [Next in Thread]