From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Seltenreich Subject: Re: [patch] org-agenda-goto should push mark before moving point Date: Fri, 23 Apr 2010 10:42:58 +0200 Message-ID: <87ljce1rvx.fsf@gate450.dyndns.org> References: <871ve7433n.fsf@gate450.dyndns.org> <7BFD3F0D-0357-4E26-83C9-27E9B0B7B200@gmail.com> 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 1O5ETc-000605-Pn for emacs-orgmode@gnu.org; Fri, 23 Apr 2010 04:43:08 -0400 Received: from [140.186.70.92] (port=53988 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O5ETY-0005s2-Cs for emacs-orgmode@gnu.org; Fri, 23 Apr 2010 04:43:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O5ETV-0000x6-MM for emacs-orgmode@gnu.org; Fri, 23 Apr 2010 04:43:04 -0400 Received: from smtp2.rz.uni-karlsruhe.de ([129.13.185.218]:50720) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O5ETV-0000wp-7z for emacs-orgmode@gnu.org; Fri, 23 Apr 2010 04:43:01 -0400 In-Reply-To: <7BFD3F0D-0357-4E26-83C9-27E9B0B7B200@gmail.com> (Carsten Dominik's message of "Fri, 23 Apr 2010 08:35:29 +0200") 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: Carsten Dominik Cc: emacs-orgmode@gnu.org 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