From: Gregor Zattler <telegraph@gmx.net>
To: help-gnu-emacs <help-gnu-emacs@gnu.org>
Subject: how to rebuild org agenda while emacs is idle?
Date: Sat, 29 Aug 2015 18:15:07 +0200 [thread overview]
Message-ID: <20150829161507.GA7263@boo.workgroup> (raw)
Hi everyone,
org-agenda is great but slow, sticky agenda solves this but gets
stale really fast. I try to refresh my org-agenda while Emacs is
idle like so:
(defun gz/refresh-agenda-when-idle ()
"Refresh Agenda while idle."
(with-current-buffer-buffer "*Org Agenda(a)*"
(org-agenda-redo ALL)))
(setq gz/idle-agenda-timer (run-with-idle-timer 9 t 'gz/update-agenda))
This should refresh my agenda after 9 seconds of idle time. But
when I change one of my agenda files and save it the change does
not occur in the agenda after 9 seconds of idle time although the
echo area shows "Rebuilding agenda buffer...done"
What's wrong with this settings?
There is another problem. For test purposes I have split the
Emacs window in two: The agenda (in order to see if something
changes) and another window for the buffer with the code.
When point is not in the agenda window the echo area
*sometimes* shows
Error running timer ‘gz/update-agenda’: (error "‘recenter’ing a
window that does not display current-buffer.")
I stop my experiment with:
(cancel-timer gz/idle-agenda-timer)
Ciao, Gregor
--
-... --- .-. . -.. ..--.. ...-.-
next reply other threads:[~2015-08-29 16:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-29 16:15 Gregor Zattler [this message]
-- strict thread matches above, loose matches on Subject: below --
2016-02-13 20:15 how to rebuild org agenda while emacs is idle? Gregor Zattler
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150829161507.GA7263@boo.workgroup \
--to=telegraph@gmx.net \
--cc=help-gnu-emacs@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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.