vile
[Top][All Lists]
Advanced

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

Re: [vile] Disappearing quotes in macro parameters


From: Thomas Dickey
Subject: Re: [vile] Disappearing quotes in macro parameters
Date: Thu, 14 Aug 2008 18:24:45 -0400 (EDT)

On Thu, 14 Aug 2008, J?~Anis R??cis wrote:

On Thu, Aug 14, 2008 at 07:23:12AM -0400, Thomas Dickey wrote:
"Anything" that would prompt from a string will do that either directly
from the keyboard, or by calling a function that takes the next token
from a buffer containing possibly more than one token.  For consistency,
that token's quotes are removed, and the commands which read (via
kbd_reply, etc), do not expect quotes.

In your example, the quotes are removed to deliver the parameters to the
low-level commands (which do not expect quotes).  vile stores data in
[History] with quotes (as needed...), and reconstructs/dequotes values
that it retrieves from [History] as part of a prompt.  The
expression-evaluation can read quoted strings, but also assumes that its
output will be acceptable to the commands, which do not expect quotes.

With all of that, there're occasional inconsistencies (bugs).  I don't
_see_ any obvious ones in your example.

Thanks for the explanation.  To be honest, I'm not quite sure if
you're saying that you're aware of the limitation and there's just
nothing surprising in my observations, or that you think it isn't a
problem worth solving or not a problem at all.  Obviously it matters

no - I was explaining the constraints (why vile removes quotes),
and directing my attention to whether vile is doing it inconsistently.

Looking at it (now that I have more time), I can see some mishandling,
e.g.,

    write-first-param "\"one two three\""
    one two three

I'd expect to see something like

    "one two three"

...so I'll investigate that and see what the cause is.

to me that strings contain the exact values I've assigned to them.
Vile shouldn't care about and more importantly should never modify
these values without me knowing about it.  At the moment, is there
anything I can do to get values with leading/trailing quotes working
as expected?

Not at the moment - I see that double-quotes inside single-quotes are
lost (which is a bug).

--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net

reply via email to

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