all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* void-function info-buffer after making a buffer
@ 2024-09-28 20:09 Heime
  2024-09-28 21:09 ` Stephen Berman
  0 siblings, 1 reply; 2+ messages in thread
From: Heime @ 2024-09-28 20:09 UTC (permalink / raw)
  To: Heime via Users list for the GNU Emacs text editor

I am getting (void-function info-buffer) although I call 
(get-buffer-create "Info")

(defconst my-message
  "To run non-interactive commands in Emacs:

 1. ** From Another Function **

    You can call a non-interactive function from another
    function, like this:

    (defun my-calling-function ()
      (my-non-interactive-function 'argument))")

;; ---------------------------------------------------------------

(defun torium (&optional bfrn)
  "TODO"

  (interactive
    (list (let ( (rqmatch nil)
                 (cseq '("Default" "Questor")) )
            (completing-read " Display Name: " cseq nil rqmatch "Questor"))))

  (let* ( (bfname (or bfrn "Questor"))
          (dbuffer (get-buffer-create (concat "𒆳 " bfname)))
          (info my-message) )

    (with-current-buffer dbuffer
      (erase-buffer)

      ;; Set the background color to blue for the buffer
      ;; (face-remap-add-relative 'default :background "blue")

      ;; Insert a button that shows the info when pressed
      (insert-button " - "
        'action (lambda (button)
                  (let ( (info-buffer
                           (get-buffer-create "Info")) )
                    (with-current-buffer (info-buffer)
                      (erase-buffer)
                      (insert info)
                      (goto-char (point-min))
                      (display-buffer info-buffer)) ))
          'follow-link t)

      (insert " Running Non-Interactive Commands") )))






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

* Re: void-function info-buffer after making a buffer
  2024-09-28 20:09 void-function info-buffer after making a buffer Heime
@ 2024-09-28 21:09 ` Stephen Berman
  0 siblings, 0 replies; 2+ messages in thread
From: Stephen Berman @ 2024-09-28 21:09 UTC (permalink / raw)
  To: Heime; +Cc: Heime via Users list for the GNU Emacs text editor

On Sat, 28 Sep 2024 20:09:59 +0000 Heime <heimeborgia@protonmail.com> wrote:

> I am getting (void-function info-buffer) although I call
> (get-buffer-create "Info")
[...]
>       ;; Insert a button that shows the info when pressed
>       (insert-button " - "
>         'action (lambda (button)
>                   (let ( (info-buffer
                            ^^^^^^^^^^^
                            This is a local variable.
>                            (get-buffer-create "Info")) )
>                     (with-current-buffer (info-buffer)
                                           ^^^^^^^^^^^^^
                                           This is a function call.

Steve Berman



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

end of thread, other threads:[~2024-09-28 21:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-28 20:09 void-function info-buffer after making a buffer Heime
2024-09-28 21:09 ` Stephen Berman

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.