From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: [PATCH] Proposed command: org-agenda-clock-goto Date: Sun, 01 Aug 2010 09:57:47 +0200 Message-ID: <87pqy29344.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from [140.186.70.92] (port=48637 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OfbXB-0001XM-L7 for emacs-orgmode@gnu.org; Sun, 01 Aug 2010 12:37:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OfTQc-0005y0-6T for emacs-orgmode@gnu.org; Sun, 01 Aug 2010 03:57:52 -0400 Received: from mail-ww0-f49.google.com ([74.125.82.49]:51373) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OfTQc-0005xr-2Q for emacs-orgmode@gnu.org; Sun, 01 Aug 2010 03:57:50 -0400 Received: by wwi14 with SMTP id 14so2420216wwi.30 for ; Sun, 01 Aug 2010 00:57:48 -0700 (PDT) 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 --=-=-= >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? --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=org-agenda.el.patch diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index d62b193..bba8683 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -2806,6 +2806,16 @@ the global options and expect it to be applied to the entire view.") (org-agenda-filter-apply org-agenda-filter)) ))) +(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)))) + (defun org-agenda-mark-clocking-task () "Mark the current clock entry in the agenda if it is present." (mapc (lambda (o) --=-=-= -- Bastien --=-=-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --=-=-=--