emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Moritz Ulrich <moritz@tarn-vedra.de>
To: Aaron Ecay <aaronecay@gmail.com>
Cc: Org-mode <emacs-orgmode@gnu.org>
Subject: Re: Buffer is read-only: #<buffer *SUMO*>
Date: Mon, 17 Sep 2012 09:02:05 +0200	[thread overview]
Message-ID: <m2392hdtea.fsf@tarn-vedra.de> (raw)
In-Reply-To: <87392hgtae.fsf@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1076 bytes --]


Aaron Ecay writes:

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

I use the same hook.

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

Yup, I agree. For me, it looks like a documentation issue. For my part,
I'll just modify the function in the hook to check if the buffer is
read-only.

Thanks,
Moritz Ulrich


-- 
Moritz Ulrich

[-- Attachment #2: Type: application/pgp-signature, Size: 486 bytes --]

  reply	other threads:[~2012-09-17  7:02 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
2012-09-17  7:02     ` Moritz Ulrich [this message]
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=m2392hdtea.fsf@tarn-vedra.de \
    --to=moritz@tarn-vedra.de \
    --cc=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).