From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dan McCarthy Newsgroups: gmane.emacs.bugs Subject: bug#66748: 29.1; Remote files lose their coding system & line ending style Date: Wed, 25 Oct 2023 11:52:34 -0400 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000469a2706088c72ac" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21181"; mail-complaints-to="usenet@ciao.gmane.io" To: 66748@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Oct 25 17:54:00 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 1qvgCk-0005GI-Kp for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 25 Oct 2023 17:53:58 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qvgCO-00078J-Jq; Wed, 25 Oct 2023 11:53:36 -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 1qvgCK-00070x-Sj for bug-gnu-emacs@gnu.org; Wed, 25 Oct 2023 11:53:33 -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 1qvgCK-0002cZ-L9 for bug-gnu-emacs@gnu.org; Wed, 25 Oct 2023 11:53:32 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qvgCo-0003YQ-IC for bug-gnu-emacs@gnu.org; Wed, 25 Oct 2023 11:54:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dan McCarthy Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 25 Oct 2023 15:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 66748 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.169824922213628 (code B ref -1); Wed, 25 Oct 2023 15:54:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 25 Oct 2023 15:53:42 +0000 Original-Received: from localhost ([127.0.0.1]:59822 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qvgCT-0003Xj-J5 for submit@debbugs.gnu.org; Wed, 25 Oct 2023 11:53:42 -0400 Original-Received: from lists.gnu.org ([2001:470:142::17]:51284) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qvgCP-0003XU-3L for submit@debbugs.gnu.org; Wed, 25 Oct 2023 11:53:40 -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 1qvgBp-0006HV-3S for bug-gnu-emacs@gnu.org; Wed, 25 Oct 2023 11:53:01 -0400 Original-Received: from mail-qt1-x834.google.com ([2607:f8b0:4864:20::834]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qvgBb-0002Ya-PY for bug-gnu-emacs@gnu.org; Wed, 25 Oct 2023 11:53:00 -0400 Original-Received: by mail-qt1-x834.google.com with SMTP id d75a77b69052e-41cb9419975so31500541cf.2 for ; Wed, 25 Oct 2023 08:52:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1698249166; x=1698853966; darn=gnu.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=1TGXGDsmIc0pYtJJTf0KBzrNEb72oIXWIR2EFdG3eMc=; b=VO+V+xjQrjwu8gD2srXvGzYiu6lAiC3MGuU0qqXOt/nFokN09PRmy8IIvCcHrM4onl 6na+Znqv4NW8bgoWiP7U/p8RJU9+omrAge8aisSMFWMa0kalLq5+y0oKhNetRSTW/zog UwqrOLFEJ0jvf4gHSvOLPB3OCe8VuzKtBmX5Q2tDN7oL3MaFZTwwWmAhp0O1ZRIBRMiy FH4qUrGFeWFw98t2s1Wflbkrv0zaR58d6z25Pl28KZEnH52UILKXS8EgqD5b1oWFw+Pz xEyn2WVdsdvc6EWGiBR6GweIYXsBjEISz+uSRtsQLH25wkwpgrxcqLwdlrgBjmSL2j6B Vw6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698249166; x=1698853966; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=1TGXGDsmIc0pYtJJTf0KBzrNEb72oIXWIR2EFdG3eMc=; b=LC8eFClE4LJj0wptFK2EIsGTahXmj2dcnNG2cGVg9sn4vRqPvPvKxiwT3t6tGProB7 vJzT4Y/CO5jkuTo4HjkoMAwRG1a1IVGMj1oOcGqTNSnHPDSlg86UpjMvcoaHEjYdvEXH SkujxOsH+9Eb8bLQdwQ7t7VvKo+MN4nLaweldP3Z9qMlxcq4Nu4oLqIU3FPIt6MTdBmY Qz5YQ0HbDCkBrQPs3HMEbzVWm+LlvldUWX7q0gKKbfGlVkaQi4BXsh4bQXbG21tsXzYi XuifJMdJlCIOvSho4PyMdHvBbg5ElZXrsCx8f25I1dn+SjM5UyI2GGrLE4CvtPX9U20g jQwg== X-Gm-Message-State: AOJu0YyunacfFTsRmoFy/oQ96X+1uL8PXce8q2Tm01lD7SkssMilSbfo p9O68ZjO6Um/r50UOaCyQtsscVXyYRb+285pGEjuACuXKco= X-Google-Smtp-Source: AGHT+IE21YeuhroZdLBoDomnk7NneJj9eITLdnn7rK5byaF9o1g1OqlqQd0MXmTYTzQlzdZ2JPklvWPfcmV8NJfSPd8= X-Received: by 2002:a05:622a:5:b0:41c:c27a:2927 with SMTP id x5-20020a05622a000500b0041cc27a2927mr18027324qtw.44.1698249165935; Wed, 25 Oct 2023 08:52:45 -0700 (PDT) Received-SPF: pass client-ip=2607:f8b0:4864:20::834; envelope-from=daniel.c.mccarthy@gmail.com; helo=mail-qt1-x834.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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:273191 Archived-At: --000000000000469a2706088c72ac Content-Type: text/plain; charset="UTF-8" I visited a remote file with DOS line endings over SSH, added a line and saved. The file still has \r\n at every line, but now Emacs reports "Unix-style LF" as the line-ending style; if I add more text and save again, the line endings are converted to \n. Something similar happens with remote files in iso-latin-1. After saving, they're converted to utf-8-unix. I noticed this in `git diff`: it reported changes in some non-ASCII text that I hadn't touched, which was surprising. Neither problem occurs with local files. In GNU Emacs 29.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.31, cairo version 1.16.0) of 2023-07-31 built on october.example.org Windowing system distributor 'The X.Org Foundation', version 11.0.12014000 System Description: Slackware 15.0 x86_64 Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG JSON LCMS2 LIBXML2 MODULES NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS WEBP X11 XDBE XIM XINPUT2 XPM GTK3 ZLIB Important settings: value of $LC_COLLATE: C value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Text Minor modes in effect: shell-dirtrack-mode: t tooltip-mode: t global-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 epa derived epg rfc6068 epg-config gnus-util text-property-search mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils mule-diag help-mode vc-hg vc-git diff-mode easy-mmode vc-bzr vc-dispatcher tramp-cache time-stamp tramp-sh tramp tramp-loaddefs trampver tramp-integration files-x tramp-compat rx shell pcomplete comint ansi-osc ansi-color ring parse-time iso8601 format-spec auth-source cl-seq eieio eieio-core cl-macs password-cache json map byte-opt gv bytecomp byte-compile time-date subr-x cl-loaddefs cl-lib rmc iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd 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 dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting cairo move-toolbar gtk x-toolkit xinput2 x multi-tty make-network-process emacs) Memory information: ((conses 16 79231 16886) (symbols 48 9277 0) (strings 32 29361 2228) (string-bytes 1 924723) (vectors 16 23951) (vector-slots 8 1006726 172152) (floats 8 46 49) (intervals 56 356 0) (buffers 976 14)) --000000000000469a2706088c72ac Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I visited a remote file with DOS line endings over SSH, ad= ded a line and
saved. The file still has \r\n at every line, but now Ema= cs reports
"Unix-style LF" as the line-ending style; if I add = more text and save
again, the line endings are converted to \n.

S= omething similar happens with remote files in iso-latin-1. After
sa= ving, they're converted to utf-8-unix. I noticed this in `git diff`: it= reported changes in some non-ASCII text that I hadn't touched, which w= as surprising.

Neither problem occurs with local f= iles.

In GNU Emacs 29.1 (build 1, x86_64-pc-linux-gnu, GTK+ Ve= rsion 3.24.31,
=C2=A0cairo version 1.16.0) of 2023-07-31 built on october.example.org
Windowing syste= m distributor 'The X.Org Foundation', version 11.0.12014000
Syst= em Description: Slackware 15.0 x86_64

Configured features:
ACL CA= IRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
JSON L= CMS2 LIBXML2 MODULES NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND
SQLIT= E3 THREADS TIFF TOOLKIT_SCROLL_BARS WEBP X11 XDBE XIM XINPUT2 XPM
GTK3 Z= LIB

Important settings:
=C2=A0 value of $LC_COLLATE: C
=C2=A0 = value of $LANG: en_US.UTF-8
=C2=A0 locale-coding-system: utf-8-unix
<= br>Major mode: Text

Minor modes in effect:
=C2=A0 shell-dirtrack-= mode: t
=C2=A0 tooltip-mode: t
=C2=A0 global-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 fil= e-name-shadow-mode: t
=C2=A0 global-font-lock-mode: t
=C2=A0 font-loc= k-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-compre= ssion-mode: t

Load-path shadows:
None found.

Features:
= (shadow sort mail-extr emacsbug message mailcap yank-media puny dired
di= red-loaddefs rfc822 mml mml-sec epa derived epg rfc6068 epg-config
gnus-= util text-property-search mm-decode mm-bodies mm-encode mail-parse
rfc22= 31 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045
ietf-drums m= m-util mail-prsvr mail-utils mule-diag help-mode vc-hg
vc-git diff-mode = easy-mmode vc-bzr vc-dispatcher tramp-cache time-stamp
tramp-sh tramp tr= amp-loaddefs trampver tramp-integration files-x
tramp-compat rx shell pc= omplete comint ansi-osc ansi-color ring
parse-time iso8601 format-spec a= uth-source cl-seq eieio eieio-core
cl-macs password-cache json map byte-= opt gv bytecomp byte-compile
time-date subr-x cl-loaddefs cl-lib rmc iso= -transl tooltip cconv eldoc
paren electric uniquify ediff-hook vc-hooks = lisp-float-type elisp-mode
mwheel term/x-win x-win term/common-win x-dnd= tool-bar dnd fontset image
regexp-opt fringe tabulated-list replace new= comment text-mode lisp-mode
prog-mode register page tab-bar menu-bar rfn= -eshadow isearch easymenu
timer select scroll-bar mouse jit-lock font-lo= ck syntax font-core
term/tty-colors frame minibuffer nadvice seq simple = cl-generic
indonesian philippine cham georgian utf-8-lang misc-lang viet= namese
tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew= greek
romanian slovak czech european ethiopic indian cyrillic chinesecomposite emoji-zwj charscript charprop case-table epa-hook
jka-cmpr-h= ook help abbrev obarray oclosure cl-preloaded button loaddefs
theme-load= defs faces cus-face macroexp files window text-properties
overlay sha1 m= d5 base64 format env code-pages mule custom widget keymap
hashtable-prin= t-readable backquote threads dbusbind inotify lcms2
dynamic-setting syst= em-font-setting font-render-setting cairo
move-toolbar gtk x-toolkit xin= put2 x multi-tty make-network-process
emacs)

Memory information:<= br>((conses 16 79231 16886)
=C2=A0(symbols 48 9277 0)
=C2=A0(strings = 32 29361 2228)
=C2=A0(string-bytes 1 924723)
=C2=A0(vectors 16 23951)=
=C2=A0(vector-slots 8 1006726 172152)
=C2=A0(floats 8 46 49)
=C2= =A0(intervals 56 356 0)
=C2=A0(buffers 976 14))
--000000000000469a2706088c72ac--