From: Stefan Huchler <stefan.huchler@mail.de>
To: help-gnu-emacs@gnu.org
Subject: Re: how to set button action
Date: Tue, 18 Oct 2016 07:45:49 +0200 [thread overview]
Message-ID: <87shrucir6.fsf@jupiter.lan> (raw)
In-Reply-To: 87oa2kpfxv.fsf@gmail.com
Alex Kost <alezost@gmail.com> writes:
> The foollowing works for me:
>
> (setq tabulated-list-entries
> '((nil [("test" action (lambda (btn) (print "action")))])))
>
>> (tabulated-list-init-header)
>> (tabulated-list-print)
>> )
yes that helped me, a small followup question, if I dont use lamba and
instead a function, can I define a parameter to that function?
It uses a marker object anyway, or can I access the id inside that
function? I have a list and need to know which element got selected.
Or do I have to make a global (line . obj) list?
next prev parent reply other threads:[~2016-10-18 5:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-16 2:36 how to set button action Stefan Huchler
2016-10-16 13:43 ` Alex Kost
2016-10-18 5:45 ` Stefan Huchler [this message]
2016-10-19 10:03 ` Michael Heerdegen
2016-10-20 2:57 ` Stefan Huchler
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87shrucir6.fsf@jupiter.lan \
--to=stefan.huchler@mail.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).