unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / 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

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