From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Sergio Durigan Junior Newsgroups: gmane.emacs.bugs Subject: bug#21730: 25.0.50; Random errors in redisplay--pre-redisplay-functions Date: Tue, 25 Jul 2017 19:15:48 -0400 Message-ID: <87lgncqfa3.fsf@sergiodj.net> 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> <83a83s7g1t.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1501024578 1166 195.159.176.226 (25 Jul 2017 23:16:18 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 25 Jul 2017 23:16:18 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) Cc: 21730@debbugs.gnu.org, mwd@md5i.com, p.stephani2@gmail.com To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jul 26 01:16:13 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 1da93i-0008Ky-6I for geb-bug-gnu-emacs@m.gmane.org; Wed, 26 Jul 2017 01:16:10 +0200 Original-Received: from localhost ([::1]:35015 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1da93o-0008AS-1g for geb-bug-gnu-emacs@m.gmane.org; Tue, 25 Jul 2017 19:16:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38301) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1da93e-00088c-8n for bug-gnu-emacs@gnu.org; Tue, 25 Jul 2017 19:16:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1da93a-0001bv-1n for bug-gnu-emacs@gnu.org; Tue, 25 Jul 2017 19:16:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:53798) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1da93Z-0001az-Uy for bug-gnu-emacs@gnu.org; Tue, 25 Jul 2017 19:16:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1da93Z-0000Ta-LR for bug-gnu-emacs@gnu.org; Tue, 25 Jul 2017 19:16:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Sergio Durigan Junior Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 25 Jul 2017 23:16:01 +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.15010245541814 (code B ref 21730); Tue, 25 Jul 2017 23:16:01 +0000 Original-Received: (at 21730) by debbugs.gnu.org; 25 Jul 2017 23:15:54 +0000 Original-Received: from localhost ([127.0.0.1]:56475 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1da93S-0000TB-68 for submit@debbugs.gnu.org; Tue, 25 Jul 2017 19:15:54 -0400 Original-Received: from kwanyin.sergiodj.net ([158.69.185.54]:60064) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1da93P-0000T0-Gg for 21730@debbugs.gnu.org; Tue, 25 Jul 2017 19:15:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sergiodj.net; s=20160602; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:References:Subject:Cc:To:From; bh=aTpd4KukeLOAcyZzlr/gft1XMsR7GfCYBY94fzhgSDA=; b=bu3kTTNAXIwaGXr4OQRxNjz13/tubRcS50kI0rOxpRzn1KwMjNbB2n493YJK+7kLMEZcwj6xZYHFZ5hCHk0aKtFwzWPDFG7aVYeNg1VlYf+9a67buY+W1cdhDKlteJru9Gv47xuVEEtMRm3/DirGNxHtsNJvo/NvXw8Vi7urLzM=; X-URL: http://blog.sergiodj.net In-Reply-To: <83a83s7g1t.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 25 Jul 2017 17:21:50 +0300") 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:134999 Archived-At: On Tuesday, July 25 2017, Eli Zaretskii wrote: >> 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? You know, that's a good question. After looking into what I have here, I don't see any other function being called before pre-redisplay-functions. Everything seems fine and I see the call to with-current-buffer before calling run-hook-with-args, which means that, unless there is a bug somewhere, I don't see how the buffer could have changed. > I'm asking because I'd like to be sure we are on the right track with > the root cause. Sure thing. Well, if you ask me, I'm convinced that what I explained in my last message is what happens, but I still don't know *why* it happens. I'll see if I manage to investigate this a bit more. Thanks, -- Sergio GPG key ID: 237A 54B1 0287 28BF 00EF 31F4 D0EB 7628 65FC 5E36 Please send encrypted e-mail if possible http://sergiodj.net/