From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Doug Lewan Newsgroups: gmane.emacs.help Subject: RE: Help with emacs scripting Date: Tue, 10 Apr 2012 16:06:07 +0000 Message-ID: <495248DFDEA08C469BBDED2D4AA6C61442552C@DAKIYA1.pegasus.local> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1334073844 24977 80.91.229.3 (10 Apr 2012 16:04:04 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 10 Apr 2012 16:04:04 +0000 (UTC) To: Daniel Sousa , "help-gnu-emacs@gnu.org" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Apr 10 18:04:03 2012 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SHdY0-0005Zq-Pt for geh-help-gnu-emacs@m.gmane.org; Tue, 10 Apr 2012 18:04:00 +0200 Original-Received: from localhost ([::1]:32876 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SHdXz-00034f-Sl for geh-help-gnu-emacs@m.gmane.org; Tue, 10 Apr 2012 12:03:59 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:33881) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SHdXq-00031K-04 for help-gnu-emacs@gnu.org; Tue, 10 Apr 2012 12:03:55 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SHdXj-00063R-Pe for help-gnu-emacs@gnu.org; Tue, 10 Apr 2012 12:03:49 -0400 Original-Received: from webmail.shubertorg.com ([207.246.209.200]:46483) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SHdXj-00062x-MJ for help-gnu-emacs@gnu.org; Tue, 10 Apr 2012 12:03:43 -0400 Original-Received: from dakiya1.pegasus.local ([::1]) by DAKIYA1.pegasus.local ([::1]) with mapi id 14.01.0339.001; Tue, 10 Apr 2012 12:06:09 -0400 Thread-Topic: Help with emacs scripting Thread-Index: AQHNFmvzWdv5QZFaYUKaLPZ+RWmxZZaUN/Aw In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.0.21.202] X-detected-operating-system: by eggs.gnu.org: Windows XP/2000 (RFC1323+, w+, tstamp-) X-Received-From: 207.246.209.200 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:84411 Archived-At: Daniel, This is probably not hard, but more information would be useful. . Are the .xsl and .php files similarly named? "bob.xsl" and "bob.php"? . Do you already have a regular expression to find the strings? Maybe you h= ave a "good" sample of strings to look for. . Does the location of the DEFINE() in the PHP file matter? Could it be rep= lacing something else? (Or interfering with something else?) ,Doug From: Daniel Sousa Sent: Monday, 2012 April 09 05:38 To: help-gnu-emacs@gnu.org Subject: Help with emacs scripting I'm new to emacs and I have not used it much, but I think that it could rea= lly help me on the task I'm currently doing. I need to change a web app to make it translatable. Now I have to change a = bunch of .xsl files. What I need to do is find the strings, then replace th= em by something like=A0 and add to= a .php something like=A0DEFINE("_LANG_FOO","bar"); I think it would be really easy to create an emacs script to automatically = do this, but I don't know how to do it. Can anyone help me? Best regards, Daniel Sousa