From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#20734: 25.0.50; "Args out of range" with help-window-select t Date: Fri, 05 Jun 2015 09:41:31 +0300 Message-ID: <83r3pqpsh0.fsf@gnu.org> References: <86vbf3tfwj.fsf@members.fsf.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1433486543 12813 80.91.229.3 (5 Jun 2015 06:42:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 5 Jun 2015 06:42:23 +0000 (UTC) Cc: 20734@debbugs.gnu.org To: Nicolas Richard Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jun 05 08:42:11 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Z0lKV-0005Oc-Gc for geb-bug-gnu-emacs@m.gmane.org; Fri, 05 Jun 2015 08:42:11 +0200 Original-Received: from localhost ([::1]:45477 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z0lKU-0003Hu-Tb for geb-bug-gnu-emacs@m.gmane.org; Fri, 05 Jun 2015 02:42:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36354) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z0lKQ-0003FC-P9 for bug-gnu-emacs@gnu.org; Fri, 05 Jun 2015 02:42:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z0lKM-0006To-8t for bug-gnu-emacs@gnu.org; Fri, 05 Jun 2015 02:42:06 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:59235) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z0lKM-0006Tj-6Z for bug-gnu-emacs@gnu.org; Fri, 05 Jun 2015 02:42:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Z0lKL-0000Tg-Sr for bug-gnu-emacs@gnu.org; Fri, 05 Jun 2015 02:42:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 05 Jun 2015 06:42:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20734 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 20734-submit@debbugs.gnu.org id=B20734.14334865051804 (code B ref 20734); Fri, 05 Jun 2015 06:42:01 +0000 Original-Received: (at 20734) by debbugs.gnu.org; 5 Jun 2015 06:41:45 +0000 Original-Received: from localhost ([127.0.0.1]:40977 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z0lK4-0000T0-Mb for submit@debbugs.gnu.org; Fri, 05 Jun 2015 02:41:45 -0400 Original-Received: from mtaout21.012.net.il ([80.179.55.169]:64327) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z0lK2-0000Sk-3D for 20734@debbugs.gnu.org; Fri, 05 Jun 2015 02:41:42 -0400 Original-Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0NPG00700L6KHO00@a-mtaout21.012.net.il> for 20734@debbugs.gnu.org; Fri, 05 Jun 2015 09:41:35 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NPG00722L9BG250@a-mtaout21.012.net.il>; Fri, 05 Jun 2015 09:41:35 +0300 (IDT) In-reply-to: <86vbf3tfwj.fsf@members.fsf.org> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:103588 Archived-At: > From: Nicolas Richard > 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)