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#18504: 24.3.93; posn-at-point intermittently returns wrong value for a valid buffer position Date: Fri, 19 Sep 2014 16:35:15 +0300 Message-ID: <837g0z20oc.fsf@gnu.org> References: <86mw9wfmxn.fsf@yandex.ru> <83ha041677.fsf@gnu.org> <541C0481.3050101@yandex.ru> <83a95v21qr.fsf@gnu.org> <541C2FBB.3030008@yandex.ru> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1411133791 13602 80.91.229.3 (19 Sep 2014 13:36:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 19 Sep 2014 13:36:31 +0000 (UTC) Cc: 18504@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Sep 19 15:36:24 2014 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 1XUyMI-0007V5-CO for geb-bug-gnu-emacs@m.gmane.org; Fri, 19 Sep 2014 15:36:22 +0200 Original-Received: from localhost ([::1]:58308 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XUyMI-0003ic-0L for geb-bug-gnu-emacs@m.gmane.org; Fri, 19 Sep 2014 09:36:22 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59333) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XUyM8-0003Zz-TK for bug-gnu-emacs@gnu.org; Fri, 19 Sep 2014 09:36:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XUyM3-0006vb-Ik for bug-gnu-emacs@gnu.org; Fri, 19 Sep 2014 09:36:12 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:53702) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XUyM3-0006vF-G5 for bug-gnu-emacs@gnu.org; Fri, 19 Sep 2014 09:36:07 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XUyLx-00066N-S7 for bug-gnu-emacs@gnu.org; Fri, 19 Sep 2014 09:36: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, 19 Sep 2014 13:36:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18504 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 18504-submit@debbugs.gnu.org id=B18504.141113372923410 (code B ref 18504); Fri, 19 Sep 2014 13:36:01 +0000 Original-Received: (at 18504) by debbugs.gnu.org; 19 Sep 2014 13:35:29 +0000 Original-Received: from localhost ([127.0.0.1]:45266 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XUyLP-00065V-VF for submit@debbugs.gnu.org; Fri, 19 Sep 2014 09:35:28 -0400 Original-Received: from mtaout28.012.net.il ([80.179.55.184]:34542) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XUyLL-00065J-Js for 18504@debbugs.gnu.org; Fri, 19 Sep 2014 09:35:24 -0400 Original-Received: from conversion-daemon.mtaout28.012.net.il by mtaout28.012.net.il (HyperSendmail v2007.08) id <0NC500000HLOJ200@mtaout28.012.net.il> for 18504@debbugs.gnu.org; Fri, 19 Sep 2014 16:34:25 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout28.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NC500LPYHPDQA30@mtaout28.012.net.il>; Fri, 19 Sep 2014 16:34:25 +0300 (IDT) In-reply-to: <541C2FBB.3030008@yandex.ru> 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:93516 Archived-At: > Date: Fri, 19 Sep 2014 17:29:31 +0400 > From: Dmitry Gutov > CC: 18504@debbugs.gnu.org > > On 09/19/2014 05:12 PM, Eli Zaretskii wrote: > > >> Wouldn't setting a conditional breakpoint help? > > > > Conditional breakpoint where? > > In the "call a function" routine, maybe? If the function is > "posn-at-point", and if its returned X coord is zero, halt! And then do what? The damage was already done, and the debugger cannot tell you how the code got to that wrong result post-factum. Btw, why is it important what happens when the user types C-g, i.e. if she abandons the completion? Or does the problem happen without C-g as well? > > With these issues, the only way to find the bug is to step through the > > offending code _before_ it produces the wrong values. So we need a > > condition that happens at the beginning of that code, not where it > > produces the final wrong results. > > If `posn-at-point' is itself stateless (and doesn't modify any relevant > caches), why not call it again at that point? Because it will most probably produce the correct result. But you can try that yourself: insert a second call under the conditions that you know are evidence of the problem. If that is repeatable, i.e. if that second call always produces the wrong result, then I have what I need.