Mapping: Restore point and restriction in current buffer.
commit8cb1d66f8683ea38a09096cbba3a736c1ce70fe3
authorCarsten Dominik <carsten.dominik@gmail.com>
Wed, 14 Jan 2009 20:22:37 +0000 (14 21:22 +0100)
committerCarsten Dominik <carsten.dominik@gmail.com>
Wed, 14 Jan 2009 20:22:37 +0000 (14 21:22 +0100)
tree05da8524673edbe621e74a71e5822239c27c0812
parentd075718333d50cf582359162a89d3bab72b030f2
Mapping: Restore point and restriction in current buffer.

Daniel Clemente writes:

    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) ?

He is right, and save-restriction is needed as well.  This is
what this commit implements.
lisp/ChangeLog
lisp/org.el