From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: org-map-entries moves point Date: Wed, 05 Feb 2014 15:59:21 -0500 Message-ID: <87mwi5uvh2.fsf@alphaville.bos.redhat.com> References: <52F295B1.6090806@miszellen.de> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51198) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WB9ZM-0003OM-0Y for emacs-orgmode@gnu.org; Wed, 05 Feb 2014 15:59:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WB9ZE-0005JQ-5O for emacs-orgmode@gnu.org; Wed, 05 Feb 2014 15:59:39 -0500 Received: from plane.gmane.org ([80.91.229.3]:39218) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WB9ZD-0005Iw-Vd for emacs-orgmode@gnu.org; Wed, 05 Feb 2014 15:59:32 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1WB9ZD-0004fO-58 for emacs-orgmode@gnu.org; Wed, 05 Feb 2014 21:59:31 +0100 Received: from pool-98-110-175-184.bstnma.fios.verizon.net ([98.110.175.184]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 05 Feb 2014 21:59:31 +0100 Received: from ndokos by pool-98-110-175-184.bstnma.fios.verizon.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 05 Feb 2014 21:59:31 +0100 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Florian Beck writes: > When I call org-map-entries with scope set to 'tree, the current > heading gets realigned to the top. > > Behold: > > (org-map-entries (lambda () > ;; do something or even nothing > ) nil 'tree) > > I think the culprit is the call to `org-agenda-prepare-buffers', or > rather commit fe3379bda6ca23474639b114592958bf14431c88, which replaces > save-excursion with save-window-excursion. > > What's interesting: This does NOT restore the window > configuration. When I replace save-window-excursion with > save-excursion the window configuration is restored again. > > I'm not sure *why* this happens. John Kitchin reported this last week and Bastien reverted that commit: http://thread.gmane.org/gmane.emacs.orgmode/81587 But it's not clear *why* that commit was done in the first place so if you get some enlightenment from your experiments, please share. Nick