unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: David Kastrup <dak@gnu.org>
Subject: Re: Is buffer size fixed in batch mode?
Date: Wed, 07 Dec 2005 10:39:55 +0100	[thread overview]
Message-ID: <853bl5ckk4.fsf@lola.goethe.zz> (raw)
In-Reply-To: ur78pl4w9.fsf@rkspeed-rugby.dk

Brian Elmegaard <brian@rkspeed-rugby.dk> writes:

> bojohan+news@dd.chalmers.se (Johan Bockgård) writes:
>
>> It depends on the function. Maybe you could tell us in more details
>> what you are trying to do?
>
> I have auto-generated xml and I want to convert it to latex, so I do
> (goto-char 1) 
> and a lot of 
> (save-excursion
>   (while (search-forward "<foo>" nil t)
>     (replace-match "\\foo[bar]{baz}" nil t))
>   )
>
> (save-excursion
>   (while (re-search-forward "<foobar>\\(.*\\)</foobar>" nil t)
>     (replace-match "\\\\foobar{\\1}" nil nil))
>   )
>
> At the end I did several replaces of multiple spaces, end of line
> spaces, and so on.
>
> If I open the xml in a running emacs it works fine, but if I did it
> with a batch it part of the tex disappeared in the output. 
>
> The I decided to move the cleanup of multiple spaces and so on to the
> beginning of the code and it runs fine.
>
> Is this to be expected?

You likely did something wrong.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

  reply	other threads:[~2005-12-07  9:39 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-01 10:37 Is buffer size fixed in batch mode? Brian Elmegaard
2005-12-03  3:26 ` Ian Zimmerman
     [not found] ` <mailman.17722.1133580378.20277.help-gnu-emacs@gnu.org>
2005-12-03 10:28   ` Brian Elmegaard
2005-12-03 14:32     ` Johan Bockgård
2005-12-07  7:53       ` Brian Elmegaard
2005-12-07  9:39         ` David Kastrup [this message]
2005-12-07  9:44           ` Brian Elmegaard
2005-12-07 10:21             ` David Kastrup
2005-12-07 10:32               ` Brian Elmegaard

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=853bl5ckk4.fsf@lola.goethe.zz \
    --to=dak@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).