GNU bug report logs - #20734
25.0.50; "Args out of range" with help-window-select t

Previous Next

Package: emacs;

Reported by: Nicolas Richard <youngfrog <at> members.fsf.org>

Date: Thu, 4 Jun 2015 19:48:02 UTC

Severity: normal

Found in version 25.0.50

Done: Nicolas Richard <youngfrog <at> members.fsf.org>

Bug is archived. No further changes may be made.

Full log


Message #11 received at 20734 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Nicolas Richard <youngfrog <at> members.fsf.org>
Cc: 20734 <at> debbugs.gnu.org
Subject: Re: bug#20734: 25.0.50; "Args out of range" with help-window-select t
Date: Fri, 05 Jun 2015 09:41:31 +0300
> From: Nicolas Richard <youngfrog <at> members.fsf.org>
> Date: Thu, 04 Jun 2015 21:47:08 +0200
> 
>     Fix display of overlapping window-specific overlays
>     
>     * src/keyboard.c (adjust_point_for_property): When adjusting point
>     due to display strings, ignore overlays that are specific to
>     windows other than the currently selected one.
>     
>     * src/xdisp.c (handle_single_display_spec): If the display
>     property comes from an overlay, arrange for buffer iteration to
>     resume only after the end of that overlay.  (Bug#20607)
> 
> I understand that
>   get_char_property_and_overlay
>       (make_number (PT), Qdisplay, selected_window,
>        &overlay))
> should not refer to PT but to "PT in selected_window", but I don't know
> how to do that.

Are you saying that adjust_point_for_property is called with the
current buffer different from what's recorded in selected_window's
buffer?  If so, please show the evidence: what is in current_buffer
and what is recorded as the selected window's buffer at that point.

And please note that the conditions in the 'if' clause that determine
whether adjust_point_for_property is called freely manipulate values
of current_buffer and PT, so perhaps the solution is add there a
condition that selected_window's buffer and current_buffer are equal,
such that in the case in point adjust_point_for_property is not called
at all.

To answer your question directly, it should be possible to compute the
(Lisp integer) value of point in the selected window as either

    make_number (marker_position (XWINDOW (selected_window)->pointm))
or
    Fwindow_point (selected_window)
or
    make_number (XBUFFER (XWINDOW (selected_window)->contents)->pt)




This bug report was last modified 10 years and 49 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.