From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: [PATCH] Proposed command: org-agenda-clock-goto Date: Wed, 04 Aug 2010 11:54:25 +0200 Message-ID: <87y6cm7lf2.fsf@gnu.org> References: <87pqy29344.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from [140.186.70.92] (port=55901 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OgagA-0004f9-DT for emacs-orgmode@gnu.org; Wed, 04 Aug 2010 05:54:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Ogag9-0004A7-79 for emacs-orgmode@gnu.org; Wed, 04 Aug 2010 05:54:30 -0400 Received: from mail-wy0-f169.google.com ([74.125.82.169]:39729) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Ogag9-00049v-11 for emacs-orgmode@gnu.org; Wed, 04 Aug 2010 05:54:29 -0400 Received: by wyg36 with SMTP id 36so5890359wyg.0 for ; Wed, 04 Aug 2010 02:54:28 -0700 (PDT) In-Reply-To: <87pqy29344.fsf@gnu.org> (Bastien's message of "Sun, 01 Aug 2010 09:57:47 +0200") 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 Bastien 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