From debbugs-submit-bounces@debbugs.gnu.org Sun May 29 17:58:03 2022 Received: (at submit) by debbugs.gnu.org; 29 May 2022 21:58:03 +0000 Received: from localhost ([127.0.0.1]:42116 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nvQvD-0001Nx-4y for submit@debbugs.gnu.org; Sun, 29 May 2022 17:58:03 -0400 Received: from lists.gnu.org ([209.51.188.17]:49218) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nvQvC-0001Nq-1q for submit@debbugs.gnu.org; Sun, 29 May 2022 17:58:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52638) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvQvB-0008BB-Q1 for bug-gnu-emacs@gnu.org; Sun, 29 May 2022 17:58:01 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:39058) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvQv7-0003C6-Qo for bug-gnu-emacs@gnu.org; Sun, 29 May 2022 17:57:59 -0400 Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 88480803E6 for ; Sun, 29 May 2022 17:57:56 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 3D90380762 for ; Sun, 29 May 2022 17:57:55 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1653861475; bh=1ie5tPinU2bAC6R43RSvQxIPnsDA3vEuPt9+ZsbZWr4=; h=From:To:Subject:Date:From; b=gikjYZ4mxjND6nPrfWFbRROgncK6FFVg4P0ajR6RjUVj8aCguJUwEBMi1TBYaHXC+ X3Gt0N6iPpWF1fU/3x4cKE0+b9wZEx8ZtC4sCSqKWr5l76voY7txc+7LCbzAnJK33k uv2I721SveDwgZWbX0y3gKKX4QxGOkIqpT7WKNneUxsG6CJ74T4FZ0J498ZPD73SaF 97N0mbClufMddVAHH+rLoxSfvRcFGzmOBfkm9sUWeMgjaBS7NWPPfx2l3YWJNIjwSH UdVl4/Q249m4ci7wo/wW1mDQ+WCV1uMNEcjB0c41wgqkxoiICxxH7uNHqUX435+Ek9 avSZVNlKqvxPw== Received: from pastel (unknown [45.72.221.51]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 1B652120189 for ; Sun, 29 May 2022 17:57:55 -0400 (EDT) From: Stefan Monnier To: bug-gnu-emacs@gnu.org Subject: 29.0.50; latex-mode overrides my `comment-style` choice Date: Sun, 29 May 2022 17:57:46 -0400 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.054 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain T_SCC_BODY_TEXT_LINE -0.01 - X-SPAM-LEVEL: Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit 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 (--) Package: Emacs Version: 29.0.50 latex-mode started to impose the old `plain` comment-style a few months ago, which I find rather annoying and not very user-friendly. At first, I thought it was a bug somewhere in my config, but I now see that it comes from: commit 0870ebb3cbfcb097d85eea5eacaf992dd88ed204 Author: Lars Ingebrigtsen Date: Thu Jan 28 07:09:18 2021 +0100 Allow commenting out white space lines in latex-mode * lisp/newcomment.el (comment-region-default-1): Allow commenting out whitespace-only regions (bug#41793). * lisp/textmodes/tex-mode.el (latex--comment-region): Use it. (latex-mode): Set a comment style shim. diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el index c4e4864da17..ce665e61656 100644 --- a/lisp/textmodes/tex-mode.el +++ b/lisp/textmodes/tex-mode.el @@ -1169,7 +1169,12 @@ latex-mode (setq-local outline-regexp latex-outline-regexp) (setq-local outline-level #'latex-outline-level) (setq-local forward-sexp-function #'latex-forward-sexp) - (setq-local skeleton-end-hook nil)) + (setq-local skeleton-end-hook nil) + (setq-local comment-region-function #'latex--comment-region) + (setq-local comment-style 'plain)) + +(defun latex--comment-region (beg end &optional arg) + (comment-region-default-1 beg end arg t)) ;;;###autoload (define-derived-mode slitex-mode latex-mode "SliTeX" The commit message doesn't explain why it changes `comment-style`. Was that an oversight? Stefan From debbugs-submit-bounces@debbugs.gnu.org Mon May 30 14:24:48 2022 Received: (at 55716) by debbugs.gnu.org; 30 May 2022 18:24:48 +0000 Received: from localhost ([127.0.0.1]:46063 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nvk4N-0006mP-V2 for submit@debbugs.gnu.org; Mon, 30 May 2022 14:24:48 -0400 Received: from quimby.gnus.org ([95.216.78.240]:48432) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nvk4K-0006m3-GA for 55716@debbugs.gnu.org; Mon, 30 May 2022 14:24:46 -0400 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=ZwqZ7jVHGN/PnQkeQbm3Py8VHOVaDVF2hDKYKeV/87I=; b=G1Ulfglw+YDTuxnOEkAtcA0+lL Esv+fWxUwZoy2YUZ5UFe23MXvozcxfvK499bEo3BEcleHt6DcvirQp7TB7EAA+LfWjK/5/VBKSxJC HINsPuzlC1FrSZ/JBZS17vClOUv7+54oLXEBVfVvXAcDKa4LCY3I/9mthNHMuDOwSEEI=; Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nvk4A-0000AC-Gy; Mon, 30 May 2022 20:24:36 +0200 From: Lars Ingebrigtsen To: Stefan Monnier Subject: Re: bug#55716: 29.0.50; latex-mode overrides my `comment-style` choice References: X-Now-Playing: Exec's _Advertise Here_: "Parricide is Painless" Date: Mon, 30 May 2022 20:24:33 +0200 In-Reply-To: (Stefan Monnier's message of "Sun, 29 May 2022 17:57:46 -0400") Message-ID: <87bkveanfi.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Stefan Monnier writes: > The commit message doesn't explain why it changes `comment-style`. > Was that an oversight? Yes, sort of. The change is wrong, and should be fixed a different way, I think. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 55716 Cc: 55716@debbugs.gnu.org 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: -3.3 (---) Stefan Monnier writes: > The commit message doesn't explain why it changes `comment-style`. > Was that an oversight? Yes, sort of. The change is wrong, and should be fixed a different way, I think. The problem is that if you have this: --- foo bar --- and comments out the blank line in the middle with `M-x comment-region', you get --- foo %% bar --- Which doesn't seem right, so I assumed that `indent' didn't work for latex-mode. But that's probably a bug in the `indent' version instead, because `indent' should work in general. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Tue May 31 08:26:42 2022 Received: (at 55716) by debbugs.gnu.org; 31 May 2022 12:26:42 +0000 Received: from localhost ([127.0.0.1]:46944 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nw0xN-0006AT-VG for submit@debbugs.gnu.org; Tue, 31 May 2022 08:26:42 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:50422) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nw0xL-0006A3-1r for 55716@debbugs.gnu.org; Tue, 31 May 2022 08:26:39 -0400 Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id C5A954424B0; Tue, 31 May 2022 08:26:32 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 760C244012F; Tue, 31 May 2022 08:26:31 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1653999991; bh=U0eW6nwMdP55SfO0KfJHgA73BpM5SqOkBRBkmVqO/+A=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=j+obrb2ysAe7Hol/pjMqG5VciFgg4c9wWBl1oX1oLMyZYqxNwUJv9sJ+4zxP+2Apv QmgKnX/uJZ2CwUEXGDNz4kDggxEjDsV/YIWcHG2zmpaKDepz+Pcw3iZBcXNGngiYb6 q2tFaRWbtysLpCKqizBzFg2gSY1KE5DrWJ0Yoe8EpZRRVTfmmeXVxVrdl7tS6LdrtX +we19pULGw67kn80/QfvwtJDtBJft+F0jTEDrsLlXESOlt2iTJ/PbxSXF6G8DAFlhT NRIpziahOjL7dz4xSnjvLYHfgYT5mUaumh0d/s5VmVwxY8vjp8DO4Q9nCORJuDhiM2 iUk5ceT0qnltw== Received: from pastel (unknown [45.72.221.51]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 4D854120192; Tue, 31 May 2022 08:26:31 -0400 (EDT) From: Stefan Monnier To: Lars Ingebrigtsen Subject: Re: bug#55716: 29.0.50; latex-mode overrides my `comment-style` choice Message-ID: References: <87bkveanfi.fsf@gnus.org> Date: Tue, 31 May 2022 08:26:16 -0400 In-Reply-To: <87bkveanfi.fsf@gnus.org> (Lars Ingebrigtsen's message of "Mon, 30 May 2022 20:24:33 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.057 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain T_SCC_BODY_TEXT_LINE -0.01 - X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 55716 Cc: 55716@debbugs.gnu.org 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: -3.3 (---) Lars Ingebrigtsen [2022-05-30 20:24:33] wrote: > Stefan Monnier writes: >> The commit message doesn't explain why it changes `comment-style`. >> Was that an oversight? > > Yes, sort of. The change is wrong, and should be fixed a different way, > I think. > > The problem is that if you have this: > > --- > foo > > bar > --- > > and comments out the blank line in the middle with `M-x comment-region', > you get > > --- > foo > %% > bar > --- > > Which doesn't seem right, so I assumed that `indent' didn't work for > latex-mode. Before your patch, this didn't comment out anything since it skipped empty lines, thus the problem didn't exist. > But that's probably a bug in the `indent' version instead, > because `indent' should work in general. Yes, it's a new problem introduced by the new functionality of commenting out empty lines (and it probably affects more than just the `indent` style, since most styles (other than `plain`) try to indent the comment, IIRC). Stefan From debbugs-submit-bounces@debbugs.gnu.org Tue May 31 14:28:05 2022 Received: (at 55716) by debbugs.gnu.org; 31 May 2022 18:28:05 +0000 Received: from localhost ([127.0.0.1]:48858 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nw6b6-00020F-UC for submit@debbugs.gnu.org; Tue, 31 May 2022 14:28:05 -0400 Received: from quimby.gnus.org ([95.216.78.240]:58760) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nw6b2-0001zP-Cf for 55716@debbugs.gnu.org; Tue, 31 May 2022 14:28:03 -0400 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=Xc5R250IiaTNPYU+iC51CqOmVxVc4cng3Xpxc0aoAmw=; b=qlRLDEFa0iop8pdlI+UUIMKrbz eL37S7SYXU2mTYlma8vOOlcbjn1Ty6dyltv/ML0vk7XUR6Z7CVTAAxff9JFtjak6fjxuZyOLaIT+8 aY9cQXCp7dhfHIarLrE9z1VRGhjW+4eELmhCPOzjzf2qo7fX++t40OelVcPlMg42OLuk=; Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nw6as-0000BH-P0; Tue, 31 May 2022 20:27:53 +0200 From: Lars Ingebrigtsen To: Stefan Monnier Subject: Re: bug#55716: 29.0.50; latex-mode overrides my `comment-style` choice References: <87bkveanfi.fsf@gnus.org> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAgMAAAAqbBEUAAAAAXNSR0IArs4c6QAAAAlQTFRF 3ufvRUxR////ksLprwAAAAFiS0dEAmYLfGQAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfm BR8SCDgzKt8OAAAAXElEQVQoz83NMQ6AMAiFYV4iuwv36RFsUu5/FVvT4hts7GIi0/8NgMgvRxk2 hVODoQFksYAmeMBAkM0IuxNwo9TD2VN/ftSVgZYL0CmwBrlQGP4Ee0G3BqIa/DOcpDtIBG8aDNYA AABaZVhJZk1NACoAAAAIAAUBEgADAAAAAQABAAABGgAFAAAAAQAAAEoBGwAFAAAAAQAAAFIBKAAD AAAAAQACAAACEwADAAAAAQABAAAAAAAAAAAASAAAAAEAAABIAAAAAR9S9zQAAAAldEVYdGRhdGU6 Y3JlYXRlADIwMjItMDUtMzFUMTg6MDg6NTYrMDA6MDAeX6FsAAAAJXRFWHRkYXRlOm1vZGlmeQAy MDIyLTA1LTMxVDE4OjA4OjU2KzAwOjAwbwIZ0AAAABd0RVh0ZXhpZjpZQ2JDclBvc2l0aW9uaW5n ADGsD4BjAAAAOHRFWHRpY2M6Y29weXJpZ2h0AENvcHlyaWdodCAoYykgMTk5OCBIZXdsZXR0LVBh Y2thcmQgQ29tcGFueflXeTcAAAAhdEVYdGljYzpkZXNjcmlwdGlvbgBzUkdCIElFQzYxOTY2LTIu MVet2kcAAAAmdEVYdGljYzptYW51ZmFjdHVyZXIASUVDIGh0dHA6Ly93d3cuaWVjLmNoHH8ATAAA ADd0RVh0aWNjOm1vZGVsAElFQyA2MTk2Ni0yLjEgRGVmYXVsdCBSR0IgY29sb3VyIHNwYWNlIC0g c1JHQkRTSKkAAAAASUVORK5CYII= X-Now-Playing: Floorplan's _Supernatural_: "Oasis" Date: Tue, 31 May 2022 20:27:50 +0200 In-Reply-To: (Stefan Monnier's message of "Tue, 31 May 2022 08:26:16 -0400") Message-ID: <87ee095zh5.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Stefan Monnier writes: > Before your patch, this didn't comment out anything since it skipped > empty lines, thus the problem didn't exist. Yes, that's the problem I was trying to fix. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 55716 Cc: 55716@debbugs.gnu.org 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: -3.3 (---) Stefan Monnier writes: > Before your patch, this didn't comment out anything since it skipped > empty lines, thus the problem didn't exist. Yes, that's the problem I was trying to fix. >> But that's probably a bug in the `indent' version instead, >> because `indent' should work in general. > > Yes, it's a new problem introduced by the new functionality of > commenting out empty lines (and it probably affects more than just the > `indent` style, since most styles (other than `plain`) try to indent the > comment, IIRC). Yup. I've now reverted the change, and is reopening the bug report. I guess it has to be fixed in the various indenting styles instead. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Tue May 31 14:28:10 2022 Received: (at control) by debbugs.gnu.org; 31 May 2022 18:28:10 +0000 Received: from localhost ([127.0.0.1]:48861 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nw6bC-00020W-5B for submit@debbugs.gnu.org; Tue, 31 May 2022 14:28:10 -0400 Received: from quimby.gnus.org ([95.216.78.240]:58776) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nw6bA-000207-Nk for control@debbugs.gnu.org; Tue, 31 May 2022 14:28:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=ct9xzJOWTqcF0NaoGIKngJOUebJ7N5mW/drh7wRjDio=; b=ALYO39ncVJPTA5EHdP06Z8Ezs7 H1lwK88oKQTfvssjH8H4X2ZS7uoBq4H4ngDYuODVLplkvZZsXFyfowiThn7FIwq/id0xFtflX+YVU 5kI7IZT1Ss201FspokKGM3L27Hc7lXd5z6L3N+WkluV/5tvjWhOmOeTR1WoTK0B9wfBc=; Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nw6b2-0000BR-T8 for control@debbugs.gnu.org; Tue, 31 May 2022 20:28:02 +0200 Date: Tue, 31 May 2022 20:28:00 +0200 Message-Id: <87czft5zgv.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #55716 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: close 55716 29.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) 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: -3.3 (---) close 55716 29.1 quit From debbugs-submit-bounces@debbugs.gnu.org Tue May 31 14:54:55 2022 Received: (at 55716) by debbugs.gnu.org; 31 May 2022 18:54:55 +0000 Received: from localhost ([127.0.0.1]:48912 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nw714-00077f-TY for submit@debbugs.gnu.org; Tue, 31 May 2022 14:54:55 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:8570) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nw70z-00077O-64 for 55716@debbugs.gnu.org; Tue, 31 May 2022 14:54:53 -0400 Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 42C30442C4B; Tue, 31 May 2022 14:54:43 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id D63274403A5; Tue, 31 May 2022 14:54:41 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1654023281; bh=nb7/n/HP00rde7SFUtLdxDQhkpep7MYMjS3bZFmQJxU=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=AeCrPeBVl2ROvoIq+D3C6mVdqYQk3NqP4bAZmbiHv1qeKC+FJtRabeK2b1l0V5QHJ w9CYy0eohA5YbxSIFh58PR9/IgS7vXD+vq8re3ptDNUMCNP8gqvV4/OzATGScde8qi iKXKSZPm17hW/jF/61bWyTxaS9NgUZBwfCF+8aYEyXMzqG6ZFTucIAlR9tRsl7Kt5R wXDY5GtaC8meU2mSNANDM1elCEBYAdkXG71fioydWmwo8HxAKF2vCXPI4LqVCVPY50 qooayYiuKz4jvEzQ3sn1n7EmTibMKeMSDYRpxUzlOwYKcx9gEwJeBqFUdw+YG+dPTV blzh0fW9Uzgrg== Received: from pastel (unknown [45.72.221.51]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 90D3E120371; Tue, 31 May 2022 14:54:41 -0400 (EDT) From: Stefan Monnier To: Lars Ingebrigtsen Subject: Re: bug#55716: 29.0.50; latex-mode overrides my `comment-style` choice Message-ID: References: <87bkveanfi.fsf@gnus.org> Date: Tue, 31 May 2022 14:54:40 -0400 In-Reply-To: (Stefan Monnier's message of "Tue, 31 May 2022 08:26:16 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.057 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain T_SCC_BODY_TEXT_LINE -0.01 - X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 55716 Cc: 55716@debbugs.gnu.org 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: -3.3 (---) > Yes, it's a new problem introduced by the new functionality of > commenting out empty lines (and it probably affects more than just the > `indent` style, since most styles (other than `plain`) try to indent the > comment, IIRC). I suspect that the patch below would fix it. Stefan diff --git a/lisp/newcomment.el b/lisp/newcomment.el index 95adf9f90a1..ebf4357f4fe 100644 --- a/lisp/newcomment.el +++ b/lisp/newcomment.el @@ -1177,6 +1177,10 @@ comment-region-internal (setq max-indent (max max-indent (current-column))) (not (or (eobp) (progn (forward-line) nil))))) + ;; In case there's only whitespace, we could try to look at + ;; surrounding text for inspiration, but we'll just use 0 instead. + (when (eq min-indent (point-max)) (setq min-indent 0)) + (setq max-indent (+ max-indent (max (length cs) (length ccs)) ;; Inserting ccs can change max-indent by (1- tab-width) @@ -1297,9 +1301,9 @@ comment-region-default-1 ;; In Lisp and similar modes with one-character comment starters, ;; double it by default if `comment-add' says so. ;; If it isn't indented, triple it. - (if (and (null arg) (not multi-char)) - (setq numarg (* comment-add (if triple 2 1))) - (setq numarg (1- (prefix-numeric-value arg)))) + (setq numarg (if (and (null arg) (not multi-char)) + (* comment-add (if triple 2 1)) + (1- (prefix-numeric-value arg)))) (comment-region-internal beg end From debbugs-submit-bounces@debbugs.gnu.org Tue May 31 22:34:02 2022 Received: (at 55716) by debbugs.gnu.org; 1 Jun 2022 02:34:03 +0000 Received: from localhost ([127.0.0.1]:49314 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nwEBO-0002ie-OF for submit@debbugs.gnu.org; Tue, 31 May 2022 22:34:02 -0400 Received: from quimby.gnus.org ([95.216.78.240]:33910) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nwEBM-0002i2-Fu for 55716@debbugs.gnu.org; Tue, 31 May 2022 22:34:01 -0400 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=pOnqGrYbYbGdJrmMjhpJVtZel8W0xE3dturhgIxsTco=; b=p2TQCMvCR3Bs9Oil5gdNKqVnFs xbEd1SBnXgPJk9KTk0W07lS/cuwenzJuzn51azuAkXrv+DC6za/SgkIapAoONsh5Hku+JjqcjCy3X Yt8H0fmJHom6Mdhkbcs/A2sB2iKbN1kPAWnFATmigMnIOc7cs5MIVgZjALiAys2OCQJY=; Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nwEBD-0006YX-0H; Wed, 01 Jun 2022 04:33:53 +0200 From: Lars Ingebrigtsen To: Stefan Monnier Subject: Re: bug#55716: 29.0.50; latex-mode overrides my `comment-style` choice References: <87bkveanfi.fsf@gnus.org> X-Now-Playing: Feathered Sun's _Two Journeys EP_: "Mar y Tierra" Date: Wed, 01 Jun 2022 04:33:50 +0200 In-Reply-To: (Stefan Monnier's message of "Tue, 31 May 2022 14:54:40 -0400") Message-ID: <87r1492ju9.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Stefan Monnier writes: > I suspect that the patch below would fix it. Makes sense to me, I think. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 55716 Cc: 55716@debbugs.gnu.org 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: -3.3 (---) Stefan Monnier writes: > I suspect that the patch below would fix it. Makes sense to me, I think. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From unknown Sun Jun 22 07:49:22 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 29 Jun 2022 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator