groff
[Top][All Lists]
Advanced

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

Re: [Groff] Escaping in Groff


From: Tadziu Hoffmann
Subject: Re: [Groff] Escaping in Groff
Date: Sat, 1 Sep 2012 19:39:33 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

[snip]
> I assume this comes from the fact that the macro expands the
> argument twice - i.e., passes it on to yet another macro.

Yes, probably.  (See the attached experiment.)

> It's not only weird that sometimes arguments have to be quoted
> once, sometimes twice and even more often - it also results in
> the problem that macro does not work transparently and
> changing the implementation might require to re-implement
> calls of it.

The plausible explanation is that the macro is simply buggy:
if it is clear that arguments with spaces are to be expected,
and the macro passes its arguments on to another macro, it
should have quoted them.

> I find it strange that one requires knowledge about the "inner
> workings" of a specific macro in order to know how to quote
> arguments to it.

If you're trying to work around a buggy macro then I see no
other way than being familiar with its inner workings to be
able to find a successful workaround.

> Is what I said in [1] true and there is in fact no consistent
> method and rather, quotes cannot be escaped like one would do
> in C?

If the macro were properly written, then as a user you would
simply quote the argument, and everything works as expected.
You shouldn't need to escape quotes as you escape backslashes
to delay their interpretation.


Attachment: argquote.ro
Description: Text document


reply via email to

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