emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [Orgmode] [patch] org-agenda-goto should push mark before moving poi


From: Carsten Dominik
Subject: Re: [Orgmode] [patch] org-agenda-goto should push mark before moving point
Date: Tue, 27 Apr 2010 12:00:26 +0200

Hi Andreas,

I have applied your patch.

Thanks.

- Carsten

On Apr 23, 2010, at 10:42 AM, Andreas Seltenreich wrote:

Carsten Dominik writes:

On Apr 22, 2010, at 10:57 PM, Andreas Seltenreich wrote:
   (switch-to-buffer-other-window buffer)
   (widen)
+   (push-mark)
   (goto-char pos)

I am no sure this is the right thing to do.  Because, often you will
show *many* places from the agenda before going back to the buffer.
Org-agenda-goto is called by many other functions like org-agenda-
show, org-agenda-recenter etc.

Well, I'd prefer too many marks over too few.  Popping multiple marks
off the local mark ring is still faster than moving point around
manually.

This might work better:

(defun my-org-agenda ()
  (interactive)
  (push-mark)
  (call-interactively 'org-agenda))

(define-key global-map "\C-ca" 'my-org-agenda)

Maybe you can test this and report back?

Won't work for me since most of the time I don't call the Agenda from
the affected buffers.  I guess advising goto-char and checking the
backtrace for org-agenda-goto isn't a good idea either since goto-char
is a C function...  I'm afraid having git merge along that change
indefinitely is the only option for me as long as I'm the only one
deeming it a good thing.

Thanks,
andreas

- Carsten







reply via email to

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