From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andrew Scott Newsgroups: gmane.emacs.bugs Subject: bug#65609: 30.0.50; inhibit-eol-conversion breaks revert-buffer Date: Tue, 29 Aug 2023 16:45:39 +0100 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000009624bd060411b440" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32955"; mail-complaints-to="usenet@ciao.gmane.io" To: 65609@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Aug 30 09:19:16 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 1qbFTv-0008MT-Po for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 30 Aug 2023 09:19:15 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qbFTe-0006Lh-NB; Wed, 30 Aug 2023 03:18:58 -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 1qbFTb-0006IQ-Em for bug-gnu-emacs@gnu.org; Wed, 30 Aug 2023 03:18:55 -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 1qbFTb-0006xQ-6b for bug-gnu-emacs@gnu.org; Wed, 30 Aug 2023 03:18:55 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qbFTi-00070i-I3 for bug-gnu-emacs@gnu.org; Wed, 30 Aug 2023 03:19:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Andrew Scott Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 30 Aug 2023 07:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 65609 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.169337992026872 (code B ref -1); Wed, 30 Aug 2023 07:19:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 30 Aug 2023 07:18:40 +0000 Original-Received: from localhost ([127.0.0.1]:52015 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qbFTL-0006zK-58 for submit@debbugs.gnu.org; Wed, 30 Aug 2023 03:18:40 -0400 Original-Received: from lists.gnu.org ([2001:470:142::17]:57788) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qb0vJ-00034g-6d for submit@debbugs.gnu.org; Tue, 29 Aug 2023 11:46:35 -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 1qb0ut-0006mh-9X for bug-gnu-emacs@gnu.org; Tue, 29 Aug 2023 11:46:15 -0400 Original-Received: from mail-yb1-xb30.google.com ([2607:f8b0:4864:20::b30]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qb0uh-0004aH-FT for bug-gnu-emacs@gnu.org; Tue, 29 Aug 2023 11:46:01 -0400 Original-Received: by mail-yb1-xb30.google.com with SMTP id 3f1490d57ef6-d7766072ba4so7452990276.1 for ; Tue, 29 Aug 2023 08:45:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693323951; x=1693928751; darn=gnu.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=sy7NKuS4tbOX+1DhUrZhrpInHjxMKEDwrcJ1jkkBjHo=; b=Y4gChaJOE+2lCyDXTVcMw+dSxFRrPaDnlUGK4cnOKC4YXzzeLaJrtNhe0MklfvWlrd 8xqzXzzWhIaTOvfXq1eVFVi5F23iYzgGaMLK8zHZonxMtmGsndZkpCpNucun2B2wnZLK TQ6+RdgJfOu1HlEuGGvM7CcJZYJQnNNLLGW0AcDVDsPSmMtzbqMmV6IFMa/TauI591uC JRWi+Hi2cyyqY6T9ShrJQAkPqlxoPnnPnvoPHUyo2e4nEbSEJAJAYOnm7jdjQl0WC7Be 0eZ2igXfwd3CSUvLlWeBisbVTfJkWQ23IXVvnEJiYWLcHmVqniGpQ89ew0irmFZiV92o jpzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693323951; x=1693928751; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=sy7NKuS4tbOX+1DhUrZhrpInHjxMKEDwrcJ1jkkBjHo=; b=jWeEAovuKBdYmHY/ok3D4f4boppALE1iWXUMv5iHA0W5rZ6RTRK7pp/H2gyM9M/9K3 0yF9c5azYk5q53bMypN0nDKi/Pp5iyYyVdVbUy+6Gc+13A2HSAd0buYXUjJceXfFSy70 xJmyeijvWdnBehFm+BrT4pGeNsdRHFJUi0V5Ps6/J5zJIS6MU4sltGNQJWeh++u5dlra FiEDr6MRtMLr4vENa7I5ievIe2qjPXKqFrXXSrEBhJVzKQjJTiGxVEo8SBRdmBh24kdM q7k1pwZNmWDtzOQFrnsgO6RVW2ztby3GI1SR9Uf/z3FyR8iMNLAY3HIAhsBXI1k51bNp n5nQ== X-Gm-Message-State: AOJu0YzOIzXNh4udoExj87IlTQQfQq214cLiHvCgWDMsHj1RPHc81i0b w9X2AL+cZnkx3UD1rkg/7LGmc70oqFcR5437to8hM18t3aJddg== X-Google-Smtp-Source: AGHT+IE1uDJ+/rS5TreKN4gTEGvm7Xwln87TKsuCaeiO/XgEvRNzNVLi6J1fwIEbYPUDXCBm3KHmsCuLG8V8jGCplAs= X-Received: by 2002:a25:d38c:0:b0:d7a:b6b9:73d8 with SMTP id e134-20020a25d38c000000b00d7ab6b973d8mr3802124ybf.20.1693323950956; Tue, 29 Aug 2023 08:45:50 -0700 (PDT) Received-SPF: pass client-ip=2607:f8b0:4864:20::b30; envelope-from=andj.scott@gmail.com; helo=mail-yb1-xb30.google.com 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, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Wed, 30 Aug 2023 03:18:37 -0400 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:268690 Archived-At: --0000000000009624bd060411b440 Content-Type: text/plain; charset="UTF-8" It appears that inhibit-eol-conversion breaks insert-file-contents's replace functionality when a change was made in the middle of the file to be reverted as the file contents get duplicated in the buffer. The issue can be reproduced on a fresh Emacs with a file named bug.el with contents: ;; 1. Launch Emacs: nix run emacs-overlay#emacs-git -- bug.el -Q --load bug.el ;; 2. Outside of Emacs, add text in below empty line: ;; 3. In Emacs, revert-buffer (setq inhibit-eol-conversion t) The contents of the buffer after revert-buffer: ;; 1. Launch Emacs: nix run emacs-overlay#emacs-git -- bug.el -Q --load bug.el ;; 2. Outside of Emacs, add text in below empty line: ;; 3. In Emacs, revert-buffer foo (setq inhibit-eol-conversion t) (setq inhibit-eol-conversion t) I couldn't reproduce this on Emacs 28.2 (nixpkgs#emacs) or 29.1 (emacs-overlay#emacs-unstable). In GNU Emacs 30.0.50 (build 1, aarch64-apple-darwin22.6.0, NS appkit-2299.70 Version 13.5.1 (Build 22G90)) Repository revision: 09351df10a1041d58c7236484f96d6999bfe9cb0 Repository branch: master Windowing system distributor 'Apple', version 10.3.2299 System Description: macOS 13.5.1 Configured using: 'configure --prefix=/nix/store/37hr4bsvv94zlh8abxs2bylxn2dj0fix-emacs-git-20230826.0 --disable-build-details --with-modules --disable-ns-self-contained --with-ns --with-native-compilation --with-tree-sitter' Configured features: ACL GLIB GMP GNUTLS JPEG JSON LIBXML2 MODULES NATIVE_COMP NOTIFY KQUEUE NS PDUMPER PNG RSVG SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP ZLIB Important settings: value of $EMACSNATIVELOADPATH: /Users/a/.cache/emacs/eln-cache value of $LC_COLLATE: C value of $LANG: en_GB.UTF-8 locale-coding-system: utf-8-unix Major mode: ELisp/d Minor modes in effect: 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 line-number-mode: t indent-tabs-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 mailcap yank-media puny dired dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg rfc6068 epg-config gnus-util 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 compile text-property-search comint ansi-osc ansi-color ring comp comp-cstr warnings icons subr-x rx cl-seq cl-macs gv cl-extra help-mode bytecomp byte-compile vc-git diff-mode easy-mmode vc-dispatcher cl-loaddefs cl-lib rmc iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/ns-win ns-win ucs-normalize mule-util term/common-win touch-screen 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 kqueue cocoa ns multi-tty make-network-process native-compile emacs) Memory information: ((conses 16 153137 16869) (symbols 48 8291 0) (strings 32 26303 2093) (string-bytes 1 843959) (vectors 16 18856) (vector-slots 8 366824 13619) (floats 8 29 52) (intervals 56 16278 0) (buffers 992 15)) --0000000000009624bd060411b440 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
It appears that inhibit-eol-conversion breaks insert-file-= contents's
replace functionality when a change was made in the middl= e of the file
to be reverted as the file contents get duplicated in the = buffer. The
issue can be reproduced on a fresh Emacs with a file named b= ug.el with
contents:

=C2=A0 =C2=A0 ;; 1. Launch Emacs: nix run em= acs-overlay#emacs-git -- bug.el -Q --load bug.el
=C2=A0 =C2=A0 ;; 2. Out= side of Emacs, add text in below empty line:
=C2=A0 =C2=A0 ;; 3. In Emac= s, revert-buffer

=C2=A0 =C2=A0 (setq inhibit-eol-conversion t)
The contents of the buffer after revert-buffer:

=C2=A0 =C2=A0 ;; 1= . Launch Emacs: nix run emacs-overlay#emacs-git -- bug.el -Q --load bug.el<= br>=C2=A0 =C2=A0 ;; 2. Outside of Emacs, add text in below empty line:
= =C2=A0 =C2=A0 ;; 3. In Emacs, revert-buffer
=C2=A0 =C2=A0 foo
=C2=A0 = =C2=A0 (setq inhibit-eol-conversion t)

=C2=A0 =C2=A0 (setq inhibit-e= ol-conversion t)

I couldn't reproduce this on Emacs 28.2 (nixpkg= s#emacs) or 29.1
(emacs-overlay#emacs-unstable).

In GNU Emacs 30.= 0.50 (build 1, aarch64-apple-darwin22.6.0, NS
appkit-2299.70 Version 13.= 5.1 (Build 22G90))
Repository revision: 09351df10a1041d58c7236484f96d699= 9bfe9cb0
Repository branch: master
Windowing system distributor '= Apple', version 10.3.2299
System Description: =C2=A0macOS 13.5.1
=
Configured using:
=C2=A0'configure
=C2=A0--prefix=3D/nix/stor= e/37hr4bsvv94zlh8abxs2bylxn2dj0fix-emacs-git-20230826.0
=C2=A0--disable-= build-details --with-modules --disable-ns-self-contained
=C2=A0--with-ns= --with-native-compilation --with-tree-sitter'

Configured featur= es:
ACL GLIB GMP GNUTLS JPEG JSON LIBXML2 MODULES NATIVE_COMP NOTIFY KQU= EUE
NS PDUMPER PNG RSVG SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SI= TTER
WEBP ZLIB

Important settings:
=C2=A0 value of $EMACSNATIV= ELOADPATH: /Users/a/.cache/emacs/eln-cache
=C2=A0 value of $LC_COLLATE: = C
=C2=A0 value of $LANG: en_GB.UTF-8
=C2=A0 locale-coding-system: utf= -8-unix

Major mode: ELisp/d

Minor modes in effect:
=C2=A0 = tooltip-mode: t
=C2=A0 global-eldoc-mode: t
=C2=A0 eldoc-mode: t
= =C2=A0 show-paren-mode: t
=C2=A0 electric-indent-mode: t
=C2=A0 mouse= -wheel-mode: t
=C2=A0 tool-bar-mode: t
=C2=A0 menu-bar-mode: t
=C2= =A0 file-name-shadow-mode: t
=C2=A0 global-font-lock-mode: t
=C2=A0 f= ont-lock-mode: t
=C2=A0 blink-cursor-mode: t
=C2=A0 line-number-mode:= t
=C2=A0 indent-tabs-mode: t
=C2=A0 transient-mark-mode: t
=C2=A0= auto-composition-mode: t
=C2=A0 auto-encryption-mode: t
=C2=A0 auto-= compression-mode: t

Load-path shadows:
None found.

Feature= s:
(shadow sort mail-extr emacsbug message mailcap yank-media puny dired=
dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg rfc606= 8
epg-config gnus-util time-date mm-decode mm-bodies mm-encode mail-pars= e
rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045
ie= tf-drums mm-util mail-prsvr mail-utils compile text-property-search
comi= nt ansi-osc ansi-color ring comp comp-cstr warnings icons subr-x rx
cl-s= eq cl-macs gv cl-extra help-mode bytecomp byte-compile vc-git
diff-mode = easy-mmode vc-dispatcher cl-loaddefs cl-lib rmc iso-transl
tooltip cconv= eldoc paren electric uniquify ediff-hook vc-hooks
lisp-float-type elisp= -mode mwheel term/ns-win ns-win ucs-normalize
mule-util term/common-win = touch-screen 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 mi= sc-lang vietnamese
tibetan thai tai-viet lao korean japanese eucjp-ms cp= 51932 hebrew greek
romanian slovak czech european ethiopic indian cyrill= ic chinese
composite emoji-zwj charscript charprop case-table epa-hookjka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefstheme-loaddefs faces cus-face macroexp files window text-properties
ov= erlay sha1 md5 base64 format env code-pages mule custom widget keymap
ha= shtable-print-readable backquote threads kqueue cocoa ns multi-tty
make-= network-process native-compile emacs)

Memory information:
((conse= s 16 153137 16869) (symbols 48 8291 0) (strings 32 26303 2093)
=C2=A0(st= ring-bytes 1 843959) (vectors 16 18856)
=C2=A0(vector-slots 8 366824 136= 19) (floats 8 29 52) (intervals 56 16278 0)
=C2=A0(buffers 992 15)) --0000000000009624bd060411b440--