all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Paul Eggert <eggert@cs.ucla.edu>
To: Eli Zaretskii <eliz@gnu.org>
Cc: larsi@gnus.org, 65156@debbugs.gnu.org, mail@lucaswerkmeister.de
Subject: bug#65156: 29.1; Reading from pipe with --insert or insert-file-contents no longer supported
Date: Fri, 11 Aug 2023 10:18:16 -0700	[thread overview]
Message-ID: <fefa2d1a-0a91-7c35-ec12-f07010b9811d@cs.ucla.edu> (raw)
In-Reply-To: <83a5uzjotb.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 606 bytes --]

On 2023-08-10 01:15, Eli Zaretskii wrote:
> 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.

It does more than that, no? If REPLACE is 'if-regular' and the file is 
not a regular file, the function replaces the entire buffer not the 
accessible region.

How about something like the attached instead?


[-- Attachment #2: insert-doc.patch --]
[-- Type: text/x-patch, Size: 872 bytes --]

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 function does code conversion according to the value of
 `coding-system-for-read' or `file-coding-system-alist', and sets the

  reply	other threads:[~2023-08-11 17:18 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-08 18:20 bug#65156: 29.1; Reading from pipe with --insert or insert-file-contents no longer supported Lucas Werkmeister
2023-08-08 18:33 ` Eli Zaretskii
2023-08-08 19:27   ` Eli Zaretskii
2023-08-09  2:47     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-08-09 11:31       ` Eli Zaretskii
2023-08-09 20:57     ` Paul Eggert
2023-08-10  5:17       ` Eli Zaretskii
2023-08-10  6:08         ` Paul Eggert
2023-08-10  8:15           ` Eli Zaretskii
2023-08-11 17:18             ` Paul Eggert [this message]
2023-08-11 18:30               ` Eli Zaretskii
2023-08-11 21:45                 ` Paul Eggert
2023-08-12  8:05                   ` Eli Zaretskii
2023-08-12  8:58                     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-08-09  8:07 ` Mattias Engdegård
2023-08-09  8:15   ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-08-09  8:29     ` Mattias Engdegård
2023-08-09 12:00       ` Eli Zaretskii
2023-08-09 12:03         ` Mattias Engdegård

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fefa2d1a-0a91-7c35-ec12-f07010b9811d@cs.ucla.edu \
    --to=eggert@cs.ucla.edu \
    --cc=65156@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=larsi@gnus.org \
    --cc=mail@lucaswerkmeister.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.