* org-map-entries narrows to subtree
@ 2009-01-11 18:26 Daniel Clemente
2009-01-11 18:36 ` Daniel Clemente
2009-01-17 7:58 ` Carsten Dominik
0 siblings, 2 replies; 4+ messages in thread
From: Daniel Clemente @ 2009-01-11 18:26 UTC (permalink / raw)
To: org-mode mailing list
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) ?
-- Daniel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: org-map-entries narrows to subtree
2009-01-11 18:26 org-map-entries narrows to subtree Daniel Clemente
@ 2009-01-11 18:36 ` Daniel Clemente
2009-01-11 20:59 ` Eric Schulte
2009-01-17 7:58 ` Carsten Dominik
1 sibling, 1 reply; 4+ messages in thread
From: Daniel Clemente @ 2009-01-11 18:36 UTC (permalink / raw)
To: org-mode mailing list
Daniel Clemente <n142857@gmail.com> writes:
> Should (save-excursion) be used inside (org-map-entries ... 'tree) ?
Sorry, I meant (save-restriction)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: org-map-entries narrows to subtree
2009-01-11 18:26 org-map-entries narrows to subtree Daniel Clemente
2009-01-11 18:36 ` Daniel Clemente
@ 2009-01-17 7:58 ` Carsten Dominik
1 sibling, 0 replies; 4+ messages in thread
From: Carsten Dominik @ 2009-01-17 7:58 UTC (permalink / raw)
To: Daniel Clemente; +Cc: org-mode mailing list
[-- Attachment #1.1: Type: text/plain, Size: 493 bytes --]
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
[-- Attachment #1.2: Type: text/html, Size: 940 bytes --]
[-- Attachment #2: Type: text/plain, Size: 204 bytes --]
_______________________________________________
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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-01-17 7:58 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-11 18:26 org-map-entries narrows to subtree Daniel Clemente
2009-01-11 18:36 ` Daniel Clemente
2009-01-11 20:59 ` Eric Schulte
2009-01-17 7:58 ` Carsten Dominik
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).