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: Tue, 27 Apr 2010 12:00:26 +0200 Message-ID: References: <871ve7433n.fsf@gate450.dyndns.org> <7BFD3F0D-0357-4E26-83C9-27E9B0B7B200@gmail.com> <87ljce1rvx.fsf@gate450.dyndns.org> Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O6hap-0006Zh-6x for emacs-orgmode@gnu.org; Tue, 27 Apr 2010 06:00:39 -0400 Received: from [140.186.70.92] (port=55455 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O6hal-0006WO-W3 for emacs-orgmode@gnu.org; Tue, 27 Apr 2010 06:00:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O6haf-0001FG-N6 for emacs-orgmode@gnu.org; Tue, 27 Apr 2010 06:00:35 -0400 Received: from mail-ew0-f214.google.com ([209.85.219.214]:35029) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O6haf-0001F6-Ic for emacs-orgmode@gnu.org; Tue, 27 Apr 2010 06:00:29 -0400 Received: by ewy6 with SMTP id 6so4738734ewy.32 for ; Tue, 27 Apr 2010 03:00:28 -0700 (PDT) In-Reply-To: <87ljce1rvx.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, 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