Luke Kanies wrote:
> On Thu, 27 Oct 2005, Brendan Strejcek wrote:
>
> > editfiles:
> > { /etc/texmf/dvips/config.ps
> > DeleteLinesMatching "[EMAIL PROTECTED] %%PaperSize: Letter$"
> > DeleteLinesMatching "^@ letterSize 8.5in 11in$"
> > # Since we are using prepend, the second one is listed first
> > PrependIfNoSuchLine "@+ %%PaperSize: Letter"
> > PrependIfNoSuchLine "@ letterSize 8.5in 11in"
> > }
>
> Even in your snippet, which is relatively straightforward code, it
> is by no means obvious what the heck you are doing. I don't know
> PostScript, so I have to assume that '^' is the comment character in
> PostScript, and I also have to assume that when you say that A4 is
> the default, you mean that it's the program's default, not that it's
> specified in the configuration by default (since you don't perform any
> operations involving this format).
Is that Postscript? :-) Actually, the ^ is just part of the regular
expression. In this case, the configuration change arrises from the
"Letter" lines being earlier in the file than the "a4" lines (so I am
relying on the prepend).
> The intent of this operation -- "use letter" -- would fail if someone
> had explicitly specified any value at all, and anyone coming behind
> you would have to rely entirely on comments to discern what the heck
> you are doing.
Actually, it will still work because those two lines will always show up
at the beginning of the file.
Best,
Brendan
--
Senior System Administrator
The University of Chicago
Department of Computer Science
http://www.cs.uchicago.edu/people/brendan
_______________________________________________
Help-cfengine mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-cfengine