all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Shawn Presser <shawnpresser@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 34123@debbugs.gnu.org
Subject: bug#34123: A patch to fix reading EOF characters in non-interactive mode
Date: Sat, 19 Jan 2019 19:22:06 -0600	[thread overview]
Message-ID: <CALtdh+9_7RmKQpFq=jfGjZV9QsPvSTWw-NbvPQ4qb_Myttwd1Q@mail.gmail.com> (raw)
In-Reply-To: <83zhryaq09.fsf@gnu.org>

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

Is there another way I can address the concern here? I'm willing to put in
the work to get this in.

To put it more simply, it seems like an error that emacs doesn't call
clearerr(stdin) after reading EOF. Without that, it's impossible to ever
read from stdin after the first EOF. Should that be changed?

On Fri, Jan 18, 2019 at 10:29 AM Eli Zaretskii <eliz@gnu.org> wrote:

> > From: Shawn Presser <shawnpresser@gmail.com>
> > Date: Fri, 18 Jan 2019 10:20:54 -0600
> > Cc: 34123@debbugs.gnu.org
> >
> > It's non-interactive:
> >
> > arc> |noninteractive|
> > t
> >
> > (The expression |noninteractive| in arcmacs is equivalent to evaluating
> 'noninteractive in emacs lisp.)
> >
> > The runtimes start by invoking emacs using `emacs -Q --script ...`, so
> it's always noninteractive. And in
> > general for writing shell scripts rather than repls, it's important to
> be in noninteractive mode. But it's equally
> > important to have the ability to prompt the user from a shell script,
> and for the user to be able to cancel by
> > using ^D without causing stdin errors on all subsequent prompts.
>
> I think we are miscommunicating, since your usage involves Emacs
> reading from the terminal.  That is not noninteractive in my book.
> What I mean by noninteractive is when stdin is not connected to a
> terminal.  Your proposed patch affects that case as well, doesn't it?
>

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

  parent reply	other threads:[~2019-01-20  1:22 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-18 10:35 bug#34123: A patch to fix reading EOF characters in non-interactive mode Shawn Presser
2019-01-18 13:25 ` Eli Zaretskii
2019-01-18 14:22   ` Shawn Presser
2019-01-18 16:03     ` Eli Zaretskii
2019-01-18 16:20       ` Shawn Presser
2019-01-18 16:29         ` Eli Zaretskii
2019-01-18 17:23           ` Shawn Presser
2019-01-20  1:22           ` Shawn Presser [this message]
2019-01-21  8:59           ` Shawn Presser
2019-01-21 15:44             ` Eli Zaretskii
2020-08-10 11:56               ` Lars Ingebrigtsen
2020-08-19 10:57                 ` Lars Ingebrigtsen
2019-06-23  0:18 ` Noam Postavsky

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='CALtdh+9_7RmKQpFq=jfGjZV9QsPvSTWw-NbvPQ4qb_Myttwd1Q@mail.gmail.com' \
    --to=shawnpresser@gmail.com \
    --cc=34123@debbugs.gnu.org \
    --cc=eliz@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.