From: Matt Lundin <mdl@imapmail.org>
To: Org Mode <emacs-orgmode@gnu.org>
Subject: [PATCH] Fix agenda follow mode to work with included diary
Date: Mon, 24 Aug 2015 10:20:35 -0500 [thread overview]
Message-ID: <87fv38g127.fsf@fastmail.fm> (raw)
* lisp/org-agenda.el (org-agenda-goto): Fix org-agenda-goto 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).
---
lisp/org-agenda.el | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 5fd1cd4..0698ddf 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -8391,13 +8391,13 @@ When called with a prefix argument, include all archive files as well."
(org-show-context 'agenda)
(save-excursion
(and (outline-next-heading)
- (org-flag-heading nil)))) ; show the next heading
- (when (outline-invisible-p)
- (show-entry)) ; display invisible text
- (recenter (/ (window-height) 2))
- (org-back-to-heading t)
- (if (re-search-forward org-complex-heading-regexp nil t)
- (goto-char (match-beginning 4)))
+ (org-flag-heading nil))) ; show the next heading
+ (when (outline-invisible-p)
+ (show-entry)) ; display invisible text
+ (recenter (/ (window-height) 2))
+ (org-back-to-heading t)
+ (if (re-search-forward org-complex-heading-regexp nil t)
+ (goto-char (match-beginning 4))))
(run-hooks 'org-agenda-after-show-hook)
(and highlight (org-highlight (point-at-bol) (point-at-eol)))))
--
2.5.0
next reply other threads:[~2015-08-24 15:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-24 15:20 Matt Lundin [this message]
-- strict thread matches above, loose matches on Subject: below --
2015-08-24 15:31 [PATCH] Fix agenda follow mode to work with included diary Matt Lundin
2015-08-24 20:51 ` Nicolas Goaziou
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87fv38g127.fsf@fastmail.fm \
--to=mdl@imapmail.org \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).