unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Using button to display a help menu
@ 2023-08-27  6:32 Heime
  2023-08-27  9:00 ` Stephen Berman
  0 siblings, 1 reply; 4+ messages in thread
From: Heime @ 2023-08-27  6:32 UTC (permalink / raw)
  To: Heime via Users list for the GNU Emacs text editor

Have made a function called 'maces' that is intended to show a button called 'Organis'
to display a help page as defined in 'maces-organis'.  Although I get the button 'Organis',
when I press it, I get 

--------

(wrong-number-of-arguments ((t) nil "Prints information about Maces Organis." (interactive) (help--window-setup (help-buffer) #'(lambda nil (insert-button "[F7]" 'action 'maces-action-organis 'follow-link t) (insert " Maces Organis \n")))) 1) maces-organis(#<overlay from 72 to 76 in *Help*>)

--------

(defun maces-organis  ()
  "Prints information about Maces Organis."
  (interactive)

  (with-help-window (help-buffer)
    (insert-button "[F7]" 'action 'maces-action-organis 'follow-link t)
    (insert " Maces Organis \n") ))


(defun maces ()
  "Prints information about Maces."
  (interactive)

  (with-help-window (help-buffer)
    (insert-button "[Organis]" 'action 'maces-organis 'follow-link t)
    (insert " Maces Organis \n") ))




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Using button to display a help menu
  2023-08-27  6:32 Using button to display a help menu Heime
@ 2023-08-27  9:00 ` Stephen Berman
  2023-08-27 12:34   ` Heime
  0 siblings, 1 reply; 4+ messages in thread
From: Stephen Berman @ 2023-08-27  9:00 UTC (permalink / raw)
  To: Heime; +Cc: Heime via Users list for the GNU Emacs text editor

On Sun, 27 Aug 2023 06:32:29 +0000 Heime <heimeborgia@protonmail.com> wrote:

> Have made a function called 'maces' that is intended to show a button
> called 'Organis' to display a help page as defined in 'maces-organis'.
> Although I get the button 'Organis', when I press it, I get
>
> --------
>
> (wrong-number-of-arguments ((t) nil "Prints information about Maces Organis." (interactive) (help--window-setup (help-buffer) #'(lambda nil (insert-button "[F7]" 'action 'maces-action-organis 'follow-link t) (insert " Maces Organis \n")))) 1) maces-organis(#<overlay from 72 to 76 in *Help*>)
>
> --------
>
> (defun maces-organis  ()
>   "Prints information about Maces Organis."
>   (interactive)
>
>   (with-help-window (help-buffer)
>     (insert-button "[F7]" 'action 'maces-action-organis 'follow-link t)
>     (insert " Maces Organis \n") ))
>
>
> (defun maces ()
>   "Prints information about Maces."
>   (interactive)
>
>   (with-help-window (help-buffer)
>     (insert-button "[Organis]" 'action 'maces-organis 'follow-link t)
>     (insert " Maces Organis \n") ))

See https://lists.gnu.org/archive/html/help-gnu-emacs/2023-07/msg00321.html

Steve Berman



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Using button to display a help menu
  2023-08-27  9:00 ` Stephen Berman
@ 2023-08-27 12:34   ` Heime
  2023-08-27 12:54     ` Stephen Berman
  0 siblings, 1 reply; 4+ messages in thread
From: Heime @ 2023-08-27 12:34 UTC (permalink / raw)
  To: Stephen Berman; +Cc: Heime via Users list for the GNU Emacs text editor






Sent with Proton Mail secure email.

------- Original Message -------
On Sunday, August 27th, 2023 at 9:00 PM, Stephen Berman <stephen.berman@gmx.net> wrote:


> On Sun, 27 Aug 2023 06:32:29 +0000 Heime heimeborgia@protonmail.com wrote:
> 
> > Have made a function called 'maces' that is intended to show a button
> > called 'Organis' to display a help page as defined in 'maces-organis'.
> > Although I get the button 'Organis', when I press it, I get
> > 
> > --------
> > 
> > (wrong-number-of-arguments ((t) nil "Prints information about Maces Organis." (interactive) (help--window-setup (help-buffer) #'(lambda nil (insert-button "[F7]" 'action 'maces-action-organis 'follow-link t) (insert " Maces Organis \n")))) 1) maces-organis(#<overlay from 72 to 76 in Help>)
> > 
> > --------
> > 
> > (defun maces-organis ()
> > "Prints information about Maces Organis."
> > (interactive)
> > 
> > (with-help-window (help-buffer)
> > (insert-button "[F7]" 'action 'maces-action-organis 'follow-link t)
> > (insert " Maces Organis \n") ))
> > 
> > (defun maces ()
> > "Prints information about Maces."
> > (interactive)
> > 
> > (with-help-window (help-buffer)
> > (insert-button "[Organis]" 'action 'maces-organis 'follow-link t)
> > (insert " Maces Organis \n") ))
> 
> 
> See https://lists.gnu.org/archive/html/help-gnu-emacs/2023-07/msg00321.html
> 
> Steve Berman

Steve, does using a button always need a function taking a button argument? 




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Using button to display a help menu
  2023-08-27 12:34   ` Heime
@ 2023-08-27 12:54     ` Stephen Berman
  0 siblings, 0 replies; 4+ messages in thread
From: Stephen Berman @ 2023-08-27 12:54 UTC (permalink / raw)
  To: Heime; +Cc: Heime via Users list for the GNU Emacs text editor

On Sun, 27 Aug 2023 12:34:22 +0000 Heime <heimeborgia@protonmail.com> wrote:

> Sent with Proton Mail secure email.
>
> ------- Original Message -------
> On Sunday, August 27th, 2023 at 9:00 PM, Stephen Berman
> <stephen.berman@gmx.net> wrote:
>
>
>> On Sun, 27 Aug 2023 06:32:29 +0000 Heime heimeborgia@protonmail.com wrote:
>>
>> > Have made a function called 'maces' that is intended to show a button
>> > called 'Organis' to display a help page as defined in 'maces-organis'.
>> > Although I get the button 'Organis', when I press it, I get
>> >
>> > --------
>> >
>> > (wrong-number-of-arguments ((t) nil "Prints information about Maces
>> > Organis." (interactive) (help--window-setup (help-buffer) #'(lambda nil
>> > (insert-button "[F7]" 'action 'maces-action-organis 'follow-link t)
>> > (insert " Maces Organis \n")))) 1) maces-organis(#<overlay from 72 to 76
>> > in Help>)
>> >
>> > --------
>> >
>> > (defun maces-organis ()
>> > "Prints information about Maces Organis."
>> > (interactive)
>> >
>> > (with-help-window (help-buffer)
>> > (insert-button "[F7]" 'action 'maces-action-organis 'follow-link t)
>> > (insert " Maces Organis \n") ))
>> >
>> > (defun maces ()
>> > "Prints information about Maces."
>> > (interactive)
>> >
>> > (with-help-window (help-buffer)
>> > (insert-button "[Organis]" 'action 'maces-organis 'follow-link t)
>> > (insert " Maces Organis \n") ))
>>
>>
>> See https://lists.gnu.org/archive/html/help-gnu-emacs/2023-07/msg00321.html
>>
>> Steve Berman
>
> Steve, does using a button always need a function taking a button argument?

I don't know any more about that than what I previously answered in
https://lists.gnu.org/archive/html/help-gnu-emacs/2023-07/msg00323.html;
see again also Yuri Khan's post
https://lists.gnu.org/archive/html/help-gnu-emacs/2023-07/msg00335.html

Steve Berman



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-08-27 12:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-27  6:32 Using button to display a help menu Heime
2023-08-27  9:00 ` Stephen Berman
2023-08-27 12:34   ` Heime
2023-08-27 12:54     ` Stephen Berman

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).