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

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

Re: Hide text


From: address@hidden
Subject: Re: Hide text
Date: Sat, 21 Feb 2004 11:51:02 -0500
User-agent: KNode/0.7.1

Fredrik Andersson wrote:

> I wonder if it is possible to hide part of text in Emacs?
> I would like to compress/expand the text inside a subroutine.
> 
> Before  compression:
> --------------------
> Function name(a,var z:boolean):Boolean;
> Var
>  x:Real;
>  z:Bollean;
> BEGIN
>  x:=4;
>  z:=True;
> END;
> 
> After compression:
> ------------------
> Function name(a,var z:boolean):Boolean;
> 
> 
> Thanks in advance
> Fredrik Andersson

If you're talking about just hiding text you can use the "narrow" function. 
You highlight a region, type C-x n n and everything not highlighted 
disappears. To bring everything back you "widen" it with C-x n w.

It can be handy to confine a macro or search to just a certain area. It 
might also be good if you worked in an office where people could look over 
your shoulder at privileged information.

I've found it's a little bit fragile. Sometimes it will widen all by itself 
so I always check the mode line when I'm about to do something radical.

--Rod

__________

Author of "Linux for Non-Geeks--Clear-eyed Answers for Practical Consumers" 
and "Boring Stories from Uncle Rod." Both are available at 
http://www.rodwriterpublishing.com/index.html

To reply by e-mail, take the extra "o" out of the name.



reply via email to

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