From mboxrd@z Thu Jan  1 00:00:00 1970
From: Carsten Dominik <carsten.dominik@gmail.com>
Subject: Re: [PATCH] Removed unecessary invocations of org-agenda-show.
Date: Tue, 14 Sep 2010 09:35:21 +0200
Message-ID: <C2234DC7-1A63-4EB1-8CFC-8579CA7B249B@gmail.com>
References: <87zkvly3m3.fsf@archdesk.localdomain>
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: <emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org>
Received: from [140.186.70.92] (port=48607 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1OvQ37-0004T8-6B
	for emacs-orgmode@gnu.org; Tue, 14 Sep 2010 03:35:33 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69)
	(envelope-from <carsten.dominik@gmail.com>) id 1OvQ33-00079U-9I
	for emacs-orgmode@gnu.org; Tue, 14 Sep 2010 03:35:29 -0400
Received: from mail-ew0-f41.google.com ([209.85.215.41]:41696)
	by eggs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <carsten.dominik@gmail.com>) id 1OvQ33-00079O-2c
	for emacs-orgmode@gnu.org; Tue, 14 Sep 2010 03:35:25 -0400
Received: by ewy28 with SMTP id 28so3553671ewy.0
	for <emacs-orgmode@gnu.org>; Tue, 14 Sep 2010 00:35:24 -0700 (PDT)
In-Reply-To: <87zkvly3m3.fsf@archdesk.localdomain>
List-Id: "General discussions about Org-mode." <emacs-orgmode.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/emacs-orgmode>,
	<mailto:emacs-orgmode-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/emacs-orgmode>
List-Post: <mailto:emacs-orgmode@gnu.org>
List-Help: <mailto:emacs-orgmode-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/emacs-orgmode>,
	<mailto:emacs-orgmode-request@gnu.org?subject=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: Matt Lundin <mdl@imapmail.org>
Cc: org-mode List <emacs-orgmode@gnu.org>


On Sep 13, 2010, at 6:48 PM, Matt Lundin wrote:

>
> lisp/org-agenda.el (org-agenda-set-tags): Remove org-agenda-show to  
> prevent
> disrupting windows and changing point in original buffer.
> (org-agenda-set-property): Same
> (org-agenda-set-effort): Same
> (org-agenda-toggle-archive-tag): Same
>
> When setting a tag in the agenda, org-mode displays the corresponding
> entry in the original org buffer by calling org-agenda-show. This has
> the unwelcome side-effect of disrupting the current window arrangement
> and changing the position of the point in the original buffer. This
> behavior is inconsistent with the that of org-agenda-todo, which makes
> all its changes "silently."

I agree, but I am sure I used to have problems with something
which is why this was added.
Have you been running this patch for some time already?
Without any problems like the agenda jumping to a wrong place in a org  
file or so?
That would be great.

- Carsten


>
> Here is the offending line (6799) in org-agenda-set-tags:
>
> --8<---------------cut here---------------start------------->8---
> (org-agenda-show)   ;;; FIXME This is a stupid hack and should not  
> be needed
> --8<---------------cut here---------------end--------------->8---
>
> The same line occurs in org-agenda-set-property, org-agenda-set- 
> effort,
> and org-agenda-toggle-archive tag.
> ---
> lisp/org-agenda.el |    4 ----
> 1 files changed, 0 insertions(+), 4 deletions(-)
>
> diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
> index 32c65db..784ba6a 100644
> --- a/lisp/org-agenda.el
> +++ b/lisp/org-agenda.el
> @@ -6796,7 +6796,6 @@ the same tree node, and the headline of the  
> tree node in the Org-mode file."
>   (org-agenda-check-no-diary)
>   (if (and (org-region-active-p) (interactive-p))
>       (call-interactively 'org-change-tag-in-region)
> -    (org-agenda-show)   ;;; FIXME This is a stupid hack and should  
> not be needed
>     (let* ((hdmarker (or (org-get-at-bol 'org-hd-marker)
> 			 (org-agenda-error)))
> 	   (buffer (marker-buffer hdmarker))
> @@ -6825,7 +6824,6 @@ the same tree node, and the headline of the  
> tree node in the Org-mode file."
>   "Set a property for the current headline."
>   (interactive)
>   (org-agenda-check-no-diary)
> -  (org-agenda-show)   ;;; FIXME This is a stupid hack and should  
> not be needed
>   (let* ((hdmarker (or (org-get-at-bol 'org-hd-marker)
> 		       (org-agenda-error)))
> 	 (buffer (marker-buffer hdmarker))
> @@ -6848,7 +6846,6 @@ the same tree node, and the headline of the  
> tree node in the Org-mode file."
>   "Set the effort property for the current headline."
>   (interactive)
>   (org-agenda-check-no-diary)
> -  (org-agenda-show)   ;;; FIXME This is a stupid hack and should  
> not be needed
>   (let* ((hdmarker (or (org-get-at-bol 'org-hd-marker)
> 		       (org-agenda-error)))
> 	 (buffer (marker-buffer hdmarker))
> @@ -6872,7 +6869,6 @@ the same tree node, and the headline of the  
> tree node in the Org-mode file."
>   "Toggle the archive tag for the current entry."
>   (interactive)
>   (org-agenda-check-no-diary)
> -  (org-agenda-show)   ;;; FIXME This is a stupid hack and should  
> not be needed
>   (let* ((hdmarker (or (org-get-at-bol 'org-hd-marker)
>                        (org-agenda-error)))
> 	 (buffer (marker-buffer hdmarker))
> -- 
> 1.7.2.3
>
>
> _______________________________________________
> 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