From: Michael Welsh Duggan <mwd@md5i.com>
To: Eli Zaretskii <eliz@gnu.org>, 21730@debbugs.gnu.org
Subject: bug#21730: 25.0.50; Random errors in redisplay--pre-redisplay-functions
Date: Sat, 31 Oct 2015 09:07:05 -0400 [thread overview]
Message-ID: <87mvuzfapy.fsf@md5i.com> (raw)
In-Reply-To: <87y4epeyf2.fsf@md5i.com> (Michael Welsh Duggan's message of "Tue, 27 Oct 2015 00:19:13 -0400")
Michael Welsh Duggan <mwd@md5i.com> writes:
> Eli Zaretskii <eliz@gnu.org> 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)
next prev parent reply other threads:[~2015-10-31 13:07 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-22 4:04 bug#21730: 25.0.50; Random errors in redisplay--pre-redisplay-functions Michael Welsh Duggan
2015-10-22 14:40 ` Eli Zaretskii
2015-10-27 4:19 ` Michael Welsh Duggan
2015-10-31 13:07 ` Michael Welsh Duggan [this message]
2015-10-31 13:32 ` Eli Zaretskii
2016-09-14 17:01 ` Philipp Stephani
[not found] ` <CAArVCkTA5_hxvxszdYX1QWSoG382zg+mW=4U3uhiXmTBcPCSgw@mail.gmail.com>
2016-09-14 17:09 ` Eli Zaretskii
2016-09-14 18:43 ` Philipp Stephani
2016-09-14 19:23 ` Eli Zaretskii
2016-09-14 19:48 ` Philipp Stephani
2016-09-15 14:22 ` Eli Zaretskii
2016-09-14 19:11 ` Philipp Stephani
2016-09-14 19:25 ` Eli Zaretskii
2017-07-25 2:06 ` Sergio Durigan Junior
2017-07-25 14:21 ` Eli Zaretskii
2017-07-25 23:15 ` Sergio Durigan Junior
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87mvuzfapy.fsf@md5i.com \
--to=mwd@md5i.com \
--cc=21730@debbugs.gnu.org \
--cc=eliz@gnu.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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.