emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Aaron Ecay <aaronecay@gmail.com>
To: Org-mode <emacs-orgmode@gnu.org>
Subject: Re: Buffer is read-only: #<buffer *SUMO*>
Date: Mon, 17 Sep 2012 00:36:09 -0400	[thread overview]
Message-ID: <87392hgtae.fsf@gmail.com> (raw)
In-Reply-To: <87vcfdzgkj.fsf@gmail.com>

OK, I’ve tracked this down.  I added a function to
‘org-agenda-finalize-hook’ which makes modifications to the agenda
buffer (viz. removing the 'mouse-highlight text properties).  At line
3441 of org-agenda.el, in the ‘org-agenda-finalize’ function, this hook
is run outside of any (let ((inhibit-read-only t)) ...).  This gives the
error.

Only some types of agenda buffers are set to be read-only –
e.g. ‘org-todo-list’ sets read-only at l. 4418 of org-agenda.el.  I
think ‘org-agenda-finalize-hook’ should be run with inhibit-read-only
bound to t, to let the hook modify the agenda buffer in any case.  But
otherwise, it should be added to the hook’s documentation that any
changes to the agenda buffer could be turned into an error by a
read-only setting.

-- 
Aaron Ecay

  reply	other threads:[~2012-09-17  4:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-16 22:36 Buffer is read-only: #<buffer *SUMO*> Moritz Ulrich
2012-09-16 23:35 ` Aaron Ecay
2012-09-17  4:36   ` Aaron Ecay [this message]
2012-09-17  7:02     ` Moritz Ulrich
2012-09-18  6:41     ` Bastien

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87392hgtae.fsf@gmail.com \
    --to=aaronecay@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

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