<textdump mode="append">

Mark Ellis mark.uzumati at virgin.net
Wed Nov 21 10:37:04 PST 2001

On 2001.11.21 12:24 Nicolas Nieswandt wrote:
> Ups, sorry, the previous message sliped through my fingers.
> Sent: Wednesday, November 21, 2001 9:31 AM
> >> Or, we could add something like <textdump offset="<line_number>"> and
> then
> >> insert <content> there, but that would be waaaay too dependent of the
> >file,
> >> and therefore not very nice solution.
> >
> >Why not just use diff? Many of you already know its syntax, it doesn't
> need
> >no "search and replace" logic at all and it could just be feed with
> inputs
> >from the XML file. (i.e. everything between the <diff
> >target=myfile.txt>...here comes my diff changes... </diff>
> >
> >Hope I made that clear, but it's just an idea that jumped to my head
> when
> >reading the above.
> Good idea, but I don't know what will happen to different versions. I
> mean,
> can diff handle config files that changes content depending on
> installation
> type? The content you need may vary if you install KDE or GNOME or
> w or w/o X or even KDE befor GNOME or GNOME befor KDE.
> So I think, improving <search_replace> would be the best solution by now.
> nico

This may be possible using regexp's in search_replace, but you'd need to 
switch off matching line by line, and match by the number of newlines 
before the position the text would be inserted, or maybe on the text on 
the previous line followed by a newline. Not fun, but maybe worth a try.

Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe alfs-discuss' in the subject header of the message

More information about the alfs-discuss mailing list