help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Arbitrary folding in emacs


From: Nicolas Richard
Subject: Re: Arbitrary folding in emacs
Date: Fri, 28 Mar 2014 13:26:34 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Tim Visher <tim.visher@gmail.com> writes:
> I too would be interested in being able to hide away a region as vim
> is capable of, but I've never heard of a feature like that in Emacs.
> It might be a very useful extension to hs-minor-mode.

outline.el has outline-flag-region, but
(i) it doens't use an ellipsis and
(ii) it is not interactive.

you can test it by selecting some part of the buffer then
M-: (progn (outline-flag-region (region-beginning) (region-end) t) (sit-for 4) 
(outline-flag-region (region-beginning) (region-end) nil))

(sit-for is just there to see the effect before cancelling it with the
'nil' 3rd argument)

I think it doesn't exist because it requires to mark a portion of the
buffer, whereas emacs has capabilities to be smarter than that (via
hideshow or outline and some others yet), and emacs doesn't want to make
non-smart things too easy. At least that's my conclusion after some time
of using emacs and grumbling about the feature not being present :p

-- 
Nico.



reply via email to

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