all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Buttons in help buffer that displays contents of variables
@ 2023-07-22 14:40 Heime
  2023-07-22 19:18 ` Heime
  0 siblings, 1 reply; 17+ messages in thread
From: Heime @ 2023-07-22 14:40 UTC (permalink / raw)
  To: Heime via Users list for the GNU Emacs text editor

I want to use a button to display the contents of a variable inside
a help buffer, but the following gives

(wrong-number-of-arguments ((t) nil "Function to be executed when the button is clicked..." (interactive) (message "Button clicked!")) 1)
  my-action(#<overlay from 1 to 8 in *Help*>)


(defconst myvar "Text of Front A")

(defun my-action ()
  "Function to be executed when the button is clicked."
  (interactive)
  (message "%s" myvar))

(defun qrh ()
  "Some description."

  (interactive)

  (with-help-window (help-buffer)
    (insert-button "Front A" 'action 'my-action 'follow-link t)))




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

end of thread, other threads:[~2023-07-23 20:05 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

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.