emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] Proposed command: org-agenda-clock-goto
@ 2010-08-01  7:57 Bastien
  2010-08-04  9:54 ` Bastien
  2010-08-06 14:52 ` Noorul Islam
  0 siblings, 2 replies; 17+ messages in thread
From: Bastien @ 2010-08-01  7:57 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 238 bytes --]

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?


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: org-agenda.el.patch --]
[-- Type: text/x-patch, Size: 731 bytes --]

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)

[-- Attachment #3: Type: text/plain, Size: 14 bytes --]


-- 
 Bastien

[-- Attachment #4: Type: text/plain, Size: 201 bytes --]

_______________________________________________
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

^ permalink raw reply related	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2010-08-12 11:34 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-01  7:57 [PATCH] Proposed command: org-agenda-clock-goto Bastien
2010-08-04  9:54 ` Bastien
2010-08-06 14:52 ` Noorul Islam
2010-08-06 17:38   ` Bastien
2010-08-06 17:54   ` Bernt Hansen
2010-08-07  8:14     ` Bastien
2010-08-07 13:22       ` Bernt Hansen
2010-08-09  6:50       ` Carsten Dominik
2010-08-11 14:24         ` Bastien
2010-08-11 22:04           ` Carsten Dominik
2010-08-11 22:13             ` Bastien
2010-08-12  3:15               ` Noorul Islam K M
2010-08-12  8:30                 ` Bastien
2010-08-12 10:26                   ` Noorul Islam K M
2010-08-12  9:57               ` Re: [PATCH] " Carsten Dominik
2010-08-12 11:23                 ` Bernt Hansen
2010-08-12 11:34                   ` Carsten Dominik

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).