From mboxrd@z Thu Jan 1 00:00:00 1970 From: ross@rosslaird.com (Ross A. Laird) Subject: Re: Displaying your Org agenda after idle time Date: Sun, 21 Mar 2010 14:45:36 -0700 Message-ID: <8739ztbb7j.fsf@rosslaird.com> References: <55590EA7-C744-44E5-909F-755F0BBE452D@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NtT2F-0005NS-D0 for emacs-orgmode@gnu.org; Sun, 21 Mar 2010 17:50:15 -0400 Received: from [140.186.70.92] (port=56617 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NtT2C-0005NJ-QA for emacs-orgmode@gnu.org; Sun, 21 Mar 2010 17:50:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NtT27-0002KG-CZ for emacs-orgmode@gnu.org; Sun, 21 Mar 2010 17:50:12 -0400 Received: from lo.gmane.org ([80.91.229.12]:45716) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NtT27-0002K8-4N for emacs-orgmode@gnu.org; Sun, 21 Mar 2010 17:50:07 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1NtT23-0000H6-2l for emacs-orgmode@gnu.org; Sun, 21 Mar 2010 22:50:03 +0100 Received: from h24-207-47-26.dlt.dccnet.com ([24.207.47.26]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 21 Mar 2010 22:50:03 +0100 Received: from ross by h24-207-47-26.dlt.dccnet.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 21 Mar 2010 22:50:03 +0100 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org John Wiegley writes: > I have the following snippet in my .emacs file, which I find very > useful. Basically what it does is that if I don't touch my Emacs for 5 > minutes, it displays the current agenda. This keeps my tasks "always > in mind" whenever I come back to Emacs after doing something else, > whereas before I had a tendency to forget that it was there. > > John > > (defun jump-to-org-agenda () > (interactive) > (let ((buf (get-buffer "*Org Agenda*")) > wind) > (if buf > (if (setq wind (get-buffer-window buf)) > (select-window wind) > (if (called-interactively-p) > (progn > (select-window (display-buffer buf t t)) > (org-fit-window-to-buffer) > ;; (org-agenda-redo) > ) > (with-selected-window (display-buffer buf) > (org-fit-window-to-buffer) > ;; (org-agenda-redo) > ))) > (call-interactively 'org-agenda-list))) > ;;(let ((buf (get-buffer "*Calendar*"))) > ;; (unless (get-buffer-window buf) > ;; (org-agenda-goto-calendar))) > ) > > (run-with-idle-timer 300 t 'jump-to-org-agenda) > This is fantastically useful. Thanks very much! Ross -- Ross A. Laird, PhD www.rosslaird.com