From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Michael Heerdegen Newsgroups: gmane.emacs.help Subject: Re: how to set button action Date: Wed, 19 Oct 2016 12:03:03 +0200 Message-ID: <877f94d5bc.fsf@web.de> References: <87r37hkojz.fsf@jupiter.lan> <87oa2kpfxv.fsf@gmail.com> <87shrucir6.fsf@jupiter.lan> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1476872312 6741 195.159.176.226 (19 Oct 2016 10:18:32 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 19 Oct 2016 10:18:32 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) Cc: help-gnu-emacs@gnu.org To: Stefan Huchler Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Oct 19 12:18:28 2016 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bwnwv-0008HO-2W for geh-help-gnu-emacs@m.gmane.org; Wed, 19 Oct 2016 12:18:17 +0200 Original-Received: from localhost ([::1]:46766 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bwnwx-0004ju-6b for geh-help-gnu-emacs@m.gmane.org; Wed, 19 Oct 2016 06:18:19 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58662) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bwniM-00014u-2m for help-gnu-emacs@gnu.org; Wed, 19 Oct 2016 06:03:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bwniH-0002yc-5F for help-gnu-emacs@gnu.org; Wed, 19 Oct 2016 06:03:14 -0400 Original-Received: from mout.web.de ([212.227.17.12]:56349) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1bwniG-0002wv-SC for help-gnu-emacs@gnu.org; Wed, 19 Oct 2016 06:03:09 -0400 Original-Received: from drachen.dragon ([90.186.0.174]) by smtp.web.de (mrweb103) with ESMTPSA (Nemesis) id 0MEVhF-1cBzCS2dyb-00FmPr; Wed, 19 Oct 2016 12:03:06 +0200 In-Reply-To: <87shrucir6.fsf@jupiter.lan> (Stefan Huchler's message of "Tue, 18 Oct 2016 07:45:49 +0200") X-Provags-ID: V03:K0:ef2R8FTjrZYB4UjckMaLQjYsg8aQDOsFjeIFm/a6LhbYoBPR+dO /AH2GVk++dFU/CfHPuzGYkCZNZve1xIa9Tpwi8N7nJU7qcy0zXhRxRPpIa2tY8SQHNLHPdD RiP29Dmx2DZ0kwgQHzrTRz/NhDZUgpQ9Ihdyy71rHuGMEjLnrspuxfpWgHhAQG0ltrc52jG 3tLiYGrNlXm8xrl7Ckxzg== X-UI-Out-Filterresults: notjunk:1;V01:K0:dw2vCIStv+A=:SrvCpKt2QCd7ko4Fp1Z3Xl 9aYN8SZimwV/0MK+5YrDqP3yDtjC/4T0WZLw93V/W6MjLSbD21yNB39okUJ/6/aSxweq0NXUn Yq1sHTfo+ZN9Z0cBdckoO4eopo6rQB25Oeu0EJe6NaYINaLekUqy3DWfFitwDVh+m7s+8qVwx 3eo3GP3wyBb/RUBPKMH19LA5Ejk6WirWPhVylyPbZJs9iEvqkDLtFOXiYUKVRP4HKU0WwmXxW P6JmqNWndzmdFMZGYyDK2f8iwfvzgkoS5AFDzHd6xPaurXAmY9IopI5f+MG13zllzsjKDQ9Gl QMxfpjTUOFN8GjqzA/BZhP9wv6x1krLNuFQXmmLd1dLtYjz/Dr86+n5Ck4i9BZQ8gZZMIn3FE RLcwg0nSAwsTpf5W2YxjBcQJzdnjDLpjsaR6faDS98IHNKNXz61ZBs8hP+t6Zf/YVHj90Teq9 6UYgPNANq5TvenwFxwP2MsohqsFcMNh71iS6iYNV7Y+L7beh5xEyCAj6Ll07xKtrr6z/rVB6k dt34dYcf0+4XG+plOQ8ELt+G9RdLcwZ5KxMu4rywhGUHqAKYBsP0fsefttXZZfmJ3q+6ejL86 gHN5x6jNuXr0MHaUWKAQnHJuxSmnq4YYKeHtMvof7+IoDupQRYFOAq6lYksvz074zuXQOs59h IHW9b3PD2vprmOg+tOdWgIF8i3w4s1BlQDwGcSer9o6Qcq29WAmohiakCRz0oc8jNZRNfZm0c m0yR0i2LRUeOr2LHRq+IBl6vSQnCMHN3humtZ4OF3LdP490SPybGm0MnQfOblJgrQUawFkEq X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.17.12 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:111571 Archived-At: Stefan Huchler writes: > 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? You mean a named function (a lambda is a function). Yes, you can do that. I suggest to have a look how some Emacs package do that, e.g. package.el (look at `package-menu--print-info-simple' and the action function `package-menu-describe-package'. Seems the action function should accept a button as argument. > 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. Seems you can either put a property on the button and refer to the property value in the action function via `button-get', or just use `tabulated-list-get-id' to get the ID. HTH, Michael.