emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] [PATCH] Proposed command: org-agenda-clock-goto


From: Bastien
Subject: Re: [Orgmode] [PATCH] Proposed command: org-agenda-clock-goto
Date: Wed, 04 Aug 2010 11:54:25 +0200
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.2 (gnu/linux)

Bastien <address@hidden> writes:

>>From the agenda, I often want to jump to the currently clocking task
> without leaving the agenda buffer.
>
> The attached patch contains a function that does so.
>
> Would that be useful to anyone else?
>
> If so, any suggestion for a keybinding?

I'm thinking of using "J" as a keybinding for the following command 
in the agenda buffer:

--8<---------------cut here---------------start------------->8---
(defun org-agenda-clock-goto ()
  "Jump to the currently clocked in task within the agenda."
  (interactive)
  (let (pos)
    (mapc (lambda (o)
            (if (eq (overlay-get o 'type) 'org-agenda-clocking)
                (setq pos (overlay-start o))))
          (overlays-in (point-min) (point-max)))
    (if pos (goto-char pos))))
--8<---------------cut here---------------end--------------->8---

For now `J' and `C-c C-x C-j' do the same thing: they jump to the
location of the current/last running clock.

After this change `J' would jump on the entry in the agenda buffer 
while `C-c C-x C-j' would jump to the entry itself.

Does that break anyone habit?

-- 
 Bastien



reply via email to

[Prev in Thread] Current Thread [Next in Thread]