From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Wolfgang Jenkner Newsgroups: gmane.emacs.devel Subject: Re: Bugs #7240, #9133 - fixing them both at the same time. Date: Sat, 24 Sep 2011 01:45:55 +0200 Message-ID: <857h4yhlfw.fsf@iznogoud.viz> References: <20110923192639.GB2562@acm.acm> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1316821571 9475 80.91.229.12 (23 Sep 2011 23:46:11 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 23 Sep 2011 23:46:11 +0000 (UTC) Cc: Richard Stallman , emacs-devel@gnu.org To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Sep 24 01:46:07 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1R7FRX-0002wf-12 for ged-emacs-devel@m.gmane.org; Sat, 24 Sep 2011 01:46:07 +0200 Original-Received: from localhost ([::1]:40252 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R7FRW-0002go-0C for ged-emacs-devel@m.gmane.org; Fri, 23 Sep 2011 19:46:06 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:45909) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R7FRT-0002gh-Nk for emacs-devel@gnu.org; Fri, 23 Sep 2011 19:46:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R7FRS-0008RH-Rd for emacs-devel@gnu.org; Fri, 23 Sep 2011 19:46:03 -0400 Original-Received: from mx10.lb01.inode.at ([62.99.145.10]:13505 helo=mx.inode.at) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R7FRR-0008QX-8v; Fri, 23 Sep 2011 19:46:01 -0400 Original-Received: from [85.127.94.229] (port=4377 helo=iznogoud.viz) by smartmx-10.inode.at with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1R7FRM-0004U9-S3; Sat, 24 Sep 2011 01:45:57 +0200 Original-Received: from wolfgang by iznogoud.viz with local (Exim 4.76 (FreeBSD)) (envelope-from ) id 1R7FRL-0000b0-Jw; Sat, 24 Sep 2011 01:45:55 +0200 Mail-Followup-To: Alan Mackenzie , Richard Stallman , emacs-devel@gnu.org In-Reply-To: <20110923192639.GB2562@acm.acm> (Alan Mackenzie's message of "Fri, 23 Sep 2011 19:26:39 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (berkeley-unix) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Received-From: 62.99.145.10 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:144237 Archived-At: Alan Mackenzie writes: > The cause of these failures was trying to make one variable, par-beg, do > two different jobs, namely 1) beginning of the paragraph; 2) start of > text in the paragraph. > > By separating these out into par-beg and text-beg the bug simply > evaporates. So part of your change is > (let ((opoint (point)) > (sentence-end (sentence-end))) > (while (< arg 0) > ! (let* ((pos (point)) > ! (text-beg > ! (progn (start-of-paragraph-text) > ! (point))) [...] > (goto-char (match-end 0)) > ! (goto-char text-beg))) and my whole patch is (goto-char (match-end 0)) - (goto-char par-beg))) + (goto-char opoint) + (start-of-paragraph-text))) This is equivalent. Of course, style matters. The rest of your change (with respect to the code before rms patched it) consists in adding the 4th and 5th line in > ! (par-beg > ! (progn > ! (backward-paragraph) > ! (if (looking-at paragraph-separate) > ! (forward-line)) > ! (point)))) That may be a good change, but it is not directly related to the bugs. > Please try out the following patch and confirm to me that it's OK. Then > I will commit it. Oh my. I'm afraid you got a code review instead;-) > Wolfgang: Thanks very much for taking the trouble to report this bug, > submitting a patch (even if it wasn't quite right), Wolfgang