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

Previous Next

Package: emacs;

Reported by: Paul Pogonyshev <pogonyshev <at> gmail.com>

Date: Fri, 11 Nov 2022 19:41:01 UTC

Severity: normal

Tags: notabug

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#59201: closed (`fill-paragraph' works differently depending
 on whether Emacs is run in batch mode or not)
Date: Sat, 12 Nov 2022 11:34:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Sat, 12 Nov 2022 13:33:53 +0200
with message-id <838rkgo19a.fsf <at> gnu.org>
and subject line Re: bug#59201: `fill-paragraph' works differently depending on whether Emacs is run in batch mode or not
has caused the debbugs.gnu.org bug report #59201,
regarding `fill-paragraph' works differently depending on whether Emacs is run in batch mode or not
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
59201: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=59201
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Paul Pogonyshev <pogonyshev <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: `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 part 3 (text/plain, inline)]
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
[Message part 4 (text/html, inline)]
[Message part 5 (message/rfc822, inline)]
From: Eli Zaretskii <eliz <at> gnu.org>
To: Paul Pogonyshev <pogonyshev <at> gmail.com>
Cc: 59201-done <at> debbugs.gnu.org
Subject: Re: bug#59201: `fill-paragraph' works differently depending on
 whether Emacs is run in batch mode or not
Date: Sat, 12 Nov 2022 13:33:53 +0200
> From: Paul Pogonyshev <pogonyshev <at> gmail.com>
> Date: Sat, 12 Nov 2022 12:26:12 +0100
> Cc: 59201 <at> debbugs.gnu.org
> 
> Thanks, please close this then.

Done.


This bug report was last modified 2 years and 192 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.