Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!psuvax1!gondor.psu.edu!flee From: flee@gondor.psu.edu (Felix Lee) Newsgroups: comp.editors Subject: ALL in Xedit (Re: XEDIT capabilities in full-screen editors) Message-ID: <3089@psuvax1.psu.edu> Date: Sun, 15-Nov-87 05:49:06 EST Article-I.D.: psuvax1.3089 Posted: Sun Nov 15 05:49:06 1987 Date-Received: Mon, 16-Nov-87 03:49:00 EST References: <3389@uw-june.UUCP> <1057@ucsfcca.ucsf.edu> Sender: netnews@psuvax1.psu.edu Reply-To: flee@gondor.psu.edu (Felix Lee) Organization: The Roadside Picnic Lines: 30 In article <1443@ttidca.TTI.COM> lear@ttidca.UUCP (Russell Lear) writes: > I'm not sure just what the ALL command in XEDIT does, but GNU emacs > (version 18.47.10) does include the commands delete-matching-lines and > delete-non-matching-lines that ... well, that delete matching and > non-matching lines according to a regular expression. GNU Emacs's "narrow-to-region" is closer in spirit. The idea is to restrict editing to a subset of the file. ALL restricts your editing to a set of lines that match Xedit's idea of a regular expression. If you say "ALL /column/ | /row/", all lines that don't have "column" or "row" will be hidden. Hidden lines are represented by a single "shadow line" that says how many lines are hidden. There's another simple command that lets you expose the first or last n lines in a shadow line. You can also turn off shadow lines. I just realized that I often use "egrep 'column' *.h *.c" and repeat-search when what I'd really like is an editor with ALL. ALL gives you the information density of egrep and surrounding context on demand. ALL lets you hide irrelevant parts of the file and focus on the problem at hand. ALL is actually a trivial use of a more general Xedit feature that could support outline processing. Someone should write a set of easy-to-use macros to let you do outline processing in Xedit. I also had another trivial macro that would hide any lines you haven't changed during that editing session--useful for remembering what you were doing after wandering off for half an hour. -- Felix Lee flee@gondor.psu.edu {cbosgd,cmcl2}!psuvax1!gondor!flee