all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Wrong argument for buffer name
@ 2023-08-07  6:59 Heime
  2023-08-07  7:39 ` Heime
  0 siblings, 1 reply; 3+ messages in thread
From: Heime @ 2023-08-07  6:59 UTC (permalink / raw)
  To: Heime via Users list for the GNU Emacs text editor

Why does the following function give

Lisp error: (wrong-type-argument stringp bfname)

What can I do to fix this problem for the buffer name ?

(defconst buffer-name "BFTEMP")

(defun estring (string &optional bfname)
  "Show STRING in a temporary buffer."

  (or bfname (setq bfname buffer-name))

  (with-output-to-temp-buffer bfname
    (princ string)
    (emacs-lisp-mode)))






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

end of thread, other threads:[~2023-08-07 18:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-07  6:59 Wrong argument for buffer name Heime
2023-08-07  7:39 ` Heime
2023-08-07 18:53   ` Emanuel Berg

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.