From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?ISO-8859-1?Q?Andreas_R=F6hler?= Newsgroups: gmane.emacs.help Subject: Re: Couple of automation questions Date: Wed, 27 Jul 2011 19:28:26 +0200 Message-ID: <4E304ABA.7040003@easy-emacs.de> References: <87tya8yyhc.fsf@mithlond.arda> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1311787720 2587 80.91.229.12 (27 Jul 2011 17:28:40 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 27 Jul 2011 17:28:40 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jul 27 19:28:37 2011 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Qm7uO-0006w1-Rv for geh-help-gnu-emacs@m.gmane.org; Wed, 27 Jul 2011 19:28:36 +0200 Original-Received: from localhost ([::1]:45138 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qm7uO-0000Zq-AG for geh-help-gnu-emacs@m.gmane.org; Wed, 27 Jul 2011 13:28:36 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:54553) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qm7uJ-0000Za-M9 for help-gnu-emacs@gnu.org; Wed, 27 Jul 2011 13:28:32 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qm7uI-0005Dq-HK for help-gnu-emacs@gnu.org; Wed, 27 Jul 2011 13:28:31 -0400 Original-Received: from moutng.kundenserver.de ([212.227.17.8]:53756) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qm7uI-0005DX-4z for help-gnu-emacs@gnu.org; Wed, 27 Jul 2011 13:28:30 -0400 Original-Received: from [192.168.178.27] (brln-4dbc767f.pool.mediaWays.net [77.188.118.127]) by mrelayeu.kundenserver.de (node=mreu1) with ESMTP (Nemesis) id 0MflIG-1R0NWy07DI-00N6Im; Wed, 27 Jul 2011 19:28:28 +0200 User-Agent: Mozilla/5.0 (X11; U; Linux i686; de; rv:1.9.2.18) Gecko/20110616 SUSE/3.1.11 Thunderbird/3.1.11 In-Reply-To: X-Provags-ID: V02:K0:28vlT62BTh+3i4eu9Bx7rxsOZEnS218LAHHAXB3xrgm PzpSzc/uyjhO7AJZnDAJpM04fGrFzYFwRm79qnc3yAkBKd4E6M 3YXWazwOGF4JvOk0blIMYh5jMLTxpTDilGR8DEVxUjKwGny9Mp 5n4zN2kac5SgFSdsVL/DKacokUWQxRezUa+K68R0rU72usQo/A +cQA301WI8TNBbzepZhZI1JhgYhua6RBqIffjYOMyY= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 212.227.17.8 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 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 Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:81812 Archived-At: Am 27.07.2011 18:52, schrieb fork: > C K Kashyap gmail.com> writes: > >> Thanks Teemu ... I am aware of elisp. What I am looking for are general tips > on how one goes about actually writing them in real time ( while editing some > text) ... for example, if I do a kill and want to yank 10 times, What I'd do is > M-:(dotimes (i 10) (yank)) >> >> but is that the recommended way or would writing the script in the main buffer > and executing it with C-x-e better ... or is there an even better way? > > What I do is to improvise a macro by C-x-( etc. Then you can "M-x > name-last-kbd-macro" to give it an identifier "M-x insert-kbd-macro" put the > macro in your .emacs file for later. > > sed + awk + tr + shell scripting might be a better fit for automatically > beautifying log files though > > > yes maybe, if the tasks repeat and are basically simple. Than you could use some python or perl too. no, if it's seldom or tricky. sed, awk etc. don't have such a thing like edebug for example. Andreas