From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: org-map-entries narrows to subtree Date: Sat, 17 Jan 2009 08:58:45 +0100 Message-ID: <3C5466AD-C933-4668-AF0C-1EC83E7098A0@uva.nl> References: <871vv9og0h.fsf@gmail.com> Mime-Version: 1.0 (Apple Message framework v930.3) Content-Type: multipart/mixed; boundary="===============0918996122==" Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LO64u-0004gd-6l for emacs-orgmode@gnu.org; Sat, 17 Jan 2009 02:58:48 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LO64t-0004gF-T6 for emacs-orgmode@gnu.org; Sat, 17 Jan 2009 02:58:47 -0500 Received: from [199.232.76.173] (port=60965 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LO64t-0004gB-Jh for emacs-orgmode@gnu.org; Sat, 17 Jan 2009 02:58:47 -0500 Received: from mail-ew0-f15.google.com ([209.85.219.15]:62123) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LO64s-0005iA-UQ for emacs-orgmode@gnu.org; Sat, 17 Jan 2009 02:58:47 -0500 Received: by mail-ew0-f15.google.com with SMTP id 8so42593ewy.18 for ; Fri, 16 Jan 2009 23:58:46 -0800 (PST) In-Reply-To: <871vv9og0h.fsf@gmail.com> 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: Daniel Clemente Cc: org-mode mailing list --===============0918996122== Content-Type: multipart/alternative; boundary=Apple-Mail-6-468854829 --Apple-Mail-6-468854829 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit On Jan 11, 2009, at 7:26 PM, Daniel Clemente wrote: > > Hi. After you eval this (for instance to count the number of > headlines under a tree): > > (org-map-entries 'ignore t 'tree) > > you end up with a different view of the buffer because (org-narrow- > to-subtree) was called. This seems an unwanted side effect since > narrowing is not org-map-entries' job. > > Should (save-excursion) be used inside (org-map-entries ... 'tree) ? Yes, I have made this change, thanks. - Carsten --Apple-Mail-6-468854829 Content-Type: text/html; charset=US-ASCII Content-Transfer-Encoding: 7bit
On Jan 11, 2009, at 7:26 PM, Daniel Clemente wrote:


Hi. After you eval this (for instance to count the number of headlines under a tree):

(org-map-entries 'ignore t 'tree)

you end up with a different view of the buffer because (org-narrow-to-subtree) was called. This seems an unwanted side effect since narrowing is not org-map-entries' job.

Should (save-excursion) be used inside (org-map-entries ... 'tree) ?

Yes, I have made this change, thanks.

- Carsten

--Apple-Mail-6-468854829-- --===============0918996122== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --===============0918996122==--