[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#64584: 29.0.91; skeleton: cannot pass `str' as argument to some func
From: |
Visuwesh |
Subject: |
bug#64584: 29.0.91; skeleton: cannot pass `str' as argument to some functions |
Date: |
Mon, 11 Sep 2023 20:50:43 +0530 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
[ 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
- bug#64584: 29.0.91; skeleton: cannot pass `str' as argument to some functions, Stefan Monnier, 2023/09/11
- bug#64584: 29.0.91; skeleton: cannot pass `str' as argument to some functions,
Visuwesh <=
- bug#64584: 29.0.91; skeleton: cannot pass `str' as argument to some functions, Stefan Monnier, 2023/09/11
- bug#64584: 29.0.91; skeleton: cannot pass `str' as argument to some functions, Visuwesh, 2023/09/11
- bug#64584: 29.0.91; skeleton: cannot pass `str' as argument to some functions, Stefan Monnier, 2023/09/11
- bug#64584: 29.0.91; skeleton: cannot pass `str' as argument to some functions, Visuwesh, 2023/09/12
- bug#64584: 29.0.91; skeleton: cannot pass `str' as argument to some functions, Stefan Monnier, 2023/09/12
- bug#64584: 29.0.91; skeleton: cannot pass `str' as argument to some functions, Visuwesh, 2023/09/12