Share

DocBook XML Mode for GNU Emacs

Tracker: Patches

5 update version-control variables in "revision" element - ID: 1172696
Last Update: Attachment added ( ashawley )

This function automatically updates the following XML
in a Docbook file:

<revhistory>
<revision>
<revnumber>$Revision: 1.6 $</revnumber>
<date>$Date: 2005/03/28 17:20:31 $</date>
<authorinitials>$Author: ashawley $</authorinitials>
<revremark>
$Log: file.xml,v $
Revision 1.6 2005/03/28 17:20:31 ashawley
Spell checked document.
</revremark>
</revision>
</revhistory>

and removes the version-control (CVS/RCS) variables and
inserts a new empty "revision" element with the
version-control variables without any substituted values.

<revhistory>
<revision>
<revnumber>$Revision$</revnumber>
<date>$Date$</date>
<authorinitials>$Author$</authorinitials>
<revremark>
$Log$
</revremark>
</revision>
<revision>
<revnumber>1.6</revnumber>
<date>2005/03/28 17:20:31</date>
<authorinitials>ashawley</authorinitials>
<revremark>
Revision 1.6 2005/03/28 17:20:31 ashawley
Spell checked document.

</revremark>
</revision>
</revhistory>

The above is roughlty equivalent to the following shell
scripting:

sed -e 's/\$[A-Za-z]*: \(.*\)\$/\1/' -e '/\$Log/ d' -e
'/<revhistory>/ r revision.xml' manual.xml.in > manual.xml

The commands are available in Emacs at:

M-x my-docbook-xml-update-revision-element
and
M-x my-docbook-xml-insert-empty-revision-element

enjoy.


Aaron S. Hawley ( ashawley ) - 2005-03-29 18:29

5

Open

None

Nobody/Anonymous

None

None

Public


Comments




Log in to comment.

No follow-up comments have been posted.

Attached File ( 1 )

Filename Description Download
docbook-xml-mode.el_revision-hack.diff diff -c patch of emacs lisp code Download

Change ( 1 )

Field Old Value Date By
File Added 127636: docbook-xml-mode.el_revision-hack.diff 2005-03-29 18:29 ashawley