unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Nicolas Richard <youngfrog@members.fsf.org>
Cc: 20734@debbugs.gnu.org
Subject: bug#20734: 25.0.50; "Args out of range" with help-window-select t
Date: Fri, 05 Jun 2015 09:41:31 +0300	[thread overview]
Message-ID: <83r3pqpsh0.fsf@gnu.org> (raw)
In-Reply-To: <86vbf3tfwj.fsf@members.fsf.org>

> From: Nicolas Richard <youngfrog@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)





  parent reply	other threads:[~2015-06-05  6:41 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-04 19:47 bug#20734: 25.0.50; "Args out of range" with help-window-select t Nicolas Richard
2015-06-04 22:27 ` Stefan Monnier
2015-06-05  9:33   ` Nicolas Richard
2015-06-05 13:46     ` Eli Zaretskii
2015-06-05  6:41 ` Eli Zaretskii [this message]
2015-06-05  9:25   ` Nicolas Richard
2015-06-05 13:45     ` Eli Zaretskii
2015-06-05 19:48       ` Nicolas Richard
2015-06-05 19:56         ` Eli Zaretskii
2015-06-06  8:44           ` Nicolas Richard
2015-06-06  8:56             ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83r3pqpsh0.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=20734@debbugs.gnu.org \
    --cc=youngfrog@members.fsf.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.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).