From unknown Sun Jun 22 17:17:31 2025 X-Loop: help-debbugs@gnu.org Subject: bug#65156: 29.1; Reading from pipe with --insert or insert-file-contents no longer supported Resent-From: Lucas Werkmeister Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 08 Aug 2023 18:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 65156 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 65156@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16915188429944 (code B ref -1); Tue, 08 Aug 2023 18:21:02 +0000 Received: (at submit) by debbugs.gnu.org; 8 Aug 2023 18:20:42 +0000 Received: from localhost ([127.0.0.1]:37760 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qTRJy-0002aK-2x for submit@debbugs.gnu.org; Tue, 08 Aug 2023 14:20:42 -0400 Received: from lists.gnu.org ([2001:470:142::17]:45994) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qTRJv-0002a2-Me for submit@debbugs.gnu.org; Tue, 08 Aug 2023 14:20:40 -0400 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 1qTRJo-0001Kz-3k for bug-gnu-emacs@gnu.org; Tue, 08 Aug 2023 14:20:32 -0400 Received: from lucaswerkmeister.de ([46.4.66.178] helo=mail.lucaswerkmeister.de) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qTRJj-0006hb-Hg for bug-gnu-emacs@gnu.org; Tue, 08 Aug 2023 14:20:31 -0400 Authentication-Results: mail.lucaswerkmeister.de; dmarc=fail (p=none dis=none) header.from=lucaswerkmeister.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lucaswerkmeister.de; s=mail; t=1691518823; bh=Uo6K8PU1Nr9tARnzvDc8XXLEP8yOcHiuu2Ny4n4VAsc=; h=Message-ID:Date:MIME-Version:To:From:Subject:Content-Type: Content-Transfer-Encoding:From:Reply-To:Subject:Date:To:Cc: In-Reply-To:References:Message-Id:Sender:Content-Type: Content-Transfer-Encoding:Content-Disposition:Mime-Version; b=pStodVJsPACEFFendbxEjm7du79m9e8EYbl5bt9PmZCf/jKCF3VKmWHs/AW3CvMTg BDYFD5DqxK/ikgqeRyJ/tEMOKwhfuibD6Zn0ESiutWBzSGK206os/3k+JIIBU8htLY n7HixslWJNVBk7tXdTuduVmhXbUpKydONaGShFxs= Received: from [IPV6:2a02:8109:92c0:22bb:9a8:d111:f066:949] (unknown [IPv6:2a02:8109:92c0:22bb:9a8:d111:f066:949]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) (Authenticated sender: mail@lucaswerkmeister.de) by mail.lucaswerkmeister.de (Postfix) with ESMTPSA id C3E98120019D for ; Tue, 8 Aug 2023 18:20:23 +0000 (UTC) Message-ID: <4b873c29-e8ca-403c-bd37-a531d93661f3@lucaswerkmeister.de> Date: Tue, 8 Aug 2023 20:20:23 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US-large From: Lucas Werkmeister Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=46.4.66.178; envelope-from=mail@lucaswerkmeister.de; helo=mail.lucaswerkmeister.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.9 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.1 (/) 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". 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. In GNU Emacs 29.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.38, cairo version 1.17.8) Windowing system distributor 'The X.Org Foundation', version 11.0.12301002 System Description: Arch Linux Configured using: 'configure --sysconfdir=/etc --prefix=/usr --libexecdir=/usr/lib --with-tree-sitter --localstatedir=/var --with-cairo --disable-build-details --with-harfbuzz --with-libsystemd --with-modules --with-x-toolkit=gtk3 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -g -ffile-prefix-map=/build/emacs/src=/usr/src/debug/emacs -flto=auto' 'LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -flto=auto'' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG JSON LCMS2 LIBOTF LIBSYSTEMD LIBXML2 M17N_FLT MODULES NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP X11 XDBE XIM XINPUT2 XPM GTK3 ZLIB Important settings: value of $LANG: en_US.UTF-8 value of $XMODIFIERS: @im=ibus locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: xterm-mouse-mode: t global-auto-revert-mode: t tooltip-mode: t global-eldoc-mode: t eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t column-number-mode: t line-number-mode: t transient-mark-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message yank-media puny dired dired-loaddefs rfc822 mml mml-sec epa derived epg rfc6068 epg-config gnus-util text-property-search time-date mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils xt-mouse autorevert filenotify finder-inf rx info package browse-url url url-proxy url-privacy url-expand url-methods url-history url-cookie generate-lisp-file url-domsuf url-util mailcap url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs password-cache json subr-x map byte-opt gv bytecomp byte-compile url-vars cl-loaddefs cl-lib rmc iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer nadvice seq simple cl-generic indonesian philippine cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget keymap hashtable-print-readable backquote threads dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting cairo move-toolbar gtk x-toolkit xinput2 x multi-tty make-network-process emacs) Memory information: ((conses 16 220386 8042) (symbols 48 13986 0) (strings 32 76266 1637) (string-bytes 1 1839262) (vectors 16 21600) (vector-slots 8 323307 13800) (floats 8 29 30) (intervals 56 250 0) (buffers 984 10)) From unknown Sun Jun 22 17:17:31 2025 X-Loop: help-debbugs@gnu.org Subject: bug#65156: 29.1; Reading from pipe with --insert or insert-file-contents no longer supported 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 X-GNU-PR-Keywords: To: Lucas Werkmeister , Paul Eggert , Lars Ingebrigtsen Cc: 65156@debbugs.gnu.org Received: via spool by 65156-submit@debbugs.gnu.org id=B65156.169151962111266 (code B ref 65156); Tue, 08 Aug 2023 18:34:01 +0000 Received: (at 65156) by debbugs.gnu.org; 8 Aug 2023 18:33:41 +0000 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 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 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==; Date: Tue, 08 Aug 2023 21:33:55 +0300 Message-Id: <83fs4tmlik.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <4b873c29-e8ca-403c-bd37-a531d93661f3@lucaswerkmeister.de> (message from Lucas Werkmeister on Tue, 8 Aug 2023 20:20:23 +0200) References: <4b873c29-e8ca-403c-bd37-a531d93661f3@lucaswerkmeister.de> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > 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? From unknown Sun Jun 22 17:17:31 2025 X-Loop: help-debbugs@gnu.org Subject: bug#65156: 29.1; Reading from pipe with --insert or insert-file-contents no longer supported Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 08 Aug 2023 19:28:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65156 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: mail@lucaswerkmeister.de, eggert@cs.ucla.edu Cc: larsi@gnus.org, 65156@debbugs.gnu.org Received: via spool by 65156-submit@debbugs.gnu.org id=B65156.169152283216610 (code B ref 65156); Tue, 08 Aug 2023 19:28:01 +0000 Received: (at 65156) by debbugs.gnu.org; 8 Aug 2023 19:27:12 +0000 Received: from localhost ([127.0.0.1]:37795 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qTSMK-0004Jp-3j for submit@debbugs.gnu.org; Tue, 08 Aug 2023 15:27:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46590) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qTSMH-0004Ja-2C for 65156@debbugs.gnu.org; Tue, 08 Aug 2023 15:27:10 -0400 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 1qTSM9-0003bc-LO; Tue, 08 Aug 2023 15:27:01 -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=20YX/cGQ+74SbGulqC7htGk+/UxnfoPGMu+2uV3QHcw=; b=MiVEVySM12IM3a8ow/2M +tfKj7XRZ3NWUJBt3+Zx0zVW8AulbMS/v3fOS1L5cdXJWluzipcG2xqNHx+0IAjwDO4r8X0vvtBL1 VVmyyc3WW+v5+bosowXGc4EoiGLiJpp7pRTDXhAv9pYOC5l3y1TD0N1JrLLbGvEq8epdL8BVEPsyc XhcuHbj7oX3e5PRMZfkiQw+umBoIQD0KHYC6G5+RYTNQfAxySCUpChkPVYHL0IcOwAz7JVmwr95eE esFvSZdOVCLh/EJhXrpbUdnyQIUBAG4mVWsSEIZY8yapJ5gAHAK4UgeDY/ECocGa0R467WNWD/C0C eAGcddJI1JhmSw==; Date: Tue, 08 Aug 2023 22:27:23 +0300 Message-Id: <83cyzxmj1g.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <83fs4tmlik.fsf@gnu.org> (message from Eli Zaretskii on Tue, 08 Aug 2023 21:33:55 +0300) References: <4b873c29-e8ca-403c-bd37-a531d93661f3@lucaswerkmeister.de> <83fs4tmlik.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Cc: 65156@debbugs.gnu.org > Date: Tue, 08 Aug 2023 21:33:55 +0300 > From: Eli Zaretskii > > > 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? I installed the patch below on the emacs-29 branch; please see if it solves your problems with reading from pipes. Paul, can there be a regular file that is not seekable? If regular files are always seekable, the patch can be simplified. diff --git a/src/fileio.c b/src/fileio.c index 995e414..55132f1 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -4581,7 +4581,7 @@ because (1) it preserves some marker positions (in unchanged portions goto handled; } - if (seekable || !NILP (end)) + if ((seekable && regular) || !NILP (end)) total = end_offset - beg_offset; else /* For a special file, all we can do is guess. */ @@ -4678,7 +4678,7 @@ because (1) it preserves some marker positions (in unchanged portions For a special file, where TOTAL is just a buffer size, so don't bother counting in HOW_MUCH. (INSERTED is where we count the number of characters inserted.) */ - if (seekable || !NILP (end)) + if ((seekable && regular) || !NILP (end)) how_much += this; inserted += this; } From unknown Sun Jun 22 17:17:31 2025 X-Loop: help-debbugs@gnu.org Subject: bug#65156: 29.1; Reading from pipe with --insert or insert-file-contents no longer supported Resent-From: Po Lu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 09 Aug 2023 02:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65156 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: larsi@gnus.org, eggert@cs.ucla.edu, 65156@debbugs.gnu.org, mail@lucaswerkmeister.de Received: via spool by 65156-submit@debbugs.gnu.org id=B65156.169154928629273 (code B ref 65156); Wed, 09 Aug 2023 02:49:02 +0000 Received: (at 65156) by debbugs.gnu.org; 9 Aug 2023 02:48:06 +0000 Received: from localhost ([127.0.0.1]:38033 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qTZEz-0007c2-Rn for submit@debbugs.gnu.org; Tue, 08 Aug 2023 22:48:06 -0400 Received: from sonic304-22.consmr.mail.ne1.yahoo.com ([66.163.191.148]:43894) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qTZEt-0007ax-I7 for 65156@debbugs.gnu.org; Tue, 08 Aug 2023 22:48:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1691549273; bh=V8wfnNVBUru4ZeDt+mlVm1oPit19KLlYDGgLPivd/A0=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From:Subject:Reply-To; b=GpDjkm0e08ruAmgvZKrhxH/D2IJ9seE0lx3ShdCh/UWAIwlX+RYqrdLBVkxj/gVEGxzhidU617vGhcaSqu3PnfRyWhlWs52uDo689DRSu1yi6yYSE3TexY0A2BuToIqYsy4AT77aVvSi8nzuGouu4ZE+g1I9C4pZgA/oiSa1N/pJKwBuJFVTWhIf9StYFTbAhBnvNR17lRzAXrwFWt9O/BghIPlMtECmE9i0GTnbXGbfUC2mRLBKpuz64wkC1gXkxF5f9ZsWDpAsnWIWw7YRlMirgD+bOTrefN6YErTb+LMhlslXeZLNUrn/e3IlozRTRcpkI7S+L0Mx2Ng9iqYQ+g== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1691549273; bh=aVWZLRlquAU1NwCSKvM2CY/M4JClnVksR8cvN+09Q6c=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=s0KUAkcdwJgA+eIb1BquWR54TWlZh5Rr9rbeiodDq05ai7jgD2dVuHwN73GbphmggW6zc/gBrOtXAeTz3lCrVj/Nu8+tIw4rBKOuKzpHjq3Xq4rDvSddLveaaLmetfINV5CTC/1iNscQXFy+nWUXWlpTRoax/xHJiUesb17+OlPzhq6JK/5bKERTQ9mIXiYJzByaV78jCGeKNlFS4xbNFTX64e4jCdJwH8NvsKJhSZdvRkMKvQJ5R/ker1n7kRoW86Mgl0FUmkL+vrPMoxl9W1v9hYF6hX5HmdMUx1kl3s8D75yAiPWHvE4J6GjvRRL4wb50o6Ink7EJGebwSKcRcw== X-YMail-OSG: 19bzzCwVM1mxKuO_NKjEv_C9BmdWtqBtBc34YC25ibdCGfPA70XEqhyZs1W0iWx fnZVz61vQuzzcM9uP_io.MTijxZFChkMoLQSCG.MRE9bjFnJduJeEJbWxeYt2MWxWsETrxwFzMgj 1NblRbpxoq8Oh_gmihmPkLx_fBUOm027G4B82NyIXe1MFHF_y7qZVYhw.1n74q2Se9j.Vrc9ZWT6 Egmn09ICuG5VKMwRnyi0lpMllZvU_1OoLGygVe0_D9SfdRjTRYC7bXMN07fC1vqQ0eiUXMxxzKsP HjjcoGtmpQXYsQPkLqGI7xL8fvr2hbd01CEmiONtn8Iapeg_mE0BMX.yQXX9SDpaFzT_pSxz0iZL cjcJPygBCp1VJ9yCNoyT8RT3GLvrc5.FozPr2QAt6_8LQUSYxCl5U2Q9jf4yrkOV22K4hpCfcbMo Y59Rs8jxsSyuQa84hWxgom15psow0gJ4Ohx0167Y54SRZex3d1RuoKy4wMaQQHiBO8IgwEM1AHHN QEQ0OqdeCSGpgJ7.YPUhV.XtejSajZhr.yGcXn52CC8layD7nTwDsirWlQsI6E2KuNQdx6f91Uda h.bCYEZC7BBk201ZN2zY0rusJGUgJeW11vd3_8iiRa6INyxnk6mmr4iBie7WLaruiyPkc3.8ohbK MERnvGhAHZMgKZBO6GXeqLuILLnxpmj_4Zx2IhnaLKDvEhWDuyKmA0i8OM_dT9VvS7i8GB_xJkUB oJvZ.mo_y7XqNUCXJUglqBu26q6D3PudyoW65yI82GVot7.NEvAG3owcIlt0Un0NjPkv99Y3WDSa AOQSCz8kRctA.OU1P_f6CCisACzEYIERJVFjuhbRWUaLEivX.dyNIcYoV0jTzrMXb3wXUIarHGHi SlRbz8N9kSZX71AiQ0K24scgOtHoi6RfsopjZs74tPI93jAUaNpNAdxZyCJ7rvgf.R7fGhBVFPKl Oo_D7T3QVCKntO3q0XEmGNigjOJNmSMWFWU3bWyPu4ZUl_rrJhzpTzX6tMBfjREYNfDNiN1QU0is RbRsIZnVEUSeBnZIYr7qByfc32G_qxum1By2SHdJgSdWtmvEo03EtlZ03yF1xCNnvu3.kasvru8a uSnOaPapgTWHJEZvXK2koivH1HjhHmpW8Xb778rQA.zOchINdhpZudXF6bSzpgNBRtIPtgmxS.5F jz_Fj87ZA3P1ojzaMtjxYO8wWvywMhFuSGAMF_SctWsbzgLPhNmv3dUpmWJqEpBv.0SJFPsf3VHi YKoTKfTvBsWGiTsAFfYYBdaIwVXS6M8_gV0N3kSiaBEwXTrLIHzQ3yTqG2h7PHPX7ykU7sBz8w9e u_NPiDslTrl6QwFekPmdcVOnCzZkHeLE9qj99GXRteWd5fgjuvITMLdPjsAReb9X6Zw2wq41_X_s zbJ1tkKwkityTS6warUk8BQ5ikqDlXljnq9RYmAhMRyk3XGMRa90IR7gn9n1v4WsabqTnM4g0ofV jjf6eIV5ueKp5EjymuR_AreKNFZ.q.DjDkaZuzijOK9pfOpF_S_2Ma61sxym0BkqroUOgL1tNjOV NHEW3n_EpvXhP4lIu_bAqR7uihGYPzy7s41V0LhMZDXhmTkOWolB7Aq3N6_KIU.Hux1Vyd9hv3S4 rSecMYZ6DfL2ddnN9tJMDBGOgRaMmAh0GMQxoDIaoGR8xs.jezOLWpA4Gn65EAysX_QJuzJRsp6U ATtln2vnbJHbMvBe_8c76M4QBVEjtpDlJopYeWhyLQdUUeXvjW2r19jmvYf_RnD_wcIWZQeVwqZl XVpUtvcnv6HItcSaPHM5kEsQ9A8dAXchfIiOn5MGPDZsgOUYqxTaEAl.UYZW1pracw9LXDTZ0rCe H4kQRAwGU4el2sglx2t2ZGf8sh1oRBK2f3FLSbZxfixt1mo.qfebSjxTQSRzVqy2CD6CHycIxgaV 59trlNaxRamCdmHi882y0dt7z_RPh5JzdllqlzD_Vz0mDv1EXusGHa_i548l2HK.t8NfrYajftD5 EdLoyit2dMwiGdOE6RSwP.tn57xgnYmTw_ytxEqIn0ArL2Fnia3KpMrZVJVN5AY8fQexgSNC0CHn mdaEFCYA3olLlizHCiZk4wV6AUNV8utRGsexQP29ZSmlWaVhoRkv61ncOuAs5D2K0cmn5aN06aK_ DBl97og6zQaJrCY7J_ECo60V2J1LC.KnFCF0OyEFBNxCK7z8zE96aFAmX5De1gYqL0ADZc9lFLaW nJtn3t8DkhawTEjJxGqfxxjwXffgHmSii46XRILdIvbZo0K4AZdd6NY.9c3uJEzvl X-Sonic-MF: X-Sonic-ID: 6d9afe10-6217-4aff-8cdc-23c0e90ffd8e Received: from sonic.gate.mail.ne1.yahoo.com by sonic304.consmr.mail.ne1.yahoo.com with HTTP; Wed, 9 Aug 2023 02:47:53 +0000 Received: by hermes--production-sg3-69654d8bd-l9pxw (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID a1381039e631424e4558eaa1088e129a; Wed, 09 Aug 2023 02:47:46 +0000 (UTC) From: Po Lu In-Reply-To: <83cyzxmj1g.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 08 Aug 2023 22:27:23 +0300") References: <4b873c29-e8ca-403c-bd37-a531d93661f3@lucaswerkmeister.de> <83fs4tmlik.fsf@gnu.org> <83cyzxmj1g.fsf@gnu.org> Date: Wed, 09 Aug 2023 10:47:41 +0800 Message-ID: <87o7jhx776.fsf@yahoo.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Mailer: WebService/1.1.21695 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Content-Length: 3764 X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: >> Cc: 65156@debbugs.gnu.org >> Date: Tue, 08 Aug 2023 21:33:55 +0300 >> From: Eli Zaretskii >>=20 >> > Date: Tue, 8 Aug 2023 20:20:23 +0200 >> > From: Lucas Werkmeister >> >=20 >> > Launch graphical Emacs with standard input attached to a pipe, then >> > attempt to insert /dev/stdin, for example: >> >=20 >> > echo test | emacs -Q --insert /dev/stdin >> > echo test | emacs -Q --eval '(insert-file-contents "/dev/stdin")' >> >=20 >> > This now results in an error (and nothing inserted into the buffer): >> > "Maximum buffer size exceeded". >>=20 >> The doc string says: >>=20 >> When inserting data from a special file (e.g., /dev/urandom), you >> can=E2=80=99t specify VISIT or BEG, and END should be specified to avo= id >> inserting unlimited data into the buffer. >>=20 >> > 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. >> >=20 >> > Other (non-stdin) pipes are also affected. Testing with a named pipe=20 >> > shows that the error only occurs after the pipe is first written to: >> >=20 >> > # first terminal: >> > mkfifo /tmp/fifo >> > emacs -Q >> > M-x insert-file /tmp/fifo >> > # second terminal: >> > { echo x; sleep 10; echo y; } > /tmp/fifo >> >=20 >> > Before you run the command in the second terminal, you can observe tha= t=20 >> > Emacs is just waiting for input from the pipe; as soon as you run the= =20 >> > other command, Emacs shows the error before the sleep finishes. >>=20 >> Lars, Paul, any suggestions? > > I installed the patch below on the emacs-29 branch; please see if it > solves your problems with reading from pipes. > > Paul, can there be a regular file that is not seekable? If regular > files are always seekable, the patch can be simplified. > > diff --git a/src/fileio.c b/src/fileio.c > index 995e414..55132f1 100644 > --- a/src/fileio.c > +++ b/src/fileio.c > @@ -4581,7 +4581,7 @@ because (1) it preserves some marker positions (in = unchanged portions > goto handled; > } >=20=20 > - if (seekable || !NILP (end)) > + if ((seekable && regular) || !NILP (end)) > total =3D end_offset - beg_offset; > else > /* For a special file, all we can do is guess. */ > @@ -4678,7 +4678,7 @@ because (1) it preserves some marker positions (in = unchanged portions > For a special file, where TOTAL is just a buffer size, > so don't bother counting in HOW_MUCH. > (INSERTED is where we count the number of characters inserted.) */ > - if (seekable || !NILP (end)) > + if ((seekable && regular) || !NILP (end)) > how_much +=3D this; > inserted +=3D this; > } Everyone, I fixed this on master yesterday, as part of a series of changes to enable visiting named pipes as files. The crux of the problem is this: seekable =3D emacs_fd_lseek (fd, 0, SEEK_CUR) < 0; <---------- if (!NILP (beg) && !seekable) xsignal2 (Qfile_error, where `seekable' is actually set to 1 if the file is NOT seekable, since lseek returns 0 upon success and -1 upon failure. Then, later: if (seekable || !NILP (end)) <------------------------ total =3D end_offset - beg_offset; else /* For a special file, all we can do is guess. */ total =3D READ_BUF_SIZE; total is set to end_offset - beg_offset (both -1 at that point), resulting in a call to buffer_overflow as the gap is extended beyond memory. The change presently in place on emacs-29 should be replaced with a one-line change that replaces: seekable =3D lseek (fd, 0, SEEK_CUR) < 0; with seekable =3D lseek (fd, 0, SEEK_CUR) !=3D (off_t) -1; From unknown Sun Jun 22 17:17:31 2025 X-Loop: help-debbugs@gnu.org Subject: bug#65156: 29.1; Reading from pipe with --insert or insert-file-contents no longer supported References: <4b873c29-e8ca-403c-bd37-a531d93661f3@lucaswerkmeister.de> In-Reply-To: <4b873c29-e8ca-403c-bd37-a531d93661f3@lucaswerkmeister.de> Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 09 Aug 2023 08:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65156 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Po Lu Cc: Eli Zaretskii , Paul Eggert , 65156@debbugs.gnu.org, Lars Ingebrigtsen , mail@lucaswerkmeister.de Received: via spool by 65156-submit@debbugs.gnu.org id=B65156.169156848531313 (code B ref 65156); Wed, 09 Aug 2023 08:09:02 +0000 Received: (at 65156) by debbugs.gnu.org; 9 Aug 2023 08:08:05 +0000 Received: from localhost ([127.0.0.1]:38200 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qTeEe-00088z-QW for submit@debbugs.gnu.org; Wed, 09 Aug 2023 04:08:05 -0400 Received: from mail-lj1-x234.google.com ([2a00:1450:4864:20::234]:47607) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qTeEd-00088V-G4 for 65156@debbugs.gnu.org; Wed, 09 Aug 2023 04:08:03 -0400 Received: by mail-lj1-x234.google.com with SMTP id 38308e7fff4ca-2b962c226ceso103578841fa.3 for <65156@debbugs.gnu.org>; Wed, 09 Aug 2023 01:08:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691568477; x=1692173277; h=to:cc:date:message-id:subject:mime-version :content-transfer-encoding:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=ThRZ6qeOToFhcwv3ShElW+mNcJbqQ8F9OFGou7Jp4x0=; b=JFFdlJYMSiw7SXcuLoDeffi9w1B9iqUbltiQ8LC8zHujOyTeKshIu5Zsru6g0qbyMq 42h81+RRtz+XtTLPe57gYlLifIqwzt2ZxmUmc9yirZDJttJBcF55KttfJ7pFMSJPy1yH 3/Qc8Qr2leyz1vKg1kJpp1giF3f/P8CxYLEI5RMoKv1g1m8HGH1okS177XCE+dMtSKQK xKFdi97UCas+0TNhiOuwqeZVLRCHOZTkGQHzp5FSsBiAaMUD03tKYvXpG0bDrT5+4V3F mBUypgiDOU//1BiglMWnLAurM0H8iDUmroXJo8NiLMpphSnawSGkUz1zIaZhKAYbV+xe x+qQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691568477; x=1692173277; h=to:cc:date:message-id:subject:mime-version :content-transfer-encoding:from:sender:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ThRZ6qeOToFhcwv3ShElW+mNcJbqQ8F9OFGou7Jp4x0=; b=BsDUSuX3mr+HRtSV8jfF6JtBhUQClcm+xHhjB2xjVivr2kjNwlqtnNUfG6PuPc7oxR tUN3QKFAo8euXany4QqVAirpZwsgW4C2NVpEmu1Dia38f2pvaZK5/c2iDCvc+5aQknXi oQ+fQ3Re75WKwqafR/X5lCjEextQUJfbLq+izri5bc4beMN4j/57r1kcJZqQhlb2JT+R ERSKElKRkrvLHWwUtp//rIuRUhzPiOmJp2D9RtE2YHyUxFWDguodD9E7vBCy+Fi6UurS C0Z6PC++GdkfaperAlN71V/OoSeOh4BN5uAKRE1BBMTJxnCB/7GYdp6D7f3nm3oxEXtD aORA== X-Gm-Message-State: AOJu0YyWOpjYJqGZHEmcebqkmp1nhPuyfJIfB+2JUAMLgns4qmKOdTst /ZsLOdJuBwoeXIaXJiaV/lM= X-Google-Smtp-Source: AGHT+IEtJLgIRkEQ+5rEtdlUnO4JkhqqYEp3lXctNMTSQLFCd1L+YoF/27e+Yi2D/HJCSIiQe4bgBg== X-Received: by 2002:a2e:8216:0:b0:2b9:ea6b:64f with SMTP id w22-20020a2e8216000000b002b9ea6b064fmr1228543ljg.37.1691568477340; Wed, 09 Aug 2023 01:07:57 -0700 (PDT) Received: from smtpclient.apple (c188-150-165-235.bredband.tele2.se. [188.150.165.235]) by smtp.gmail.com with ESMTPSA id e22-20020a2e9316000000b002ba045496d0sm2623845ljh.125.2023.08.09.01.07.56 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 09 Aug 2023 01:07:56 -0700 (PDT) From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.15\)) Message-Id: <76F5A77D-3461-4411-9716-7EF40F68722A@gmail.com> Date: Wed, 9 Aug 2023 10:07:55 +0200 X-Mailer: Apple Mail (2.3654.120.0.1.15) X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) The current (4767f5eaee) code on emacs-29 fails fileio-tests with: Test fileio-tests--non-regular-insert condition: (ert-test-failed ((should-error (insert-file-contents "/dev/urandom" nil 5 10)) :form (insert-file-contents "/dev/urandom" nil 5 10) :value ("/dev/urandom" 5) :fail-reason "did not signal an error")) From unknown Sun Jun 22 17:17:31 2025 X-Loop: help-debbugs@gnu.org Subject: bug#65156: 29.1; Reading from pipe with --insert or insert-file-contents no longer supported Resent-From: Po Lu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 09 Aug 2023 08:17:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65156 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Cc: Eli Zaretskii , Paul Eggert , 65156@debbugs.gnu.org, Lars Ingebrigtsen , mail@lucaswerkmeister.de Received: via spool by 65156-submit@debbugs.gnu.org id=B65156.169156896832048 (code B ref 65156); Wed, 09 Aug 2023 08:17:01 +0000 Received: (at 65156) by debbugs.gnu.org; 9 Aug 2023 08:16:08 +0000 Received: from localhost ([127.0.0.1]:38205 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qTeMR-0008Kp-Qx for submit@debbugs.gnu.org; Wed, 09 Aug 2023 04:16:08 -0400 Received: from sonic317-34.consmr.mail.ne1.yahoo.com ([66.163.184.45]:45779) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qTeMQ-0008K5-B3 for 65156@debbugs.gnu.org; Wed, 09 Aug 2023 04:16:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1691568960; bh=9+eSRnYkUpKDTgJgR+AIlaJ7Goj+lB9SxE8rBTjV/rA=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From:Subject:Reply-To; b=j5rjdOveXpGWm0tRXJ2bPvt93LdltooV/Fq5NRd2oNs4vyC7Ws7xYvM8SZkqN3YeKz1W79a7LlDujf9YF1Lis749gXrzF4jTUDeHsQS5YaK30Xzs9mDtmVc4kspSUFNIzhZIW12u1tbTb1IHc86jH3pgMVlTV9qWXn22Sl1hA/9OF9of40kmJmzqPrK0aVDGWo0KhkPYglt8nRUGogz1jVN/MMiakpJLMg4rqxYnoCfAq7z0AZ5IAN9lqS1fheUFtKThvAbnr/YImnnog/u6qwdUTi1Cba7Nw3j0UGFg9JR7YtK3BkdPCJqREqdSXxF8Ts7sl3mPTpimdF13aI2TsQ== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1691568960; bh=fCIyqeqEr4zFsM9rKc86j3ivLVlswIN/jw9SW7D7iDV=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=LEdd7027XlryzEpn6TnbxrcPHd48aSbSpPUz1zT/bAvqVpjOk/eBsyvRfxV10F5kO2bBYrvsByR7OiWhjBaOYA8LX9b5+91TBTUOJBp73JZPnIZjYmjcbV76Ab2/5OnFx6awUMTcQXqta3O47KG1JhCLCZo7dT9StiIU9Ee4HQh77B+HWaEyDw7GoaBTyJ3A7Xr0KSSwzrm77v/PUg8LE8QawAkH/igOQV5z1iOd+/ALkmy+OLa/PEKxAqhdxKa3z8u7tUjZ8mhlffmrEgI8d3ls58QOFcuGmywXxlxtBIiB6mCALOwzAbvN6dQ7xIXNYGwDyl2H49UDRN8Gmi9EfQ== X-YMail-OSG: zRadZCEVM1l6aA55dkveD2cZwzQZQ9zFkIt1cvWmw_baEqbWeLa32n8z9fLrDEs qa2a_cP_tpXt5k2HDZID7X.LpR3LM.igsEyuBmZU0ifzQ3X1nL67KryON_FKl6W5.u3rojPP8W3S ec8sivaiZuNXWYUv6xXcHUUbG.ECV4aAWMXnCwnhcmmll9cklButyl.lioptuRh_PRzFBdAQqY1H W8dt8uWzGUTjQvlScWyjUNXwHBHcwfV05gOCiRNiKjVrIfC9OubOC0KDrDTVVvzbYGijXSTsasBl Mig66so3yfQiwG2GXJyMarGubVN5RSi4l5aZlrB0J8da6cxw15ysSjXOgMmohcpv3nHXmn6.UAKs MFeD5y2kxpU_mST2Z.raznYaZAu4DCK1tNSRL2hC5sdiVHXTwcglxc5P2WXE_8KQm53eNLIvMYLL erSopgnwX3CfQW26uZviFx0SSrN_1aQZhVrDyGkXiaSYMDJfNtCBVGNuMQjB_bFnXyiAb3nf05v6 2yFgFBkAdr.nlujdvWnZl.9DIv.HmZ7QmqjKE3LKdrjm1tJcInosHW3qLLCjfPbRR4S9KvNzc2AD ttAqTgfPTEpje7smSy6sttm2b2mwIeQseai3ZPB_4sMhlEPkLfT6craLz9Pt9ngkR1r6Rvgtlq0m Rmzc3jkG.i5x5Y6CCP3ClEwB10Dj5AfGtx7meKR_77OZmUJTQqvuor3pS4kQTwLzyVlVrSHm7tBQ QrGoZO_SkD2SC4ExdnSpj2_G_X.WrL27qFjOojYWpjUiMDuP1InjWVL_06CWq8ef3ZFHnseY2Ylx hDHq4f_5B6b7dlepm7h987k.Pa4mxXxzeMJFO4MLDHj9eRyCAV7MuxmydebKAmcE0D8JkM1.t8gi lCX2wtzq5NVOUhrjiEvuerHELFcuQ9FEKcjKy5cw31ODBGFahI7cDj79vlIUpLkOdltDxGyspiZO Vy98R7CUgMhvmsOPddfiErwD_h9F4xFc4EZ2C5n22z5nUPAy8LtUTxeui9ZdlTLilWwSB75NIrmu nh3aU8jc_6l0fnB0QbF3nd6Lzh0aAPtHsSyXOulaQcLbEd9pTKk8zEC_0kfZaJj5NzgIOYo4kYBy hR9y0FtuxfTKzWHGTcWusKe5wP9bqetu7MKiKsyBBPnuVO52zBeGlxNKG2DzvHsHcflemAjukZ9Q .eIC8HIGhf69jS7RN1aTeYPrVRk1N5J5CDOihy5JB5uA2LaklKBCIxRIN5DsNWHsGT1OLzGqqEBo 77YtQsHONi8dPcDkLfwJCV4PGF1gZLsA9XXhV7gAotEdi6rFztjOyHK9Ukb5qmFsrK6Qfx_7UEOQ qPXHuiLsIP1YtfGt_m0GcRM..Bvauo27sdKU71nMc_C1wPaGV7NZFMVzsKo4IrBJ2nIzudBBG62y iVxsR7SpbjdtvMSmV80JJhI0w0PVKPWrReuT0IWCiFECWb2xOmQ14yiZsyECUpdHG4ZcQD70nenq X_ID_gHvWmrjc7AgmW8VpfzVyo81kEndwKY1YfMd1Ypu9WbOZScCCkj8gUerVUkAVXkH29SHDOqj MWqqyW.SWcmUwV9CFDU2Sv5zmFNuZVbAnEtNnIiqgEOQwQnSOexejWb1rIriB3De.7s2SE6Tjsek SDlU3Nrz0.JVTClEeDBopmLHUTk99WzChYCzUdCopvKa6w.3C03865Qg7JqVyatiQlQUWkIQQ7DV vBVuZpvxVtUWtXSY6PlylQi59GlEUNJdH.lIUOjgEoyDX30BLTLNphch_90J7P1VhmWo4NwuVBhJ CZgEzXaLlJtquRzaft4u68FWgYSWOg6F84qnNqwheE.1ZzaoUTjV.RGhbJ6nEriKad4OQI5tIJDa GXDOeT9rjYpp6bQrmDIIGCFEva5GTfiNC38aAavELiIc2iz9Zn0hqcY1J93mIkzNdhx4m6M1cYY5 7UxthOg1TaW9UEI6zYlnNpQvIOHHszI4OfvWOZswCHH5YOuDCQ6pRzWVC81.GtY5fVvH1w6CiF_K 8H6dSZyn.CwU0EKFHf7NqdWJKfiHaBoAIZ9NqNBsyNrsQL5YC6J.ppdTtbmjogQC1_qE3NIOJ.qH xT.ih3JcgCwNU1c_2YTsx6jMkLVI2SdWTr5mAxR424xj5QO0v7ET2r3o6APZe2bTWoRNG7813Q3X Tp2H7NnkdbZ_tSRMfxF_7P0EPGEu6ogdBBcn4MKImQLCX5XSEKTMnFVLKH_QJdf8M7d0xKZZ3Y1b wUfCNbVIxOWPcDWgRaNBll0I7ZllmhLxNz4XAIXJg_2gxVj3mFQ1mnHQg4aOE2Gp1ZWWmkg-- X-Sonic-MF: X-Sonic-ID: 1b3fa962-803e-47a6-83ae-400d7e33c093 Received: from sonic.gate.mail.ne1.yahoo.com by sonic317.consmr.mail.ne1.yahoo.com with HTTP; Wed, 9 Aug 2023 08:16:00 +0000 Received: by hermes--production-sg3-69654d8bd-cgvfq (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID beecf97e6bed72eed94e72a6b8c4ca90; Wed, 09 Aug 2023 08:15:58 +0000 (UTC) From: Po Lu In-Reply-To: <76F5A77D-3461-4411-9716-7EF40F68722A@gmail.com> ("Mattias =?UTF-8?Q?Engdeg=C3=A5rd?="'s message of "Wed, 9 Aug 2023 10:07:55 +0200") References: <76F5A77D-3461-4411-9716-7EF40F68722A@gmail.com> Date: Wed, 09 Aug 2023 16:15:53 +0800 Message-ID: <878raky6km.fsf@yahoo.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Mailer: WebService/1.1.21695 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Content-Length: 690 X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Mattias Engdeg=C3=A5rd writes: > The current (4767f5eaee) code on emacs-29 fails fileio-tests with: > > Test fileio-tests--non-regular-insert condition: > (ert-test-failed > ((should-error > (insert-file-contents "/dev/urandom" nil 5 10)) > :form > (insert-file-contents "/dev/urandom" nil 5 10) > :value > ("/dev/urandom" 5) > :fail-reason "did not signal an error")) Right, but that's a problem with the test: /dev/urandom is seekable under the Linux kernel. I fixed this on master by checking for a regular file instead of a seekable file when verifying BEG, but that's too extensive a change for Emacs 29. From unknown Sun Jun 22 17:17:31 2025 X-Loop: help-debbugs@gnu.org Subject: bug#65156: 29.1; Reading from pipe with --insert or insert-file-contents no longer supported Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 09 Aug 2023 08:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65156 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Po Lu Cc: Eli Zaretskii , Paul Eggert , 65156@debbugs.gnu.org, Lars Ingebrigtsen , mail@lucaswerkmeister.de Received: via spool by 65156-submit@debbugs.gnu.org id=B65156.1691569761784 (code B ref 65156); Wed, 09 Aug 2023 08:30:02 +0000 Received: (at 65156) by debbugs.gnu.org; 9 Aug 2023 08:29:21 +0000 Received: from localhost ([127.0.0.1]:38226 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qTeZF-0000Ca-7u for submit@debbugs.gnu.org; Wed, 09 Aug 2023 04:29:21 -0400 Received: from mail-lf1-x135.google.com ([2a00:1450:4864:20::135]:60416) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qTeZD-0000CN-W2 for 65156@debbugs.gnu.org; Wed, 09 Aug 2023 04:29:20 -0400 Received: by mail-lf1-x135.google.com with SMTP id 2adb3069b0e04-4fe700f9bf7so4052010e87.0 for <65156@debbugs.gnu.org>; Wed, 09 Aug 2023 01:29:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691569754; x=1692174554; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:sender:from:to:cc:subject :date:message-id:reply-to; bh=9ZPf2WZw5XiTrTWClzRbKeD8io0CxYx5jTKVFfZrCdA=; b=Wd0blrPGYheSPo/WAi32VbuJx5GZcTKlvyMkUbZQvTBPB+08T9Qo9DPumaKfGnaPk2 NNVwORFw+teseP9OHvF/p5RnON+cSPnkuT8fgHyrQuydm4faIIZnhuY0DxP8XQBoukPx 3cIiUZhV9SlHdL669mVjyk0zjOn9MV0UtXCHaXeHbYwvhtDWFHDmlIhUvEZ/sYFUxnc7 RhMM8G08Ie3OQV8yPmAr9DxD37jnqmQOBLjc/k62VZ5P8PvWU4zR5NfJFGv5uYdO1nKG aRhiDi55VIDe/8OVxODk0roHEyUDFMY1ky8wSD0h11leQQG3rsIiVeU48J8QPJPasWgC evpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691569754; x=1692174554; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:sender:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=9ZPf2WZw5XiTrTWClzRbKeD8io0CxYx5jTKVFfZrCdA=; b=ke0ftWURooCES0F2MuZFf4U7fhUv+ub6E7l1PbL1dEVgWJUaRnxXYymx5Ckrgt9jaJ JxdVaC17AOGSbQ33KitxuqEwaO6+tjVng7A8fPMuTsLZFvyjo0/iyLNqhVJf0sZKc2BG n5PYBndufhchraVstJVyoYSg2txPJZuN+rBj1yaNHJ8dovzeZOJnxptmEYEXfhDK81Mp qdcLttzye82jGN4gbNbEruixHHJw4hHezZ8UD/b0yseMuwdjDSETtbpVyU61Zog7TQZK gHq9ZQQgBpBO84OjcxSVHt3xipJksIYl41B0sqmJlgoRKpoOjULAvNo3rcYZM208BXlB EkEw== X-Gm-Message-State: AOJu0YxjdeRE6QZEQNCYZ6i85qDQoO8j8YIJj48DdplwcQwLRX7NsrQT /SHWmnkteBTUDjcVxveSVKo= X-Google-Smtp-Source: AGHT+IH8zIOQ1G6kahinUo5LOhGwOMubNlO54AbWQ+q0qSwj5ZTqjWjyFLT0D0iM8lmX+i1RJFH0fA== X-Received: by 2002:a05:6512:3b24:b0:4fe:b04:dfac with SMTP id f36-20020a0565123b2400b004fe0b04dfacmr1933593lfv.0.1691569753932; Wed, 09 Aug 2023 01:29:13 -0700 (PDT) Received: from smtpclient.apple (c188-150-165-235.bredband.tele2.se. [188.150.165.235]) by smtp.gmail.com with ESMTPSA id c6-20020a197606000000b004fdda72ec16sm2180608lff.274.2023.08.09.01.29.13 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 09 Aug 2023 01:29:13 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.15\)) From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= In-Reply-To: <878raky6km.fsf@yahoo.com> Date: Wed, 9 Aug 2023 10:29:12 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: References: <76F5A77D-3461-4411-9716-7EF40F68722A@gmail.com> <878raky6km.fsf@yahoo.com> X-Mailer: Apple Mail (2.3654.120.0.1.15) X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) 9 aug. 2023 kl. 10.15 skrev Po Lu : > Right, but that's a problem with the test: /dev/urandom is seekable > under the Linux kernel. I fixed this on master by checking for a > regular file instead of a seekable file when verifying BEG, but that's > too extensive a change for Emacs 29. Thank you. We cannot have tests that keep failing, so I disabled it on = emacs-29. From unknown Sun Jun 22 17:17:31 2025 X-Loop: help-debbugs@gnu.org Subject: bug#65156: 29.1; Reading from pipe with --insert or insert-file-contents no longer supported Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 09 Aug 2023 11:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65156 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Po Lu Cc: larsi@gnus.org, eggert@cs.ucla.edu, 65156@debbugs.gnu.org, mail@lucaswerkmeister.de Received: via spool by 65156-submit@debbugs.gnu.org id=B65156.16915806846540 (code B ref 65156); Wed, 09 Aug 2023 11:32:02 +0000 Received: (at 65156) by debbugs.gnu.org; 9 Aug 2023 11:31:24 +0000 Received: from localhost ([127.0.0.1]:38383 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qThPP-0001hP-LJ for submit@debbugs.gnu.org; Wed, 09 Aug 2023 07:31:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41314) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qThPN-0001hC-GN for 65156@debbugs.gnu.org; Wed, 09 Aug 2023 07:31:22 -0400 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 1qThPD-0004Es-TC; Wed, 09 Aug 2023 07:31:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=n2eI6D30nmv7XPrudonhXfblFH97fKHzvopTdGCbF4A=; b=kdzao6RMQcBr 6RV2t32K9D2cXZwBCOLuMCwIzH0MsFgi/jbzyW8Kwah0SR8C2pv4oZ8sSAPvk6e6+SsCFUseDnoKS GzcIYDwxzMzwEnEKnlv64/34Q7vHwcJ/a8O5eLb+NECIftzPLUmTxdiO2XShqQ1PL70Y8flPf7ZUP w80j4agx3Y6zQvX1ghEWJV0qPS4kBx65UdOS3NXE0+rbahFF38TteD0DWrwa7A6zS2q2LeohpekeW sviZ9rfv2lb02FO378sSwN10wIps/VUJg44WEEYZ/eMPkcAudXSmyY/Dvgm5+XRLeGqdD2J3fBW9v VfGZKxzEiUdysJ9gJkVVdw==; Date: Wed, 09 Aug 2023 14:31:35 +0300 Message-Id: <83a5v0moyw.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <87o7jhx776.fsf@yahoo.com> (message from Po Lu on Wed, 09 Aug 2023 10:47:41 +0800) References: <4b873c29-e8ca-403c-bd37-a531d93661f3@lucaswerkmeister.de> <83fs4tmlik.fsf@gnu.org> <83cyzxmj1g.fsf@gnu.org> <87o7jhx776.fsf@yahoo.com> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Po Lu > Cc: mail@lucaswerkmeister.de, eggert@cs.ucla.edu, larsi@gnus.org, > 65156@debbugs.gnu.org > Date: Wed, 09 Aug 2023 10:47:41 +0800 > > The change presently in place on emacs-29 should be replaced with a > one-line change that replaces: > > seekable = lseek (fd, 0, SEEK_CUR) < 0; > > with > > seekable = lseek (fd, 0, SEEK_CUR) != (off_t) -1; Thanks. In the future, when you encounter such bugs, please look into their VCS history, and if the bug was introduced during the development of the last release, fix it on the release branch, especially if the fix is simple and safe. From unknown Sun Jun 22 17:17:31 2025 X-Loop: help-debbugs@gnu.org Subject: bug#65156: 29.1; Reading from pipe with --insert or insert-file-contents no longer supported Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 09 Aug 2023 12:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65156 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Cc: luangruo@yahoo.com, larsi@gnus.org, eggert@cs.ucla.edu, 65156@debbugs.gnu.org, mail@lucaswerkmeister.de Received: via spool by 65156-submit@debbugs.gnu.org id=B65156.16915824139483 (code B ref 65156); Wed, 09 Aug 2023 12:01:02 +0000 Received: (at 65156) by debbugs.gnu.org; 9 Aug 2023 12:00:13 +0000 Received: from localhost ([127.0.0.1]:38411 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qThrI-0002St-Lc for submit@debbugs.gnu.org; Wed, 09 Aug 2023 08:00:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44534) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qThrF-0002RW-OS for 65156@debbugs.gnu.org; Wed, 09 Aug 2023 08:00:11 -0400 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 1qThr8-0001oj-Kf; Wed, 09 Aug 2023 08:00:02 -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=9hwRAo6hJaOvZR5VOTn+MsnDmL4zS1u5dzOw6Fr7CxQ=; b=sZXsqCZalraYPPvVAJcm 2mMgoYdycOYM9zVc4gRQfeXkmrgXfHmMQ+pQRMw1LfDoM5AcYG0sLiBB/tdWJDhoKB1JGa5j6jykK A+z4sBKKYj2eFTV23gd5eV9Jeh5XCxmbSu+uIPMGEVonU4KS2DB4GzsxIIb0kuZdU/aUpnyyxrUxC VqmlfK1EZtTjcIJZtERHzHAgpjMFiBe1c4eQacUwfBYTLF85tYCLPFGZx7DOzFhjkQZwD85vMSIxB SqgeV6jD+4IwEaJhFjPZBQOG11PudjqmMXgZK6ykexBl+gNUFyRbaB8+kFWVlQAYispW0ql/UF/r/ 7+tFXrJrCf8DjQ==; Date: Wed, 09 Aug 2023 15:00:26 +0300 Message-Id: <83350smnmt.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: (message from Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= on Wed, 9 Aug 2023 10:29:12 +0200) References: <76F5A77D-3461-4411-9716-7EF40F68722A@gmail.com> <878raky6km.fsf@yahoo.com> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Mattias Engdegård > Date: Wed, 9 Aug 2023 10:29:12 +0200 > Cc: Eli Zaretskii , > Lars Ingebrigtsen , > Paul Eggert , > 65156@debbugs.gnu.org, > mail@lucaswerkmeister.de > > 9 aug. 2023 kl. 10.15 skrev Po Lu : > > > Right, but that's a problem with the test: /dev/urandom is seekable > > under the Linux kernel. I fixed this on master by checking for a > > regular file instead of a seekable file when verifying BEG, but that's > > too extensive a change for Emacs 29. > > Thank you. We cannot have tests that keep failing, so I disabled it on emacs-29. Thanks, but that wasn't TRT in this case. That test is useful, and moreover, tests a feature introduced in Emacs 29. One of the sub-tests fails, so I just commented it out for now, and re-enabled the test as a whole. From unknown Sun Jun 22 17:17:31 2025 X-Loop: help-debbugs@gnu.org Subject: bug#65156: 29.1; Reading from pipe with --insert or insert-file-contents no longer supported Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 09 Aug 2023 12:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65156 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: luangruo@yahoo.com, larsi@gnus.org, eggert@cs.ucla.edu, 65156@debbugs.gnu.org, mail@lucaswerkmeister.de Received: via spool by 65156-submit@debbugs.gnu.org id=B65156.16915826479962 (code B ref 65156); Wed, 09 Aug 2023 12:05:02 +0000 Received: (at 65156) by debbugs.gnu.org; 9 Aug 2023 12:04:07 +0000 Received: from localhost ([127.0.0.1]:38415 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qThv5-0002ac-Cr for submit@debbugs.gnu.org; Wed, 09 Aug 2023 08:04:07 -0400 Received: from mail-lf1-x12c.google.com ([2a00:1450:4864:20::12c]:51619) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qThv3-0002a5-Aj for 65156@debbugs.gnu.org; Wed, 09 Aug 2023 08:04:05 -0400 Received: by mail-lf1-x12c.google.com with SMTP id 2adb3069b0e04-4fe3678010eso11121561e87.3 for <65156@debbugs.gnu.org>; Wed, 09 Aug 2023 05:04:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691582639; x=1692187439; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:sender:from:to:cc:subject :date:message-id:reply-to; bh=tYzCn5zF4RXqaVRRGTkJ0wSWmlnUmxMfU7JWryuQicc=; b=CWTApleMGkZqN8M18ykLq0hVlm2HS07cMfXgcUikO5u1ko82N7mlP5wcx3wUjRNWT8 pwp7a3lZaTmVt/A1ABJDJ6SfzFxz1e/le+8D9x/7vw/XG/a+sAhZC9mLd/Du+F99TyNv bOFS9yF2oapnC44L5on7hakXp/A9B6BV83DLC5CIdGPK4Yfuoy/Lnq81G9S8WMkATWoq KbU+iunvQ4TFZFk4ad8DNV7npEgZAN92SgG/r4ZJOsT5xImfaQFaZAURtU0sl5YTWhen 5CmdImmkGy2u0ccZJ07726LxzuxRFJ0niNZA6dqWDwAnsIduTFksMWkdEvFnlCMZoZ/A I0HA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691582639; x=1692187439; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:sender:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=tYzCn5zF4RXqaVRRGTkJ0wSWmlnUmxMfU7JWryuQicc=; b=C/zRzUOQTA2bYptYEvAVwfjpLXlnkdJNBkO1X35PJhlFhjr2L4lzrAWvQmnz/iKi/v yWzuQC8lR6G+GOuJIiNEI1QUEjpS6YsiBjIVTGfJ7+1hODdPG9JuffX7/WFumRG1lQOY l4MeJXJj0I6wtwolhp4FQbpI3cGJrCgSWj+d7/iyI+fXbvuhbZabBogY7uzv+2olo4if HUfETAD+Nelwo0PqRvDgKeaVVqcMPqqOtq6fyzhaJbokFAmAsRUsSdk1abTJivyANzR3 mB8oY7ZhmRexRtwomRLjsQbqhu969m2mlcXDfgGMv2dwCi5sDbkiH954OvcxMsGhepXh ludw== X-Gm-Message-State: AOJu0YyJGULgRF7+qL2e/rGQbITKWJf4ve/EKq6wQwlunvGj2AsNTDLK vXOUsraG6QgHQdjcAFvSFq4= X-Google-Smtp-Source: AGHT+IGh71LbR10ENhiDhoHNSkdoTMbDptjn3iyZqMbgL1iWvDYVlvSmob83/j9kWLNhh/SH0zKxIA== X-Received: by 2002:a05:6512:128a:b0:4fd:fef7:95a1 with SMTP id u10-20020a056512128a00b004fdfef795a1mr1941171lfs.53.1691582639090; Wed, 09 Aug 2023 05:03:59 -0700 (PDT) Received: from smtpclient.apple (c188-150-165-235.bredband.tele2.se. [188.150.165.235]) by smtp.gmail.com with ESMTPSA id x11-20020ac2488b000000b004fba077e654sm2253200lfc.194.2023.08.09.05.03.57 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 09 Aug 2023 05:03:57 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.15\)) From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= In-Reply-To: <83350smnmt.fsf@gnu.org> Date: Wed, 9 Aug 2023 14:03:56 +0200 Content-Transfer-Encoding: 7bit Message-Id: <068B449D-572A-4085-9659-5D0649489943@gmail.com> References: <76F5A77D-3461-4411-9716-7EF40F68722A@gmail.com> <878raky6km.fsf@yahoo.com> <83350smnmt.fsf@gnu.org> X-Mailer: Apple Mail (2.3654.120.0.1.15) X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) 9 aug. 2023 kl. 14.00 skrev Eli Zaretskii : > One of the > sub-tests fails, so I just commented it out for now, and re-enabled > the test as a whole. Thank you, that is even better. I can confirm that it still passes on macOS. From unknown Sun Jun 22 17:17:31 2025 X-Loop: help-debbugs@gnu.org Subject: bug#65156: 29.1; Reading from pipe with --insert or insert-file-contents no longer supported Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 09 Aug 2023 20:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65156 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii , mail@lucaswerkmeister.de Cc: larsi@gnus.org, 65156@debbugs.gnu.org Received: via spool by 65156-submit@debbugs.gnu.org id=B65156.1691614665316 (code B ref 65156); Wed, 09 Aug 2023 20:58:02 +0000 Received: (at 65156) by debbugs.gnu.org; 9 Aug 2023 20:57:45 +0000 Received: from localhost ([127.0.0.1]:40590 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qTqFV-000052-8S for submit@debbugs.gnu.org; Wed, 09 Aug 2023 16:57:45 -0400 Received: from mail.cs.ucla.edu ([131.179.128.66]:38132) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qTqFS-0008WU-Tx for 65156@debbugs.gnu.org; Wed, 09 Aug 2023 16:57:43 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id 630A03C011BD8; Wed, 9 Aug 2023 13:57:37 -0700 (PDT) Received: from mail.cs.ucla.edu ([127.0.0.1]) by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id rNEsxE2v5ISu; Wed, 9 Aug 2023 13:57:37 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id 153753C011BD9; Wed, 9 Aug 2023 13:57:37 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.cs.ucla.edu 153753C011BD9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cs.ucla.edu; s=9D0B346E-2AEB-11ED-9476-E14B719DCE6C; t=1691614657; bh=+tozhGlHsIespjWbSwVyBSGsUesO0w0NLfNBqLHOrEw=; h=Message-ID:Date:MIME-Version:To:From; b=buOOM2Zb/+au/YAjLJMvAeLkCeDegjE3Ej+rLuFxH4F/y1j2uGJ2SxctDgcogyDzb X0yn/lt8CK4UGUXebb6kJdgr5+CFEE9SHTBY+L4CNe36kX/k/4OqL09ONbEU7mxLqD HCngSz5+TQE2Vw6oTavSGz08yNc2WfEd7xbZCBfer3DhCbEJUEDBK2TRQKDrx40FTA VM/EFbf/ZthdoH/OvO1GS3gzPC32fvMaN3nXUOQ89iyuG3MT3qyKk2RrSQwFzE9MLf yKIq/6hAIrJpYTAUZIl0PunszubqpxO/7j+y3pvy1TlVOcSb92VB28afQJ8JY/UNzy /gkSoP3y2cFpw== X-Virus-Scanned: amavisd-new at mail.cs.ucla.edu Received: from mail.cs.ucla.edu ([127.0.0.1]) by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id wXK3WJ2e9lm3; Wed, 9 Aug 2023 13:57:37 -0700 (PDT) Received: from [192.168.1.9] (cpe-172-91-119-151.socal.res.rr.com [172.91.119.151]) by mail.cs.ucla.edu (Postfix) with ESMTPSA id DF02A3C011BD8; Wed, 9 Aug 2023 13:57:36 -0700 (PDT) Message-ID: <63a54bee-6bfd-70e5-a9b5-a6f650cabd12@cs.ucla.edu> Date: Wed, 9 Aug 2023 13:57:36 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Content-Language: en-US References: <4b873c29-e8ca-403c-bd37-a531d93661f3@lucaswerkmeister.de> <83fs4tmlik.fsf@gnu.org> <83cyzxmj1g.fsf@gnu.org> From: Paul Eggert Organization: UCLA Computer Science Department In-Reply-To: <83cyzxmj1g.fsf@gnu.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.1 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.1 (-) On 2023-08-08 12:27, Eli Zaretskii wrote: > Paul, can there be a regular file that is not seekable? No. The current code on master is a bit of a mess. There's nothing wrong with using a positive BEG on a seekable and non-regular file, for example; the old doc string was wrong and now the code has been changed to match the doc string unfortunately. Nor is there anything wrong if BEG is 0 on a non-seekable file (though this latter issue is longstanding and so I guess nobody cares). There are surely some gotchas involving the REPLACE arg of insert-file-contents too, but it's hard to tell because the doc string seems to be corrupted for the case where REPLACE is 'if-regular' and I don't know what it's trying to say. From unknown Sun Jun 22 17:17:31 2025 X-Loop: help-debbugs@gnu.org Subject: bug#65156: 29.1; Reading from pipe with --insert or insert-file-contents no longer supported Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 10 Aug 2023 05:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65156 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Paul Eggert Cc: larsi@gnus.org, 65156@debbugs.gnu.org, mail@lucaswerkmeister.de Received: via spool by 65156-submit@debbugs.gnu.org id=B65156.169164464630641 (code B ref 65156); Thu, 10 Aug 2023 05:18:02 +0000 Received: (at 65156) by debbugs.gnu.org; 10 Aug 2023 05:17:26 +0000 Received: from localhost ([127.0.0.1]:41011 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qTy33-0007y8-Re for submit@debbugs.gnu.org; Thu, 10 Aug 2023 01:17:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52846) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qTy31-0007xt-3Z for 65156@debbugs.gnu.org; Thu, 10 Aug 2023 01:17:24 -0400 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 1qTy2u-0001fK-BX; Thu, 10 Aug 2023 01:17:16 -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=ww4T0Ycm/YbShZYHisIAdS7UKXfpQijcRLO8NKjaALg=; b=BpVi3XWLflvZZ+FU6cKn cggoQ08vIVPAY18jndzV68u/xzhyZlXciiSftuqgC+fuFEPRIruSq6rLI00phz8UvzrFmX3hCjrxy e0FF1Zv40UYKOAZRR+EkdYIN49ETNTcV2Y41TC+LhB/4AqXn5uuZUB5rKrs9NqTRug9d9iK6Kr8Gw 3BQnyTl1A+hbmd0INR1s3+0ZN6t9byWbSe14RmmbiBy5oxIwIEe4YQTgBUrt41xJR+ZSAv1rNiBeE TvOjkHv7884VvRvJPQ+DA3Q4+8gxL69Fh4TF9Hksam9RMW/KZ/sYR0jfaRk385AUznzjVczpiK01c 3LGOPOhy1HoIrw==; Date: Thu, 10 Aug 2023 08:17:41 +0300 Message-Id: <83ttt7jx1m.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <63a54bee-6bfd-70e5-a9b5-a6f650cabd12@cs.ucla.edu> (message from Paul Eggert on Wed, 9 Aug 2023 13:57:36 -0700) References: <4b873c29-e8ca-403c-bd37-a531d93661f3@lucaswerkmeister.de> <83fs4tmlik.fsf@gnu.org> <83cyzxmj1g.fsf@gnu.org> <63a54bee-6bfd-70e5-a9b5-a6f650cabd12@cs.ucla.edu> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Wed, 9 Aug 2023 13:57:36 -0700 > Cc: larsi@gnus.org, 65156@debbugs.gnu.org > From: Paul Eggert > > On 2023-08-08 12:27, Eli Zaretskii wrote: > > Paul, can there be a regular file that is not seekable? > > No. Thanks. This is no longer an issue, though. > The current code on master is a bit of a mess. There's nothing wrong > with using a positive BEG on a seekable and non-regular file, for > example; the old doc string was wrong and now the code has been changed > to match the doc string unfortunately. Nor is there anything wrong if > BEG is 0 on a non-seekable file (though this latter issue is > longstanding and so I guess nobody cares). These are minor issues that should be easy to clean up, I think? If so, now is a good time for doing that on master. > There are surely some gotchas involving the REPLACE arg of > insert-file-contents too, but it's hard to tell because the doc string > seems to be corrupted for the case where REPLACE is 'if-regular' and I > don't know what it's trying to say. I guess you are alluding to this part: If REPLACE is the symbol ‘if-regular’, then eschew preserving marker positions or the undo list if REPLACE is nil if FILENAME is not a regular file. Otherwise, signal an error if REPLACE is non-nil and FILENAME is not a regular file. Which part(s) of this are unclear? From unknown Sun Jun 22 17:17:31 2025 X-Loop: help-debbugs@gnu.org Subject: bug#65156: 29.1; Reading from pipe with --insert or insert-file-contents no longer supported Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 10 Aug 2023 06:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65156 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: larsi@gnus.org, 65156@debbugs.gnu.org, mail@lucaswerkmeister.de Received: via spool by 65156-submit@debbugs.gnu.org id=B65156.16916477383743 (code B ref 65156); Thu, 10 Aug 2023 06:09:02 +0000 Received: (at 65156) by debbugs.gnu.org; 10 Aug 2023 06:08:58 +0000 Received: from localhost ([127.0.0.1]:41059 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qTyqw-0000yJ-EW for submit@debbugs.gnu.org; Thu, 10 Aug 2023 02:08:58 -0400 Received: from mail.cs.ucla.edu ([131.179.128.66]:48288) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qTyqu-0000xq-CQ for 65156@debbugs.gnu.org; Thu, 10 Aug 2023 02:08:56 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id 93E6E3C011BD8; Wed, 9 Aug 2023 23:08:50 -0700 (PDT) Received: from mail.cs.ucla.edu ([127.0.0.1]) by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id VLv6p_d0UXVe; Wed, 9 Aug 2023 23:08:50 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id 49B233C011BD9; Wed, 9 Aug 2023 23:08:50 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.cs.ucla.edu 49B233C011BD9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cs.ucla.edu; s=9D0B346E-2AEB-11ED-9476-E14B719DCE6C; t=1691647730; bh=yOO+AUfg7CyAIhwVFh25Np1EgId8IB5Q7bBsjvdu+0U=; h=Message-ID:Date:MIME-Version:To:From; b=nDZhuggMGsYLJjaXJcvnllyYDh0T4B4xRGSSV7g0NkdIwpjnPUMM3aM0DazkH/01X eW6S6SRkhyBQV8KqGYBLjRWRU6gK80EPAdwtx7B4xEXB7LZZnZkleFBl+kDg1x3R9X Q0nSAex4WcHBS0je0Ft72LCIMW7WRAWZeYs+PK7R8qA8RyczxkpUUinoaaMB+XvCjw 3LzqfzoelVFQWOTa5auRVxWtqdTxrGJrSm/MUq4oUmqkpvqmF1r7e4ynoMOfsZmb1C RtHg0dRcytEiPw+Qck6WnKLVMN7bLz2oXeEQJRSC6XJ7b+ogDqH4VbVTcMkJn+K/ku N6UkyhKGGwLIA== X-Virus-Scanned: amavisd-new at mail.cs.ucla.edu Received: from mail.cs.ucla.edu ([127.0.0.1]) by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id ekeVJsyud5OV; Wed, 9 Aug 2023 23:08:50 -0700 (PDT) Received: from [192.168.1.9] (cpe-172-91-119-151.socal.res.rr.com [172.91.119.151]) by mail.cs.ucla.edu (Postfix) with ESMTPSA id 1E69D3C011BD8; Wed, 9 Aug 2023 23:08:50 -0700 (PDT) Message-ID: <6755e91e-1318-8ca8-33e4-30d354d95a2f@cs.ucla.edu> Date: Wed, 9 Aug 2023 23:08:49 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Content-Language: en-US References: <4b873c29-e8ca-403c-bd37-a531d93661f3@lucaswerkmeister.de> <83fs4tmlik.fsf@gnu.org> <83cyzxmj1g.fsf@gnu.org> <63a54bee-6bfd-70e5-a9b5-a6f650cabd12@cs.ucla.edu> <83ttt7jx1m.fsf@gnu.org> From: Paul Eggert Organization: UCLA Computer Science Department In-Reply-To: <83ttt7jx1m.fsf@gnu.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.1 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.1 (-) On 2023-08-09 22:17, Eli Zaretskii wrote: > If REPLACE is the symbol =E2=80=98if-regular=E2=80=99, then eschew p= reserving marker > positions or the undo list if REPLACE is nil if FILENAME is not a > regular file. Otherwise, signal an error if REPLACE is non-nil and > FILENAME is not a regular file. >=20 > Which part(s) of this are unclear? In "If REPLACE is the symbol 'if-regular', then if REPLACE is nil if=20 . Otherwise, ..." I don't know what the first sentence means. The "if=20 REPLACE is nil" seems to contradict the "If REPLACE is the symbol=20 'if-regular'" and the relationship between and is unclear. Nor do I know which "if" the "Otherwise" is referring to. Nor is it easy to see how this paragraph connects to the previous one,=20 the one that begins "If optional fifth argument REPLACE is non-nil" and=20 that goes on to say "When REPLACE is non-nil" as if the second phrase=20 were not redundant (so which part of that paragraph talks about what=20 happens when REPLACE being nil?). It's understandable that the doc string is a mess, since the code is=20 messier. (Yes, this is the peanut gallery talking....) From unknown Sun Jun 22 17:17:31 2025 X-Loop: help-debbugs@gnu.org Subject: bug#65156: 29.1; Reading from pipe with --insert or insert-file-contents no longer supported Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 10 Aug 2023 08:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65156 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Paul Eggert Cc: larsi@gnus.org, 65156@debbugs.gnu.org, mail@lucaswerkmeister.de Received: via spool by 65156-submit@debbugs.gnu.org id=B65156.169165531417355 (code B ref 65156); Thu, 10 Aug 2023 08:16:02 +0000 Received: (at 65156) by debbugs.gnu.org; 10 Aug 2023 08:15:14 +0000 Received: from localhost ([127.0.0.1]:41288 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qU0p7-0004Vr-PD for submit@debbugs.gnu.org; Thu, 10 Aug 2023 04:15:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43088) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qU0p5-0004Vc-O1 for 65156@debbugs.gnu.org; Thu, 10 Aug 2023 04:15:12 -0400 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 1qU0oy-0002ac-Vw; Thu, 10 Aug 2023 04:15:04 -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=eDg7Jvp2dvQ7p4rEGvAbhM5n/nof+VfxCNzYxRqoL20=; b=X8xERhOPzG7q+G+4KPX2 6DEbE5oN3C5K2Vj90LmyAIc9G4AvXvx2xlm61SZBzMrORWMJC6NltcAU/v4RpsPAQJ1zhkc+yRwNx 415i7X84Ca/DpzVsgFQ595Jif4R3McBG35k+3q/iJM0MA1SxhnIC3zelkokUVyxnV6M3OftlVXk/K tKjwkVUfWFh8ZtSxYVIBqNDXhhgogbQeEOVMGMAE9gnqdp33GvBYOWkMxBBvSWeKa6b4oC0zc/h4Z qayeEaQ6/voBoi3cTaqQmTCUtLfOi2NmWt4g4BHuBEBboXjLwjpoVDHx+oGZqLImYcFRX908qaJ+T ebbPVh5Rf7KXwQ==; Date: Thu, 10 Aug 2023 11:15:28 +0300 Message-Id: <83a5uzjotb.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <6755e91e-1318-8ca8-33e4-30d354d95a2f@cs.ucla.edu> (message from Paul Eggert on Wed, 9 Aug 2023 23:08:49 -0700) References: <4b873c29-e8ca-403c-bd37-a531d93661f3@lucaswerkmeister.de> <83fs4tmlik.fsf@gnu.org> <83cyzxmj1g.fsf@gnu.org> <63a54bee-6bfd-70e5-a9b5-a6f650cabd12@cs.ucla.edu> <83ttt7jx1m.fsf@gnu.org> <6755e91e-1318-8ca8-33e4-30d354d95a2f@cs.ucla.edu> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Wed, 9 Aug 2023 23:08:49 -0700 > Cc: mail@lucaswerkmeister.de, larsi@gnus.org, 65156@debbugs.gnu.org > From: Paul Eggert > > On 2023-08-09 22:17, Eli Zaretskii wrote: > > If REPLACE is the symbol ‘if-regular’, then eschew preserving marker > > positions or the undo list if REPLACE is nil if FILENAME is not a > > regular file. Otherwise, signal an error if REPLACE is non-nil and > > FILENAME is not a regular file. > > > > Which part(s) of this are unclear? > > In "If REPLACE is the symbol 'if-regular', then if REPLACE is nil if > . Otherwise, ..." I don't know what the first sentence means. I think it should be changed to say this instead: If REPLACE is the symbol ‘if-regular’, then eschew preserving marker positions or the undo list when FILENAME is not a regular file. Otherwise, signal an error if REPLACE is non-nil and FILENAME is not a regular file. AFAICT, this is what the code does. > Nor do I know which "if" the "Otherwise" is referring to. It alludes to the case that REPLACE is not 'if-regular'. > Nor is it easy to see how this paragraph connects to the previous one, > the one that begins "If optional fifth argument REPLACE is non-nil" and > that goes on to say "When REPLACE is non-nil" as if the second phrase > were not redundant (so which part of that paragraph talks about what > happens when REPLACE being nil?). This describes what happens when REPLACE is neither nil nor 'if-regular', AFAICT. IOW, the "smart" replacement happens only with regular files; with non-regular files we either erase the buffer and insert the stuff from the file (if REPLACE is 'if-regular') or signal an error. If you agree that this is what the doc string should say, I will reword it (but feel free to beat me to that ;-). From unknown Sun Jun 22 17:17:31 2025 X-Loop: help-debbugs@gnu.org Subject: bug#65156: 29.1; Reading from pipe with --insert or insert-file-contents no longer supported Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 11 Aug 2023 17:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65156 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: larsi@gnus.org, 65156@debbugs.gnu.org, mail@lucaswerkmeister.de Received: via spool by 65156-submit@debbugs.gnu.org id=B65156.169177430420907 (code B ref 65156); Fri, 11 Aug 2023 17:19:02 +0000 Received: (at 65156) by debbugs.gnu.org; 11 Aug 2023 17:18:24 +0000 Received: from localhost ([127.0.0.1]:47895 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qUVmK-0005R8-EP for submit@debbugs.gnu.org; Fri, 11 Aug 2023 13:18:24 -0400 Received: from mail.cs.ucla.edu ([131.179.128.66]:34990) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qUVmI-0005Qu-K0 for 65156@debbugs.gnu.org; Fri, 11 Aug 2023 13:18:23 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id CFFF73C011BD4; Fri, 11 Aug 2023 10:18:16 -0700 (PDT) Received: from mail.cs.ucla.edu ([127.0.0.1]) by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id YfsqGPbS7woO; Fri, 11 Aug 2023 10:18:16 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id 6B8B63C011BDB; Fri, 11 Aug 2023 10:18:16 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.cs.ucla.edu 6B8B63C011BDB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cs.ucla.edu; s=9D0B346E-2AEB-11ED-9476-E14B719DCE6C; t=1691774296; bh=jb9VgkL1+d/ZVbUTQNtj1PQ3iDsFZMLQe347QULGmiw=; h=Message-ID:Date:MIME-Version:To:From; b=C1v3MakgSPnQgCW55bwezao7Ynm/Oc1GSgwJL9YFaUyPS5BizLtZpsFIPZfT2cg6y d57hQ/ZGnIiwImuNDxZN1+4UzFIRn7bb15UXN8uzTJtHKhjCaOEiG9BqF9/SiYNMMv Eeyyezk1Oenchx2UGwmspGBhiniDdSIqEfUXy2ElKh499pAsjdCor3r3EOvhUvP6Bu nr6yidjQeBRQeeup+oNunLBnkQKpIiC7f8Q42ymzCGJgStYu0NvidvNPmYgggzlWk0 N9Vik46j2qnVubbVKlASCB8rCskAJYOKlPa0NmEXVdfTCA6v+/K0k7l+iZu6SAY0OC zyZmR9aUFaX/Q== X-Virus-Scanned: amavisd-new at mail.cs.ucla.edu Received: from mail.cs.ucla.edu ([127.0.0.1]) by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id H4CpVqaLexlf; Fri, 11 Aug 2023 10:18:16 -0700 (PDT) Received: from [192.168.1.9] (cpe-172-91-119-151.socal.res.rr.com [172.91.119.151]) by mail.cs.ucla.edu (Postfix) with ESMTPSA id 420823C011BD4; Fri, 11 Aug 2023 10:18:16 -0700 (PDT) Content-Type: multipart/mixed; boundary="------------eo5CC2kRMzP0FxaX0TE30gJr" Message-ID: Date: Fri, 11 Aug 2023 10:18:16 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Content-Language: en-US References: <4b873c29-e8ca-403c-bd37-a531d93661f3@lucaswerkmeister.de> <83fs4tmlik.fsf@gnu.org> <83cyzxmj1g.fsf@gnu.org> <63a54bee-6bfd-70e5-a9b5-a6f650cabd12@cs.ucla.edu> <83ttt7jx1m.fsf@gnu.org> <6755e91e-1318-8ca8-33e4-30d354d95a2f@cs.ucla.edu> <83a5uzjotb.fsf@gnu.org> From: Paul Eggert Organization: UCLA Computer Science Department In-Reply-To: <83a5uzjotb.fsf@gnu.org> X-Spam-Score: -0.1 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.1 (-) This is a multi-part message in MIME format. --------------eo5CC2kRMzP0FxaX0TE30gJr Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable On 2023-08-10 01:15, Eli Zaretskii wrote: > I think it should be changed to say this instead: >=20 > If REPLACE is the symbol =E2=80=98if-regular=E2=80=99, then eschew p= reserving marker > positions or the undo list when FILENAME is not a regular file. > Otherwise, signal an error if REPLACE is non-nil and FILENAME is not > a regular file. >=20 > AFAICT, this is what the code does. It does more than that, no? If REPLACE is 'if-regular' and the file is=20 not a regular file, the function replaces the entire buffer not the=20 accessible region. How about something like the attached instead? --------------eo5CC2kRMzP0FxaX0TE30gJr Content-Type: text/x-patch; charset=UTF-8; name="insert-doc.patch" Content-Disposition: attachment; filename="insert-doc.patch" Content-Transfer-Encoding: base64 ZGlmZiAtLWdpdCBhL3NyYy9maWxlaW8uYyBiL3NyYy9maWxlaW8uYwppbmRleCA1MmJiYWE2 MWZjMi4uNDBjODcwMzMxYjggMTAwNjQ0Ci0tLSBhL3NyYy9maWxlaW8uYworKysgYi9zcmMv ZmlsZWlvLmMKQEAgLTQwMzEsMTAgKzQwMzEsOSBAQCBiZWNhdXNlICgxKSBpdCBwcmVzZXJ2 ZXMgc29tZSBtYXJrZXIgcG9zaXRpb25zIChpbiB1bmNoYW5nZWQgcG9ydGlvbnMKIHVuZG8g bGlzdC4gIFdoZW4gUkVQTEFDRSBpcyBub24tbmlsLCB0aGUgc2Vjb25kIHJldHVybiB2YWx1 ZSBpcyB0aGUKIG51bWJlciBvZiBjaGFyYWN0ZXJzIHRoYXQgcmVwbGFjZSBwcmV2aW91cyBi dWZmZXIgY29udGVudHMuCiAKLUlmIFJFUExBQ0UgaXMgdGhlIHN5bWJvbCBgaWYtcmVndWxh cicsIHRoZW4gZXNjaGV3IHByZXNlcnZpbmcgbWFya2VyCi1wb3NpdGlvbnMgb3IgdGhlIHVu ZG8gbGlzdCBpZiBSRVBMQUNFIGlzIG5pbCBpZiBGSUxFTkFNRSBpcyBub3QgYQotcmVndWxh ciBmaWxlLiAgT3RoZXJ3aXNlLCBzaWduYWwgYW4gZXJyb3IgaWYgUkVQTEFDRSBpcyBub24t bmlsIGFuZAotRklMRU5BTUUgaXMgbm90IGEgcmVndWxhciBmaWxlLgorSWYgUkVQTEFDRSBp cyBub24tbmlsIGFuZCBGSUxFTkFNRSBpcyBub3QgYSByZWd1bGFyIGZpbGUsIGFjdCBhcyBp ZgorUkVQTEFDRSB3ZXJlIG5pbCBpZiBSRVBMQUNFIGlzIHRoZSBzeW1ib2wgYGlmLXJlZ3Vs YXInIGFuZCBzaWduYWwgYW4KK2Vycm9yIG90aGVyd2lzZS4KIAogVGhpcyBmdW5jdGlvbiBk b2VzIGNvZGUgY29udmVyc2lvbiBhY2NvcmRpbmcgdG8gdGhlIHZhbHVlIG9mCiBgY29kaW5n LXN5c3RlbS1mb3ItcmVhZCcgb3IgYGZpbGUtY29kaW5nLXN5c3RlbS1hbGlzdCcsIGFuZCBz ZXRzIHRoZQo= --------------eo5CC2kRMzP0FxaX0TE30gJr-- From unknown Sun Jun 22 17:17:31 2025 X-Loop: help-debbugs@gnu.org Subject: bug#65156: 29.1; Reading from pipe with --insert or insert-file-contents no longer supported Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 11 Aug 2023 18:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65156 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Paul Eggert Cc: larsi@gnus.org, 65156@debbugs.gnu.org, mail@lucaswerkmeister.de Received: via spool by 65156-submit@debbugs.gnu.org id=B65156.169177863627951 (code B ref 65156); Fri, 11 Aug 2023 18:31:02 +0000 Received: (at 65156) by debbugs.gnu.org; 11 Aug 2023 18:30:36 +0000 Received: from localhost ([127.0.0.1]:47950 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qUWuA-0007Ge-S0 for submit@debbugs.gnu.org; Fri, 11 Aug 2023 14:30:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56848) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qUWu7-0007GA-Du for 65156@debbugs.gnu.org; Fri, 11 Aug 2023 14:30:32 -0400 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 1qUWtw-0004pM-Et; Fri, 11 Aug 2023 14:30:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=krddJobUvY1Cha3PldB1KqeGcvSMoV8lWJmlmm/iK6g=; b=b8wDSTt/85sL g6jUjZW/eRWMU7XBSjwOTRZjGmJHNA+nlfmTaTEHB41cDsv7cKuJAbXFRUvOn+R5mWNYFWoFQYuWq NyEVhYXctWh3HOsrLqYJ2ttLBuGQwOntHUBLzIM8vaY2lOodCWDze55xNXngYlPh6dLSYb3eQjXoS 4yjhgcsibzxu7nqEAgzN60pFQCNzlsHoHJAieeo9k+pxwK7G0fg1ilBIixcoJl6/4wt8fidJ3INP/ vHrqLHo5x7FOnHQlSFHqf59sjlehLGNlDq9SBLU9StUZt9nY3afJLWSOWi6RxSQ7pvPWof1BTSIIO Al7GqtMdz0ZJdLcMC27fXg==; Date: Fri, 11 Aug 2023 21:30:43 +0300 Message-Id: <83wmy1fn3g.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: (message from Paul Eggert on Fri, 11 Aug 2023 10:18:16 -0700) References: <4b873c29-e8ca-403c-bd37-a531d93661f3@lucaswerkmeister.de> <83fs4tmlik.fsf@gnu.org> <83cyzxmj1g.fsf@gnu.org> <63a54bee-6bfd-70e5-a9b5-a6f650cabd12@cs.ucla.edu> <83ttt7jx1m.fsf@gnu.org> <6755e91e-1318-8ca8-33e4-30d354d95a2f@cs.ucla.edu> <83a5uzjotb.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Fri, 11 Aug 2023 10:18:16 -0700 > Cc: mail@lucaswerkmeister.de, larsi@gnus.org, 65156@debbugs.gnu.org > From: Paul Eggert > > diff --git a/src/fileio.c b/src/fileio.c > index 52bbaa61fc2..40c870331b8 100644 > --- a/src/fileio.c > +++ b/src/fileio.c > @@ -4031,10 +4031,9 @@ because (1) it preserves some marker positions (in unchanged portions > undo list. When REPLACE is non-nil, the second return value is the > number of characters that replace previous buffer contents. > > -If REPLACE is the symbol `if-regular', then eschew preserving marker > -positions or the undo list if REPLACE is nil if FILENAME is not a > -regular file. Otherwise, signal an error if REPLACE is non-nil and > -FILENAME is not a regular file. > +If REPLACE is non-nil and FILENAME is not a regular file, act as if > +REPLACE were nil if REPLACE is the symbol `if-regular' and signal an > +error otherwise. This is fine, but I think instead of "act as if REPLACE were nil" we should explicitly say that the buffer is erased and the file's contents is inserted. From unknown Sun Jun 22 17:17:31 2025 X-Loop: help-debbugs@gnu.org Subject: bug#65156: 29.1; Reading from pipe with --insert or insert-file-contents no longer supported Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 11 Aug 2023 21:46:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65156 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: larsi@gnus.org, 65156@debbugs.gnu.org, mail@lucaswerkmeister.de Received: via spool by 65156-submit@debbugs.gnu.org id=B65156.16917903596362 (code B ref 65156); Fri, 11 Aug 2023 21:46:03 +0000 Received: (at 65156) by debbugs.gnu.org; 11 Aug 2023 21:45:59 +0000 Received: from localhost ([127.0.0.1]:48199 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qUZxH-0001eX-AC for submit@debbugs.gnu.org; Fri, 11 Aug 2023 17:45:59 -0400 Received: from mail.cs.ucla.edu ([131.179.128.66]:43004) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qUZxF-0001e3-1K for 65156@debbugs.gnu.org; Fri, 11 Aug 2023 17:45:58 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id 913353C011BD4; Fri, 11 Aug 2023 14:45:51 -0700 (PDT) Received: from mail.cs.ucla.edu ([127.0.0.1]) by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id LNPE31qsSXkV; Fri, 11 Aug 2023 14:45:51 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id 450243C011BDC; Fri, 11 Aug 2023 14:45:51 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.cs.ucla.edu 450243C011BDC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cs.ucla.edu; s=9D0B346E-2AEB-11ED-9476-E14B719DCE6C; t=1691790351; bh=GLcaM1FlqthGlhGgLZOPb8A9CUr/kEtV50BPynRRD1s=; h=Message-ID:Date:MIME-Version:To:From; b=NHX1KMwkaBUs21qBR7cCKT3SoLJ0yPY8D2QEz2iASkCaHP6d0/Y2tpMEggLd0frQ6 l1fEdkJxDeqJOesY334wtRoMtq8b0fMROw3e7fCrQ6VGYkljqhoR171DXioqc7TzSu oa7bv6VjHJYKUqANktpezClt4ZhwDFkiN4e8n7BQSjk3Su8sEEmRqUrnXUbY4NJjVq S/ub2TojACm3/OcbOlVIQePhM+SAiePC42Ube22CP/E+/O4Gu4kMEMnaeON5krSbXy vfl1WpkGeIvLAJ8ukgUH1q0hogYjIWUUIy0DMXA7K9zxsHUv1/0S3LR4WJB6oQ97sv ZQt5+6aLXDhLw== X-Virus-Scanned: amavisd-new at mail.cs.ucla.edu Received: from mail.cs.ucla.edu ([127.0.0.1]) by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 03tgOEXxdE55; Fri, 11 Aug 2023 14:45:51 -0700 (PDT) Received: from [192.168.1.9] (cpe-172-91-119-151.socal.res.rr.com [172.91.119.151]) by mail.cs.ucla.edu (Postfix) with ESMTPSA id 1CD093C011BD4; Fri, 11 Aug 2023 14:45:51 -0700 (PDT) Message-ID: Date: Fri, 11 Aug 2023 14:45:48 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Content-Language: en-US References: <4b873c29-e8ca-403c-bd37-a531d93661f3@lucaswerkmeister.de> <83fs4tmlik.fsf@gnu.org> <83cyzxmj1g.fsf@gnu.org> <63a54bee-6bfd-70e5-a9b5-a6f650cabd12@cs.ucla.edu> <83ttt7jx1m.fsf@gnu.org> <6755e91e-1318-8ca8-33e4-30d354d95a2f@cs.ucla.edu> <83a5uzjotb.fsf@gnu.org> <83wmy1fn3g.fsf@gnu.org> From: Paul Eggert Organization: UCLA Computer Science Department In-Reply-To: <83wmy1fn3g.fsf@gnu.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.1 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.1 (-) On 2023-08-11 11:30, Eli Zaretskii wrote: > This is fine, but I think instead of "act as if REPLACE were nil" we > should explicitly say that the buffer is erased and the file's > contents is inserted. I'm still a bit lost here. It's news to me that REPLACE being nil means the entire buffer is erased first. The bigger picture is that I don't know what insert-file-contents is supposed to do in all these complicated circumstances. THat is the various motivations behind insert-file-contents's complex argument combinations don't fully make sense to me. So I'll step aside and let someone more expert fix the doc string, whenever anybody has the time. From unknown Sun Jun 22 17:17:31 2025 X-Loop: help-debbugs@gnu.org Subject: bug#65156: 29.1; Reading from pipe with --insert or insert-file-contents no longer supported Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 12 Aug 2023 08:06:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65156 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Paul Eggert Cc: larsi@gnus.org, 65156@debbugs.gnu.org, mail@lucaswerkmeister.de Received: via spool by 65156-submit@debbugs.gnu.org id=B65156.169182752123821 (code B ref 65156); Sat, 12 Aug 2023 08:06:01 +0000 Received: (at 65156) by debbugs.gnu.org; 12 Aug 2023 08:05:21 +0000 Received: from localhost ([127.0.0.1]:48660 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qUjce-0006C6-T1 for submit@debbugs.gnu.org; Sat, 12 Aug 2023 04:05:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40748) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qUjca-0006Bl-SZ for 65156@debbugs.gnu.org; Sat, 12 Aug 2023 04:05:20 -0400 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 1qUjcS-0003I4-GT; Sat, 12 Aug 2023 04:05:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=UAiGwUXNKvMbob2C5r6qZCVK/b3ZbLVBkTpkb8LY7CU=; b=UDl3V0HIKHVi coCIqYsZgzylP3ahIpf4X79VIWX9ez4WrlCLwnb/0Qpdj/q0q+E8re9VMtAoZxL7XhXUJsP47kevl umlaf7uG6ymPpUtrNrYzqYubDK9Ds30SsxkwqUbVcew/aUnau7tUWsdYssFqBBX9uii1x8UruGJ0p 72qHaChna7YSCfZ+RWuXUWc7PSk4RaVWr0ogj9mSqKfjzudIJE0KZ1KAKCXJG/mcuszpTrFP3xi1v cWxg89Mmqmb6D7xNB9+m1sOOJJKj6q8Qk/WoWiQrmeZ5qSX37YaY1z2dZ+fzjZr4QYHgMc1mmLZ8Y VCW96Wm9Szxjng5Jr8QTSA==; Date: Sat, 12 Aug 2023 11:05:33 +0300 Message-Id: <83pm3selde.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: (message from Paul Eggert on Fri, 11 Aug 2023 14:45:48 -0700) References: <4b873c29-e8ca-403c-bd37-a531d93661f3@lucaswerkmeister.de> <83fs4tmlik.fsf@gnu.org> <83cyzxmj1g.fsf@gnu.org> <63a54bee-6bfd-70e5-a9b5-a6f650cabd12@cs.ucla.edu> <83ttt7jx1m.fsf@gnu.org> <6755e91e-1318-8ca8-33e4-30d354d95a2f@cs.ucla.edu> <83a5uzjotb.fsf@gnu.org> <83wmy1fn3g.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Fri, 11 Aug 2023 14:45:48 -0700 > Cc: mail@lucaswerkmeister.de, larsi@gnus.org, 65156@debbugs.gnu.org > From: Paul Eggert > > On 2023-08-11 11:30, Eli Zaretskii wrote: > > This is fine, but I think instead of "act as if REPLACE were nil" we > > should explicitly say that the buffer is erased and the file's > > contents is inserted. > > I'm still a bit lost here. It's news to me that REPLACE being nil means > the entire buffer is erased first. That's actually a bug: it should only erase the accessible portion of the buffer. I fixed it now. > The bigger picture is that I don't know what insert-file-contents is > supposed to do in all these complicated circumstances. THat is the > various motivations behind insert-file-contents's complex argument > combinations don't fully make sense to me. So I'll step aside and let > someone more expert fix the doc string, whenever anybody has the time. Until we wait for someone to figure that out, I attempted to make things better by fixing the doc string's language as best I could, see the master branch. WDYT about backporting this (both the doc string and the erasing fix) to emacs-29? From unknown Sun Jun 22 17:17:31 2025 X-Loop: help-debbugs@gnu.org Subject: bug#65156: 29.1; Reading from pipe with --insert or insert-file-contents no longer supported Resent-From: Po Lu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 12 Aug 2023 09:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65156 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: larsi@gnus.org, Paul Eggert , 65156@debbugs.gnu.org, mail@lucaswerkmeister.de Received: via spool by 65156-submit@debbugs.gnu.org id=B65156.169183075830863 (code B ref 65156); Sat, 12 Aug 2023 09:00:02 +0000 Received: (at 65156) by debbugs.gnu.org; 12 Aug 2023 08:59:18 +0000 Received: from localhost ([127.0.0.1]:48715 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qUkSs-00081g-44 for submit@debbugs.gnu.org; Sat, 12 Aug 2023 04:59:18 -0400 Received: from sonic309-20.consmr.mail.ne1.yahoo.com ([66.163.184.146]:38151) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qUkSp-000819-IQ for 65156@debbugs.gnu.org; Sat, 12 Aug 2023 04:59:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1691830749; bh=G80W5Aq3VNsRxjgrKITiy2cjuiRg3loQir8gsu3uhI4=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From:Subject:Reply-To; b=X1GL2ZFjy+DeHCFezITl1HPQHABs4mCqXjgEwtMo18iTzdXv9noR6RnDsG1kzwNtBCTHfMwhfGwWob+eK+Xs9oCS7b2pN/F9pvnPJxCX7E0HFklJc3kncUJtxqa8bz1D6fFEQypEBZOW/yRKDO1++QjZD5YecBDnytoYvgF5AdvFBY5c/N0Be9zQlVFzcs2oF4UHMHyULrGfhpfR/wMkJdWmvdNZkbFlnX2Snf2XDxV7IzQPQbsi8O9VqSNyd+uqJrilTOEydsLo4Xqc5nm6sSkUj+XnSQJT/di4VnD0TdKYv0Wv7P9GoRtNDDw2JyDgH348ZahDPrJ4jzmuR42Jhw== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1691830749; bh=1hvFC0CfSVAMDZ+eVWmpIwVCQDz2yMi5WgLbiFMNpeT=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=bhsf3gAjXrtkW8ipWj2RTYYJtwyloDhH8hOttvOz7lSQwL6snfTYJKkIhhDITiQzw8UO+C2w/1ndqAFLsHvxxETBoVjEZTW9ityINW6Filb04yDKoBjDOvg4h+Sye2IfAdKKonwVPUO63wXfvP8Si3SKzAUNrg7PY03OSEdB61K2qB7b1UX/g0+E7nIeBeE2QOBsNke4qJNMCMONgUIJ/PS6AtnOhkJt3J78i658T4Deo7CXw+h5mggk9oCVijDOhn8qhGt5oBtMiLrkYEDRsnxs385+O4jYt01P8OkC+eOB6QVF1lwHVI0Jn+HAaqIJd8YCRohnKFfsTmJBlmNhGQ== X-YMail-OSG: _W6dqG0VM1kv4i7O0ej2LEAp_RuBsFjTFIgGz6g7yOd6ykqnXhJH.SqfZ0jmaIp omq9IPY_M7IjeodsRTWB3w8P3HmdaXwI28kqzee4E696gPpx7iIDLxvsdkdbO8d_eqETgDEdhVBA N2pT69rxAKm60qTHouXQK2s_xA20wAszC0DTNfpiR.N4O6TUShEmu95s8NYYDSVWT.hJlm6FMK9J .2_7vaoN9ahPKiDz2jxzngbvKwatM1l3oYi7n6Az8rfNZdOf0wauPGoPkj_bu4I5sUoMTBmBgh2E 0V.2WV17_uSYn3KITJtwSp1AQEw5HPGrthRaGoL8cDYKUSMFk0WgjYmr_lpX_9nGSuZ50blbfecn FjxSwtb9FCfZ2iN8cC1PzzCnMyagKt_4k6JjL5aljk2Ryfm_ko0GUS0BPzbioF94UlGwH_7ApAVv oJxy5b45A_rrzWtPflB12er.F_RUUM9Cp2cK58JtpcJi9kGCL2v129aSVMbey9tfGLsxybRtU5.7 3ZNWMMQXXwJLL9q2ZoKB_3O5278DFdZ1ozhbqhe4rtBpO15u6cnGjzulbRypK9IXJa0vsmPpnQuJ oyqqCnpAijFwnOVEVpoNaXmxVy.IEDVd6grn_DNRvUsqc3L2YacJwycHbKq.SJhHNRv_nx7lsm3j QKrl1GO.fL0ckSsHrDLpzuVB5xbz.R5DxoCSai9Ze5yOXqGTE1JR4u8Bq4VnYV1fhQPOfSh2FN.w 2wpHbyh1RMXznfhJuj3ltGS6BwIE9uaTNnqqOateh149k14Y0Ex2_R7o3uE0tTdJH1vZgdRlY.o1 R_rkZj.awjFeV_274qNw9iVvTcSRgdELOSZdvi6Z_vtpqKKvG6seTQgkfPkMHs1XzC2bwLiiXyCg i4pkOOPZVR3oL0XbgH4tu0V0OyoNakOdTfPK6ab9vgeIW1OGdF3aGLFtwxEB41cF0bFNUiCZCbgn ZOCs_VtBVhExvV2_0MsGMALNLgsJR3NphifK8DSXkP.pprQt2fo3WkA0be2vBxeaMb12gyuPckQP hHinFxc.Cp3STw9AIShMT.DozDSj0V4uy6LBUL5xakI5sg1EEzPR8KzbxkSaoKe_nLxTdubIBuRa 24pPWE2r6gJFay7Tn94M9PhdeTDc2kJtSQaHFInGzORWChNbEo4k_8.BIe7WGSL19CqnEmLm1M9d GEtbOFtleZT7NzBMlhbhSwJb5A1.6_obvQnZ_4RXQs_zLaT1LNMQUN9SrZ_YnrLj_yu_CNO9pUpp 0uVLr7HrgSJo2OQ61aafCcn611Tqeo4qsxoKBjSbkmSIdeCWwd8G7AUJysy1Qb_xigNEKpGi3EGI JaB_rRYP8siRqksJNeAO9eE0Kj210oMygbwrflUUu2CTMWVSYko06CVKszPn9oFsDQW8QaeyFFjk VGrltTfkUzLJr5a33oQC2mnSMzR.st.MuRLkLpzUyHSrtjJqCFF3iF7cX44Xnfrmd_3mDHKG4pgj M_GrK92QBu8bxeyGLAcmMPXeJHsGC8yRuOt4dh85b_Hnf0gYfzqQMQxbCF0VUEyjZbp1eD.DkXTI RIFdm._V52b6w0ObBWN37BQStIf80GAwx7esf6OBi0OGGC8Y01..rg_588XMo9DrDr_.S_BX5ZDq 8JoJoLW6ztmveszbpG8gbTeXGa3fNrI6AcIdnF3faZDkHO9cGF1gkLqiOvbphxI4We6fk69ZAU6B z6X5kUSzP.fQJ1w7nyi7iAI4C7lM6q0p2Etmh_MgMQDFdMYBKZUVRG9NZTO1qqj3MEiaVM5DkaCJ 0T88rrAhVbKON9eos13pM4teSo5QnnPE4RNnhgp8mRdHpnDXoEVg8p722X9PILuCwktEA60YgEMf aiMhNK5SCbhPZaLrcyNFj35xl_hlykC6_adzZjpD4pFGPnrZV9nt9avf88ZUAZicJRelaedIs.75 WArilLPTq0Bza3jEwHwMJz_jQSxDiWl11ApS7FA_XAzI0kkkntgJgtvs._FzdPdAmULuTWoQO24r 2CYc_g7_Px7ZoCuR39w6enekQAjMcWtKdJ7iKflbDyMk.JFiJFz1lkHr3GRUCL9F8YG_Qjh2UMot KW8O41WOs408k8kIZ_ggcBbNRGY5oHxDziWlpcmPBH3KG_Hk2d72EBg09kIndnE5LL6L1JgrFWd0 tH9lqn0wucXc3vB8UtD5ls.BNnO_bxEaICCi0SvKFL5HxvUdd3FtipOW8CdWTXJ0LXUIl5RBLzCW L_ddU_ssu2L4iKgSk4rJk5e34LPbQ25JJfI9bN9q21MubIqCQ6yS6EngsHdZAdG1PrA-- X-Sonic-MF: X-Sonic-ID: f16c28b5-9441-4e59-a3c3-f631f74fc428 Received: from sonic.gate.mail.ne1.yahoo.com by sonic309.consmr.mail.ne1.yahoo.com with HTTP; Sat, 12 Aug 2023 08:59:09 +0000 Received: by hermes--production-sg3-69654d8bd-752gm (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 75308761546b4da881a22357a08d1cde; Sat, 12 Aug 2023 08:59:04 +0000 (UTC) From: Po Lu In-Reply-To: <83pm3selde.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 12 Aug 2023 11:05:33 +0300") References: <4b873c29-e8ca-403c-bd37-a531d93661f3@lucaswerkmeister.de> <83fs4tmlik.fsf@gnu.org> <83cyzxmj1g.fsf@gnu.org> <63a54bee-6bfd-70e5-a9b5-a6f650cabd12@cs.ucla.edu> <83ttt7jx1m.fsf@gnu.org> <6755e91e-1318-8ca8-33e4-30d354d95a2f@cs.ucla.edu> <83a5uzjotb.fsf@gnu.org> <83wmy1fn3g.fsf@gnu.org> <83pm3selde.fsf@gnu.org> Date: Sat, 12 Aug 2023 16:58:58 +0800 Message-ID: <874jl4prfx.fsf@yahoo.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Mailer: WebService/1.1.21695 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Content-Length: 303 X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: > WDYT about backporting this (both the doc string and the erasing fix) > to emacs-29? That's not necessary, since `if-regular' doesn't exist on Emacs 29; it's used in Emacs 30 to ``visit'' non-regular files as files. I sincerely apologize for causing this mess.