From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Seltenreich Subject: [patch] org-agenda-goto should push mark before moving point Date: Thu, 22 Apr 2010 22:57:48 +0200 Message-ID: <871ve7433n.fsf@gate450.dyndns.org> 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 1O53T9-0002vB-6A for emacs-orgmode@gnu.org; Thu, 22 Apr 2010 16:57:55 -0400 Received: from [140.186.70.92] (port=33006 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O53T7-0002s5-Qw for emacs-orgmode@gnu.org; Thu, 22 Apr 2010 16:57:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O53T6-0006nR-D4 for emacs-orgmode@gnu.org; Thu, 22 Apr 2010 16:57:53 -0400 Received: from smtp1.rz.uni-karlsruhe.de ([129.13.185.217]:45416) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O53T6-0006nC-87 for emacs-orgmode@gnu.org; Thu, 22 Apr 2010 16:57:52 -0400 Received: from uwi7 by rzstud2.stud.uni-karlsruhe.de with local (Exim 4.63) (envelope-from ) id 1O53T3-0007tG-70 for emacs-orgmode@gnu.org; Thu, 22 Apr 2010 22:57:49 +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: emacs-orgmode@gnu.org 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)