From: Heime <heimeborgia@protonmail.com>
To: Stephen Berman <stephen.berman@gmx.net>
Cc: Heime via Users list for the GNU Emacs text editor
<help-gnu-emacs@gnu.org>
Subject: Re: Buttons in help buffer that displays contents of variables
Date: Sat, 22 Jul 2023 23:13:26 +0000 [thread overview]
Message-ID: <uKBHu-yqr0iiKiU5amUDJLjAIvpx6wEMLfq0XMbzcbTv_34bWPRRz_gJWfAea5HBJ6zsWRQU0PtzT8b5b1ZSikQLKUKYld5wYcpSIgmLcXg=@protonmail.com> (raw)
In-Reply-To: <87zg3ntvbv.fsf@gmx.net>
------- Original Message -------
On Sunday, July 23rd, 2023 at 10:50 AM, Stephen Berman <stephen.berman@gmx.net> wrote:
> On Sat, 22 Jul 2023 22:42:55 +0000 Heime heimeborgia@protonmail.com wrote:
>
> > ------- Original Message -------
> > On Sunday, July 23rd, 2023 at 10:28 AM, Stephen Berman
> > stephen.berman@gmx.net wrote:
> >
> > > On Sat, 22 Jul 2023 22:13:25 +0000 Heime heimeborgia@protonmail.com wrote:
> > >
> > > [...]
> > >
> > > > > > > > > > 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:
> > > > > > > > > >
> > > > > > > > > > (defun my-action ()
> > > > > > > > > > "Function to be executed when the button is clicked."
> > > > > > > > > > (interactive)
> > > > > > > > > > (message "%s" myvar))
> > > > > > > > > >
> > > > > > > > > > Steve Berman
> > > >
> > > > Do you know what the single argument is used for ?
> > >
> > > 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’s invocation function when it is invoked. See also the function` button-activate' described in that node.
> > >
> > > 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
What does the button.el use as object to push to the action associated function
that would be sensible. Would it be "action" ?
next prev parent reply other threads:[~2023-07-22 23:13 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-22 14:40 Buttons in help buffer that displays contents of variables Heime
2023-07-22 19:18 ` Heime
2023-07-22 20:14 ` Stephen Berman
2023-07-22 20:24 ` Heime
2023-07-22 20:48 ` Stephen Berman
2023-07-22 21:24 ` Heime
2023-07-22 21:46 ` Stephen Berman
2023-07-22 22:02 ` Heime
2023-07-22 22:13 ` Heime
2023-07-22 22:28 ` Stephen Berman
2023-07-22 22:42 ` Heime
2023-07-22 22:50 ` Stephen Berman
2023-07-22 23:13 ` Heime [this message]
2023-07-23 7:45 ` Yuri Khan
2023-07-23 19:34 ` Heime
2023-07-23 19:57 ` Yuri Khan
2023-07-23 20:05 ` Heime
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='uKBHu-yqr0iiKiU5amUDJLjAIvpx6wEMLfq0XMbzcbTv_34bWPRRz_gJWfAea5HBJ6zsWRQU0PtzT8b5b1ZSikQLKUKYld5wYcpSIgmLcXg=@protonmail.com' \
--to=heimeborgia@protonmail.com \
--cc=help-gnu-emacs@gnu.org \
--cc=stephen.berman@gmx.net \
/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.