From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#65156: 29.1; Reading from pipe with --insert or insert-file-contents no longer supported Date: Tue, 08 Aug 2023 21:33:55 +0300 Message-ID: <83fs4tmlik.fsf@gnu.org> References: <4b873c29-e8ca-403c-bd37-a531d93661f3@lucaswerkmeister.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34761"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 65156@debbugs.gnu.org To: Lucas Werkmeister , Paul Eggert , Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Aug 08 20:34:26 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qTRXF-0008oe-Kw for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 08 Aug 2023 20:34:25 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qTRWu-00053W-MJ; Tue, 08 Aug 2023 14:34:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qTRWs-00053K-9d for bug-gnu-emacs@gnu.org; Tue, 08 Aug 2023 14:34:02 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qTRWs-0001Tc-2C for bug-gnu-emacs@gnu.org; Tue, 08 Aug 2023 14:34:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qTRWr-0002wJ-ON for bug-gnu-emacs@gnu.org; Tue, 08 Aug 2023 14:34:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 08 Aug 2023 18:34:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65156 X-GNU-PR-Package: emacs Original-Received: via spool by 65156-submit@debbugs.gnu.org id=B65156.169151962111266 (code B ref 65156); Tue, 08 Aug 2023 18:34:01 +0000 Original-Received: (at 65156) by debbugs.gnu.org; 8 Aug 2023 18:33:41 +0000 Original-Received: from localhost ([127.0.0.1]:37772 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qTRWX-0002ve-4N for submit@debbugs.gnu.org; Tue, 08 Aug 2023 14:33:41 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49686) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qTRWV-0002vS-7H for 65156@debbugs.gnu.org; Tue, 08 Aug 2023 14:33:39 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qTRWO-0001Px-Kz; Tue, 08 Aug 2023 14:33:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=3hjUKhAXRdxktzKIvSqMw5O1uyHBSzyvsIVNfHtOhTY=; b=OABHIkDE0lW67hc07ugA BuS5ituzHXleO3OyhsdWHAjTi4suokfrr32B3AEYfGKeRd0kEZqZziHmyQpFafQTWSRj+/1+3x2ae mTQF6h/3Q0bmv+AmiHdkUPc8JR7SKgT8+0RKHgKShtUH9xK+OQXIHKN5eG74zUvqOalltp0inlhIZ chtrts3vdcLqPa8Kk63XdVI2vWEKZNA68OeSvctooyTa0LR794gWgT2W6Gb/+NZ1tlE0jAoq5d893 LMg5xADOrB7nJm6mi83xO2hnTsx4vMkr701nHUpjHiCizVnOqPA9z+/XIZf5Fo8JNxbMk5cesq4Gb wg54XxjJLdupuQ==; In-Reply-To: <4b873c29-e8ca-403c-bd37-a531d93661f3@lucaswerkmeister.de> (message from Lucas Werkmeister on Tue, 8 Aug 2023 20:20:23 +0200) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:266984 Archived-At: > Date: Tue, 8 Aug 2023 20:20:23 +0200 > From: Lucas Werkmeister > > 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?