From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Lundin Subject: Re: [PATCH] Removed unecessary invocations of org-agenda-show. Date: Tue, 05 Oct 2010 14:07:16 -0400 Message-ID: <878w2c7bu3.fsf@fastmail.fm> References: <87zkvly3m3.fsf@archdesk.localdomain> <878w329v2i.fsf@archdesk.localdomain> <62316513-0AF8-4F39-A770-475C76DFB790@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from [140.186.70.92] (port=52086 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P3Bv6-0004iX-Rk for emacs-orgmode@gnu.org; Tue, 05 Oct 2010 14:07:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P3Bv5-00055c-Ai for emacs-orgmode@gnu.org; Tue, 05 Oct 2010 14:07:20 -0400 Received: from out5.smtp.messagingengine.com ([66.111.4.29]:37224) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P3Bv5-00054t-3c for emacs-orgmode@gnu.org; Tue, 05 Oct 2010 14:07:19 -0400 In-Reply-To: <62316513-0AF8-4F39-A770-475C76DFB790@gmail.com> (Carsten Dominik's message of "Mon, 4 Oct 2010 06:22:50 +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: org-mode List Hi Carsten Carsten Dominik writes: > On Sep 16, 2010, at 6:22 AM, Matthew Lundin wrote: > >> Hi Carsten, >> >> Carsten Dominik writes: >> >>> 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? >> >> I haven't yet encountered any deleterious side effects, but I agree >> that >> this patch needs further consideration. I will do some additional >> research/testing and return with a report. :) > > Hi Matt, > > any new about this patch? > I've looked at the code and can't see anything that org-agenda-show adds to org-agenda-set-tags, apart from making the original buffer visible. The function org-agenda-show calls org-agenda-goto, which grabs the value of org-marker, jumps to the corresponding buffer and position, and shows the next heading. The function org-agenda-set-tags does exactly the same things in the background, except that it uses org-hd-marker instead of org-marker. As a point of comparison, org-agenda-todo seems to works just fine without invoking org-agenda-show. Unfortunately, there haven't been substantial changes to org-agenda-set-tags since 4.12a (the beginning of the git repository), so I can't reconstruct why the hack was added. I've not run into any troubles with the patch. I've tried moving headlines around behind the agenda's back, changing multiple lines before refreshing the agenda buffer, etc., all without issue. That's not to say there aren't problems lurking out there somewhere; but detecting them is beyond my abilities. :) Best, Matt