From mboxrd@z Thu Jan 1 00:00:00 1970 From: Moritz Ulrich Subject: Re: Buffer is read-only: # Date: Mon, 17 Sep 2012 09:02:05 +0200 Message-ID: References: , <87vcfdzgkj.fsf@gmail.com>, <87392hgtae.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([208.118.235.92]:58380) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TDVLY-0006EG-3h for emacs-orgmode@gnu.org; Mon, 17 Sep 2012 03:02:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TDVLQ-0007aR-Q2 for emacs-orgmode@gnu.org; Mon, 17 Sep 2012 03:02:20 -0400 Received: from mail-we0-f169.google.com ([74.125.82.169]:34167) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TDVLQ-0007aF-K5 for emacs-orgmode@gnu.org; Mon, 17 Sep 2012 03:02:12 -0400 Received: by weys10 with SMTP id s10so4009750wey.0 for ; Mon, 17 Sep 2012 00:02:11 -0700 (PDT) In-reply-to: <87392hgtae.fsf@gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Aaron Ecay Cc: Org-mode --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Aaron Ecay writes: > OK, I=E2=80=99ve tracked this down. I added a function to > =E2=80=98org-agenda-finalize-hook=E2=80=99 which makes modifications to t= he agenda > buffer (viz. removing the 'mouse-highlight text properties). At line > 3441 of org-agenda.el, in the =E2=80=98org-agenda-finalize=E2=80=99 funct= ion, 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 =E2=80=93 > e.g. =E2=80=98org-todo-list=E2=80=99 sets read-only at l. 4418 of org-age= nda.el. I > think =E2=80=98org-agenda-finalize-hook=E2=80=99 should be run with inhib= it-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=E2=80=99s 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 =2D-=20 Moritz Ulrich --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (Darwin) iQEcBAEBCAAGBQJQVsrwAAoJEKUFGO1Zs0thePcIAIbLxL/mSceBKAfSTspOf/ZR ASfKzGPHb/djbECSOeDjiFhJ8wuMlCTYgMoJMQUjPDQQkE/eTcTMrkqCD6QvXuns qTaTYRrFqdBPjuHjjYZT0idzo5dmrRUPOdnldqMfvPldQIVdq83hQfVdFDx+xFWf SwRdcCrtRKC1mU0hN9xU0K6wPqg19NG/JxehvhxSdPyokbQy7Q3ojakzSKuhYUj9 3bDjNyu8GL3vD+SOLA/TAron224snUnTjm+O5xWahTOsJMupM6aMy96DcbkqTsJK dpvAT7b9zw08DVLAf0dQerHYPu0b3Frn+hQEt7Ix2BZ1MK2fqZ8En0FDDqIOYPI= =SSt+ -----END PGP SIGNATURE----- --=-=-=--