all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Making a read-only buffer writable
@ 2023-09-12  9:08 Heime
  2023-09-12 10:06 ` Philip Kaludercic
  2023-09-12 10:26 ` Yuri Khan
  0 siblings, 2 replies; 4+ messages in thread
From: Heime @ 2023-09-12  9:08 UTC (permalink / raw)
  To: Heime via Users list for the GNU Emacs text editor

Have been reading the documentation, any time one wants to write (insert) into a 
read-only buffer, one has to make it writable.  Doesn't matter when that time is. 
If it's read-only you need to make it writable to write into it. 

Then I wonder how it is possible for the following function 
to call  

(insert-button "[1]"

and

(insert " Graphic Organisation")

without calling 

(setq buffer-read-only nil)

first, just after  

(with-help-window (help-buffer)

-------------

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

  (with-help-window (help-buffer)

    (insert-button "[1]" 'action
      (lambda (button)
        (setq buffer-read-only nil)
        (insert "> Graphic Organisation \n\n")
        (setq buffer-read-only t)))
    (insert " Graphic Organisation") ))





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

end of thread, other threads:[~2023-09-12 10:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-12  9:08 Making a read-only buffer writable Heime
2023-09-12 10:06 ` Philip Kaludercic
2023-09-12 10:26 ` Yuri Khan
2023-09-12 10:52   ` 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.