Bernt Hansen <[EMAIL PROTECTED]> 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


_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

Reply via email to