GNU bug report logs -
#59201
`fill-paragraph' works differently depending on whether Emacs is run in batch mode or not
Previous Next
Full log
View this message in rfc822 format
[Message part 1 (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 2 (text/html, inline)]
This bug report was last modified 2 years and 191 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.