From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Welsh Duggan Newsgroups: gmane.emacs.bugs Subject: bug#21730: 25.0.50; Random errors in redisplay--pre-redisplay-functions Date: Sat, 31 Oct 2015 09:07:05 -0400 Message-ID: <87mvuzfapy.fsf@md5i.com> References: <87io5zh7m1.fsf@md5i.com> <83vb9zt19o.fsf@gnu.org> <87y4epeyf2.fsf@md5i.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1446296910 12876 80.91.229.3 (31 Oct 2015 13:08:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 31 Oct 2015 13:08:30 +0000 (UTC) To: Eli Zaretskii , 21730@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Oct 31 14:08:13 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 1ZsVtE-0000JD-BL for geb-bug-gnu-emacs@m.gmane.org; Sat, 31 Oct 2015 14:08:12 +0100 Original-Received: from localhost ([::1]:55595 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZsVtD-0008RP-JK for geb-bug-gnu-emacs@m.gmane.org; Sat, 31 Oct 2015 09:08:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35443) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZsVt9-0008Qo-Sr for bug-gnu-emacs@gnu.org; Sat, 31 Oct 2015 09:08:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZsVt5-0001hl-FQ for bug-gnu-emacs@gnu.org; Sat, 31 Oct 2015 09:08:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:56065) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZsVt5-0001hh-By for bug-gnu-emacs@gnu.org; Sat, 31 Oct 2015 09:08:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZsVt4-0003wy-K8 for bug-gnu-emacs@gnu.org; Sat, 31 Oct 2015 09:08:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Welsh Duggan Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 31 Oct 2015 13:08: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.144629684915134 (code B ref 21730); Sat, 31 Oct 2015 13:08:02 +0000 Original-Received: (at 21730) by debbugs.gnu.org; 31 Oct 2015 13:07:29 +0000 Original-Received: from localhost ([127.0.0.1]:46773 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZsVsV-0003w1-RC for submit@debbugs.gnu.org; Sat, 31 Oct 2015 09:07:28 -0400 Original-Received: from md5i.com ([75.151.244.229]:37432) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZsVsA-0003va-Js for 21730@debbugs.gnu.org; Sat, 31 Oct 2015 09:07:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=md5i.com; s=dkim; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:References: Subject:To:From; bh=rUWgYAzjFOqYsANryIs3pNPe4NLCii9iNIkvNvFrM3k=; b=i5qlADLeh CKJEjOvi94c52Jsh19WPx+zbuQMMG+rwxvj3h5SIMypTs6NXrotU+jXVf62k900FR7zLUvLxPegt8 HsSlbPZCxOWqvENKP8DJ3RlEPYjkfsRG/J0JaKFC7H; Original-Received: from md5i by md5i.com with local (Exim 4.86) (envelope-from ) id 1ZsVs9-0000cv-R4; Sat, 31 Oct 2015 09:07:05 -0400 In-Reply-To: <87y4epeyf2.fsf@md5i.com> (Michael Welsh Duggan's message of "Tue, 27 Oct 2015 00:19:13 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) 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: 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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:108230 Archived-At: Michael Welsh Duggan writes: > Eli Zaretskii writes: > >> From the backtrace it is obvious that the immediate reason for the >> problem is the call to 'get-char-property' with an invalid 1st argument >> of zero (it's a buffer position, so should be at least 1). >> >> Looking at 'cursor-sensor--detect', I see this: >> >> (defun cursor-sensor--detect (window) >> (unless cursor-sensor-inhibit >> (let* ((point (window-point window)) >> ;; It's often desirable to make the cursor-sensor-functions property >> ;; non-sticky on both ends, but that means get-pos-property might >> ;; never see it. >> (new (or (get-char-property point 'cursor-sensor-functions) >> (unless (bobp) >> (get-char-property (1- point) 'cursor-sensor-functions)))) >> >> So my guess is that the value of 'point' (the variable, not the >> function) is 1, i.e. beginning of buffer, and subtracting 1 from it >> produces that zero. Then the second call to 'get-char-property' barfs >> as expected. >> >> The code tries to protect itself against such a calamity by calling >> 'bobp', but that function looks at the buffer's value of point, which >> might be different from what 'window-point' returns. >> >> So my advice would be to replace the call to 'bobp' with an explicit >> test of the value of the local variable 'point', and see if that fixes >> the problem. > > I've changed the (bobp) to (= point 1). I'll run it for a couple of > weeks and report back. This change seems to have done the trick. I have not encountered the error in several days. -- Michael Welsh Duggan (md5i@md5i.com)