From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#45720: 28.0.50; fill-region-as-paragraph with long unbreakable lines Date: Sun, 10 Jan 2021 15:06:49 +0100 Message-ID: <87eeisubra.fsf@gnus.org> References: <40659.67204.506971.24567@gargle.gargle.HOWL> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29820"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 45720@debbugs.gnu.org To: "Roland Winkler" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jan 10 15:08:30 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kybOQ-0007ek-4r for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 10 Jan 2021 15:08:30 +0100 Original-Received: from localhost ([::1]:33490 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kybOO-00063J-Nm for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 10 Jan 2021 09:08:28 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35988) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kybNy-00061U-Ek for bug-gnu-emacs@gnu.org; Sun, 10 Jan 2021 09:08:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:41951) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kybNy-0002CC-5v for bug-gnu-emacs@gnu.org; Sun, 10 Jan 2021 09:08:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kybNx-0006WE-Up for bug-gnu-emacs@gnu.org; Sun, 10 Jan 2021 09:08:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 10 Jan 2021 14:08:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45720 X-GNU-PR-Package: emacs Original-Received: via spool by 45720-submit@debbugs.gnu.org id=B45720.161028762124929 (code B ref 45720); Sun, 10 Jan 2021 14:08:01 +0000 Original-Received: (at 45720) by debbugs.gnu.org; 10 Jan 2021 14:07:01 +0000 Original-Received: from localhost ([127.0.0.1]:53494 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kybMz-0006Tw-7X for submit@debbugs.gnu.org; Sun, 10 Jan 2021 09:07:01 -0500 Original-Received: from quimby.gnus.org ([95.216.78.240]:41366) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kybMx-0006TZ-9Z for 45720@debbugs.gnu.org; Sun, 10 Jan 2021 09:06:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=9SXImkjduIrGQ1S8tBoxIlM6Z/mBN8jJ4SkMekNsw10=; b=aclyZm2ppi9IbtgyMHUSaNaYkn g2IiayGfBMuGm8qGfUmzsjmePBQx83rjTJdRxRuAKXrVAfz1cITf9cr7cGXDqtHd/BK5T5TyzFLU8 Fh9B4f3XWAnlcZZCvy/1WuiKIRFH+Rr+2cr7y7SzwCQhJjOmSIGD87j0/GpNU8SdaVuI=; Original-Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kybMo-0007Y7-CC; Sun, 10 Jan 2021 15:06:52 +0100 X-Now-Playing: Joy Division's _Substance_: "Transmission" In-Reply-To: <40659.67204.506971.24567@gargle.gargle.HOWL> (Roland Winkler's message of "Thu, 7 Jan 2021 17:52:51 -0600") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:197609 Archived-At: "Roland Winkler" writes: > Then put point on letter `b' of the following line and run M-x foo > > aaa = baaaaaaaaaaaaaaaaaaaaaaaaaaaa > > This fills the line as > > aaa = > baaaaaaaaaaaaaaaaaaaaaaaaaaaa > > The line break introduced here does not make sense. The line should > be kept what it was. Yup. Looking at the code, this looked suspiciously easy to fix. However, there's absolutely no tests for this stuff, so my confidence that I didn't break anything here is pretty low. I've added a couple tests (based on your test case) and pushed it to the trunk, though. Let me know whether it works in your real cases or not: > Command `foo' is really the essence of bibtex-fill-field-bounds in > textmodes/bibtex.el that uses fill-region-as-paragraph to fill the > fields of BibTeX entries. If the field holds a URL, it may happen > more easily that the value of the field is a string that goes beyond > fill-column and that fill-region-as-paragraph cannot break into > words. I haven't tried to construct a yet more minimalistic version > of this problem. Or whether this breaks something else, and if it does, please do feel free to add more tests to test/lisp/textmodes/fill-tests.el. :-) -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no