all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Paul Pogonyshev <pogonyshev@gmail.com>
To: 59201@debbugs.gnu.org
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	[thread overview]
Message-ID: <CAG7BparEA0yO983EmFbX09LsyH4m+0OtE6CPtUhf1Hq7oBd1zQ@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1035 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 1342 bytes --]

             reply	other threads:[~2022-11-11 19:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-11 19:40 Paul Pogonyshev [this message]
2022-11-12 11:17 ` bug#59201: `fill-paragraph' works differently depending on whether Emacs is run in batch mode or not Eli Zaretskii
2022-11-12 11:26   ` Paul Pogonyshev
2022-11-12 11:33     ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAG7BparEA0yO983EmFbX09LsyH4m+0OtE6CPtUhf1Hq7oBd1zQ@mail.gmail.com \
    --to=pogonyshev@gmail.com \
    --cc=59201@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.