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#20498: 25.0.50; PATCH: break potential infinite loop in (line-move-to-column) Date: Sat, 09 May 2015 16:08:32 +0300 Message-ID: <83r3qpoq3z.fsf@gnu.org> References: <87k2wp8nji.fsf@secretsauce.net> <834mnsto2o.fsf@gnu.org> <87383b5s9z.fsf@secretsauce.net> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1431176967 15322 80.91.229.3 (9 May 2015 13:09:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 9 May 2015 13:09:27 +0000 (UTC) Cc: 20498-done@debbugs.gnu.org To: Dima Kogan Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat May 09 15:09:17 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 1Yr4VF-00075p-TT for geb-bug-gnu-emacs@m.gmane.org; Sat, 09 May 2015 15:09:14 +0200 Original-Received: from localhost ([::1]:59280 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yr4VF-0001pJ-C0 for geb-bug-gnu-emacs@m.gmane.org; Sat, 09 May 2015 09:09:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47835) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yr4V8-0001hc-8n for bug-gnu-emacs@gnu.org; Sat, 09 May 2015 09:09:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yr4V4-0001z3-NF for bug-gnu-emacs@gnu.org; Sat, 09 May 2015 09:09:06 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:57434) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yr4V4-0001yt-KI for bug-gnu-emacs@gnu.org; Sat, 09 May 2015 09:09:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Yr4V4-0004Ww-G3 for bug-gnu-emacs@gnu.org; Sat, 09 May 2015 09:09:02 -0400 Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Sat, 09 May 2015 13:09:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 20498 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Mail-Followup-To: 20498@debbugs.gnu.org, eliz@gnu.org, dima@secretsauce.net Original-Received: via spool by 20498-done@debbugs.gnu.org id=D20498.143117690717367 (code D ref 20498); Sat, 09 May 2015 13:09:01 +0000 Original-Received: (at 20498-done) by debbugs.gnu.org; 9 May 2015 13:08:27 +0000 Original-Received: from localhost ([127.0.0.1]:39175 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Yr4UU-0004W3-Tu for submit@debbugs.gnu.org; Sat, 09 May 2015 09:08:27 -0400 Original-Received: from mtaout23.012.net.il ([80.179.55.175]:65237) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Yr4US-0004Vo-8J for 20498-done@debbugs.gnu.org; Sat, 09 May 2015 09:08:25 -0400 Original-Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0NO300J0033HB300@a-mtaout23.012.net.il> for 20498-done@debbugs.gnu.org; Sat, 09 May 2015 16:08:17 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NO300JYC35S6770@a-mtaout23.012.net.il>; Sat, 09 May 2015 16:08:17 +0300 (IDT) In-reply-to: <87383b5s9z.fsf@secretsauce.net> 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:102618 Archived-At: > From: Dima Kogan > Cc: 20498@debbugs.gnu.org > Date: Tue, 05 May 2015 01:29:14 -0700 > > Hi. Thank you very much for double-checking. It indeed looks like (bolp) > should cover this case. It doesn't however. When ERC misbehaves in this > way I observe both > > (= (line-beginning-position) (point)) --> t > (bolp) --> nil > > This sounds wrong. Looking at the buffer with my eyes, the point is not > at the beginning of the line, so it LOOKS like the (bolp) result is > correct. > > The docs for (line-beginning-position) state that this function respects > field boundaries. If I ignore those explicitly then I see the correct > behavior: > > (let ((inhibit-field-text-motion t)) > (line-beginning-position)) ---> correct start of line > > So the correct patch would replace (line-beginning-position) to the > above expression. This is trivial, and I'm not actually attaching a > patch. If you want me to, tell me. Thanks, I pushed such a change. > (line-beginning-position) is used in quite a few places in emacs, and > I'm wondering if in many of those uses the intent is to ignore fields. I don't know, but I guess they will discover this in due time.