From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#65156: 29.1; Reading from pipe with --insert or insert-file-contents no longer supported Date: Thu, 10 Aug 2023 11:15:28 +0300 Message-ID: <83a5uzjotb.fsf@gnu.org> 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 Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16832"; mail-complaints-to="usenet@ciao.gmane.io" Cc: larsi@gnus.org, 65156@debbugs.gnu.org, mail@lucaswerkmeister.de To: Paul Eggert Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Aug 10 10:16:13 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qU0q4-0004Cv-KT for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 10 Aug 2023 10:16:12 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qU0pw-0004p8-OU; Thu, 10 Aug 2023 04:16:06 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qU0pu-0004ow-Uj for bug-gnu-emacs@gnu.org; Thu, 10 Aug 2023 04:16:03 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qU0pu-0002qz-Mi for bug-gnu-emacs@gnu.org; Thu, 10 Aug 2023 04:16:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qU0pu-0004X3-Ij for bug-gnu-emacs@gnu.org; Thu, 10 Aug 2023 04:16:02 -0400 X-Loop: help-debbugs@gnu.org 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 Original-Received: via spool by 65156-submit@debbugs.gnu.org id=B65156.169165531417355 (code B ref 65156); Thu, 10 Aug 2023 08:16:02 +0000 Original-Received: (at 65156) by debbugs.gnu.org; 10 Aug 2023 08:15:14 +0000 Original-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 Original-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 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 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==; In-Reply-To: <6755e91e-1318-8ca8-33e4-30d354d95a2f@cs.ucla.edu> (message from Paul Eggert on Wed, 9 Aug 2023 23:08:49 -0700) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:267101 Archived-At: > 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 ;-).