From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: [patch] org-agenda-goto should push mark before moving point Date: Fri, 23 Apr 2010 08:35:29 +0200 Message-ID: <7BFD3F0D-0357-4E26-83C9-27E9B0B7B200@gmail.com> References: <871ve7433n.fsf@gate450.dyndns.org> Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O5DeO-00018k-On for emacs-orgmode@gnu.org; Fri, 23 Apr 2010 03:50:13 -0400 Received: from [140.186.70.92] (port=33301 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O5DeI-00016P-So for emacs-orgmode@gnu.org; Fri, 23 Apr 2010 03:50:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O5DeE-0001HG-C1 for emacs-orgmode@gnu.org; Fri, 23 Apr 2010 03:50:05 -0400 Received: from mail-ew0-f214.google.com ([209.85.219.214]:38821) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O5DeC-0001Ff-Lp for emacs-orgmode@gnu.org; Fri, 23 Apr 2010 03:50:02 -0400 Received: by ewy6 with SMTP id 6so2905446ewy.32 for ; Fri, 23 Apr 2010 00:49:58 -0700 (PDT) In-Reply-To: <871ve7433n.fsf@gate450.dyndns.org> 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: Andreas Seltenreich Cc: emacs-orgmode@gnu.org Hi Andreas, On Apr 22, 2010, at 10:57 PM, Andreas Seltenreich wrote: > Hi, > > many commands in Emacs that move the point long distances push the > mark > so you can go back using C-u C-. org-agenda-goto doesn't do > this, > and I found it a bit annoying that I have to navigate the outline > again > to find back to where the point was before using the Agenda. > > Patch attached. > > regards, > andreas > > diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el > index c68038d..9f35069 100644 > --- a/lisp/org-agenda.el > +++ b/lisp/org-agenda.el > @@ -6082,6 +6082,7 @@ > (pos (marker-position marker))) > (switch-to-buffer-other-window buffer) > (widen) > + (push-mark) > (goto-char pos) > (when (org-mode-p) > (org-show-context 'agenda) 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. 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? - Carsten > > > _______________________________________________ > Emacs-orgmode mailing list > Please use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode - Carsten