Subject: bug#59201: closed (Re: bug#59201: `fill-paragraph' works differently depending on whether Emacs is run in batch mode or not)

From: [email-masked] (GNU bug Tracking System)
Date: Sat, 12 Nov 2022 11:34:02 +0000

Your bug report

#59201: `fill-paragraph' works differently depending on whether Emacs is run in batch mode or not

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
59201: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=59201
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#59201: `fill-paragraph' works differently depending on whether Emacs is run in batch mode or not
From: Eli Zaretskii <[email-masked]>
To: Paul Pogonyshev <[email-masked]>
Cc: [email-masked]
Date: Sat, 12 Nov 2022 13:33:53 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

> From: Paul Pogonyshev <[email-masked]>
> Date: Sat, 12 Nov 2022 12:26:12 +0100
> Cc: [email-masked]
> 
> Thanks, please close this then.

Done.

Subject: `fill-paragraph' works differently depending on whether Emacs is run in batch mode or not
From: Paul Pogonyshev <[email-masked]>
To: [email-masked]
Date: Fri, 11 Nov 2022 20:40:25 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

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