emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] Re: Wishlist - Function to get to and reveal the current c


From: Bastien
Subject: Re: [Orgmode] Re: Wishlist - Function to get to and reveal the current clocking task
Date: Wed, 03 Oct 2007 22:36:48 +0100
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.0 (gnu/linux)

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

?

-- 
Bastien




reply via email to

[Prev in Thread] Current Thread [Next in Thread]