GNU bug report logs -
#64584
29.0.91; skeleton: cannot pass `str' as argument to some functions
Previous Next
Reported by: Visuwesh <visuweshm <at> gmail.com>
Date: Wed, 12 Jul 2023 17:07:01 UTC
Severity: normal
Found in version 29.0.91
Done: Visuwesh <visuweshm <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> I can do
>
> (define-skeleton test
> ""
> (read-file-name "p: ")
> (shell-quote-argument (eval str)))
Eww... please don't! This relies on an internal detail about how `str`
is implemented.
>>> AFAIU, using 'str should prevent the insertion of the value but that
>>> signals the same error.
>> Sorry, I don't know what you mean by that.
> I meant this part in skeleton-insert's docstring
>
> Quoted Lisp expressions are evaluated for their side-effects.
Ah, I see. Yes, using
'str
should basically have no effect.
>>> I tried (progn str (shell-quote-argument str))
>>> instead but the same error again.
>> Of course: any use `str` within an actual expression (as opposed to
>> using it as a skeleton element) will work reliably only if that occurs
>> after a use of `str` as a skeleton element.
> Thanks for your patience and help.
We should try and improve the docs to clarify this confusing situation.
If you have suggestions for how/where we could make changes that would
have effectively discouraged you from trying to use `str` in that way,
I'd be happy to hear them.
Stefan
This bug report was last modified 1 year and 344 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.