François Pinard <pin...@iro.umontreal.ca> wrote:

> Nick Dokos <nicholas.do...@hp.com> writes:
> 
> > François Pinard <pin...@iro.umontreal.ca> wrote:
> 
> >> Now that many Org files are part of my agenda list, it became more
> >> likely that I inadvertently kill one of them.  Then, commands like
> >> "t" or "RET" in the agenda fail.  I have to first revisit the Org
> >> file by some other mean first, for such commands to succeed.  Could
> >> Org do the revisiting as needed, instead of raising an error?
> >> 
> 
> > Just do "g" in the agenda and retry the "t".
> 
> Thanks for hint, Nick, I'll surely use it.
> 
> Yet, I do not think it is appropriate for Org to raise an Emacs Lisp
> error.  It really looks like a bug.
> 

But it is an error: you've gotten rid of a buffer that it expected to
find.  Admittedly however, the error should be caught and a reasonable
error message printed out (something like ``Try pressing "g" in the
agenda and then retry the command '' :-) ) This would alleviate Bernt's
performance concerns as well: if you make the mistake (kill a buffer
that's needed), you suffer the consequences (slow rebuilding of the
agenda) - it does not affect anybody else.

Maybe org-with-remote-undo can check if the buffer argument is nil and
complain if it is.

Nick


Reply via email to