[Orgmode] [PATCH] Fix bug that erases org buffer when calling agenda via org-agenda-open-link.

2010-09-15 Thread Matthew Lundin
[My apologies, but I'm afraid my first attempt at this patch mistook a necessary second check for redundancy. Here is an improved version.] * lisp/org-agenda.el (org-prepare-agenda): If the agenda is called from within the agenda via an elisp link, such as [[elisp:(org-agenda-list)]], org-prep

[Orgmode] [PATCH] Fix bug that erases org buffer when calling agenda via org-agenda-open-link.

2010-09-15 Thread Matt Lundin
* lisp/org-agenda.el (org-prepare-agenda): If the agenda is called from within the agenda via an elisp link, such as [[elisp:(org-agenda-list)]], org-prepare-agenda erases the buffer of the file containing the link, since that buffer is current during org-prepare agenda (due to a with-curr