emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Gregor Zattler <telegraph@gmx.net>
To: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: how to rebuild org agenda while emacs is idle?
Date: Sat, 13 Feb 2016 21:15:41 +0100	[thread overview]
Message-ID: <20160213201541.GA6043@len.workgroup> (raw)

Hi org-mode users and developers,

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."
    (org-agenda-redo 'all))

(setq gz/idle-agenda-timer (run-with-idle-timer 3 t 'gz/refresh-agenda-when-idle))

This should refresh my agenda after 3 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?


If you want to play with this, use this test.org:
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
(defun gz/refresh-agenda-when-idle ()
  "Refresh Agenda while idle."
    (org-agenda-redo 'all))

(setq gz/idle-agenda-timer (run-with-idle-timer 3 t 'gz/refresh-agenda-when-idle))


; in order to cancel the timer ans start afresh:
(cancel-timer gz/idle-agenda-timer)


* Change this heading and watch the agenda buffer: changing?
<2016-02-13 Sa>--<2036-02-13 Mi>
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

nd visit it like so:
emacs24 -Q -nw /tmp/nuff.org  --eval '(org-agenda-file-to-front)' --eval '(org-agenda "a")'

The problem is the same with emacs25 and org-mode from git as of
today (but with emacs25 you'll have to arrange the windows
yourself).


Ciao, Gregor

                 reply	other threads:[~2016-02-13 20:16 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20160213201541.GA6043@len.workgroup \
    --to=telegraph@gmx.net \
    --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).