emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Buffer is read-only: #<buffer *SUMO*>
@ 2012-09-16 22:36 Moritz Ulrich
  2012-09-16 23:35 ` Aaron Ecay
  0 siblings, 1 reply; 5+ messages in thread
From: Moritz Ulrich @ 2012-09-16 22:36 UTC (permalink / raw)
  To: Org-mode

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


I get this error when I run `org-mobile-push'. Setting `debug-on-error'
to t doesn't bring up an error buffer when I get this error.

GNU Emacs 24.2.1 (x86_64-apple-darwin11.4.0, NS apple-appkit-1138.47)
Org-mode version 7.9.1 (release_7.9.1-23-gf1f1fc)

I used to get this error when I kept my agenda buffer open for a very
long time. Killing the buffer fixed this. This doesn't seem to work
anymore.

Any ideas?


Cheers,

-- 
Moritz Ulrich

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Buffer is read-only: #<buffer *SUMO*>
  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
  0 siblings, 1 reply; 5+ messages in thread
From: Aaron Ecay @ 2012-09-16 23:35 UTC (permalink / raw)
  To: Org-mode

2012ko irailak 16an, Moritz Ulrich-ek idatzi zuen:
>  I get this error when I run `org-mobile-push'. Setting
> `debug-on-error' to t doesn't bring up an error buffer when I get this
> error.
> 
> GNU Emacs 24.2.1 (x86_64-apple-darwin11.4.0, NS apple-appkit-1138.47)
> Org-mode version 7.9.1 (release_7.9.1-23-gf1f1fc)
> 
> I used to get this error when I kept my agenda buffer open for a very
> long time. Killing the buffer fixed this. This doesn't seem to work
> anymore.
> 
> Any ideas?

I had to check that it wasn’t me who wrote this message; I’ve started
having the same problem in the past 24 hours.  My org(-mobile) setup is
pretty new, but I don’t associate the problem with any particular
modification to my init files or org installation.

I’ve tentatively traced the error message to the
‘org-batch-store-agenda-views’ macro, which (by virtue of being a macro
and not a function) is impervious to any usual debugging techniques.
The next thing I can try debugging-wise will be to convert that into a
function and try stepping through it.

I’ve temporarily hacked around the problem by setting
‘org-mobile-agendas’ to '(); this works for me as a stopgap since I’m
not really using the agenda integration in MobileOrg.

Aaron

PS This is Org-mode version 7.9.1 (release_7.9.1-226-ga99402.dirty) on
Emacs bzr r110057

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Buffer is read-only: #<buffer *SUMO*>
  2012-09-16 23:35 ` Aaron Ecay
@ 2012-09-17  4:36   ` Aaron Ecay
  2012-09-17  7:02     ` Moritz Ulrich
  2012-09-18  6:41     ` Bastien
  0 siblings, 2 replies; 5+ messages in thread
From: Aaron Ecay @ 2012-09-17  4:36 UTC (permalink / raw)
  To: Org-mode

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Buffer is read-only: #<buffer *SUMO*>
  2012-09-17  4:36   ` Aaron Ecay
@ 2012-09-17  7:02     ` Moritz Ulrich
  2012-09-18  6:41     ` Bastien
  1 sibling, 0 replies; 5+ messages in thread
From: Moritz Ulrich @ 2012-09-17  7:02 UTC (permalink / raw)
  To: Aaron Ecay; +Cc: Org-mode

[-- 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 --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Buffer is read-only: #<buffer *SUMO*>
  2012-09-17  4:36   ` Aaron Ecay
  2012-09-17  7:02     ` Moritz Ulrich
@ 2012-09-18  6:41     ` Bastien
  1 sibling, 0 replies; 5+ messages in thread
From: Bastien @ 2012-09-18  6:41 UTC (permalink / raw)
  To: Org-mode

Hi Aaron,

Aaron Ecay <aaronecay@gmail.com> writes:

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

All agenda views should be read-only, this is deep in the veins of 
what is an agenda.

If you find an agenda view that is not read only, please report it.

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

This is now the case.  I updated the docstrings to reflect this.

Thanks to you and Moritz for the discussion.

-- 
 Bastien

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-09-18 10:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2012-09-18  6:41     ` Bastien

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