GNU bug report logs -
#65156
29.1; Reading from pipe with --insert or insert-file-contents no longer supported
Previous Next
Full log
Message #8 received at 65156 <at> debbugs.gnu.org (full text, mbox):
> Date: Tue, 8 Aug 2023 20:20:23 +0200
> From: Lucas Werkmeister <mail <at> lucaswerkmeister.de>
>
> Launch graphical Emacs with standard input attached to a pipe, then
> attempt to insert /dev/stdin, for example:
>
> echo test | emacs -Q --insert /dev/stdin
> echo test | emacs -Q --eval '(insert-file-contents "/dev/stdin")'
>
> This now results in an error (and nothing inserted into the buffer):
> "Maximum buffer size exceeded".
The doc string says:
When inserting data from a special file (e.g., /dev/urandom), you
can’t specify VISIT or BEG, and END should be specified to avoid
inserting unlimited data into the buffer.
> Previously, this used to work; git bisect identifies cb4579ed6b ("Allow
> inserting parts of /dev/urandom with insert-file-contents", bug#18370)
> as the first bad commit.
>
> Other (non-stdin) pipes are also affected. Testing with a named pipe
> shows that the error only occurs after the pipe is first written to:
>
> # first terminal:
> mkfifo /tmp/fifo
> emacs -Q
> M-x insert-file /tmp/fifo
> # second terminal:
> { echo x; sleep 10; echo y; } > /tmp/fifo
>
> Before you run the command in the second terminal, you can observe that
> Emacs is just waiting for input from the pipe; as soon as you run the
> other command, Emacs shows the error before the sleep finishes.
Lars, Paul, any suggestions?
This bug report was last modified 1 year and 315 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.