From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: Re: Wishlist - Function to get to and reveal the current clocking task Date: Wed, 03 Oct 2007 22:36:48 +0100 Message-ID: <87myuzribz.fsf@bzg.ath.cx> References: <877im413y0.fsf@gollum.intra.norang.ca> <878x6krryb.fsf@bzg.ath.cx> <87ve9oyrmm.fsf@gollum.intra.norang.ca> <87zlz0qbhk.fsf@bzg.ath.cx> <87k5q4ypy1.fsf@gollum.intra.norang.ca> <877im4ezuv.fsf@bzg.ath.cx> <877im42akr.fsf@gollum.intra.norang.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IdBtt-0002Jy-U7 for emacs-orgmode@gnu.org; Wed, 03 Oct 2007 17:37:01 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IdBts-0002GG-1S for emacs-orgmode@gnu.org; Wed, 03 Oct 2007 17:37:01 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IdBtr-0002F3-Oz for emacs-orgmode@gnu.org; Wed, 03 Oct 2007 17:36:59 -0400 Received: from hu-out-0506.google.com ([72.14.214.236]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IdBtq-0002T6-0i for emacs-orgmode@gnu.org; Wed, 03 Oct 2007 17:36:58 -0400 Received: by hu-out-0506.google.com with SMTP id 23so2393573huc for ; Wed, 03 Oct 2007 14:36:57 -0700 (PDT) In-Reply-To: <877im42akr.fsf@gollum.intra.norang.ca> (Bernt Hansen's message of "Wed, 03 Oct 2007 16:43:32 -0400") 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 Bernt Hansen 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)) ------------------------------------------------------------------------ ? -- Bastien