all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: <tomas@tuxteam.de>
To: help-gnu-emacs@gnu.org
Subject: Re: Passing a list to an interactive function
Date: Fri, 18 Dec 2020 12:50:41 +0100	[thread overview]
Message-ID: <20201218115041.GB27014@tuxteam.de> (raw)
In-Reply-To: <trinity-60635d1f-9aa5-4897-9a55-840ad52a6be0-1608291497535@3c-app-mailcom-bs11>

[-- Attachment #1: Type: text/plain, Size: 1036 bytes --]

On Fri, Dec 18, 2020 at 12:38:17PM +0100, pietru@caramail.com wrote:
> 
> 
> > Sent: Friday, December 18, 2020 at 12:30 PM
> > From: "Jean Louis" <bugs@gnu.support>
> > To: pietru@caramail.com
> > Cc: "Help Gnu Emacs" <help-gnu-emacs@gnu.org>
> > Subject: Re: Passing a list to an interactive function
> >
> > * pietru@caramail.com <pietru@caramail.com> [2020-12-18 14:19]:
> > > I would like to pass a list to an interactive function.  How can I do that?
> >
> > (funcall-interactively #'YOUR-FUNCTION '("List" 2))
> 
> I mean, how do I define an interactive function that takes a list as argument?

I'd guess that 'x' is the most appropriate template char. Extracted from
`interactive's docstring:

  x -- Lisp expression read but not evaluated.

Or you don't provide a string description to `interactive'. Then you
have full control over the user input (for example, if you have a
more concrete idea about how your list's members should look like:
you didn't say anything about that part :-)

Cheers
 - t

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

  parent reply	other threads:[~2020-12-18 11:50 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-18 11:05 Passing a list to an interactive function pietru
2020-12-18 11:30 ` Jean Louis
2020-12-18 11:38   ` pietru
2020-12-18 11:49     ` Joost Kremers
2020-12-18 11:50     ` tomas [this message]
2020-12-18 11:56     ` Jean Louis
2020-12-19  2:05     ` pietru
2020-12-19  3:25       ` Jean Louis
2020-12-19  3:34         ` pietru
2020-12-19  3:49           ` Jean Louis
2020-12-19  4:29             ` pietru
2020-12-19  5:54               ` Jean Louis
2020-12-19 11:03                 ` pietru
2020-12-19  6:23               ` Michael Heerdegen
2020-12-19  6:26                 ` pietru

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201218115041.GB27014@tuxteam.de \
    --to=tomas@tuxteam.de \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.