[Top][All Lists]

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

bug#7101: Please reveal-mode, don't hide my overlays!

From: Lennart Borgman
Subject: bug#7101: Please reveal-mode, don't hide my overlays!
Date: Thu, 7 Oct 2010 12:33:13 +0200

On Thu, Oct 7, 2010 at 12:23 PM, Stefan Monnier
<address@hidden> wrote:
>> Am I the only one that gets crazy when reveal hides the overlays
>> again? At least I mostly find it very frustrating when moving around
>> in a buffer that uses org-mode.
> I love this feature, since it lets me open&close things without ever
> having to remember a keybinding: I hide everything in the major mode
> hook and then use reveal-mode to hide&show.
>> I can see it is useful sometimes though I do not know how to best
>> separate those times when it is useful and when it is not. So I will
>> not try that.
>> Instead in the attached patch I made the automatic hiding optional and
>> add a new command for hiding
> Maybe I could live with that, and I think it's going in the right
> direction (e.g. the reveal-close-revealed functionality sounds good),
> but I don't think having it as a defcustom is right: it's something
> you'll likely want to change dynamically at run time.

Maybe it should be buffer local most of the time and take default
value from a defcustom?

I wonder whether searching should be made a special case here? I
prefer to see my hits when searching (at least around point), but if
it is the wrong place then I might want to close the revealed overlay
immediately. How about something like that?

> One thing I've considered is to add a "keep-pos/region-shown" command that
> would mark the current buffer position (or region) as something that
> should stay revealed, so it won't be auto-closed when you move elsewhere.
> Of course, it would want to come with something like
> reveal-close-revealed to later re-hide them.

It is similar to my idea above. I think my idea above could be
implemented with something like that.

> Another thing I'd be interested to see is a hook that major/minor modes
> can use to have some control over showing/hiding.  The main such use for
> me would be to let smerge-mode teach reveal-mode that if one conflict
> marker is revealed, all the corresponding markers should also be
> revealed (or maybe just: if part of a conflict is revealed, always
> reveal the whole conflict).

Could also be implemented with the above ideas.

reply via email to

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