all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* how to rebuild org agenda while emacs is idle?
@ 2015-08-29 16:15 Gregor Zattler
  0 siblings, 0 replies; 2+ messages in thread
From: Gregor Zattler @ 2015-08-29 16:15 UTC (permalink / raw)
  To: help-gnu-emacs

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
-- 
 -... --- .-. . -.. ..--.. ...-.-



^ permalink raw reply	[flat|nested] 2+ messages in thread
* how to rebuild org agenda while emacs is idle?
@ 2016-02-13 20:15 Gregor Zattler
  0 siblings, 0 replies; 2+ messages in thread
From: Gregor Zattler @ 2016-02-13 20:15 UTC (permalink / raw)
  To: emacs-orgmode

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-02-13 20:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-29 16:15 how to rebuild org agenda while emacs is idle? Gregor Zattler
  -- strict thread matches above, loose matches on Subject: below --
2016-02-13 20:15 Gregor Zattler

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.