unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Le Wang <l26wang@gmail.com>
To: Daniel Sousa <daniel@sousa.me>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Help with emacs scripting
Date: Wed, 11 Apr 2012 19:31:22 +0800	[thread overview]
Message-ID: <CAM=K+irbUJgZHgBEpqHKy8_fyYZhmwxH456tjmbGVmm+GQ7BRQ@mail.gmail.com> (raw)
In-Reply-To: <CAKhc=u7y0ajNLnHWkQu7SbW+-dtRe6zOJ6nYMcF5gCoXV_OsLQ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 998 bytes --]

On Mon, Apr 9, 2012 at 5:37 PM, Daniel Sousa <daniel@sousa.me> wrote:

> I'm new to emacs and I have not used it much, but I think that it could
> really 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
> them by something like <xsl:value-of select="/xml/lang/foo" /> and add to a
> .php something like DEFINE("_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?
>

Your question is vague.  What does the buffer look like?  Where does "foo"
come from?  Is it derived from the string you're searching for?  Where does
"bar" come from?

It's best to start coding this and come back with specific questions when
you get stuck.  "Do my homework" type of questions aren't likely to get you
a full solution.


Best regards,
> Daniel Sousa
>


-- 
Le

[-- Attachment #2: Type: text/html, Size: 1575 bytes --]

  parent reply	other threads:[~2012-04-11 11:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-09  9:37 Help with emacs scripting Daniel Sousa
2012-04-10 16:06 ` Doug Lewan
2012-04-11  0:22   ` Daniel Sousa
2012-04-11 11:31 ` Le Wang [this message]
     [not found] <F326B9A37B353A449FC7A09B36835F82F4EDAA@MACE.sppdg.ad>
2012-04-12 16:10 ` Daniel Sousa
2012-04-12 16:36   ` Andreas Röhler
2012-04-13 13:56   ` Doug Lewan
2012-04-16  0:10     ` Daniel Sousa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAM=K+irbUJgZHgBEpqHKy8_fyYZhmwxH456tjmbGVmm+GQ7BRQ@mail.gmail.com' \
    --to=l26wang@gmail.com \
    --cc=daniel@sousa.me \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).