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
Message #11 received at 64584 <at> debbugs.gnu.org (full text, mbox):
[ Sorry about mangling the bug address, and thanks for fixing it, and
replying. ]
[திங்கள் செப்டம்பர் 11, 2023] Stefan Monnier wrote:
>> In a skeleton template, it is not possible to pass `str' as an argument
>> to some functions.
>
> It is, but only after it appeared "naked" in the skeleton.
>
> `skeleton-insert` says:
>
> str first time: read a string according to INTERACTOR
> then: insert previously read string once more
>
> which indeed doesn't explicitly tell you tht you're doing something
> wrong, but it does imply that `str` doesn't just hold a string, or at
> least not initially.
Thanks, that explains the confusing part of the docstring. However,
there's still a problem as...
>> (define-skeleton test-skeleton ""
>> (file-relative-name (read-file-name "P: "))
>> (shell-quote-argument str))
>
> It should work if you can change your skeleton to something like:
>
> (define-skeleton test-skeleton ""
> (file-relative-name (read-file-name "P: "))
> str
> (shell-quote-argument str))
>
> where that first use of `str` will convert it from something that "read
> a string according to INTERACTOR" to the actual string.
... this inserts the directory twice. :-(
AFAIU, using 'str should prevent the insertion of the value but that
signals the same error. I tried (progn str (shell-quote-argument str))
instead but the same error again.
>
> 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.