[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Need 'UncommentAndSetValue' or some such

From: Brendan Strejcek
Subject: Re: Need 'UncommentAndSetValue' or some such
Date: Fri, 28 Oct 2005 12:21:45 -0500
User-agent: Mutt/1.5.6+20040818i

Luke Kanies wrote:

> On Thu, 27 Oct 2005, Brendan Strejcek wrote:
> >     editfiles:
> >         { /etc/texmf/dvips/
> >             DeleteLinesMatching "address@hidden %%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.


Senior System Administrator
The University of Chicago
Department of Computer Science

reply via email to

[Prev in Thread] Current Thread [Next in Thread]