From unknown Sun Aug 17 01:22:38 2025 X-Loop: help-debbugs@gnu.org Subject: bug#20774: auto-fill doesn't work properly when first-line prefix differs in adaptive-fill-mode Resent-From: Samuel Freilich Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 08 Jun 2015 23:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 20774 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 20774@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.1433807108631 (code B ref -1); Mon, 08 Jun 2015 23:46:02 +0000 Received: (at submit) by debbugs.gnu.org; 8 Jun 2015 23:45:08 +0000 Received: from localhost ([127.0.0.1]:45531 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z26j2-00009y-K9 for submit@debbugs.gnu.org; Mon, 08 Jun 2015 19:45:07 -0400 Received: from eggs.gnu.org ([208.118.235.92]:45799) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z26di-0008TN-VW for submit@debbugs.gnu.org; Mon, 08 Jun 2015 19:39:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z26dc-0006bH-FJ for submit@debbugs.gnu.org; Mon, 08 Jun 2015 19:39:29 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,HTML_MESSAGE, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:49110) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z26dc-0006bD-Ba for submit@debbugs.gnu.org; Mon, 08 Jun 2015 19:39:28 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59299) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z26da-0005JA-Nn for bug-gnu-emacs@gnu.org; Mon, 08 Jun 2015 19:39:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z26dZ-0006al-7W for bug-gnu-emacs@gnu.org; Mon, 08 Jun 2015 19:39:26 -0400 Received: from mail-qk0-x236.google.com ([2607:f8b0:400d:c09::236]:34273) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z26dZ-0006a7-1v for bug-gnu-emacs@gnu.org; Mon, 08 Jun 2015 19:39:25 -0400 Received: by qkoo18 with SMTP id o18so1223062qko.1 for ; Mon, 08 Jun 2015 16:39:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=y07DCusFza6ao5dxtjMdzbYwelzNDKt7H2GoH29LSgo=; b=nHgiLPysDQf3p1MIlwAgQvJ6YYfCTtOfWkCn3S3qOxNJ9huABQsr7pQIUhgMd6gCAu /NQak1a0JT0vC/EeHSQ/rOOiAjGbjbm3vwG9KCE9prXKZAW8+i4hT462/3mQcWZbcG+b 2FOkoCKgXKlpnefyGm1AdLpA8bvYS+A+Ir9/WZwrhytZfZEbRIHMthXieb+RVFqsQXQ8 hR03tQgaWt8FwFYvv5dVGiTyCULADxa0a+CvSXOZyxRJzJK+JEseJIVIGVWmEL8QulK+ DKIa0cb8QjKYJp03zZkDGCHXOEcd1f6fgZTx5PsMWDf7+5Xfu8K7+ldGVvl2vQdAhBfj WBBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to :content-type; bh=y07DCusFza6ao5dxtjMdzbYwelzNDKt7H2GoH29LSgo=; b=jHopfhgaMMt51kxbTW0c/vSIpCjX8F5Eh76MuRDwcu+QDvnmvDPC3Yighkhdtse8Zf PngEPq9/XOME9ZlfTmn9AxQD3eHvoDLMG0anUNnP/7s849k+CTaFB/hWJYI+AmGTiyxC ZwvR94zjrhfB59ua0co48qFBtcTAaIcSPAgSIAMNCXPTegvQYU7y/f0vG17nBMHPnjH5 GgJc/0jFXtClTu35WgmdvbDpS6mYBikVmulQDRpRuyqVHXr/7Ha0Paz3nVISZXr30EO5 5fHueOgxl1eheEe7x7uFleR1e6aWVWkUTmvBfqhFE/BLTFHBF1OTaoyu3qR1MEH7afZD B0jQ== X-Gm-Message-State: ALoCoQllu/jyDsTCpLs3Lw9mXmmxcm9iLWYKQhTz9Y9iryktIH0VD4M+uywDu8LHTbXvID8fr/fU X-Received: by 10.55.24.149 with SMTP id 21mr36972057qky.97.1433806764059; Mon, 08 Jun 2015 16:39:24 -0700 (PDT) MIME-Version: 1.0 Received: by 10.140.87.119 with HTTP; Mon, 8 Jun 2015 16:39:03 -0700 (PDT) From: Samuel Freilich Date: Mon, 8 Jun 2015 19:39:03 -0400 Message-ID: Content-Type: multipart/mixed; boundary=001a11441e5ed9763e05180a2604 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Mailman-Approved-At: Mon, 08 Jun 2015 19:45:01 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) --001a11441e5ed9763e05180a2604 Content-Type: multipart/alternative; boundary=001a11441e5ed9763905180a2602 --001a11441e5ed9763905180a2602 Content-Type: text/plain; charset=UTF-8 The function do-auto-fill doesn't consider that in adaptive-fill-mode, the first line's prefix might not match the fill-prefix for subsequent lines. For example, markdown-mode configures adaptive-fill-mode so that when filling list item paragraphs, there's a hanging indent: * List item... next line... Currently, there's a bug where auto-fill-mode will break lines at the start of a list item, even though the resulting line is just as long, e.g.: * [link](http://a-really-long-url.example.com/.. .) When you hit enter at the end of the line in markdown-mode with autofill on and the fill-column set to less than the length of that line, it becomes: * [link](http://a-really-long-url.example.com/.. .) That's incorrect behavior because the prefix added after breaking the line is just as long as the line up to the point before the break. The attached patch fixes this by ensuring that a line will be broken by auto-fill only if the position is further along in the line than the length of the fill prefix. It also ensures that the first-line fill prefix is skipped when finding a point to break (that is, the line should not be broken in the middle of the prefix), even if the first-line prefix differs from the fill-prefix for subsequent lines. *Detailed Reproduction Steps:* Get markdown-mode from: http://jblevins.org/projects/markdown-mode/markdown-mode.el $ emacs -Q -l markdown-mode.el M-x markdown-mode RET M-x auto-fill-mode RET M-x set-fill-column RET 5 RET Type the following into the buffer and hit RET: * Item Actual result: * Item [cursor] Expected result: * Item [cursor] Peace, -Sam --001a11441e5ed9763905180a2602 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
The function do-auto-fill doesn't consider that in ada= ptive-fill-mode, the first line's prefix might not match the fill-prefi= x for subsequent lines.

For example, markdown-mode confi= gures adaptive-fill-mode so that when filling list item paragraphs, there&#= 39;s a hanging indent:

* =C2=A0 List item...
=
=C2=A0 =C2=A0 next line...

Currently, there&#= 39;s a bug where auto-fill-mode will break lines at the start of a list ite= m, even though the resulting line is just as long, e.g.:


When you hit enter at the end of the line in= markdown-mode with autofill on and the fill-column set to less than the le= ngth of that line, it becomes:

* =C2=A0=C2=A0
=C2=A0 =C2=A0[link](http://a-really-long-url.ex= ample.com/...)

That's incorrect behavior be= cause the prefix added after breaking the line is just as long as the line = up to the point before the break.

The a= ttached patch fixes this by ensuring that a line will be broken by auto-fil= l only if the position is further along in the line than the length of the = fill prefix. It also ensures that the first-line fill prefix is skipped whe= n finding a point to break (that is, the line should not be broken in the m= iddle of the prefix), even if the first-line prefix differs from the fill-p= refix for subsequent lines.


Deta= iled Reproduction Steps:


$ emacs -Q -l markdown-mode.el
=
M-x markdown-mode RET
M-x auto-fill-mode RET
M-x s= et-fill-column RET 5 RET

Type the following into t= he buffer and hit RET:
* Item

Actual res= ult:
*
=C2=A0 Item
=C2=A0 [cursor]
=
Expected result:
* Item
=C2=A0 [cursor]<= /div>

Peace,
-Sam
--001a11441e5ed9763905180a2602-- --001a11441e5ed9763e05180a2604 Content-Type: text/x-patch; charset=US-ASCII; name="emacs-auto-fill-different-first-line.patch" Content-Disposition: attachment; filename="emacs-auto-fill-different-first-line.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_iaojaqfr0 KioqIHNpbXBsZS5lbC5vbGQJMjAxNS0wNi0wOCAxOToxOToyMC40ODQzOTczODcgLTA0MDAKLS0t IHNpbXBsZS5lbC5uZXcJMjAxNS0wNi0wOCAxOToxODo1OC4zNDAzMDUzMDEgLTA0MDAKKioqKioq KioqKioqKioqCioqKiA2NTU5LDY1NzUgKioqKgogIAkgICAgICAgKHNldHEgZmlsbC1wcmVmaXgg cHJlZml4KSkpKQogIAogICAgICAgICh3aGlsZSAoYW5kIChub3QgZ2l2ZS11cCkgKD4gKGN1cnJl bnQtY29sdW1uKSBmYykpCiEgCTs7IERldGVybWluZSB3aGVyZSB0byBzcGxpdCB0aGUgbGluZS4K ISAJKGxldCogKGFmdGVyLXByZWZpeAogIAkgICAgICAgKGZpbGwtcG9pbnQKICAJCShzYXZlLWV4 Y3Vyc2lvbgogIAkJICAoYmVnaW5uaW5nLW9mLWxpbmUpCiEgCQkgIChzZXRxIGFmdGVyLXByZWZp eCAocG9pbnQpKQohIAkJICAoYW5kIGZpbGwtcHJlZml4CiEgCQkgICAgICAgKGxvb2tpbmctYXQg KHJlZ2V4cC1xdW90ZSBmaWxsLXByZWZpeCkpCiEgCQkgICAgICAgKHNldHEgYWZ0ZXItcHJlZml4 IChtYXRjaC1lbmQgMCkpKQogIAkJICAobW92ZS10by1jb2x1bW4gKDErIGZjKSkKISAJCSAgKGZp bGwtbW92ZS10by1icmVhay1wb2lud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YXJkICIgIikgKGVvbHApKQohIAkJICAgIDs7IEl0IGlzIGZ1dGlsZSB0byBzcGxp dCBlYXJsaWVyIGluIHRoZSBsaW5lIHRoYW4gdGhlIGxlbmd0aCBvZiB0aGUKISAJCSAgICA7OyBw cmVmaXgsIHNpbmNlIHdlIHdvdWxkIGp1c3QgaW5zZXJ0IHRoZSBwcmVmaXggYWdhaW4uCiEgCQkg ICAgKGFuZCBmaWxsLXByZWZpeCAoPD0gKHBvaW50KSAoKyBsaW5lLXN0YXJ0IChsZW5ndGggZmls bC1wcmVmaXgpKSkpCiAgCQkgICAgOzsgRG9uJ3Qgc3BsaXQgcmlnaHQgYWZ0ZXIgYSBjb21tZW50 IHN0YXJ0ZXIKICAJCSAgICA7OyBzaW5jZSB3ZSB3b3VsZCBqdXN0IG1ha2UgYW5vdGhlciBjb21t ZW50IHN0YXJ0ZXIuCiAgCQkgICAgKGFuZCBjb21tZW50LXN0YXJ0LXNraXAK --001a11441e5ed9763e05180a2604-- From unknown Sun Aug 17 01:22:38 2025 X-Loop: help-debbugs@gnu.org Subject: bug#20774: Typo in Patch References: In-Reply-To: Resent-From: Samuel Freilich Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 26 Jun 2015 23:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20774 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 20774@debbugs.gnu.org Received: via spool by 20774-submit@debbugs.gnu.org id=B20774.14353620383538 (code B ref 20774); Fri, 26 Jun 2015 23:41:02 +0000 Received: (at 20774) by debbugs.gnu.org; 26 Jun 2015 23:40:38 +0000 Received: from localhost ([127.0.0.1]:58520 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z8dEa-0000uz-Oj for submit@debbugs.gnu.org; Fri, 26 Jun 2015 19:40:37 -0400 Received: from mail-vn0-f54.google.com ([209.85.216.54]:43925) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z8dEY-0000uj-Ei for 20774@debbugs.gnu.org; Fri, 26 Jun 2015 19:40:35 -0400 Received: by vnbg190 with SMTP id g190so3049722vnb.10 for <20774@debbugs.gnu.org>; Fri, 26 Jun 2015 16:40:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=DoVcge0Unu7YorWj2J/+Je3p9IUDNcFSsz5E+SqEyIY=; b=mVIhrqGETsMGNdhscbqSubfRnu3duW4Sk7DSU9HNUFfQMUmZcWzNiBVpu/zSNN1TQp F4oYmYIU8VMkruyd7Qs81CxbLBE0mXYs70oqHd2Tiux+e6JA9sV3S1aBXqNkqOr5R92U Yv5c39fawhQTVY8EBatHl1CNQzPcJpj/y/2cGJPfdBYajArRSsTFY+3yxdThAPQs/dQ0 L/8qa6HsbkaK1wyuz0u+O0fQ4D+RbbtJ7OjiAHe83M6geT4fuwXkxjw/9gLzgXyKiDiL hewT3UooHRdVWx72gLenXMEaunP/nqqfq58gt/pVfgauMQMCLXYA1IlomP2t4uQsdCVb dDxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to :content-type; bh=DoVcge0Unu7YorWj2J/+Je3p9IUDNcFSsz5E+SqEyIY=; b=lgkFBxhexaFPWSGBi8et3PG9UfC1GmgF2h9UssnkvusS9mxwfV4lpnV9IL58xo0C6h pSpzypcQhyVbfkC+Ibtcnsk53tr9NGGMW++tfFHhWg3AE4M3vmKKGjaGSwZvuK1M57nU 2nBGVdEuzsA/KA1BZmXA+at1MawYMjXXp5i4j2vpKtuQcx+77cdyFnkFOoOoZmS619dd dMQRD0h/61C8oUWDc1EaBvGA/OXBXIrmiXCtOmT9rUF1c4FJOha/PnCIVuW5HqmVilvx uSZA2INytfwFmedgHDVfw0sfxRAebHujCin5C/uVipIO/h7CPb/qQ6e6G1gm34tHLecA 2bYA== X-Gm-Message-State: ALoCoQmI5G8I0cTnDTNF0o+em3ymz5HmV8TkEv2S1v+QCDCzSf1ApxPPyEWFe4MkT3/Oy08lenEl X-Received: by 10.52.251.107 with SMTP id zj11mr3702900vdc.96.1435362028845; Fri, 26 Jun 2015 16:40:28 -0700 (PDT) MIME-Version: 1.0 Received: by 10.31.102.198 with HTTP; Fri, 26 Jun 2015 16:40:09 -0700 (PDT) From: Samuel Freilich Date: Fri, 26 Jun 2015 19:40:09 -0400 Message-ID: Content-Type: multipart/mixed; boundary=001a1134d45edad02305197443d2 X-Spam-Score: -2.1 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.1 (--) --001a1134d45edad02305197443d2 Content-Type: multipart/alternative; boundary=001a1134d45edad01e05197443d0 --001a1134d45edad01e05197443d0 Content-Type: text/plain; charset=UTF-8 There was a typo in that previous patch. Should have been regexp-quote, not regex-quote. Fixed version attached. --001a1134d45edad01e05197443d0 Content-Type: text/html; charset=UTF-8
There was a typo in that previous patch. Should have been regexp-quote, not regex-quote. Fixed version attached.
--001a1134d45edad01e05197443d0-- --001a1134d45edad02305197443d2 Content-Type: text/x-patch; charset=US-ASCII; name="emacs-auto-fill-different-first-line-fixed.patch" Content-Disposition: attachment; filename="emacs-auto-fill-different-first-line-fixed.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_ibe9h6310 KioqIHNpbXBsZS5lbC5vbGQJMjAxNS0wNi0wOCAxOToxOToyMC40ODQzOTczODcgLTA0MDAKLS0t IHNpbXBsZS5lbC5uZXcJMjAxNS0wNi0wOCAxOToxODo1OC4zNDAzMDUzMDEgLTA0MDAKKioqKioq KioqKioqKioqCioqKiA2NTU5LDY1NzUgKioqKgogIAkgICAgICAgKHNldHEgZmlsbC1wcmVmaXgg cHJlZml4KSkpKQogIAogICAgICAgICh3aGlsZSAoYW5kIChub3QgZ2l2ZS11cCkgKD4gKGN1cnJl bnQtY29sdW1uKSBmYykpCiEgCTs7IERldGVybWluZSB3aGVyZSB0byBzcGxpdCB0aGUgbGluZS4K ISAJKGxldCogKGFmdGVyLXByZWZpeAogIAkgICAgICAgKGZpbGwtcG9pbnQKICAJCShzYXZlLWV4 Y3Vyc2lvbgogIAkJICAoYmVnaW5uaW5nLW9mLWxpbmUpCiEgCQkgIChzZXRxIGFmdGVyLXByZWZp eCAocG9pbnQpKQohIAkJICAoYW5kIGZpbGwtcHJlZml4CiEgCQkgICAgICAgKGxvb2tpbmctYXQg KHJlZ2V4cC1xdW90ZSBmaWxsLXByZWZpeCkpCiEgCQkgICAgICAgKHNldHEgYWZ0ZXItcHJlZml4 IChtYXRjaC1lbmQgMCkpKQogIAkJICAobW92ZS10by1jb2x1bW4gKDErIGZjKSkKISAJCSAgKGZp bGwtbW92ZS10by1icmVhay1wb2ludCBhZnRlci1wcmVmaXgpCiAgCQkgIChwb2ludCkpKSkKICAK ICAJICA7OyBTZWUgd2hldGhlciB0aGUgcGxhY2Ugd2UgZm91bmQgaXMgYW55IGdvb2QuCi0tLSA2 NTU5LDY1ODEgLS0tLQogIAkgICAgICAgKHNldHEgZmlsbC1wcmVmaXggcHJlZml4KSkpKQogIAog ICAgICAgICh3aGlsZSAoYW5kIChub3QgZ2l2ZS11cCkgKD4gKGN1cnJlbnQtY29sdW1uKSBmYykp CiEgICAgICAgICA7OyBEZXRlcm1pbmUgd2hlcmUgdG8gc3BsaXQgdGhlIGxpbmUuCiEgICAgICAg ICAobGV0KiAobGluZS1zdGFydAohICAgICAgICAgICAgICAgIGFmdGVyLXByZWZpeAogIAkgICAg ICAgKGZpbGwtcG9pbnQKICAJCShzYXZlLWV4Y3Vyc2lvbgogIAkJICAoYmVnaW5uaW5nLW9mLWxp bmUpCiEg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yBJdCBpcyBmdXRpbGUgdG8gc3Bs aXQgYXQgdGhlIGVuZCBvZiB0aGUgcHJlZml4CiEgCQkgICAgOzsgc2luY2Ugd2Ugd291bGQganVz dCBpbnNlcnQgdGhlIHByZWZpeCBhZ2Fpbi4KISAJCSAgICAoYW5kIGFmdGVyLXByZWZpeCAoPD0g KHBvaW50KSBhZnRlci1wcmVmaXgpKQogIAkJICAgIDs7IERvbid0IHNwbGl0IHJpZ2h0IGFmdGVy IGEgY29tbWVudCBzdGFydGVyCiAgCQkgICAgOzsgc2luY2Ugd2Ugd291bGQganVzdCBtYWtlIGFu b3RoZXIgY29tbWVudCBzdGFydGVyLgogIAkJICAgIChhbmQgY29tbWVudC1zdGFydC1za2lwCi0t LSA2NTg0LDY1OTIgLS0tLQogIAkJKG9yIChib2xwKQogIAkJICAgIDs7IFRoZXJlIGlzIG5vIHVz ZSBicmVha2luZyBhdCBlbmQgb2YgbGluZS4KICAJCSAgICAoc2F2ZS1leGN1cnNpb24gKHNraXAt Y2hhcnMtZm9yd2FyZCAiICIpIChlb2xwKSkKISAJCSAgICA7OyBJdCBpcyBmdXRpbGUgdG8gc3Bs aXQgZWFybGllciBpbiB0aGUgbGluZSB0aGFuIHRoZSBsZW5ndGggb2YgdGhlCiEgCQkgICAgOzsg cHJlZml4LCBzaW5jZSB3ZSB3b3VsZCBqdXN0IGluc2VydCB0aGUgcHJlZml4IGFnYWluLgohIAkJ ICAgIChhbmQgZmlsbC1wcmVmaXggKDw9IChwb2ludCkgKCsgbGluZS1zdGFydCAobGVuZ3RoIGZp bGwtcHJlZml4KSkpKQogIAkJICAgIDs7IERvbid0IHNwbGl0IHJpZ2h0IGFmdGVyIGEgY29tbWVu dCBzdGFydGVyCiAgCQkgICAgOzsgc2luY2Ugd2Ugd291bGQganVzdCBtYWtlIGFub3RoZXIgY29t bWVudCBzdGFydGVyLgogIAkJICAgIChhbmQgY29tbWVudC1zdGFydC1za2lwCg== --001a1134d45edad02305197443d2-- From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 01 21:04:01 2016 Received: (at control) by debbugs.gnu.org; 2 Jan 2016 02:04:01 +0000 Received: from localhost ([127.0.0.1]:34180 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aFBY1-0001jo-Hz for submit@debbugs.gnu.org; Fri, 01 Jan 2016 21:04:01 -0500 Received: from mail-ob0-f173.google.com ([209.85.214.173]:33387) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aFBY0-0001jd-MM for control@debbugs.gnu.org; Fri, 01 Jan 2016 21:04:00 -0500 Received: by mail-ob0-f173.google.com with SMTP id bx1so189711292obb.0 for ; Fri, 01 Jan 2016 18:04:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:content-type:content-transfer-encoding:subject:message-id:date :to:mime-version; bh=j/G6Pt7U9G1sIMG23C7alyWtZIz0UXYLZFS+TGH6f2Y=; b=D2CwW6KUCwPpz3U7fwZ5bpeYrlahP0/6X1GLSg68UoEEOqq4mOINlreTbC6jBk6+g9 cCUbOSfgda+W6+qg6WSX1c39ilZagQiiv0UY7y7AFm5FLVTZVevDZcCgJlM7XI+ghBW7 wWDX9ENT3hYnBLlfQvwcnlFtJOaCul69Hl/nFLMksnAW6rmdLWG1w2tsKykwz3qWfked nR1Pc9RFxvYWL1Mcup84xNg7m/eXUwNwA9UDgRickNk893hzOwhqaCgTHNtayuGy5hEU wZRLaut90mXFj2MdGgLRjrBl6sV4uDuOPzwhNX/UMK5oueGj+RJfn6OXTezghuF2+UP4 s+VA== X-Received: by 10.60.93.170 with SMTP id cv10mr46257182oeb.38.1451595131092; Thu, 31 Dec 2015 12:52:11 -0800 (PST) Received: from [192.168.0.3] (174-23-112-137.slkc.qwest.net. [174.23.112.137]) by smtp.gmail.com with ESMTPSA id p64sm25953125oia.20.2015.12.31.12.52.10 for (version=TLSv1/SSLv3 cipher=OTHER); Thu, 31 Dec 2015 12:52:10 -0800 (PST) From: Ivan Andrus Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: control message for bugs 20774, 20776, 20606, 20414 Message-Id: <3AF9BF2D-B954-4430-9A89-E98C0CB9246B@gmail.com> Date: Thu, 31 Dec 2015 13:52:10 -0700 To: control@debbugs.gnu.org Mime-Version: 1.0 (Mac OS X Mail 9.1 \(3096.5\)) X-Mailer: Apple Mail (2.3096.5) X-Spam-Score: -0.2 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.2 (/) tags 20774 patch tags 20776 patch merge 20606 20414 From unknown Sun Aug 17 01:22:38 2025 X-Loop: help-debbugs@gnu.org Subject: bug#20774: auto-fill doesn't work properly when first-line prefix differs in adaptive-fill-mode Resent-From: npostavs@users.sourceforge.net Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 22 Aug 2017 12:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20774 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Samuel Freilich Cc: 20774@debbugs.gnu.org Received: via spool by 20774-submit@debbugs.gnu.org id=B20774.150340610310800 (code B ref 20774); Tue, 22 Aug 2017 12:49:02 +0000 Received: (at 20774) by debbugs.gnu.org; 22 Aug 2017 12:48:23 +0000 Received: from localhost ([127.0.0.1]:48754 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dk8bX-0002o8-KI for submit@debbugs.gnu.org; Tue, 22 Aug 2017 08:48:23 -0400 Received: from mail-io0-f193.google.com ([209.85.223.193]:36732) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dk8bV-0002nu-UT for 20774@debbugs.gnu.org; Tue, 22 Aug 2017 08:48:22 -0400 Received: by mail-io0-f193.google.com with SMTP id o196so2772450ioe.3 for <20774@debbugs.gnu.org>; Tue, 22 Aug 2017 05:48:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=WiMH0hIgJCIxgiVsNBcbBLxiQNGHhBhwWD/ZSSSyqo0=; b=XtUsfDCD9rjjj3QEOnQHc9PW07uSCqytv4+O1397W4cU7SKjE1/3YzExEV7sZA/pKP HyXWSWtE7pJXkKbMFQ46G0leK9xOuXWmT4UGleeURmKcvZPe1bnzN6Y9ExW/BXAKB5rO rsl2zsvU1Lp+vhMIAaPwzbzBL3E/jpBkrDZaIet7DOJXZ4sNIeY+gUPkFWAS3vclbTUe DSjUxfHDSGOU0c1AWT6BRi0dqNTChuzQPJuqczKlQDEwX3gxRIQTmgyDa+D5iAMLAXOL 1otlebDJp+zczl3a7KeAx0TswSGSRYIJjMPAG9IcNwJMkZpyfkaYjrphxbcL/3GBH+A0 lvXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=WiMH0hIgJCIxgiVsNBcbBLxiQNGHhBhwWD/ZSSSyqo0=; b=mhV7X+ICzLjE1Dh/gLryQqnbHYNmf45rUm3P3QJlE1OvCzJSedSaw5XPofgCTor13a Ogfjo+47COC1VRbFlJB8O2YZzxMfm8Bg8Qv5txQeKY1ygZWIYvlmLM4YBWX89RVV2KM0 ZiXAGg2WdsUCZdrrF5Nv8eD1b6BLAI3lSZWgyrbXxCFZlhCknKvMX9EDb0ISjNSQ7zip C2HkbRXpxXWLu1uKJqdYdkoNgCYbYGnZwhmxJnGuYixQDXDCS6e+HB4fJ7XPGxX0k9Gd puR+KXOxkr0PLRSV3igSVdThuJObtl5pScwsgoyr++MfL59rm6eTcALtuunoMRycNrw9 hxhw== X-Gm-Message-State: AHYfb5iS+BzSqBSUOsU2MNIl08U71EcEc1jJuoxpKCVP5XgD/YPFQyo9 OzEVYDCjDmeKDR9L X-Received: by 10.107.199.195 with SMTP id x186mr501791iof.293.1503406096191; Tue, 22 Aug 2017 05:48:16 -0700 (PDT) Received: from zony ([45.2.119.49]) by smtp.googlemail.com with ESMTPSA id 137sm2097001ity.38.2017.08.22.05.48.14 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 22 Aug 2017 05:48:14 -0700 (PDT) From: npostavs@users.sourceforge.net References: Date: Tue, 22 Aug 2017 08:49:52 -0400 In-Reply-To: (Samuel Freilich's message of "Mon, 8 Jun 2015 19:39:03 -0400") Message-ID: <878tibbwcv.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.1 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.1 (--) Samuel Freilich writes: > $ emacs -Q -l markdown-mode.el > M-x markdown-mode RET > M-x auto-fill-mode RET > M-x set-fill-column RET 5 RET > > Type the following into the buffer and hit RET: > * Item > > Actual result: > * > Item > [cursor] > > Expected result: > * Item > [cursor] With the patch I get * Item [cursor] i.e, the cursor lands in column 0. Is it correct? From unknown Sun Aug 17 01:22:38 2025 X-Loop: help-debbugs@gnu.org Subject: bug#20774: auto-fill doesn't work properly when first-line prefix differs in adaptive-fill-mode Resent-From: Samuel Freilich Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 22 Aug 2017 16:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20774 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: npostavs@users.sourceforge.net Cc: 20774@debbugs.gnu.org Received: via spool by 20774-submit@debbugs.gnu.org id=B20774.15034176823907 (code B ref 20774); Tue, 22 Aug 2017 16:02:02 +0000 Received: (at 20774) by debbugs.gnu.org; 22 Aug 2017 16:01:22 +0000 Received: from localhost ([127.0.0.1]:49750 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dkBcI-00010x-Ia for submit@debbugs.gnu.org; Tue, 22 Aug 2017 12:01:22 -0400 Received: from mail-oi0-f43.google.com ([209.85.218.43]:33490) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dkBcH-00010k-28 for 20774@debbugs.gnu.org; Tue, 22 Aug 2017 12:01:21 -0400 Received: by mail-oi0-f43.google.com with SMTP id f11so190116938oic.0 for <20774@debbugs.gnu.org>; Tue, 22 Aug 2017 09:01:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=SKLPHvH5hk2jZ8Sw9N0i6grWhhWkAY/OeeUY6qig0gc=; b=RzZu5x+ZIMidHT5juA8G5eSGy80cHKEn1sr1DYqDDbaTTjd1d//Iqq8lmqo464IXtP 2MqJQikaKaI9kt8XapZBGs6ciB0X8hlIIEnSJsUR+HtwTZyRDUTf6Y2APGG647uyqJD0 RmyWHLPkizjvUOphdEvhpR9nkWyMjvhvYz/9OnSpKapDf3P0bUwV1sDxsIMFY8S4vIBi pWmqHVUmFkllc9mF8gNLz3w/J0Ayza+a4en/gBH9fvATneVzNhdr5gil7uQ/KLG7Zwjx z1FqnwSHgb/CuA/2rw2ZJ6uu1sRdIiV6Y+H3CrZpYGRHO+4AjMkvd6Nm74RUIHSFooip YBaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=SKLPHvH5hk2jZ8Sw9N0i6grWhhWkAY/OeeUY6qig0gc=; b=k7RVVmytu6ehJHcnN4qe6F9G/RuZsyKRxrmxMR88VaratfTPo563pWlwNy+wb+aQpe 7476Wp1f3nfcC41QmMuxjQmyg7vJBoBtss/iuTi4QpC/xzjQnEnD3Y1Pk2cRzbo0BHyX kP9GyERonxaoXFOgsnJLomGknCMOXUD9WnFjhCHS1ISTlprdtEUR6dv0+N/auJkXMTPh J1uG19unMjyY45cVRANOy6+uc7/QqOqwkTylg2p87ttjVYZQpVAx1LcSbFwCveMRrOyd CMFQCIerSjuAh/Mw+mHhuk0FXGMjXnmMv5yWK+QnZRRhaqT/SYnMGe20qbriq6onr56L CIyA== X-Gm-Message-State: AHYfb5i3+eCQI4nGdQVD8qxmwi67rANha9dr++J5fjWA3YSfW6mpvbjK um1oZ4f/2m7e6Jx+d/8HXg5rly61DFjF X-Received: by 10.202.235.140 with SMTP id j134mr1317044oih.281.1503417674275; Tue, 22 Aug 2017 09:01:14 -0700 (PDT) MIME-Version: 1.0 Received: by 10.58.43.76 with HTTP; Tue, 22 Aug 2017 09:00:53 -0700 (PDT) In-Reply-To: <878tibbwcv.fsf@users.sourceforge.net> References: <878tibbwcv.fsf@users.sourceforge.net> From: Samuel Freilich Date: Tue, 22 Aug 2017 12:00:53 -0400 Message-ID: Content-Type: multipart/alternative; boundary="001a113ce37e6d4ee3055759b453" X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --001a113ce37e6d4ee3055759b453 Content-Type: text/plain; charset="UTF-8" Yes, that's correct. Sorry for getting that wrong in my initial description of the bug. That's the same as the indentation behavior with auto-fill-mode disabled. A hanging indent is not assumed with only one line. On Tue, Aug 22, 2017 at 8:49 AM, wrote: > Samuel Freilich writes: > > > $ emacs -Q -l markdown-mode.el > > M-x markdown-mode RET > > M-x auto-fill-mode RET > > M-x set-fill-column RET 5 RET > > > > Type the following into the buffer and hit RET: > > * Item > > > > Actual result: > > * > > Item > > [cursor] > > > > Expected result: > > * Item > > [cursor] > > With the patch I get > > * Item > [cursor] > > i.e, the cursor lands in column 0. Is it correct? > --001a113ce37e6d4ee3055759b453 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Yes, that's correct. Sorry for getting that wrong in m= y initial description of the bug. That's the same as the indentation be= havior with auto-fill-mode disabled. A hanging indent is not assumed with o= nly one line.

On Tue, Aug 22, 2017 at 8:49 AM, <npostavs@users.sourcefor= ge.net> wrote:
Samuel Freil= ich <sfreilich@google.com>= ; writes:

> $ emacs -Q -l markdown-mode.el
> M-x markdown-mode RET
> M-x auto-fill-mode RET
> M-x set-fill-column RET 5 RET
>
> Type the following into the buffer and hit RET:
> * Item
>
> Actual result:
> *
>=C2=A0 =C2=A0Item
>=C2=A0 =C2=A0[cursor]
>
> Expected result:
> * Item
>=C2=A0 =C2=A0[cursor]

With the patch I get

* Item
[cursor]

i.e, the cursor lands in column 0.=C2=A0 Is it correct?

--001a113ce37e6d4ee3055759b453-- From unknown Sun Aug 17 01:22:38 2025 X-Loop: help-debbugs@gnu.org Subject: bug#20774: auto-fill doesn't work properly when first-line prefix differs in adaptive-fill-mode Resent-From: npostavs@users.sourceforge.net Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 23 Aug 2017 03:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20774 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Samuel Freilich Cc: 20774@debbugs.gnu.org Received: via spool by 20774-submit@debbugs.gnu.org id=B20774.15034605247911 (code B ref 20774); Wed, 23 Aug 2017 03:56:02 +0000 Received: (at 20774) by debbugs.gnu.org; 23 Aug 2017 03:55:24 +0000 Received: from localhost ([127.0.0.1]:50207 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dkMlI-00023X-BA for submit@debbugs.gnu.org; Tue, 22 Aug 2017 23:55:24 -0400 Received: from mail-it0-f43.google.com ([209.85.214.43]:37963) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dkMlG-00023F-Rg for 20774@debbugs.gnu.org; Tue, 22 Aug 2017 23:55:23 -0400 Received: by mail-it0-f43.google.com with SMTP id x187so4879223ite.1 for <20774@debbugs.gnu.org>; Tue, 22 Aug 2017 20:55:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=VFzxyDCuVyFP5+UnrhsFuc0S5vtRd0NmXDhf960MtkY=; b=T8LYARlVIq3dQ3ebYqkoBnEN5i6bJVY8Xk26cK/2Q3BCeoxSSQDjNICXfhLBhmimHK AThG3JVfI3r+0hetPFLcWWTegThW25ISnlmOxpR6caPUFeK677qn5mnCXnbn6EeksUiC DxECrEtJukWdvvnk7ElefaWL9Ppr73DPj2jnfB7kpLgzcflIz6nmekTjAGgTPe1TdfDG j88rrI3UzFJzTkmHXcx6cfpgba6WusYO40lftNdazy6m47FL0COpyGnbv9uRbVjE89Bd wxit1VU2gmlqdnuFqgdgDrtRBIu1jcGQHRXSaDyCJlIqOmOIYFWzZfyOORQuRjP9Vu3s w8Eg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=VFzxyDCuVyFP5+UnrhsFuc0S5vtRd0NmXDhf960MtkY=; b=rTmDoBdDTn9b8yQTPi6xnP1wi3uqtksYoSFW+2aUUoCCfprYfGobcfbpR3gQzoy/u6 +oABAaDlpGI2Fr+AJW3RMGjpWLNv27sdFB8d8lDfi1kUmZObAmqR6VWV8u+SlyX80x4H 9eGBlzi/0e95EEJeEac4u+rH7MfaRM3mv1p6aRir/xeqSof7OdWt8vogmnmgrv59ySJa L/EbRuhsIKYftudyeSaYofYI7FZByGN141vsTQNNQLMjFzYAehqOshEpR7T37ghARyEo k4Rmm0N1OnhlFoe4KY44/b7OgDDkEXsrxrOMdKH4GwK48jmI7ZRKXZl6wu7i3cr6OEFc CguQ== X-Gm-Message-State: AHYfb5gEx5phOmMI6fMbRw2RjgpCOFfc9HW6UhH1pU/NoRqcjHKFtAJp b04XuwU7CzUPBsG2 X-Received: by 10.36.134.68 with SMTP id u65mr2192702itd.87.1503460517019; Tue, 22 Aug 2017 20:55:17 -0700 (PDT) Received: from zony ([45.2.119.49]) by smtp.googlemail.com with ESMTPSA id l97sm295737ioi.61.2017.08.22.20.55.15 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 22 Aug 2017 20:55:16 -0700 (PDT) From: npostavs@users.sourceforge.net References: <878tibbwcv.fsf@users.sourceforge.net> Date: Tue, 22 Aug 2017 23:56:54 -0400 In-Reply-To: (Samuel Freilich's message of "Tue, 22 Aug 2017 12:00:53 -0400") Message-ID: <87wp5v9bsp.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.7 (/) Samuel Freilich writes: > Yes, that's correct. Sorry for getting that wrong in my initial > description of the bug. That's the same as the indentation behavior > with auto-fill-mode disabled. A hanging indent is not assumed with > only one line. Ah okay. The patch looks fine (apart from the indentation being off, I assume because you had tab-width = 4). Would you mind adding a commit message? (See CONTRIBUTE for the format.) If you're feeling up to it, a test would be nice too. Since you're sending from a google.com address, I understand the copyright assignment is covered under Google's blanket agreement, is that right? From unknown Sun Aug 17 01:22:38 2025 X-Loop: help-debbugs@gnu.org Subject: bug#20774: auto-fill doesn't work properly when first-line prefix differs in adaptive-fill-mode Resent-From: Samuel Freilich Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 23 Aug 2017 18:21:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20774 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: npostavs@users.sourceforge.net Cc: 20774@debbugs.gnu.org Received: via spool by 20774-submit@debbugs.gnu.org id=B20774.15035124484307 (code B ref 20774); Wed, 23 Aug 2017 18:21:01 +0000 Received: (at 20774) by debbugs.gnu.org; 23 Aug 2017 18:20:48 +0000 Received: from localhost ([127.0.0.1]:51676 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dkaGl-00017P-Vf for submit@debbugs.gnu.org; Wed, 23 Aug 2017 14:20:48 -0400 Received: from mail-oi0-f42.google.com ([209.85.218.42]:33573) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dkaGk-00017C-IE for 20774@debbugs.gnu.org; Wed, 23 Aug 2017 14:20:47 -0400 Received: by mail-oi0-f42.google.com with SMTP id f11so9402819oic.0 for <20774@debbugs.gnu.org>; Wed, 23 Aug 2017 11:20:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=oYho5qRmlpkM2N12Qz3vsDm8COCsCCrPmCyqMdYfrto=; b=WwOiCJirE6mYk0ZQ/J0fel6Ke6RF7FDdNBJstwtTVTTqiTG3blGe0s5gRWBkcBpdbD wQfK91z2Q5rzVyYvoenba2NCCrA5EFe4usR67o9K1AmmTvV9WVJRO8zaOl6wqM4WFHX8 3rOICOZaw/bgPVbTrBssOeVPUAiFXJaRgIYCLhABRcCht3qMD0Wmk1a9dzSeIkmA14Rw hvfDmsyDmVyg9nc8QsRJVTSFC1NU/hE/o9U8T5weCvj+e7cCAYwNy/cdcRHqW/Hh9CMA NeN860tEEpuf9mf975fL0OEYrob8CyZEIk0aNSoadFU6MNwgF8pN9M6zkVrZFPh1HlVC W87Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=oYho5qRmlpkM2N12Qz3vsDm8COCsCCrPmCyqMdYfrto=; b=As94ZUjbK3MxESieLLalBXnr8Tjz6xqB5xyKF03Nk/25pJzE5JM54MCuLmjssUnL9p Qa/m0YtxAHsM35ohQn6URVRNt0uQCiElvyVtRSCJFDF+D2JSQzBFR9Lne6HdZQwJAnBh WWuz2mz4FSLzASob099MpkVnOeTdQSEBddSvtPi6si4zkgQAcXYDNgEE7QoUDWI98zBd FbZAitEdN9Oo+ihIzvxfsaUUzpFbGJuudAI3yc53QYXbQaFD2NwjQr8ZT63JqdCmtotH Ygxn/aJoQ05oI0jUKN/IkbwxRo+7SGiyhQv5cinGXP0WtkhG8uB2edNDkKh+6+tOYF+U USjg== X-Gm-Message-State: AHYfb5goIauME4GYNYlxG0M+bLWVq3b8sA96ZtdzOOt2fUhXTUdwXn29 XwG7ZQb052QiFqV1U7uvj+ZHStngoJv9 X-Google-Smtp-Source: ADKCNb7EtdHtiBD+XDKxg5iqvuoxjIph5lHHDiq5iXqw7IKUdnmevkD92o+pymfzcEwUVa01lFExj5ZM0+N/mGmvYyQ= X-Received: by 10.202.177.133 with SMTP id a127mr4078036oif.70.1503512440667; Wed, 23 Aug 2017 11:20:40 -0700 (PDT) MIME-Version: 1.0 Received: by 10.58.43.76 with HTTP; Wed, 23 Aug 2017 11:20:20 -0700 (PDT) In-Reply-To: <87wp5v9bsp.fsf@users.sourceforge.net> References: <878tibbwcv.fsf@users.sourceforge.net> <87wp5v9bsp.fsf@users.sourceforge.net> From: Samuel Freilich Date: Wed, 23 Aug 2017 14:20:20 -0400 Message-ID: Content-Type: multipart/mixed; boundary="001a113cd3f0f1e33b05576fc402" X-Spam-Score: 0.5 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) --001a113cd3f0f1e33b05576fc402 Content-Type: multipart/alternative; boundary="001a113cd3f0f1e33805576fc400" --001a113cd3f0f1e33805576fc400 Content-Type: text/plain; charset="UTF-8" tab-width = 4 seems consistent with how the rest of the file is formatted. I didn't want to change the spacing in lines not touched by my diff. I added tests and a change description, and formatted the patch according to the current instructions. I made the patch a bit more minimal. I pruned the part that dealt with adaptive-fill-first-line-regexp didn't work as well as expected, since that didn't work as well as expected (it didn't deal with all the complexity possible with adaptive-fill-function). The updated version at least handles cases where the fill-prefix isn't shorter than the first-line prefix. That allowed me to simplify the code quite a bit, since that makes the previous logic for skipping the exact fill-prefix redundant, fill-move-to-break-point already handles the logic of trying to skip at least one word after the start position passed to it. Please take another look. You're correct about copyright. I'm doing this for work, copyright is covered by whatever agreements Google has made. On Tue, Aug 22, 2017 at 11:56 PM, wrote: > Samuel Freilich writes: > > > Yes, that's correct. Sorry for getting that wrong in my initial > > description of the bug. That's the same as the indentation behavior > > with auto-fill-mode disabled. A hanging indent is not assumed with > > only one line. > > Ah okay. The patch looks fine (apart from the indentation being off, I > assume because you had tab-width = 4). Would you mind adding a commit > message? (See CONTRIBUTE for the format.) > > If you're feeling up to it, a test would be nice too. > > Since you're sending from a google.com address, I understand the > copyright assignment is covered under Google's blanket agreement, is > that right? > --001a113cd3f0f1e33805576fc400 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
tab-width =3D 4 seems con= sistent with how the rest of the file is formatted. I didn't want to ch= ange the spacing in lines not touched by my diff.

I= added tests and a change description, and formatted the patch according to= the current instructions. I made the patch a bit more minimal. I pruned th= e part that dealt with adaptive-fill-first-line-regexp didn't work as w= ell as expected, since that didn't work as well as expected (it didn= 9;t deal with all the complexity possible with=C2=A0adaptive-fill-function)= . The updated version at least handles cases where the fill-prefix isn'= t shorter than the first-line prefix.=C2=A0That allowed me to simplify the code quite a bit, since that makes = the previous logic for skipping the exact fill-prefix redundant, fill-move-= to-break-point already handles the logic of trying to skip at least one wor= d after the start position passed to it. Please take another look.

You're correct about copyright. I'm doing t= his for work, copyright is covered by whatever agreements Google has made.<= /div>


<= /div>

= On Tue, Aug 22, 2017 at 11:56 PM, <npostavs@users.sourceforg= e.net> wrote:
Samuel Freilich <sfreilich= @google.com> writes:

> Yes, that's correct. Sorry for getting that wrong in my initial > description of the bug. That's the same as the indentation behavio= r
> with auto-fill-mode disabled. A hanging indent is not assumed with
> only one line.

Ah okay.=C2=A0 The patch looks fine (apart from the indentation bein= g off, I
assume because you had tab-width =3D 4).=C2=A0 Would you mind adding a comm= it
message?=C2=A0 (See CONTRIBUTE for the format.)

If you're feeling up to it, a test would be nice too.

Since you're sending from a google.com address, I understand the
copyright assignment is covered under Google's blanket agreement, is that right?

--001a113cd3f0f1e33805576fc400-- --001a113cd3f0f1e33b05576fc402 Content-Type: text/x-patch; charset="US-ASCII"; name="0001-Do-not-split-line-before-length-of-fill-prefix.patch" Content-Disposition: attachment; filename="0001-Do-not-split-line-before-length-of-fill-prefix.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_j6pccjjz0 RnJvbSBiMDk4YjQxY2E0NTc3NjBhNmRkZGU2MzNjYWMzN2U3MGZiY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E0OCwxOCArNzE0OCwxNyBAQCBkby1h dXRvLWZpbGwKIAkgICAgICAgKHNldHEgZmlsbC1wcmVmaXggcHJlZml4KSkpKQogCiAgICAgICAo d2hpbGUgKGFuZCAobm90IGdpdmUtdXApICg+IChjdXJyZW50LWNvbHVtbikgZmMpKQotCTs7IERl dGVybWluZSB3aGVyZSB0byBzcGxpdCB0aGUgbGluZS4KLQkobGV0KiAoYWZ0ZXItcHJlZml4Ci0J ICAgICAgIChmaWxsLXBvaW50Ci0JCShzYXZlLWV4Y3Vyc2lvbgotCQkgIChiZWdpbm5pbmctb2Yt bGluZSkKLQkJICAoc2V0cSBhZnRlci1wcmVmaXggKHBvaW50KSkKLQkJICAoYW5kIGZpbGwtcHJl Zml4Ci0JCSAgICAgICAobG9va2luZy1hdCAocmVnZXhwLXF1b3RlIGZpbGwtcHJlZml4KSkKLQkJ ICAgICAgIChzZXRxIGFmdGVyLXByZWZpeCAobWF0Y2gtZW5kIDApKSkKLQkJICAobW92ZS10by1j b2x1bW4gKDErIGZjKSkKLQkJICAoZmlsbC1tb3ZlLXRvLWJyZWFrLXBvaW50IGFmdGVyLXByZWZp eCkKLQkJICAocG9pbnQpKSkpCisgICAgICAgIDs7IERldGVybWluZSB3aGVyZSB0byBzcGxpdCB0 aGUgbGluZS4KKyAgICAgICAgKGxldCAoKGZpbGwtcG9pbnQKKyAgICAgICAgICAgICAgIChzYXZl LWV4Y3Vyc2lvbgorICAgICAgICAgICAgICAgICAoYmVnaW5uaW5nLW9mLWxpbmUpCisgICAgICAg ICAgICAgICAgIChsZXQgKChsaW5lLXN0YXJ0IChwb2ludCkpKQorICAgICAgICAgICAgICAgICAg ICAobW92ZS10by1jb2x1bW4gKDErIGZjKSkKKyAgICAgICAgICAgICAgICAgICAgOzsgRG9uJ3Qg c3BsaXQgZWFybGllciBpbiB0aGUgbGluZSB0aGFuIHRoZSBsZW5ndGggb2YgdGhlIGZpbGwKKyAg ICAgICAgICAgICAgICAgICAgOzsgcHJlZml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22:38 2025 X-Loop: help-debbugs@gnu.org Subject: bug#20774: auto-fill doesn't work properly when first-line prefix differs in adaptive-fill-mode Resent-From: npostavs@users.sourceforge.net Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 24 Aug 2017 02:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20774 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Samuel Freilich Cc: 20774@debbugs.gnu.org Received: via spool by 20774-submit@debbugs.gnu.org id=B20774.150354093021402 (code B ref 20774); Thu, 24 Aug 2017 02:16:02 +0000 Received: (at 20774) by debbugs.gnu.org; 24 Aug 2017 02:15:30 +0000 Received: from localhost ([127.0.0.1]:51930 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dkhgA-0005Z8-EY for submit@debbugs.gnu.org; Wed, 23 Aug 2017 22:15:30 -0400 Received: from mail-it0-f42.google.com ([209.85.214.42]:37492) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dkhg8-0005Yv-RC for 20774@debbugs.gnu.org; Wed, 23 Aug 2017 22:15:29 -0400 Received: by mail-it0-f42.google.com with SMTP id 190so8240537itx.0 for <20774@debbugs.gnu.org>; Wed, 23 Aug 2017 19:15:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=eDNmZpic/TzMAYALa69gjxdAILEgazZo92uSMbT/lHc=; b=pQbRrjmshlU+r1GWqPTv8oAPnqvVNYbIGwlvBcv4WRZCuHCDWUVYjxkq2tmXGmFbgJ uLS+dVfctEZ22AtJR2v536D11PBxGn8ubGuJ4RscZLIyoG4A/ztKuiXfDUiITAPesDJY hKjay6rTaU0dFJWWJiqfPaDKlHJvpyR+ji5I0maanmwOrIsFibayrg5bY70c+Imyn+xu NFzn+BC/Ga4aMEr7NwfHPRh+S8/jfF0al9B6l50av4J2lDy6RjQqL6bYjQUN+2GBzPwY E4w225BaqOjCVNGEstylBC7m3j5B7UG2hpB/I9dMPGXcVSrDnrd47Gnc9IzDSvswNhd3 vS5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=eDNmZpic/TzMAYALa69gjxdAILEgazZo92uSMbT/lHc=; b=NNxnRSsIZmUL7VOGk1bZCmPrVgjvplm0BkbvW2NW2AvsW5X7hLPzC/0uqVzuvKKi1X GSlZSm4/x9Xxb7ohhT7hKaOmA7GaAfmQ4mk+KRsBHHbwjsY+zjtBgotup5Oyabq2lZus kU/1TpgXdWHJidCOg53ztKWBknwQiJvJ89N11PkeegeUoigZ23Tno2A8ehzqMLpjRoA6 c2PFUo1CjLjs97wPaFft6U1BFJazUvFjVqXj/928ickTDjjT5rFinrMUHW1jBQHNUE6B 6ZV/zKr73tHWKfLcLJ4BYM21UYlOYg2QUug2IBuabMtVPq7JS3IUFR343b/tu9XByV6D 3xFA== X-Gm-Message-State: AHYfb5ixqSX97SaEGHmkVSU+fjX21utm7Vtm9qozTeszZxPvDM2e+/jm kwETsUmJFvE40l2s X-Received: by 10.36.241.3 with SMTP id c3mr4478913iti.116.1503540923096; Wed, 23 Aug 2017 19:15:23 -0700 (PDT) Received: from zony ([45.2.119.49]) by smtp.googlemail.com with ESMTPSA id i13sm1407752ioo.48.2017.08.23.19.15.19 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Aug 2017 19:15:21 -0700 (PDT) From: npostavs@users.sourceforge.net References: <878tibbwcv.fsf@users.sourceforge.net> <87wp5v9bsp.fsf@users.sourceforge.net> Date: Wed, 23 Aug 2017 22:16:59 -0400 In-Reply-To: (Samuel Freilich's message of "Wed, 23 Aug 2017 14:20:20 -0400") Message-ID: <87r2w1aew4.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.7 (/) Samuel Freilich writes: > tab-width = 4 seems consistent with how the rest of the file is formatted. > I didn't want to change the spacing in lines not touched by my diff. Hmm, somehow the code that landed in my buffer looked wrongly indented. Something got messed up somewhere (possibly by the email system, possibly during patch application, I've been experimenting with various forms of automation for that), but since the indentation in your next patch looks fine there's not really much point in worrying about it. > I added tests and a change description, and formatted the patch according > to the current instructions. Thanks! > I made the patch a bit more minimal. I pruned the part that dealt with > adaptive-fill-first-line-regexp didn't work as well as expected, since > that didn't work as well as expected (it didn't deal with all the > complexity possible with adaptive-fill-function). The updated version > at least handles cases where the fill-prefix isn't shorter than the > first-line prefix. That allowed me to simplify the code quite a bit, > since that makes the previous logic for skipping the exact fill-prefix > redundant, fill-move-to-break-point already handles the logic of > trying to skip at least one word after the start position passed to > it. Please take another look. Your commit message is a bit too focused on the problems of what was there previously rather than how your new code is correct. This description in your email is better, but I'm still struggling a bit (I'm realizing I was probably a bit too superficial previously, there are a lot of interacting options which makes things tricky). If I understand correctly, the previous code would take the fill-prefix as non-breakable if the current line started with the fill-prefix. Your new code takes the first N characters of the line as non-breakable (where N is the length of fill-prefix, should this be based on string-width instead?). Is that correct (for both adaptive-fill-mode and otherwise)? If so, please add an explanation of why it's correct to the commit message. If not, I hope we can elaborate the commit message until even I can understand what's happening ;) (Minor commit message format nitpick: the part explaining the changes to the function should start with "* lisp/simple.el (do-auto-fill):".) From unknown Sun Aug 17 01:22:38 2025 X-Loop: help-debbugs@gnu.org Subject: bug#20774: auto-fill doesn't work properly when first-line prefix differs in adaptive-fill-mode Resent-From: Samuel Freilich Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 24 Aug 2017 15:12:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20774 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: npostavs@users.sourceforge.net Cc: 20774@debbugs.gnu.org Received: via spool by 20774-submit@debbugs.gnu.org id=B20774.150358750210276 (code B ref 20774); Thu, 24 Aug 2017 15:12:01 +0000 Received: (at 20774) by debbugs.gnu.org; 24 Aug 2017 15:11:42 +0000 Received: from localhost ([127.0.0.1]:53016 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dktnJ-0002fg-Ts for submit@debbugs.gnu.org; Thu, 24 Aug 2017 11:11:42 -0400 Received: from mail-oi0-f53.google.com ([209.85.218.53]:33105) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dktnH-0002fP-MX for 20774@debbugs.gnu.org; Thu, 24 Aug 2017 11:11:40 -0400 Received: by mail-oi0-f53.google.com with SMTP id 193so8150802oii.0 for <20774@debbugs.gnu.org>; Thu, 24 Aug 2017 08:11:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=AT4yxY/nLzxVeuin5lWq4/sIvykVcYDDCYhCN0PK1E0=; b=QwQxnR0Igd0EOfx4wRW5rL3NXFIO1xlUoYRNjoVHdiPcFw04jhznDSjX04jYuzmqfO I9Bwz3mFiDbg9LzlekUjxA3l4kmlxuWSo8RAPsyr4mrrdkOoco8XjOfaUbq0N4o1evaJ /s6HdYuHCregF/vlN7hFbRMOergHXFdrhgM1NlI1MuWwiM4xEof6VkAagLAhtUG2N7QR OnfNEusD7avj7qg3LNOynSn4Nc7CO3s+9p2P9eEx6f4lRtKw7Zhbemi3hrERIP2Tbp30 FieMRuhF3V5S6tZ62D6P6vfmuwRlLeFHLaor5MuEf2N09xUGyrYR2fGNw7x5jRBM0yUZ I2Yg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=AT4yxY/nLzxVeuin5lWq4/sIvykVcYDDCYhCN0PK1E0=; b=T1x2ZY5D2VJRKhQIlojo1z6g3/QK6nBSnIQ7SlTQ+cRmnrAOnuTAeFCSsTVI5OSP6k 239lAEy3i81LHGyt87r+kup5tqBW/0cBx3kEmySUwzc9xYnN8SGfdjq+Non2locYj7+Z tNWybHnlze2sok4Mfcnn9pXy/sJe2LLOJp956Ces1fU14NkASOPQl+GFORsQJ193us2P t4Njn25kwLBibFshipXW5P/MuCPF84sxzB2jkp0ITUzo8xt6AbfvMdF/cS9VI9Z9vxMY Co8AU0X+jJEtPP1HhI5Sucj6K5NiGqtaxWC+/BOJeaqlOEsa3WNciUMSZ4bBCFR5JADs oEXA== X-Gm-Message-State: AHYfb5jpk8rt6PS0LYPfhlNWrHR8TAPrwmqWIAvgu1MJFoQeNzCvrxbe T3iej8N7V1bLRBvFx8oJuFAIF5V/aU3S X-Google-Smtp-Source: ADKCNb5GVopJ/MVX6L4xAwmX9X3AR7Dp6uv6x3ivLQLFV2Qi/dDWYQ2UzqPwEsiIwKpdC43Wfk06a86YW5nUnIfYwHM= X-Received: by 10.202.235.140 with SMTP id j134mr7977533oih.281.1503587493116; Thu, 24 Aug 2017 08:11:33 -0700 (PDT) MIME-Version: 1.0 Received: by 10.58.43.76 with HTTP; Thu, 24 Aug 2017 08:11:12 -0700 (PDT) In-Reply-To: <87r2w1aew4.fsf@users.sourceforge.net> References: <878tibbwcv.fsf@users.sourceforge.net> <87wp5v9bsp.fsf@users.sourceforge.net> <87r2w1aew4.fsf@users.sourceforge.net> From: Samuel Freilich Date: Thu, 24 Aug 2017 11:11:12 -0400 Message-ID: Content-Type: multipart/mixed; boundary="001a113ce37e6df23a0557813e91" X-Spam-Score: 0.5 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) --001a113ce37e6df23a0557813e91 Content-Type: multipart/alternative; boundary="001a113ce37e6df2370557813e8f" --001a113ce37e6df2370557813e8f Content-Type: text/plain; charset="UTF-8" You're right about string-width, since I'm counting number of columns. Fixed that. (Which required me to deal with the fact that fill-prefix can be nil.) Your understanding is correct. My fix avoids do-auto-fill breaking a line only to create a subsequent line that's as long or longer. The previous version avoided that in most cases by refusing to break a line during (or immediately after) the fill-prefix. But that failed to avoid that problem when: * It's breaking the first line of a paragraph * The prefix of that first line doesn't match the fill-prefix for the rest of the paragraph I've attached the fixed version of the patch with a hopefully-improved commit message. On Wed, Aug 23, 2017 at 10:16 PM, wrote: > Samuel Freilich writes: > > > tab-width = 4 seems consistent with how the rest of the file is > formatted. > > I didn't want to change the spacing in lines not touched by my diff. > > Hmm, somehow the code that landed in my buffer looked wrongly indented. > Something got messed up somewhere (possibly by the email system, > possibly during patch application, I've been experimenting with various > forms of automation for that), but since the indentation in your next > patch looks fine there's not really much point in worrying about it. > > > I added tests and a change description, and formatted the patch according > > to the current instructions. > > Thanks! > > > I made the patch a bit more minimal. I pruned the part that dealt with > > adaptive-fill-first-line-regexp didn't work as well as expected, since > > that didn't work as well as expected (it didn't deal with all the > > complexity possible with adaptive-fill-function). The updated version > > at least handles cases where the fill-prefix isn't shorter than the > > first-line prefix. That allowed me to simplify the code quite a bit, > > since that makes the previous logic for skipping the exact fill-prefix > > redundant, fill-move-to-break-point already handles the logic of > > trying to skip at least one word after the start position passed to > > it. Please take another look. > > Your commit message is a bit too focused on the problems of what was > there previously rather than how your new code is correct. This > description in your email is better, but I'm still struggling a bit (I'm > realizing I was probably a bit too superficial previously, there are a > lot of interacting options which makes things tricky). > > If I understand correctly, the previous code would take the fill-prefix > as non-breakable if the current line started with the fill-prefix. Your > new code takes the first N characters of the line as non-breakable > (where N is the length of fill-prefix, should this be based on > string-width instead?). Is that correct (for both adaptive-fill-mode > and otherwise)? If so, please add an explanation of why it's correct to > the commit message. If not, I hope we can elaborate the commit message > until even I can understand what's happening ;) > > (Minor commit message format nitpick: the part explaining the changes to > the function should start with "* lisp/simple.el (do-auto-fill):".) > --001a113ce37e6df2370557813e8f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
You're right about string-width, since I'm countin= g number of columns. Fixed that. (Which required me to deal with the fact t= hat fill-prefix can be nil.)

Your understanding is corre= ct. My fix avoids do-auto-fill breaking a line only to create a subsequent = line that's as long or longer.

The previous ve= rsion avoided that in most cases by refusing to break a line during (or imm= ediately after) the fill-prefix. But that failed to avoid that problem when= :
* It's breaking the first line of a paragraph
* T= he prefix of that first line doesn't match the fill-prefix for the rest= of the paragraph

I've attached the fixed vers= ion of the patch with a hopefully-improved commit message.



On Wed, Aug 23, 2017 at 10:16 PM, <npostavs@users.so= urceforge.net> wrote:
Samuel Freilich <sfr= eilich@google.com> writes:

> tab-width =3D 4 seems consistent with how the rest of the file is form= atted.
> I didn't want to change the spacing in lines not touched by my dif= f.

Hmm, somehow the code that landed in my buffer looked wrongly indent= ed.
Something got messed up somewhere (possibly by the email system,
possibly during patch application, I've been experimenting with various=
forms of automation for that), but since the indentation in your next
patch looks fine there's not really much point in worrying about it.
> I added tests and a change description, and formatted the patch accord= ing
> to the current instructions.

Thanks!

> I made the patch a bit more minimal. I pruned the part that dealt with=
> adaptive-fill-first-line-regexp didn't work as well as expect= ed, since
> that didn't work as well as expected (it didn't deal with all = the
> complexity possible with adaptive-fill-function). The updated version<= br> > at least handles cases where the fill-prefix isn't shorter than th= e
> first-line prefix. That allowed me to simplify the code quite a bit, > since that makes the previous logic for skipping the exact fill-prefix=
> redundant, fill-move-to-break-point already handles the logic of
> trying to skip at least one word after the start position passed to > it. Please take another look.

Your commit message is a bit too focused on the problems of what was=
there previously rather than how your new code is correct.=C2=A0 This
description in your email is better, but I'm still struggling a bit (I&= #39;m
realizing I was probably a bit too superficial previously, there are a
lot of interacting options which makes things tricky).

If I understand correctly, the previous code would take the fill-prefix
as non-breakable if the current line started with the fill-prefix.=C2=A0 Yo= ur
new code takes the first N characters of the line as non-breakable
(where N is the length of fill-prefix, should this be based on
string-width instead?).=C2=A0 Is that correct (for both adaptive-fill-mode<= br> and otherwise)?=C2=A0 If so, please add an explanation of why it's corr= ect to
the commit message.=C2=A0 If not, I hope we can elaborate the commit messag= e
until even I can understand what's happening ;)

(Minor commit message format nitpick: the part explaining the changes to the function should start with "* lisp/simple.el (do-auto-fill):"= .)

--001a113ce37e6df2370557813e8f-- --001a113ce37e6df23a0557813e91 Content-Type: text/x-patch; charset="US-ASCII"; name="0002-Do-not-split-line-before-width-of-fill-prefix.patch" Content-Disposition: attachment; filename="0002-Do-not-split-line-before-width-of-fill-prefix.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_j6ql3ptr0 RnJvbSA0MmRhMWQ4MDM2N2I3NTE5YjAwNDczMjhhMzdkODQ1ZTc4YWFhMTU3IE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBTYW11ZWwgRnJlaWxpY2ggPHNmcmVpbGljaEBnb29nbGUuY29t PgpEYXRlOiBXZWQsIDIzIEF1ZyAyMDE3IDEzOjQwOjQ1IC0wNDAwClN1YmplY3Q6IFtQQVRDSF0g RG8gbm90IHNwbGl0IGxpbmUgYmVmb3JlIHdpZHRoIG9mIGZpbGwtcHJlZml4CgpXaGVuIGF1dG8t ZmlsbGluZyBhIHBhcmFncmFwaCwgZG9uJ3Qgc3BsaXQgYSBsaW5lIGJlZm9yZSB0aGUgd2lkdGgg b2YgdGhlCmZpbGwtcHJlZml4LCBjcmVhdGluZyBh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ikgZmMpKQotCTs7IERldGVybWlu ZSB3aGVyZSB0byBzcGxpdCB0aGUgbGluZS4KLQkobGV0KiAoYWZ0ZXItcHJlZml4Ci0JICAgICAg IChmaWxsLXBvaW50Ci0JCShzYXZlLWV4Y3Vyc2lvbgotCQkgIChiZWdpbm5pbmctb2YtbGluZSkK LQkJICAoc2V0cSBhZnRlci1wcmVmaXggKHBvaW50KSkKLQkJICAoYW5kIGZpbGwtcHJlZml4Ci0J CSAgICAgICAobG9va2luZy1hdCAocmVnZXhwLXF1b3RlIGZpbGwtcHJlZml4KSkKLQkJICAgICAg IChzZXRxIGFmdGVyLXByZWZpeCAobWF0Y2gtZW5kIDApKSkKLQkJICAobW92ZS10by1jb2x1bW4g KDErIGZjKSkKLQkJICAoZmlsbC1tb3ZlLXRvLWJyZWFrLXBvaW50IGFmdGVyLXByZWZpeCkKLQkJ ICAocG9pbnQpKSkpCisgICAgICAgIDs7IERldGVybWluZSB3aGVyZSB0byBzcGxpdCB0aGUgbGlu ZS4KKyAgICAgICAgKGxldCAoKGZpbGwtcG9pbnQKKyAgICAgICAgICAgICAgIChzYXZlLWV4Y3Vy c2lvbgorICAgICAgICAgICAgICAgICAoYmVnaW5uaW5nLW9mLWxpbmUpCisgICAgICAgICAgICAg ICAgIChsZXQgKChsaW5lLXN0YXJ0IChwb2ludCkpKQorICAgICAgICAgICAgICAgICAgICAobW92 ZS10by1jb2x1bW4gKDErIGZjKSkKKyAgICAgICAgICAgICAgICAgICAgOzsgRG9uJ3Qgc3BsaXQg ZWFybGllciBpbiB0aGUgbGluZSB0aGFuIHRoZSBsZW5ndGggb2YgdGhlCisgICAgICAgICAgICAg ICAgICAgIDs7IGZpbGwgcHJlZml4LCBzaW5jZSB0aGUgcmVzdWx0aW5nIGxpbmUgd291bGQgYmUg bG9uZ2VyLgorICAgICAgICAgICAgICAgICAgICAoZmlsbC1tb3ZlLXRvLWJyZWFrLXBvaW50Cisg ICAgICAgICAgICAgICAgICAgICAoaWYgZmlsbC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3MzMwZTQwMzQgMTAwNjQ0Ci0tLSBhL3Rlc3QvbGlzcC9zaW1wbGUtdGVzdHMuZWwKKysrIGIv dGVzdC9saXNwL3NpbXBsZS10ZXN0cy5lbApAQCAtNDk3LDUgKzQ5NywxNiBAQCBzaW1wbGUtdGVz dC11bmRvLXdpdGgtc3dpdGNoZWQtYnVmZmVyCiAgICAgICAoc2hvdWxkIChlcXVhbCAobGluZS1u dW1iZXItYXQtcG9zIDUpIDMpKQogICAgICAgKHNob3VsZCAoZXF1YWwgKGxpbmUtbnVtYmVyLWF0 LXBvcyA3KSA0KSkpKSkKIAorKGVydC1kZWZ0ZXN0IGF1dG8tZmlsbC1tb2RlLW5vLWJyZWFrLWJl Zm9yZS1sZW5ndGgtb2YtZmlsbC1wcmVmaXggKCkKKyAgKHdpdGgtdGVtcC1idWZmZXIKKyAgICAo c2V0cS1sb2NhbCBmaWxsLXByZWZpeCAiICAgIikKKyAgICAoc2V0LWZpbGwtY29sdW1uIDUpCisg ICAgOzsgU2hvdWxkbid0IGJyZWFrIGFmdGVyICdmb28nICgzIGNoYXJhY3RlcnMpIHdoZW4gdGhl IG5leHQKKyAgICA7OyBsaW5lIGlzIGluZGVudGVkID49IHRvIHRoYXQsIHRoYXQgd291ZGxuJ3Qg cmVzdWx0IGluIHNob3J0ZXIKKyAgICA7OyBsaW5lcy4KKyAgICAoaW5zZXJ0ICJmb28gYmFyIikK KyAgICAoZG8tYXV0by1maWxsKQorICAgIChzaG91bGQgKHN0cmluZy1lcXVhbCAoYnVmZmVyLXN0 cmluZykgImZvbyBiYXIiKSkpKQorCiAocHJvdmlkZSAnc2ltcGxlLXRlc3QpCiA7Ozsgc2ltcGxl LXRlc3QuZWwgZW5kcyBoZXJlCi0tIAoyLjE0LjEuMzQyLmc2NDkwNTI1YzU0LWdvb2cKCg== --001a113ce37e6df23a0557813e91-- From unknown Sun Aug 17 01:22:38 2025 X-Loop: help-debbugs@gnu.org Subject: bug#20774: auto-fill doesn't work properly when first-line prefix differs in adaptive-fill-mode Resent-From: npostavs@users.sourceforge.net Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 25 Aug 2017 01:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20774 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Samuel Freilich Cc: 20774@debbugs.gnu.org Received: via spool by 20774-submit@debbugs.gnu.org id=B20774.150362542731159 (code B ref 20774); Fri, 25 Aug 2017 01:44:02 +0000 Received: (at 20774) by debbugs.gnu.org; 25 Aug 2017 01:43:47 +0000 Received: from localhost ([127.0.0.1]:53394 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dl3f1-00086V-Fs for submit@debbugs.gnu.org; Thu, 24 Aug 2017 21:43:47 -0400 Received: from mail-it0-f49.google.com ([209.85.214.49]:37565) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dl3f0-00086I-48 for 20774@debbugs.gnu.org; Thu, 24 Aug 2017 21:43:46 -0400 Received: by mail-it0-f49.google.com with SMTP id 77so591020itj.0 for <20774@debbugs.gnu.org>; Thu, 24 Aug 2017 18:43:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=re914tYfXRv/RhByu+lizHA+faFFYbKUhXaEZrOvarQ=; b=UKkjE8RdIxz7KcLJ85NO0cZK2/QpQYnNTXRx9dM6QqqmeQEn4xJoC+ZTkT8rUPZKMd LR2gAyZTbL+pamllL8nrw7YeVIKqiSEydysilMNPW6hqWe4N964x6oJfRMw7pjICT3Fg mkknPdAOOpkWqUIvGZMvenDFy7npfdoCdTnuC1tWwT2z4Ry8DBx5ZvTr9r4+tyVauA18 HH1P9qpZdANAiuV81H/FGijlJwE3uHK8POJ8IckOgcqfGLRo48Hhng9fp0+VAxJVnvUC C68MNDBLw/6/emhkKvF30b7IhSjy1z2fim0PAEfvIFpLmLg+PrF8NzyjSi7X09ZZgcUE deUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=re914tYfXRv/RhByu+lizHA+faFFYbKUhXaEZrOvarQ=; b=pti+MaVRUKSHz/YHk3LdOCPPhQdpP+M61DAx//jFYF8w4teoN8inzw7bvfwBNhRU4v PQ85IpaDMBsxBVXBG8gnoD0Mr+IyBe986J7trwDqV7jrr5r0SdPbGIi8YyHX+PWjVt03 a/aKmJXYdGB2dyK2iOh/mnnazzRJpmS/6bFp3hYlGYMyWxXQT5GYDwd5Ax04hjaiIS+F AMasRKJs7fTCBAwk9QYBbB2RePpLBs1ZIRHGblGsQCQgT51dN9c6KreUJZE42OFQyOkl B66gld7MoPHOu0rryiwk7PxK+GWt0TXtAyfvUmroaYJh1qiq8QkP8SAMNLssajUnkvKX h/Jg== X-Gm-Message-State: AHYfb5jcl0ccVHHbQTaQ24g9Ik2DnK13fW0+Bpsoz1dMeVQ5idvt04I1 0RmZ32f3F3NwhH5P X-Received: by 10.36.104.210 with SMTP id v201mr710586itb.95.1503625420400; Thu, 24 Aug 2017 18:43:40 -0700 (PDT) Received: from zony ([45.2.119.49]) by smtp.googlemail.com with ESMTPSA id q21sm234087itb.28.2017.08.24.18.43.38 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 24 Aug 2017 18:43:38 -0700 (PDT) From: npostavs@users.sourceforge.net References: <878tibbwcv.fsf@users.sourceforge.net> <87wp5v9bsp.fsf@users.sourceforge.net> <87r2w1aew4.fsf@users.sourceforge.net> Date: Thu, 24 Aug 2017 21:45:17 -0400 In-Reply-To: (Samuel Freilich's message of "Thu, 24 Aug 2017 11:11:12 -0400") Message-ID: <87fucga09e.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.7 (/) Samuel Freilich writes: > You're right about string-width, since I'm counting number of columns. > Fixed that. (Which required me to deal with the fact that fill-prefix can > be nil.) Actually, it's now occuring to me that adding a position to a string-width isn't quite correct either, since it doesn't take into account wide characters on the current line. I guess it should actually be something like (save-excursion (if line-prefix (move-to-column (string-width line-prefix)) (beginning-of-line)) (point)) > I've attached the fixed version of the patch with a hopefully-improved > commit message. That is much better, thanks. (One more minor formatting nitpick, there should be 2 spaces after the period.) From unknown Sun Aug 17 01:22:38 2025 X-Loop: help-debbugs@gnu.org Subject: bug#20774: auto-fill doesn't work properly when first-line prefix differs in adaptive-fill-mode References: In-Reply-To: Resent-From: npostavs@users.sourceforge.net Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 29 Aug 2017 03:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20774 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Samuel Freilich , 20774@debbugs.gnu.org Received: via spool by 20774-submit@debbugs.gnu.org id=B20774.150397775724990 (code B ref 20774); Tue, 29 Aug 2017 03:36:02 +0000 Received: (at 20774) by debbugs.gnu.org; 29 Aug 2017 03:35:57 +0000 Received: from localhost ([127.0.0.1]:59887 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dmXJl-0006V0-FD for submit@debbugs.gnu.org; Mon, 28 Aug 2017 23:35:57 -0400 Received: from mail-io0-f178.google.com ([209.85.223.178]:35913) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dmXJk-0006Uo-D0 for 20774@debbugs.gnu.org; Mon, 28 Aug 2017 23:35:56 -0400 Received: by mail-io0-f178.google.com with SMTP id g33so7793772ioj.3 for <20774@debbugs.gnu.org>; Mon, 28 Aug 2017 20:35:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:date:message-id:mime-version; bh=Ldz2X9JhSUFQrlPVjSZ7dAsRkwQD14kBJ2nsV2lPvVU=; b=JEqRzgV+MgwKQrPv/KkilthIfkI3Kx+Cib9bS1tel4eKrtPj14i0TreJSIjxvQnvwL pmqEiFIP3A0gv0tc6a1UFN60Li+UnyLL932Mig+rSs0vz0Svbi4bMrLC/m4WxPAiH5LS nX3U8gRxUFKXAkNgGAR4uHg+ZOdoYHy+InviCtnFDEmeCtmLtnZI7y9Evqc/sV+uXCWv muf7iJWLdPkiLXpMCE99WqMXVlShUHiQzMTdF/u81HAJc8/npcFZjzwVkbJYSSUoz63F vFua69g/Pg7iwBoQQvoqvHw4GesDjeBivxnjHhfL9v4/wcWZ0Ns1qeBv5Nd5y5o6pBut zX9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:date:message-id :mime-version; bh=Ldz2X9JhSUFQrlPVjSZ7dAsRkwQD14kBJ2nsV2lPvVU=; b=CxjXWGjTmstIwDXfxCnsDGhsSL1etSMYEO2K5gBVXxhZ3DkMUlzHUz9OaE9vVW8hUs cBYkN15mfKZ6g04oxXyldINyTQKTNL23RYxDwhrlCLLlZEN42TPUh/far3LVC6LzZgLb 5iyJnQDEBfHf0R4+jo4+Js03f3phezGRYPh5gWwxhIwOzth++AEeFJVlZBvuLtDp2iKq FqJMLBcyX1yoa1LYBaiY8mzAJ2bJIslIAL2FcQVAj08TRzuNZEUGHK84wtSHANX1QkLG 7i5WaqcxkjvOSjUvY+KrkUQFDwAu1G74J+ZgVYLgECxEypFrS2tVFDc1YtcnSB2iEbUV Qj3A== X-Gm-Message-State: AHYfb5iq9m5RBF+K0rl6rv+OW8rXjsGIYYfghlxjG+KTWN5JjX1APiJQ WEXqHZaXdvDsaihp X-Received: by 10.107.136.229 with SMTP id s98mr2497718ioi.323.1503977750652; Mon, 28 Aug 2017 20:35:50 -0700 (PDT) Received: from zony ([45.2.119.49]) by smtp.googlemail.com with ESMTPSA id f25sm906065ioj.36.2017.08.28.20.35.49 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 28 Aug 2017 20:35:49 -0700 (PDT) From: npostavs@users.sourceforge.net Date: Mon, 28 Aug 2017 23:37:30 -0400 Message-ID: <87pobf82o5.fsf@users.sourceforge.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.1 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.1 (--) --=-=-= Content-Type: text/plain [forwarding to bug list] --=-=-= Content-Type: message/rfc822 Content-Disposition: inline Received: by 10.58.43.76 with HTTP; Mon, 28 Aug 2017 19:06:23 -0700 (PDT) In-Reply-To: <87fucga09e.fsf@users.sourceforge.net> References: <878tibbwcv.fsf@users.sourceforge.net> <87wp5v9bsp.fsf@users.sourceforge.net> <87r2w1aew4.fsf@users.sourceforge.net> <87fucga09e.fsf@users.sourceforge.net> From: Samuel Freilich Date: Mon, 28 Aug 2017 22:06:23 -0400 Message-ID: Subject: Re: bug#20774: auto-fill doesn't work properly when first-line prefix differs in adaptive-fill-mode To: npostavs@users.sourceforge.net MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=====-=-=" --=====-=-= Content-Type: multipart/alternative; boundary="======-=-=" --======-=-= Content-Type: text/plain; charset=utf-8 Content-Disposition: inline wrote: > Actually, it's now occuring to me that adding a position to a > string-width isn't quite correct either Ah right, (point) is in characters, which doesn't correspond directly to columns at all. I think I can avoid the extra save-excursion and make it a little cleaner as a result. > there should be 2 spaces after the period Heresy! :-P But done. That does seem to be the most common style in the ChangeLog. Please take another look. Hopefully this patch can be merged. --======-=-= Content-Type: text/x-patch; name=0003-Do-not-split-line-before-width-of-fill-prefix.patch Content-Disposition: attachment; filename=0003-Do-not-split-line-before-width-of-fill-prefix.patch >From 118c8a43510a7d3020a552ce0e87e5a1b9ccec54 Mon Sep 17 00:00:00 2001 From: Samuel Freilich Date: Wed, 23 Aug 2017 13:40:45 -0400 Subject: [PATCH] Do not split line before width of fill-prefix When auto-filling a paragraph, don't split a line before the width of the fill-prefix, creating a subsequent line that is as long or longer (Bug#20774). * lisp/simple.el (do-auto-fill): Only consider break-points that are later in the line than the width of the fill-prefix. This is a more general solution than the previous logic, which only skipped over the exact fill-prefix. The fill-prefix doesn't necessarily match the prefix of the first line of a paragraph in adaptive-fill-mode. --- lisp/simple.el | 27 ++++++++++++--------------- test/lisp/simple-tests.el | 11 +++++++++++ 2 files changed, 23 insertions(+), 15 deletions(-) diff --git a/lisp/simple.el b/lisp/simple.el index 13cfa3487d..27990bb661 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -7151,18 +7151,18 @@ do-auto-fill (setq fill-prefix prefix)))) (while (and (not give-up) (> (current-column) fc)) - ;; Determine where to split the line. - (let* (after-prefix - (fill-point - (save-excursion - (beginning-of-line) - (setq after-prefix (point)) - (and fill-prefix - (looking-at (regexp-quote fill-prefix)) - (setq after-prefix (match-end 0))) - (move-to-column (1+ fc)) - (fill-move-to-break-point after-prefix) - (point)))) + ;; Determine where to split the line. + (let ((fill-point + (save-excursion + (beginning-of-line) + ;; Don't split earlier in the line than the length of the + ;; fill prefix, since the resulting line would be longer. + (when fill-prefix + (move-to-column (string-width fill-prefix))) + (let ((after-prefix (point))) + (move-to-column (1+ fc)) + (fill-move-to-break-point after-prefix) + (point))))) ;; See whether the place we found is any good. (if (save-excursion @@ -7170,9 +7170,6 @@ do-auto-fill (or (bolp) ;; There is no use breaking at end of line. (save-excursion (skip-chars-forward " ") (eolp)) - ;; It is futile to split at the end of the prefix - ;; since we would just insert the prefix again. - (and after-prefix (<= (point) after-prefix)) ;; Don't split right after a comment starter ;; since we would just make another comment starter. (and comment-start-skip diff --git a/test/lisp/simple-tests.el b/test/lisp/simple-tests.el index ad7aee1db1..c7330e4034 100644 --- a/test/lisp/simple-tests.el +++ b/test/lisp/simple-tests.el @@ -497,5 +497,16 @@ simple-test-undo-with-switched-buffer (should (equal (line-number-at-pos 5) 3)) (should (equal (line-number-at-pos 7) 4))))) +(ert-deftest auto-fill-mode-no-break-before-length-of-fill-prefix () + (with-temp-buffer + (setq-local fill-prefix " ") + (set-fill-column 5) + ;; Shouldn't break after 'foo' (3 characters) when the next + ;; line is indented >= to that, that woudln't result in shorter + ;; lines. + (insert "foo bar") + (do-auto-fill) + (should (string-equal (buffer-string) "foo bar")))) + (provide 'simple-test) ;;; simple-test.el ends here -- 2.14.1.342.g6490525c54-goog --======-=-=-- --=====-=-=-- --=-=-=-- From unknown Sun Aug 17 01:22:38 2025 X-Loop: help-debbugs@gnu.org Subject: bug#20774: auto-fill doesn't work properly when first-line prefix differs in adaptive-fill-mode Resent-From: npostavs@users.sourceforge.net Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 29 Aug 2017 03:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20774 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Samuel Freilich Cc: 20774@debbugs.gnu.org Received: via spool by 20774-submit@debbugs.gnu.org id=B20774.150397883926596 (code B ref 20774); Tue, 29 Aug 2017 03:54:02 +0000 Received: (at 20774) by debbugs.gnu.org; 29 Aug 2017 03:53:59 +0000 Received: from localhost ([127.0.0.1]:59902 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dmXbD-0006uu-Bb for submit@debbugs.gnu.org; Mon, 28 Aug 2017 23:53:59 -0400 Received: from mail-io0-f196.google.com ([209.85.223.196]:38802) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dmXbB-0006ug-Dy for 20774@debbugs.gnu.org; Mon, 28 Aug 2017 23:53:57 -0400 Received: by mail-io0-f196.google.com with SMTP id m40so2271145ioi.5 for <20774@debbugs.gnu.org>; Mon, 28 Aug 2017 20:53:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=ILyAqJeBgbQHpO5+LRsVCEn3KPKjQUZbSXO7s/wmq1k=; b=HRGgXR+cRHRvlZsVNbgo46xT4/WiTCbK0obT7Fl1ZTzdPfi0Y8i5bKyHPxxGT5sgUN /SMtlDAj3SkEnZtHdOrRATTkE1b/l/CZSV2GKcFpeOg1RQk5RU4rXiAgjPWMPusSxgaN mUdKb9cEaYCIyyMW/I2T4rcLGFXOR02MCqvFrwR9udZL8seItTOjOUqGLT1E4a+hrCrb WviBUqSDn9tOhfANuJakWnzQOBGggpJ6s85GhjL94Gb2FOKJvBYwKYzCnEWcZMSeqSaD iZTnE9asK0XqEVtO4vuerscSCCGLo879XwmBLVwshd9/3buJONJ7YjluFbcFmB6Z1Bn8 E8MQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=ILyAqJeBgbQHpO5+LRsVCEn3KPKjQUZbSXO7s/wmq1k=; b=SlS15VXWnnQysr7tPXI6kF+v2iB0/bjXAS+b2Xt7oB8mgGPCoud9hCV4XexXV3a8JV 8whL8KK+Es8ACGo0Dj5/rKvE+HRx9BzFVGOSsz0t5BuZQBAsnDdGFYvl7FViN9JY6ow2 7DTFVz65RPxgkzhJBZEMGUhMf/B+TfAUM3zt4Lo3kCze/I4kQ6HPjR/4J1G89ycNOS1h hmv2ijOUjA6fNcw3BZenX8rUwEf1Qi+N1RltMRHRjJPew7mpR+AWCt733ctXT3nZ1PKN WBZZP0Qa+MQwjA5GuRd7lHJERPtczQeJQkvAn/NAn8BNS1NNcmMFdqNuTGsYBVWCcO1U md9Q== X-Gm-Message-State: AHYfb5i1nyZhkN1r8uW3KMVOLxoKSIv5GWNIiYv2dBWtoeYTzTt6T4/1 24wBAKNhwtdSq7th X-Received: by 10.36.225.7 with SMTP id n7mr2992917ith.96.1503978831668; Mon, 28 Aug 2017 20:53:51 -0700 (PDT) Received: from zony ([45.2.119.49]) by smtp.googlemail.com with ESMTPSA id k79sm977804itb.3.2017.08.28.20.53.50 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 28 Aug 2017 20:53:51 -0700 (PDT) From: npostavs@users.sourceforge.net References: <87pobf82o5.fsf@users.sourceforge.net> Date: Mon, 28 Aug 2017 23:55:31 -0400 In-Reply-To: <87pobf82o5.fsf@users.sourceforge.net> (npostavs@users.sourceforge.net's message of "Mon, 28 Aug 2017 23:37:30 -0400") Message-ID: <87fucb81u4.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.6 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.6 (--) > From: Samuel Freilich > > wrote: > >> Actually, it's now occuring to me that adding a position to a >> string-width isn't quite correct either > > Ah right, (point) is in characters, which doesn't correspond directly to > columns at all. I think I can avoid the extra save-excursion and make it a > little cleaner as a result. Looks good. I'll wait a couple of days before pushing in case someone finds we missed something. >> there should be 2 spaces after the period > > Heresy! :-P > > But done. That does seem to be the most common style in the ChangeLog. I think you'll find it's not just most common, it's official policy[1]. However, the Church of Emacs will forgive your impertinence, as long as you don't bring up the subject of quotation marks ;) [2] [1]: http://www.gnu.org/prep/standards/html_node/Comments.html [2]: https://mobile.twitter.com/AMalabarba/status/641598687467163648 From unknown Sun Aug 17 01:22:38 2025 X-Loop: help-debbugs@gnu.org Subject: bug#20774: auto-fill doesn't work properly when first-line prefix differs in adaptive-fill-mode Resent-From: npostavs@users.sourceforge.net Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 31 Aug 2017 00:50:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20774 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Samuel Freilich Cc: 20774@debbugs.gnu.org Received: via spool by 20774-submit@debbugs.gnu.org id=B20774.15041405972381 (code B ref 20774); Thu, 31 Aug 2017 00:50:01 +0000 Received: (at 20774) by debbugs.gnu.org; 31 Aug 2017 00:49:57 +0000 Received: from localhost ([127.0.0.1]:35495 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dnDgC-0000cG-Rw for submit@debbugs.gnu.org; Wed, 30 Aug 2017 20:49:57 -0400 Received: from mail-io0-f196.google.com ([209.85.223.196]:35876) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dnDgA-0000bx-Rm; Wed, 30 Aug 2017 20:49:55 -0400 Received: by mail-io0-f196.google.com with SMTP id 2so2583604ion.3; Wed, 30 Aug 2017 17:49:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=OsBRgwb0Fn9amTM9JVhtRJPy5Sl7g5hobht+SxxSP00=; b=vFDeJkpYCkfJAnkbPPxYtfeMLvzXXzK+/oXiimvXCegBjRhbclbySmF67PEwYwtTZi JAgF3SWDAlXEWHOzz53YyTspG+PeOsR/wFlDdNVIAQYKTVBc8aOzJrpid/C+3pPiyKC+ VfklUj6bOpRigzyNhMMvKQB3zqyZ7giTZlfWqm/5uQ9Qq7977EPze38nnFYChv7ByMBQ Faqvt+zoLrEPsTtFu8xmMM7IsAHcG/EyjHniO7iHwUmX2XXKUDGKry862ZrsJBaiAbIN XZpqomBVKxjXj2rxCXQifRyOYPt2+snxxPjgFXmXD4/4HVNDvTOz6DN788ZDdLh1HqOE s8hQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=OsBRgwb0Fn9amTM9JVhtRJPy5Sl7g5hobht+SxxSP00=; b=h23zo6LyHqR3FdyBbSEXj7E4hyXOxtgyCmxyksTR8HNV0hdnc4Bxg3a93HDGzDs1l/ TPu/THKYlWPE91ekVMlwMulh1adB88rssMnOjjkGruOzUcIGnbje/sXDvPbg9/SjysEA OSfYA3EjBbN1GMXFn3XBUyoyMrM+gDuHuXaP7mZdy2px/MoBbPYBhiHVZRKoG+cCvaW/ uergMj8s2OTo7habxHFa+x1vUHfn57SYFlLdaYlAkc3f5UHcQUQMo4SP69zTkpJiaJgT x9y8CUN+zpkAZEoRMBzXjRB9bb+Xe+OVd9Cguf+0pdmSFrs7cBHLeiwP1EUBbbnvBJh8 NyLw== X-Gm-Message-State: AHPjjUhZCtFRfUXyUhI2+77n1HatofSAQbg4ndWpL7toYWYAbIjrhosJ NBfkaP3zDFSB0EmZ X-Received: by 10.107.201.136 with SMTP id z130mr3747396iof.72.1504140589195; Wed, 30 Aug 2017 17:49:49 -0700 (PDT) Received: from zony ([45.2.119.49]) by smtp.googlemail.com with ESMTPSA id w89sm3431176ioe.1.2017.08.30.17.49.48 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 30 Aug 2017 17:49:48 -0700 (PDT) From: npostavs@users.sourceforge.net References: <87pobf82o5.fsf@users.sourceforge.net> <87fucb81u4.fsf@users.sourceforge.net> Date: Wed, 30 Aug 2017 20:51:30 -0400 In-Reply-To: <87fucb81u4.fsf@users.sourceforge.net> (npostavs@users.sourceforge.net's message of "Mon, 28 Aug 2017 23:55:31 -0400") Message-ID: <87shg87e5p.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.1 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.1 (--) tags 20774 fixed close 20774 26.1 quit npostavs@users.sourceforge.net writes: > Looks good. I'll wait a couple of days before pushing in case someone > finds we missed something. I've pushed to master. [1: cda26e6462]: 2017-08-30 20:10:36 -0400 Do not split line before width of fill-prefix http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=cda26e64621d71c6a797f694418d844a621998be