🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.emacs
Article #8196

Re: GNU Emacs special form "interactive"

#8196
From: Dan Pierson
Date: Fri, 30 Dec 1988 19:12
26 lines
1448 bytes
In article <8812301512.AA10827@decwrl.dec.com>, ellis@ultra (David Ellis) writes:
>	(interactive (format "s(This is a %s prompt string) : " foo-arg))
>
>Unfortunately, GNU Emacs rewards this effort with the error message
>
>	Wrong type argument: listp, "s(This is a Type A prompt string) : "
>
>saying that "interactive" expects a list (huh?) but has been given a string.

From ^H-f interactive:

   "The argument of  interactive  is usually a string ...
     ...
    If the argument is not a string, it is evaluated to get a list of
     arguments to pass to the function."

You might try:

    (interactive (list (read-string (format "This is a %s prompt string: "
                                             foo-arg))))
-- 
                                            dan

In real life: Dan Pierson, Encore Computer Corporation, Research
UUCP: {talcott,linus,necis,decvax}!encore!pierson
Internet: pierson@multimax.encore.com
Technical Details
Message-ID: <4535@xenna.Encore.COM>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!bloom-beacon!bu-cs!encore!pierson@mist
References: <8812301512.AA10827@decwrl.dec.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!bloom-beacon!bu-cs!encore!pierson@mist
From: pierson@mist (Dan Pierson)
Newsgroups: comp.emacs
Subject: Re: GNU Emacs special form "interactive"
Message-ID: <4535@xenna.Encore.COM>
Date: 30 Dec 88 19:12:46 GMT
References: <8812301512.AA10827@decwrl.dec.com>
Sender: news@Encore.COM
Reply-To: pierson@mist (Dan Pierson)
Organization: Encore Computer Corp
Lines: 26
In-reply-to: ellis@ultra.dec.com (David Ellis)