From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Roodwriter@core.com" Newsgroups: gmane.emacs.help Subject: Re: Hide text Date: Sat, 21 Feb 2004 11:51:02 -0500 Organization: Posted via Supernews, http://www.supernews.com Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <103f310pvjt515d@corp.supernews.com> References: <55f725fe.0402210757.1f503c4e@posting.google.com> Reply-To: Roodwriter@core.com NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: sea.gmane.org 1077382932 23854 80.91.224.253 (21 Feb 2004 17:02:12 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 21 Feb 2004 17:02:12 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Feb 21 18:02:07 2004 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AuaVy-000435-00 for ; Sat, 21 Feb 2004 18:02:06 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1AuaVL-0000iu-QP for geh-help-gnu-emacs@m.gmane.org; Sat, 21 Feb 2004 12:01:27 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!cyclone.bc.net!sjc70.webusenet.com!news.usenetserver.com!sn-xit-02!sn-xit-01!sn-post-01!supernews.com!corp.supernews.com!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: KNode/0.7.1 Original-X-Complaints-To: abuse@supernews.com Original-Lines: 45 Original-Xref: shelby.stanford.edu gnu.emacs.help:121099 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:17049 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:17049 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.