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: pgpjq1KlqGMaR.pgp
Description: PGP signature

Reply via email to