GNU bug report logs - #78866
[PATCH] (Finsert_file_contents): Refine commit d07af40d8826

Previous Next

Package: emacs;

Reported by: Stefan Monnier <monnier <at> iro.umontreal.ca>

Date: Mon, 23 Jun 2025 02:30:02 UTC

Severity: normal

Tags: patch

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


Message #25 received at 78866-done <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 78866-done <at> debbugs.gnu.org
Subject: Re: bug#78866: [PATCH] (Finsert_file_contents): Refine commit
 d07af40d8826
Date: Fri, 27 Jun 2025 23:14:45 -0400
>> we should additionally check that BEG==BEGV and Z==ZV:
>> 
>>     if (!NILP (visit) && BEG == BEGV && Z == ZV)
>
> To this I agree: the condition means that the previous buffer contents
> is discarded, and likewise its relation to the original file, and the
> buffer will from now on visit the new file, originally having the
> exact contents of that new file.  In that specific case, indeed
> there's no sense in any super-session warnings.

Thanks, pushed.

>> Tho, maybe the `BEG == BEGV && Z == ZV` check should be performed in the
>> above quoted sanity check, because I think using a non-nil VISIT within
>> a narrowed buffer goes against the intention of VISIT.
> I'd be reluctant to make such a change: who knows which package out
> there uses this unintentional feature?

Fair enough, closing,


        Stefan





This bug report was last modified 1 day ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.