From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Paul Pogonyshev Newsgroups: gmane.emacs.bugs Subject: bug#59201: `fill-paragraph' works differently depending on whether Emacs is run in batch mode or not Date: Fri, 11 Nov 2022 20:40:25 +0100 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000005a157605ed371050" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25562"; mail-complaints-to="usenet@ciao.gmane.io" To: 59201@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Nov 11 20:41:35 2022 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 1otZuA-0006Vi-Ns for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 11 Nov 2022 20:41:34 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1otZtj-0003W4-TE; Fri, 11 Nov 2022 14:41:07 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1otZte-0003Tb-Qh for bug-gnu-emacs@gnu.org; Fri, 11 Nov 2022 14:41:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1otZte-0005Yv-IL for bug-gnu-emacs@gnu.org; Fri, 11 Nov 2022 14:41:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1otZte-0008N4-4H for bug-gnu-emacs@gnu.org; Fri, 11 Nov 2022 14:41:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Paul Pogonyshev Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 11 Nov 2022 19:41:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 59201 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.166819564532146 (code B ref -1); Fri, 11 Nov 2022 19:41:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 11 Nov 2022 19:40:45 +0000 Original-Received: from localhost ([127.0.0.1]:46783 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1otZtN-0008MP-AZ for submit@debbugs.gnu.org; Fri, 11 Nov 2022 14:40:45 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:52388) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1otZtL-0008MH-2n for submit@debbugs.gnu.org; Fri, 11 Nov 2022 14:40:43 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1otZtK-0003A3-Az for bug-gnu-emacs@gnu.org; Fri, 11 Nov 2022 14:40:42 -0500 Original-Received: from mail-ej1-x630.google.com ([2a00:1450:4864:20::630]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1otZtI-0005Rs-Nt for bug-gnu-emacs@gnu.org; Fri, 11 Nov 2022 14:40:42 -0500 Original-Received: by mail-ej1-x630.google.com with SMTP id f27so14929516eje.1 for ; Fri, 11 Nov 2022 11:40:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=xJfnbwqJod1GHdNAo2Pfl1EJGhiPZR0NoW7XsjsOMYI=; b=iIDLLuLIdq1obqRq6lMaCzTDv53iaSyW0i5g3OZHzRaa5tQ2+z7MduDG38RzuFqntx AwsNvOvLg7cutPfV9si1Oa1KFfd3vZiWb+kvmkPBNvqWcOGP+gf/TVd5g932EMie3zbd Lwy2VOJ2tPvYF/7/bwxTsHvSRjA6XY+i2GYQD8YhO7gyvoPcvMHcAOYxB/Un5XYzTg6s 2pAuiu4q6wAOzu1sKxNkDlN5mSSuNRGIskFwC8q8dghZuhzqNs+2RESgiC1TcoAxhprM LPlQLaqmPri1bbs88Stv+LNhNJk/pz6yJ5Kz+qZtRNhKi0jhdqv6QQtpdukB0p3nb2/+ rebg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=xJfnbwqJod1GHdNAo2Pfl1EJGhiPZR0NoW7XsjsOMYI=; b=xzjrbWiQ2hvgnRFVpibizsKGp43aycpgMHsIRWBf9Xyba6+s05CRadEI463AyA2KUv mld6iZelwpc2N0gKpsJN0o9JrzplmRDpg7Z7I2/muwXmygO4soOV8d/LnolxqLuu416M 5FQc8yr44v2dFo6r6tbAEUa6WCL/EXrlvgqLLL2SAVzg3qqgI7OT6UTT/ROob8IvQOEH 4kbzV2YZ184GCQKzgy+k2IaqmYPFHDet9Zvt5/9q7YrBURph5KsfuWeQqmbYHxBV1lBL pc0KickkCZ6xs3IzA6uQ9Mit20Bke1JPEKrslqHYKFf3UBvEzW1wEv3Uyk7jQu9zBx0F pQQg== X-Gm-Message-State: ANoB5pkuijtIDvG5jYSmODVqwLezWcmYxuuMGQKrPWHpDfIufSG4SN89 8NcJFybNuLAGaVRar36OKvkEGegZuS6o9D8ZHVN0Twba7g== X-Google-Smtp-Source: AA0mqf6BWskWa5xziXVlCSU5WottFbKWJxeXNFmPG8OWKuaszyhFi/NR4R+SJUnPQ+VpY5KxmyYOBOQ3bK46C7xz04c= X-Received: by 2002:a17:906:170c:b0:78d:3e56:52c with SMTP id c12-20020a170906170c00b0078d3e56052cmr2931348eje.732.1668195636875; Fri, 11 Nov 2022 11:40:36 -0800 (PST) Received-SPF: pass client-ip=2a00:1450:4864:20::630; envelope-from=pogonyshev@gmail.com; helo=mail-ej1-x630.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:247613 Archived-At: --0000000000005a157605ed371050 Content-Type: text/plain; charset="UTF-8" Tested with Emacs 28 and a recent Emacs 29 build. To reproduce: $ emacs --batch --eval "(princ (with-temp-buffer (insert \"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua...\n\") (set-mark 1) (fill-paragraph nil t) (buffer-string)) 'external-debugging-output)" Prints the text in one line, i.e. `fill-paragraph' appears to have done nothing. If you replace `--batch' in the command line with `-Q' without changing *anything* else: $ emacs -Q --eval "(princ (with-temp-buffer (insert \"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua...\n\") (set-mark 1) (fill-paragraph nil t) (buffer-string)) 'external-debugging-output)" the output in the console becomes formatted in two lines, i.e. `fill-paragraph' does its work. In both cases the code is exactly the same and the function is called non-interactively. The only difference, as far as I see, is the batch mode. Paul --0000000000005a157605ed371050 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Tested with Emacs 28 and a recent Emacs 29 build.

To reproduce:

=C2=A0 =C2=A0 $ emacs --b= atch --eval "(princ (with-temp-buffer (insert \"Lorem ipsum dolor= sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut= labore et dolore magna aliqua...\n\") (set-mark 1) (fill-paragraph ni= l t) (buffer-string)) 'external-debugging-output)"
<= br>
Prints the text in one line, i.e. `fill-paragraph' appear= s to have done nothing.

If you replace `--batch= 9; in the command line with `-Q' without changing anything=C2=A0= else:

=C2=A0 =C2=A0 $ emacs -Q --eval "(= princ (with-temp-buffer (insert \"Lorem ipsum dolor sit amet, consecte= tur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore m= agna aliqua...\n\") (set-mark 1) (fill-paragraph nil t) (buffer-string= )) 'external-debugging-output)"

the output in the console becomes formatted in two lines, i.e. `fill-parag= raph' does its work.

In both cases the code is= exactly the same and the function is called non-interactively. The only di= fference, as far as I see, is the batch mode.

Paul=
--0000000000005a157605ed371050--