[Top][All Lists]

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

Re: [reveal-mode] Hiding short expressions

From: Stefan
Subject: Re: [reveal-mode] Hiding short expressions
Date: 03 Jul 2004 13:01:43 -0400
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

>> The behavior you seem to want is actually simpler than the current
>> behavior (in other words, I first implemented the behavior you want and
>> then added code to keep the overlays open even after the cursor moves out
>> of the overlay), and it should be easy to change the code such that you can
>> choose between different behaviors.

> One could add a variable which lets you choose what behavior is used.
> But if you wanted to use outline-minor-mode and hiding of footnotes at
> the same time in a latex-mode or LaTeX-mode buffer, it would probably
> be better to choose the behavior depending on a special attribute of
> the overlays.  This could be done e.g. by adding a 'reveal-close
> attribute to the 'category property of the overlay:

Indeed, I think it should be decided on an overlay basis rather than for the
whole buffer.  But I don't like forcing an indirection through `category',
so I'd just do (overlay-get ol 'reveal-close) which also obeys the
`category' prop if present.  Also I expect that a heuristic such as "is
there a linefeed within the overlay" would provide a pretty good
starting point without needing any extra tag on the overlays.

The rationale for it is that the behavior that "keeps overlay opened when
point is on same line" is mostly useful to allow the user to use C-p and
C-n without spuriously closing the overlay because the C-p jumps to just
a bit before the beginning.  At least that was my experience when working
on it.


reply via email to

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