emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Kiwon Um <um.kiwon@gmail.com>
To: Suvayu Ali <fatkasuvayu+linux@gmail.com>
Cc: nicholas.dokos@hp.com, emacs-orgmode@gnu.org
Subject: Re: org-agenda-show-current-time-in-grid and automatic refresh
Date: Thu, 13 Jan 2011 13:56:53 +0900	[thread overview]
Message-ID: <87mxn54d0q.fsf@gmail.com> (raw)
In-Reply-To: <20110112133307.4705f99a@bhishma.homelinux.net> (Suvayu Ali's message of "Wed, 12 Jan 2011 13:33:07 -0800")

Suvayu Ali <fatkasuvayu+linux@gmail.com> writes:

> Hi Nick,
>
> On Wed, 12 Jan 2011 03:23:44 -0500
> Nick Dokos <nicholas.dokos@hp.com> wrote:
>
>> You can probably use run-with-timer or run-with-idle-timer to do
>> things like this, but I'm with Detlef Steuer: pressing 'g' in the
>> agenda to refresh it is simple and does not consume any extra
>> resources - you do it when you need to and it's done. I just find the
>> idea of running a timer in order to update a time line in the agenda
>> every once in a while somewhat distasteful, but maybe it's just me.
>
> Thanks for the hint. I tried it, works fine. But on reflecting on it
> some more, I agree with you seems an overkill specially when a simple g
> does the job.

Thanks. Here is my hack for it. It works fine.

;; in the emacs init file

;; refresh agenda view regurally
(defun kiwon/org-agenda-redo-in-other-window ()
  "Call org-agenda-redo function even in the non-agenda buffer."
  (interactive)
  (let ((agenda-window (get-buffer-window org-agenda-buffer-name t)))
    (when agenda-window
      (with-selected-window agenda-window (org-agenda-redo)))))
(run-at-time nil 300 'kiwon/org-agenda-redo-in-other-window)

--
Kiwon Um

  reply	other threads:[~2011-01-13  4:57 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-12  3:23 org-agenda-show-current-time-in-grid and automatic refresh Kiwon Um
2011-01-12  7:19 ` Suvayu Ali
2011-01-12  8:23   ` Nick Dokos
2011-01-12 21:33     ` Suvayu Ali
2011-01-13  4:56       ` Kiwon Um [this message]
2011-01-13  6:36         ` Michael Brand
2011-01-15 11:35         ` Bastien
2011-01-18  9:58   ` Carsten Dominik
2011-01-12  7:58 ` Detlef Steuer
  -- strict thread matches above, loose matches on Subject: below --
2011-01-13  1:43 Tommy Stanton
2011-01-13  8:41 ` Sébastien Vauban

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=87mxn54d0q.fsf@gmail.com \
    --to=um.kiwon@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=fatkasuvayu+linux@gmail.com \
    --cc=nicholas.dokos@hp.com \
    /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).