[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Sheflug] vi, emacs, sharp sticks
>>>>> "Chris" == Chris J/#6 <sixie [at] nccnet.co.uk> writes:
Chris> you can't beat just going <ESC>:%!sort to filter the file
In Emacs you have the choice between M-! sort (save 2 or 3 keystrokes
;-) and M-x sortlines, depending on whether the file is already loaded
into a buffer or not. What I like in Emacs though is the ability to
run such commands on a region.
I actually mostly use external commands like this:
C-SPC C-x C-x ; create a trivial region
C-u M-| ; filter region through pipe and replace it with output
cd /coda/Projects/XEmacs/21.2-HEAD && cvs diff -U 0 src/ChangeLog
&& cvs diff src/emacs.c RET
and mail it off to the patch list. But you can do things like
C-x h C-u M-| xpm2pnm|pnm2png ; select all, replace region from pipe
C-x C-w out.png RET
This is more useful when the transformation is applied to _part_ of
the buffer; saving the file and running the command externally doesn't
work then, except for some specially designed programs like patch that
ignore extraneous text.
The main advantage to Emacs is that it's mostly modeless (as somebody
pointed out, vi users terminate text with RET ESC, not just RET), and
even inside command entry you use the same commands recursively. It's
possible to run Gnus recursively in a command buffer! But .... ;-)
For the information of Emacs fans who may not have seen these things
yet; vi users won't be impressed. :-)
--
University of Tsukuba Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
Institute of Policy and Planning Sciences Tel/fax: +81 (298) 53-5091
_________________ _________________ _________________ _________________
What are those straight lines for? "XEmacs rules."
---------------------------------------------------------------------
Sheffield Linux User's Group - http://www.sheflug.co.uk
To unsubscribe from this list send mail to
- <sheflug-request [at] vuw.ac.nz> - with the word
"unsubscribe" in the body of the message.
GNU the choice of a complete generation.