From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Giorgos Keramidas Newsgroups: gmane.emacs.help Subject: Re: some vi equivalents please? Date: Mon, 03 Nov 2008 18:24:16 +0200 Organization: SunSITE.dk - Supporting Open source Message-ID: <87r65sn5fz.fsf@kobe.laptop> References: <987e361b-2efc-421b-8b36-4dcc67f1971e@z6g2000pre.googlegroups.com> <2f5cb1cc-c6ae-4f69-9589-d91ee639b042@i18g2000prf.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1225730863 11918 80.91.229.12 (3 Nov 2008 16:47:43 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 3 Nov 2008 16:47:43 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Nov 03 17:48:44 2008 connect(): Connection refused Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Kx2ba-0001XB-Ap for geh-help-gnu-emacs@m.gmane.org; Mon, 03 Nov 2008 17:48:42 +0100 Original-Received: from localhost ([127.0.0.1]:58136 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kx2aT-0000ft-DB for geh-help-gnu-emacs@m.gmane.org; Mon, 03 Nov 2008 11:47:33 -0500 Original-Path: news.stanford.edu!headwall.stanford.edu!news.glorb.com!news2!dotsrc.org!filter.dotsrc.org!news.dotsrc.org!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (berkeley-unix) Cancel-Lock: sha1:nTZQ6E5EdycOrBwfdzsa0Rpxv+o= Original-Lines: 34 Original-NNTP-Posting-Host: 79.103.11.174 Original-X-Trace: news.sunsite.dk DXC=iEg1GKfKC=iHNh; Hl28o0iYSB=nbEKnkkCA74; ^LPKQcL^Mjgb9LMWQ7e=5i7Z=ILIBDhNfReNYa8@e`9a Original-X-Complaints-To: staff@sunsite.dk Original-Xref: news.stanford.edu gnu.emacs.help:164053 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:59395 Archived-At: On Sun, 2 Nov 2008 23:19:00 -0800 (PST), rustom wrote: > On Nov 2, 9:12 pm, "Drew Adams" wrote: > But there is one thing which is more appropriate here (I think) When I > put n!!sort to sort the next n lines I was putting that merely as an > example of a 2-way pipe. ie a command that takes its input from a > bunch of vi lines and whose output goes in as a replacement. > > Of course its good to know about sort-lines but that is hardly > general. One could want sort|uniq or sort|uniq|pr with all kinds of > unixy command-line args peppered in -- a unix-shell programmer never > ceases to find new pipelines that he never had imagined before. A more general way would be to `mark a region' and then filter the region through a shell command with `M-! command' or `C-u M-! command'. I have modified `ViEmacsTable' on the wiki, to include info about these two, and a pointer to `ExecuteExternalCommand'. > Also Xah mentioned that flush-lines is obsolete compared to > delete-matching-lines. Since I'm hearing of both for the first time > I'll leave it to others to decide which is the recommended name. > Frankly flush makes me think of fflush in C (or something less > mentionable) IMO, Xah is right that `delete-matching-lines' is a more mnemonic name. The equivalence table seems to be: delete-matching-lines => flush-lines delete-non-matching-lines => keep-lines We don't have a `keep-matching-lines' too, but it would probably make sense to add it as an alias of `keep-lines' :)