>>>>> Paul D Nelson <[email protected]> writes:

    > To reproduce: 1. Put some %%(org-diary) lines in your diary file,
    > e.g.,

    > %%(org-diary) ~/my-org-file.org

    > 2. Open an Org agenda, then kill it with C-x k.

    > 3. Run M-x diary.

    > This gives:

    > Bad diary sexp at [...]  (org-diary) Error: (error "Selecting
    > deleted buffer")

    > The issue is that killing the agenda buffer leaves
    > org-agenda-buffer with a non-nil reference to a dead buffer.  The
    > patch checks whether the agenda buffer is still live, and
    > otherwise uses the current buffer.

This is really useful. I've run into the same problem on several
occasions. Opening up the agenda again solves it most of the time - but
your patch is better.

Colin.


Reply via email to