all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Roodwriter@core.com" <Roodwriter@core.com>
Subject: Re: Hide text
Date: Sat, 21 Feb 2004 11:51:02 -0500	[thread overview]
Message-ID: <103f310pvjt515d@corp.supernews.com> (raw)
In-Reply-To: 55f725fe.0402210757.1f503c4e@posting.google.com

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	other threads:[~2004-02-21 16:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-21 15:57 Hide text Fredrik Andersson
2004-02-21 16:51 ` Roodwriter [this message]
2004-02-21 18:14 ` Benjamin Rutt
2004-02-22  2:47   ` Brad Collins

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=103f310pvjt515d@corp.supernews.com \
    --to=roodwriter@core.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.