[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

defun with find-file does not run from Gnus buffers

From: Albert Reiner
Subject: defun with find-file does not run from Gnus buffers
Date: 24 Jun 2004 15:51:30 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2


I wanted to have a shortcut for opening a specific file, so I wrote
the following function:

    (defun willehalm-note ()
       (interactive "*")
       (find-file "~/.once-to-willehalm/note"))

This works well from most buffers I use; however, when I do M-x
willehalm-note in a Gnus (*Group*, *Summary ...*, *Article*) buffer, I
get a message about the buffer being read-only:

| Buffer is read-only: #<buffer *Summary*>

While this is true, I don't quite see why that should matter as
willehalm-note shouldn't write anything to any buffer.

I hope someone will point me to the reason underlying this behavior,
and to a cure for my defun.  (I suppose a keyboard macro would not
have that problem, but I'll probably learn more about elisp that way.)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]