From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stephen Berman Newsgroups: gmane.emacs.help Subject: Re: Buttons in help buffer that displays contents of variables Date: Sun, 23 Jul 2023 00:50:12 +0200 Message-ID: <87zg3ntvbv.fsf@gmx.net> References: <87h6pvvh4i.fsf@gmx.net> <87cz0jvfjo.fsf@gmx.net> <-Of1ukZDnMEs_SVnir4H5K16gZyeSQzumX2oqufViGBYgx6lWFHLhnFHoUC6_0NHmrd9FQ7I5-HyOlZWKDx1Go2wVfQ9Yb0WZrTPY2ihcbo=@protonmail.com> <878rb7vctx.fsf@gmx.net> <874jlvvawe.fsf@gmx.net> <2o0OzY_iBd8TOmOEzF9du3kSZGrEKIJbl7QdqK3lyQ7xonVsF2v5W3Dxt4hQ8T1cQfShQxikqyAhCD4Kc0BGJNGaPya9ClnAWarEa9ZJ9HQ=@protonmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3651"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Heime via Users list for the GNU Emacs text editor To: Heime Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jul 23 00:51:00 2023 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qNLRE-0000p9-GT for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 23 Jul 2023 00:51:00 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qNLQa-00026c-AX; Sat, 22 Jul 2023 18:50:20 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qNLQY-00026M-1g for help-gnu-emacs@gnu.org; Sat, 22 Jul 2023 18:50:18 -0400 Original-Received: from mout.gmx.net ([212.227.17.21]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qNLQW-0007d0-6v for help-gnu-emacs@gnu.org; Sat, 22 Jul 2023 18:50:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=s31663417; t=1690066213; x=1690671013; i=stephen.berman@gmx.net; bh=5Bt7fYimM2YLrmKPfSTDNTaykXHgTsC1l9l/k/yAtbc=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date; b=kZ9Kgj0ZWi5jNKgB+AolusuyKkcxmL6d05/z+xxOu9Je7meyzSyTKnCdmWY8r6VsyPbUNVK WwCQa7cO95/UuQ4HPiyaeQoOyfJWJd2he1u+j0H0q81aIvGqJDmrIkmFI/z7KRJOmrD8HTjyD 32gRuA5e8TiFLw4t/cEMEHJjn7his4BrxZjEgjI3dvPxigh4T6hl6syKkb1lKfvFiKjNpIawz +yShnJwyM9zovqTMIPPg+VXVAzT91jDAf8g9RskXSzd+k8JTXK0OlzHUmqPJjQEysRPLHFgXH 1or1j4ud6VC0O+E2upZu2yi9HNYvnmz9l3xo9eqvP7upjW+9vCvg== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Original-Received: from strobelfssd ([94.134.196.80]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MY6Cb-1qOeca0Rjh-00YUMT; Sun, 23 Jul 2023 00:50:13 +0200 In-Reply-To: <2o0OzY_iBd8TOmOEzF9du3kSZGrEKIJbl7QdqK3lyQ7xonVsF2v5W3Dxt4hQ8T1cQfShQxikqyAhCD4Kc0BGJNGaPya9ClnAWarEa9ZJ9HQ=@protonmail.com> (Heime's message of "Sat, 22 Jul 2023 22:42:55 +0000") X-Provags-ID: V03:K1:v8B8/pD1xB2haoWf67MoxLfZbtE/5E6W12BN9eSICUeTxKTULm2 romSyXyejEdHcsAlgznvB3mzrwnMG4WvthubPwxwqq/synxPYPAx2zzB5XgCcRVzfYrgocA +Bc9kUdAIFXffTQRuxnnEwmy+C9cd++2BuWCnsWTcVFqtNMUiuAiWsvzShYR7PXU02Un48U pXEd3ZbYdXtAieDo1En+w== UI-OutboundReport: notjunk:1;M01:P0:4hAMqese1hY=;X8jrdUKLAYX6Mk+/LM4Iu6QdL17 LQjTg8HW4IiCIP80aMU0Y4L3pWkKAWqNHi1TuD6qN/fZ76CmODjZdnb9O5z/+gG8CLRT+IpK9 nDCaqiAD/SqovXxNqQHZPe9WxA7RWZVxUQxLdHkQIsH6t+GvDUeWq38qw4crw4AL4COgyL40I sYsKF+PTeSrLJgmidmIxzdDVA2NGBf7J26whdt62fecUhW7aupRYwA5vbUrbBRbEshBIRaG3m f3KPNFULFPx9RH/GGX7SakTmiII0ANT784zyvLXeJUGmabtzzfOpfoBbGu3jlvF0Sw/jtWQGU zUK7At/+rYx1NVJUHGfgEA7Xw//hVxpT/cZrtHhvXbYjXFRSh8549pCeZZ/yd5HgVHbK246Vg BlqJkEe3rXspSy+f3yIaLdp4tqiXJwycfHo5KxDNCe+HiWkXbreXPNkxe3E+lfHN9MDIX3wSl 7Eg5y3e2YlHTBQv2xgHLUvpdB2f6OvCJvroh/APBsw47EUllHQXqQmxRnx3/XMuFKnI5ZOsvv 6ji2HbrBUQMMCGnz5DtK0lWxhUdhNXMKXPyUs6WB4nLc5MGMtJQxmSO5L+W2SOU5FLZ5YPs0T WOCSFb6BzVa0XXgPEonNc5dQDDkBP5BOqL/RjnEEm57WZXeOmB9a7atB6uyAgstFxBok2offh VmCbMRZjSeRt9d5JrsnnjoaMqgmBPvrHouk9GFbRpQa0O/WG7JapmTW3vujWA5S73fi10KMiH uJxVrmTt+P1Zln7gTtPNaVBII7t1jXFZHk771/p47NRlsAgRE3NfaOiUqjsSPWbjKuLnt4KN Received-SPF: pass client-ip=212.227.17.21; envelope-from=stephen.berman@gmx.net; helo=mout.gmx.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:144400 Archived-At: On Sat, 22 Jul 2023 22:42:55 +0000 Heime wrote: > ------- Original Message ------- > On Sunday, July 23rd, 2023 at 10:28 AM, Stephen Berman > wrote: > > >> On Sat, 22 Jul 2023 22:13:25 +0000 Heime heimeborgia@protonmail.com wrot= e: >>=20 >>=20 >> [...] >>=20 >> > > > > > > > The error says the function my-action expects one argument= , but you >> > > > > > > > defined it with an empty argument list. If you don't want = to use the >> > > > > > > > argument, you can use `' as a placeholder for the required= argument, >> > > > > > > > which will be ignored by the byte compiler: >> > > > > > > >=20 >> > > > > > > > (defun my-action () >> > > > > > > > "Function to be executed when the button is clicked." >> > > > > > > > (interactive) >> > > > > > > > (message "%s" myvar)) >> > > > > > > >=20 >> > > > > > > > Steve Berman >> >=20 >> > Do you know what the single argument is used for ? >>=20 >>=20 >> This is explained in the Info node `(elisp) Manipulating Buttons': Where= a >> BUTTON parameter is specified, it means an object referring to a specific >> button, either an overlay (for overlay buttons), or a buffer-position or >> marker (for text property buttons). Such an object is passed as the first >> argument to a button=E2=80=99s invocation function when it is invoked. S= ee also the >> function` button-activate' described in that node. >>=20 >> Steve Berman > > What would be the actual object name passed to the function ? I'm not sure what you mean by "actual object name", but since the parameter is a local variable of the function, you can use any name for it you like, including, as noted above, the underscore `_' (which seems to have been removed by your mail program in the above citation), if you don't use it in the body of the function. Steve Berman