Hrvoje Niksic writes:
Kyle Jones <kyle_jones(a)wonderworks.com> writes:
> Hrvoje Niksic writes:
> > Kyle Jones <kyle_jones(a)wonderworks.com> writes:
> >
> > > Easily reproducible. The problem is that the selection is stored as
> > > the region between the buffer's point marker and the buffer mark.
> >
> > Couldn't it store the region between (region-beginning) and
> > (region-end)? That seems to hold information that is synchronized
> > with the visual information displayed by zmacs-regions.
>
> region-beginning/region-end will return different values depending
> on which window displaying a buffer is the selected window, so it
> suffers from the same problem. The zmacs-region extent could almost
> be used, as its endpoints are not altered by mere selection of a
> window. But the extent isn't updated if zmacs-regions == nil so
> the extent won't be covering the correct region if the user isn't
> using zmacs-regions.
Let me be a pest some more: can we use primary-selection-extent? That
looks like it's independent of zmacs-regions and like it should
encompass the correct region.
I think using the zmacs-region extent when zmacs-regions == t
and primary-selection-extent otherwise would do it.