From: Kyle Sexton <ks@mocker.org>
To: Nick Dokos <ndokos@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Agenda in the mode-line?
Date: Fri, 02 Aug 2013 12:49:00 -0500 [thread overview]
Message-ID: <m21u6c7zlf.fsf@unknown28cfe95504ff.gateway.2wire.net> (raw)
In-Reply-To: <87haf86myt.fsf@gmail.com> (Nick Dokos's message of "Fri, 02 Aug 2013 13:07:06 -0400")
Nick Dokos <ndokos@gmail.com> writes:
> I don't think the feature exists but it should be buildable - although I
> think it is not exactly simple.
>
> It should be easy to write a function that uses the org mapping API to
> produce a string of the form "[Work: 3/10 Home: 2/20]" and assign it to
> a variable, say mode-line-org-tasks. The variable can be added to
> mode-line-format.
That part is beyond my elisp ability, but good to know that the feature
doesn't currently exist.
> The problem is to force mode-line redisplay when things change,
> e.g. when you mark a TODO task DONE, or add another task to work.org.
> If the file gets modified, then filenotify.el can be used, but since the
> agenda files are kept open, the buffer is modified but the file is not
> (until the buffer is saved) and I'm not sure how to detect such changes
> and propagate them to the mode line. I thought there must be a hook to
> allow this, but I haven't found one yet.
>
> The rather yucky alternative is to poll the relevant buffers (say once a
> minute) to see if they are modified and if so, run the function to set
> the variable and force mode-line redisplay.
I already have a function for org-mobile to sync, could something like
that be hooked into?
#+BEGIN_SRC emacs-lisp
;; Push to mobile-org
;; moble sync
(defvar org-mobile-sync-timer nil)
(defvar org-mobile-sync-idle-secs (* 60 10))
(defun org-mobile-sync ()
(interactive)
(org-mobile-pull)
(org-mobile-push))
(defun org-mobile-sync-enable ()
"enable mobile org idle sync"
(interactive)
(setq org-mobile-sync-timer
(run-with-idle-timer org-mobile-sync-idle-secs t
'org-mobile-sync)))
(defun org-mobile-sync-disable ()
"disable mobile org idle sync"
(interactive)
(cancel-timer org-mobile-sync-timer))
(org-mobile-sync-enable)
#+END_SRC
--
Kyle Sexton
next prev parent reply other threads:[~2013-08-02 17:49 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-01 13:30 Agenda in the mode-line? Kyle Sexton
2013-08-02 14:36 ` Bastien
2013-08-02 14:59 ` Kyle Sexton
2013-08-02 17:07 ` Nick Dokos
2013-08-02 17:49 ` Kyle Sexton [this message]
2013-08-03 5:27 ` Nick Dokos
2013-08-03 3:48 ` Eric Abrahamsen
2013-08-04 18:18 ` Daniel Clemente
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=m21u6c7zlf.fsf@unknown28cfe95504ff.gateway.2wire.net \
--to=ks@mocker.org \
--cc=emacs-orgmode@gnu.org \
--cc=ndokos@gmail.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).