Re: map-extents and narrowed buffer

Hrvoje Niksic <[email protected]>
Newsgroups gmane.emacs.xemacs.design
Message-ID <[email protected]>
Kyle Jones <[email protected]> writes:

> Hrvoje Niksic writes:
>  >   ;; [1] Should map in [30, 60) because narrowing is in effect.
>  >   ;; Currently maps in [1, 100).
>  >   (map-extents function nil nil nil)
>  > [...]
>  > I seriously doubt that there's any code that actually depends on the
>  > current behavior of #1.
>
> It seems wrong to me for the map-extents to honor the clipping
> region for this case and not honor it in the other cases.
> Consistency.  In my own code I already call map-extents with
> (point-min)/(point-max) start/end values to get the clipping region
> honored, so I must have figured it out sometime in the past.

OK.  Then at least the docstring and the Info documentation of
map-extents should mention that map-extents ignores narrowing and
that, to respect it, you have to explicitly use (point-min) and
(point-max) as endpoints.

That should decrease the possibility of the nasty surprise.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.