Fix agenda follow mode to work with included diary
commit06966b940377943d85dff55a602adce2909bd02b
authorMatt Lundin <mdl@imapmail.org>
Mon, 24 Aug 2015 15:31:49 +0000 (24 10:31 -0500)
committerNicolas Goaziou <mail@nicolasgoaziou.fr>
Mon, 24 Aug 2015 20:49:11 +0000 (24 22:49 +0200)
treea94ed2974662ff1afb697f94af5e25725a6b9798
parent0b524dd82c845ef64045529570926eb73b72145a
Fix agenda follow mode to work with included diary

* lisp/org-agenda.el (org-agenda-goto): Fix function to work with
  non-Org buffers.  Otherwise `org-agenda-follow-mode' does not work
  correctly with included diary entries (e.g., it errors out while the
  cursor is still in the diary buffer).

Follow mode does not work with diary entries in the agenda.  It calls
`org-agenda-goto', which expects to be in an Org mode buffer but does not
test to make sure that it is in an Org buffer.  As a result, it errors
out midway through and leaves the cursor stranded in the diary buffer.
lisp/org-agenda.el