From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.help Subject: RE: some vi equivalents please? Date: Thu, 6 Nov 2008 08:50:35 -0800 Message-ID: <006b01c9402f$ca8da1d0$c2b22382@us.oracle.com> References: <4912ee0b@news.greennet.net> <9b816dd4-7769-45cc-8edb-00a075e9049a@v13g2000pro.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1225990315 2668 80.91.229.12 (6 Nov 2008 16:51:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 6 Nov 2008 16:51:55 +0000 (UTC) To: "'rustom'" , Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Nov 06 17:52:58 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 1Ky86C-0005hz-KS for geh-help-gnu-emacs@m.gmane.org; Thu, 06 Nov 2008 17:52:48 +0100 Original-Received: from localhost ([127.0.0.1]:44685 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ky855-00049u-Dc for geh-help-gnu-emacs@m.gmane.org; Thu, 06 Nov 2008 11:51:39 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ky84H-0003xU-Rl for help-gnu-emacs@gnu.org; Thu, 06 Nov 2008 11:50:49 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ky84E-0003vM-Ct for help-gnu-emacs@gnu.org; Thu, 06 Nov 2008 11:50:49 -0500 Original-Received: from [199.232.76.173] (port=39030 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ky84E-0003vI-0x for help-gnu-emacs@gnu.org; Thu, 06 Nov 2008 11:50:46 -0500 Original-Received: from rcsinet12.oracle.com ([148.87.113.124]:17086 helo=rgminet12.oracle.com) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Ky84D-000717-Ge for help-gnu-emacs@gnu.org; Thu, 06 Nov 2008 11:50:45 -0500 Original-Received: from rgminet15.oracle.com (rcsinet15.oracle.com [148.87.113.117]) by rgminet12.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id mA6GoYjA021547 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 6 Nov 2008 16:50:35 GMT Original-Received: from acsmt705.oracle.com (acsmt705.oracle.com [141.146.40.83]) by rgminet15.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id mA6GobhY002995; Thu, 6 Nov 2008 16:50:40 GMT Original-Received: from dradamslap1 (/130.35.178.194) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 06 Nov 2008 16:50:33 +0000 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <9b816dd4-7769-45cc-8edb-00a075e9049a@v13g2000pro.googlegroups.com> Thread-Index: Ack/4v+WVkeUgYd4RwCVGI3jiJ9n/QASmR4g X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3350 X-Source-IP: acsmt705.oracle.com [141.146.40.83] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090208.4913205D.035D:SCFSTAT928724,ss=1,fgs=0 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 1) 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:59513 Archived-At: > Your macro is not equivalent to the vi :g//d unless it is > embedded into a loop. The loop could be programmatic or interactive > (keep doing Cx e) To loop with a keyboard macro: `C-x e e e e e e e e'... or `C-u 1000 C-x e' > (without the infrequently used flush-lines) Why "infrequently"? > I work in an environment where I am the old-timer using the strange > old clunky emacs. I have a hell of a time convincing my half-my-age > coworkers to use emacs. Confirming the clunkyness (because I dont > know a command) does not help my cause :-) Don't bother. ;-) Or convince by example. A friend asked his team to estimate how long it would take to transform tons of C++ code in a certain context. The estimates were all about 2-3 man-weeks. He looked through the existing Emacs Lisp source code, hacked something together, and did all of the code transformation in less than a day. YMMV, of course. But Emacs is not so clunky. ;-) > Funnily enough, this requirement came up in a large scale edit that > required adding a single line to 200 classes in 37 files. I did this > (for these coworkers) by writing 3 elisp functions that implemented an > iterator that sequentially went through the 200 classes. Producing > the file:lineNo list of those 200 cases was where the original request > (for deleting lines) came up. There you go. I should think that such demonstrations might eventually pique the interest of a few of your half-your-agers.