bug-gnu-emacs
[Top][All Lists]
Advanced

[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: Stefan Monnier
Subject: bug#64584: 29.0.91; skeleton: cannot pass `str' as argument to some functions
Date: Mon, 11 Sep 2023 09:52:00 -0400
User-agent: Gnus/5.13 (Gnus v5.13)

> 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.

>     (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.


        Stefan






reply via email to

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