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: Fri, 11 Aug 2023 21:30:43 +0300 Message-ID: <83wmy1fn3g.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> <83a5uzjotb.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25996"; 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 Fri Aug 11 20:31:19 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 1qUWur-0006XV-JX for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 11 Aug 2023 20:31:17 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qUWue-00060e-GG; Fri, 11 Aug 2023 14:31:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qUWud-0005uo-32 for bug-gnu-emacs@gnu.org; Fri, 11 Aug 2023 14:31: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 1qUWuc-0004yv-QD for bug-gnu-emacs@gnu.org; Fri, 11 Aug 2023 14:31:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qUWuc-0007Hv-Gj for bug-gnu-emacs@gnu.org; Fri, 11 Aug 2023 14:31: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: 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 Original-Received: via spool by 65156-submit@debbugs.gnu.org id=B65156.169177863627951 (code B ref 65156); Fri, 11 Aug 2023 18:31:02 +0000 Original-Received: (at 65156) by debbugs.gnu.org; 11 Aug 2023 18:30:36 +0000 Original-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 Original-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 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 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==; In-Reply-To: (message from Paul Eggert on Fri, 11 Aug 2023 10:18:16 -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:267227 Archived-At: > 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.