From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#49558: fill paragraph in texinfo-mode fails with @ Date: Wed, 14 Jul 2021 15:01:18 +0300 Message-ID: <83im1d85pt.fsf@gnu.org> References: <87h7gxmj5s.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5256"; mail-complaints-to="usenet@ciao.gmane.io" Cc: lisa-asket@perso.be, 49558@debbugs.gnu.org To: Lars Ingebrigtsen , Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jul 14 14:02:12 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m3dad-0001B7-JA for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 14 Jul 2021 14:02:11 +0200 Original-Received: from localhost ([::1]:52330 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m3dac-00030K-Jq for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 14 Jul 2021 08:02:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38538) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m3daU-0002zu-IM for bug-gnu-emacs@gnu.org; Wed, 14 Jul 2021 08:02:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:59947) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m3daU-000177-9P for bug-gnu-emacs@gnu.org; Wed, 14 Jul 2021 08:02:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m3daU-0004oH-7k for bug-gnu-emacs@gnu.org; Wed, 14 Jul 2021 08:02:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 14 Jul 2021 12:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49558 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch moreinfo Original-Received: via spool by 49558-submit@debbugs.gnu.org id=B49558.162626409118437 (code B ref 49558); Wed, 14 Jul 2021 12:02:02 +0000 Original-Received: (at 49558) by debbugs.gnu.org; 14 Jul 2021 12:01:31 +0000 Original-Received: from localhost ([127.0.0.1]:43260 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m3dZy-0004nJ-Kf for submit@debbugs.gnu.org; Wed, 14 Jul 2021 08:01:30 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:40538) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m3dZw-0004n6-Qt for 49558@debbugs.gnu.org; Wed, 14 Jul 2021 08:01:30 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:37336) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m3dZq-0000do-EK; Wed, 14 Jul 2021 08:01:22 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2908 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m3dZp-0000MZ-Q1; Wed, 14 Jul 2021 08:01:22 -0400 In-Reply-To: <87h7gxmj5s.fsf@gnus.org> (message from Lars Ingebrigtsen on Wed, 14 Jul 2021 09:47:11 +0200) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:209916 Archived-At: > From: Lars Ingebrigtsen > Date: Wed, 14 Jul 2021 09:47:11 +0200 > Cc: 49558@debbugs.gnu.org > > lisa-asket@perso.be writes: > > > I am using `M-q` to fill my paragraphs. I have noticed that in texinfo-mode, > > doing `M-q` on a paragraph starting with `@` does not refill the paragraph. > > > > This occurs in instances such as > > > > @noindent Everyone is permitted to copy and distribute verbatim > > copies of this license document, but changing it is not allowed. > > This is because texinfo-mode regards almost any line that starts with a > @ as a paragraph separator, so forward-paragraph etc doesn't work > properly on those lines. I actually think this is a "feature" in Texinfo mode. In Texinfo, we have constructs that start with @ at BOL which we don't _want_ to refill, and we _do_ want them to be treated as a separate paragraph. A few examples: @node Foo Bar Baz Quux Very Long Node Name @subsection This is a very long subsection name @cindex a very long index entry that could wrap @defun my-func with many different arguments that could wrap @end multitable And I could probably come up with a few more. So @noindent is more an exception that the rule, and there actually is no reason to have any text after it on the same line, you could leave it on a line by itself without losing anything. > The following patch fixes the problem, but I'm not sure this is the > correct thing, but the manual says: > > -- > Lines that start a new paragraph and are > contained in it must match only ‘paragraph-start’, not > ‘paragraph-separate’. > -- I never took this seriously. E.g., even our default values of these variables don't seem to heed this rule. Stefan, any comments? > So I think it is? But this code has been basically like this for > decades... anybody got any comments about why it is like it is today? See above. I'd prefer not to change these variables in Texinfo, as it could cause more trouble than it fixes. If we want the likes of @noindent to be exempt from this treatment of lines that begin with @, we could perhaps introduce a fill-paragraph-function specific for Texinfo, and in that function treat ^@noindent (and perhaps a few more directives) specially.