From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#21730: 25.0.50; Random errors in redisplay--pre-redisplay-functions Date: Tue, 25 Jul 2017 17:21:50 +0300 Message-ID: <83a83s7g1t.fsf@gnu.org> References: <87io5zh7m1.fsf@md5i.com> <83vb9zt19o.fsf@gnu.org> <87y4epeyf2.fsf@md5i.com> <87mvuzfapy.fsf@md5i.com> <83ziyzxiwl.fsf@gnu.org> <83mvja7074.fsf@gnu.org> <87h8y1s20v.fsf@sergiodj.net> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1500992595 4136 195.159.176.226 (25 Jul 2017 14:23:15 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 25 Jul 2017 14:23:15 +0000 (UTC) Cc: 21730@debbugs.gnu.org, mwd@md5i.com, p.stephani2@gmail.com To: Sergio Durigan Junior Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jul 25 16:23:10 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1da0js-0000mH-B2 for geb-bug-gnu-emacs@m.gmane.org; Tue, 25 Jul 2017 16:23:08 +0200 Original-Received: from localhost ([::1]:32853 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1da0jy-0002Qt-1v for geb-bug-gnu-emacs@m.gmane.org; Tue, 25 Jul 2017 10:23:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58884) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1da0jr-0002QY-5U for bug-gnu-emacs@gnu.org; Tue, 25 Jul 2017 10:23:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1da0jm-0008Rx-PF for bug-gnu-emacs@gnu.org; Tue, 25 Jul 2017 10:23:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:53314) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1da0jm-0008Rj-LP for bug-gnu-emacs@gnu.org; Tue, 25 Jul 2017 10:23:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1da0jm-0005sm-F2 for bug-gnu-emacs@gnu.org; Tue, 25 Jul 2017 10:23:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 25 Jul 2017 14:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21730 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 21730-submit@debbugs.gnu.org id=B21730.150099252722540 (code B ref 21730); Tue, 25 Jul 2017 14:23:02 +0000 Original-Received: (at 21730) by debbugs.gnu.org; 25 Jul 2017 14:22:07 +0000 Original-Received: from localhost ([127.0.0.1]:55991 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1da0is-0005rU-RR for submit@debbugs.gnu.org; Tue, 25 Jul 2017 10:22:07 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:39146) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1da0ir-0005qz-E2 for 21730@debbugs.gnu.org; Tue, 25 Jul 2017 10:22:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1da0ig-0007hU-GX for 21730@debbugs.gnu.org; Tue, 25 Jul 2017 10:22:00 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:32824) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1da0ic-0007fg-GR; Tue, 25 Jul 2017 10:21:50 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4368 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1da0ib-00029O-VS; Tue, 25 Jul 2017 10:21:50 -0400 In-reply-to: <87h8y1s20v.fsf@sergiodj.net> (message from Sergio Durigan Junior on Mon, 24 Jul 2017 22:06:56 -0400) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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" Xref: news.gmane.org gmane.emacs.bugs:134966 Archived-At: > From: Sergio Durigan Junior > Cc: Philipp Stephani , 21730@debbugs.gnu.org, mwd@md5i.com > Date: Mon, 24 Jul 2017 22:06:56 -0400 > > Debugger entered--Lisp error: (args-out-of-range 0) > get-char-property(0 cursor-sensor-functions) > cursor-sensor--detect(#) > ^^^^^^^^^^^^^^^^^^^^^^^^^ > run-hook-with-args(cursor-sensor--detect #) > redisplay--pre-redisplay-functions(t) > apply(redisplay--pre-redisplay-functions t) > [ lots of other functions not interesting for us ] > > I took the liberty to mark the interesting part above, which is the > argument to cursor-sensor--detect. As you can notice, it's working on > the *Group* window, from Gnus. Now, the interesting part that I noticed > and was able to verify is that this only happens when (a) I am not > working in that buffer, (b) the point is at (point-min) at that buffer, > but (c) the point is not (point-min) at the buffer I'm currently in. In > this case, Emacs does some wrong calculations with point and ends up > with the value of 0, which makes sense if you consider that > (window-point) of that window is 1, but (bobp) is not t (because, as I > explained, I'm working in another buffer, and the value of point there > is not 1). > > With all that said, I came to the conclusion that Phillip's rationale > makes sense and therefore his patch seems to be the best shot we have at > fixing this annoying bug. Thanks for following up. Phillip's hypothesis assumes that there's another function in pre-redisplay-function, which is called before cursor-sensor--detect and switches to another buffer, leaving us there. Do you indeed have other functions on that list? If so, what are they? I'm asking because I'd like to be sure we are on the right track with the root cause.