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: Andreas Seltenreich
Subject: Re: [Orgmode] [patch] org-agenda-goto should push mark before moving point
Date: Fri, 23 Apr 2010 10:42:58 +0200
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1 (gnu/linux)

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




reply via email to

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