|
From: | Bernt Hansen |
Subject: | [Orgmode] Re: Wishlist - Function to get to and reveal the current clocking task |
Date: | Thu, 04 Oct 2007 10:57:43 -0400 |
User-agent: | Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) |
Bastien <address@hidden> writes: > Bernt Hansen <address@hidden> writes: > >> If I fold my buffer it works but if I show all of the buffer with C-c >> C-a then repeatedly run the new function it jumps back and forth between >> two points in the file (lines 335 and 365 for me - the clock marker is >> on line 365 - almost at the end of the file) > > I guess the point itself is not moving, it's just the buffer being > centered differently. Let's add recenter: > > ------------------------------------------------------------------------ > (defun org-goto-clocked-in-entry (&optional delete-windows) > "Go to the currently clocked-in entry." > (interactive "P") > (if (not (marker-buffer org-clock-marker)) > (error "No active clock")) > (switch-to-buffer-other-window > (marker-buffer org-clock-marker)) > (if delete-windows (delete-other-windows)) > (goto-char org-clock-marker) > (org-show-entry) > (org-back-to-heading) > (recenter)) > ------------------------------------------------------------------------ That seems to help. Thanks.
[Prev in Thread] | Current Thread | [Next in Thread] |