From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: miranda kastemaa Newsgroups: gmane.emacs.bugs Subject: bug#64164: 29.0.92; buffer-file-coding-system changes unexpectedly after saving Date: Mon, 19 Jun 2023 23:46:37 +0300 Message-ID: References: <83wmzz75np.fsf@gnu.org> Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.21\)) Content-Type: multipart/alternative; boundary="Apple-Mail=_95A8748F-30BD-4275-B9EC-94DE6348E746" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3170"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 64164@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jun 20 07:23:04 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 1qBTpX-0000Wn-Pl for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 20 Jun 2023 07:23:04 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qBTmf-000759-53; Tue, 20 Jun 2023 01:20:05 -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 1qBTmd-00073A-6g for bug-gnu-emacs@gnu.org; Tue, 20 Jun 2023 01:20:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qBTmc-0004mA-Rv for bug-gnu-emacs@gnu.org; Tue, 20 Jun 2023 01:20:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qBTmc-0000yz-Dp for bug-gnu-emacs@gnu.org; Tue, 20 Jun 2023 01:20:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: miranda kastemaa Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 20 Jun 2023 05:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64164 X-GNU-PR-Package: emacs Original-Received: via spool by 64164-submit@debbugs.gnu.org id=B64164.16872383933730 (code B ref 64164); Tue, 20 Jun 2023 05:20:02 +0000 Original-Received: (at 64164) by debbugs.gnu.org; 20 Jun 2023 05:19:53 +0000 Original-Received: from localhost ([127.0.0.1]:57745 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qBTmR-0000y4-NR for submit@debbugs.gnu.org; Tue, 20 Jun 2023 01:19:53 -0400 Original-Received: from bumble.maple.relay.mailchannels.net ([23.83.214.25]:27574) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qBLlt-0003Nk-KE for 64164@debbugs.gnu.org; Mon, 19 Jun 2023 16:46:47 -0400 X-Sender-Id: dreamhost|x-authsender|miranda@pulusound.fi Original-Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 0178964203C; Mon, 19 Jun 2023 20:46:44 +0000 (UTC) Original-Received: from pdx1-sub0-mail-a224.dreamhost.com (unknown [127.0.0.6]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 3A8A06420DD; Mon, 19 Jun 2023 20:46:41 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1687207601; a=rsa-sha256; cv=none; b=o+U8dMqABDKiDqX6B1ajQR5/uWZ1EkAB9Tqprw52+SVVlrlRXFbTGXslPPqvCiFnLgeF8h r5ooIT7awM6kVNKC/0moN9QJDdgd0nuwrNCswHWwNd92XCn7IxXbMaGXOETKzsMYIa33P7 jb+CnJXfSvOVoH2r9NdztslbQY/VbrjFbS7+5Y9GWBr7Krv/t+rW7CogNDEJkNR2l/tTyf ST1J9kZKDBX9CVQ19eUwGlROgjkD0IITuF7Rm8jKddgdMyK0SAI2QUauGY8JeJLL9pnsLA NYcGcObiz+3GQa80sTLN/FVAb6V+0uxXeKLp3UE99dUrDxvL37AV+5FagUCeXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1687207601; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references:dkim-signature; bh=2AR9y/JMPxugEx88qPmCEukfs2usfm/8V121fbYwCis=; b=LCQo+trqxaDDdnCAeH8nkXFXtwgCQ5/e7tc7hPVbtYxLvXbHJh1ngsTsbVa7KbDbZFROm6 oh+kyOtpYaVwK4LmTCfSifqolg5xAhOsshRUg2BB68r95xONnO2Ppf5OevORinhKdfld+8 CETYKu6RXrbnEOF9xiffwnyNNxwjY2WMgB+zRzj8V0LV4Z58d9f2tCFWmoxL2PfSfNyhmq xkfCPrOZZhVeVbFiAaXyyrsa6biKYfDm878G1PxhcRxJUdf7M2HwZ8DKT4A8YlzlkHiO75 B/A8Ea55BikQSzuOUcuBKUlDgiCF6Y4FLxzXN4feEX+rLhr+p8wDfx3wcIQ7Iw== ARC-Authentication-Results: i=1; rspamd-9fcc56855-wlvtx; auth=pass smtp.auth=dreamhost smtp.mailfrom=miranda@pulusound.fi X-Sender-Id: dreamhost|x-authsender|miranda@pulusound.fi X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|miranda@pulusound.fi X-MailChannels-Auth-Id: dreamhost X-Befitting-Hysterical: 66ba67594bacdbb2_1687207603487_3191460960 X-MC-Loop-Signature: 1687207603487:324132200 X-MC-Ingress-Time: 1687207603486 Original-Received: from pdx1-sub0-mail-a224.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.120.163.52 (trex/6.9.1); Mon, 19 Jun 2023 20:46:43 +0000 Original-Received: from 82-181-28-45.bb.dnainternet.fi (82-181-28-45.bb.dnainternet.fi [82.181.28.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: miranda@pulusound.fi) by pdx1-sub0-mail-a224.dreamhost.com (Postfix) with ESMTPSA id 4QlMJ01tjlz5k; Mon, 19 Jun 2023 13:46:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pulusound.fi; s=dreamhost; t=1687207601; bh=2AR9y/JMPxugEx88qPmCEukfs2usfm/8V121fbYwCis=; h=From:Content-Type:Subject:Date:Cc:To; b=Jq9RVy6feAKKNG0UJFAHmi4nWK9Yo6RGGSNn3x31XLR8iBe+HNZGEeS0aKRVlJzIm ow4bzt8gUvICQQgc6q1b2epiN3/Kg5XWs865JFCuWuz/kBJW4tNzBbtmjN5KZrZ2nB fjSU1quuMcVFCR/uXcuhSiEzcYSW65FvZkEFiJBa+biUP4AtQNdpmNpd9Em87bXqGC K/vtYBIjYmA4AoTBPqRMysC3GJde64tPWaxka6OiIHsnDj0pC97bvyWr9uKLB+dA79 sobP0p3TVeIynNjljcMAaPhhqpXW+nHTNLyy6FAur25Nc/qDGUC1seK3fEdBnn6h8W 69hlkE98lOuYw== In-Reply-To: <83wmzz75np.fsf@gnu.org> X-Mailer: Apple Mail (2.3445.104.21) X-Mailman-Approved-At: Tue, 20 Jun 2023 01:19:50 -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:263732 Archived-At: --Apple-Mail=_95A8748F-30BD-4275-B9EC-94DE6348E746 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 >=20 > On 19 Jun 2023, at 19.55, Eli Zaretskii wrote: >=20 >> Date: Mon, 19 Jun 2023 12:57:39 +0300 >> From: miranda@pulusound.fi >>=20 >> i am trying to edit remote files on another macOS system, using = Tramp's=20 >> ssh: method. i am running `emacs -Q`. >>=20 >> when i open any file on this remote system, the initial value of=20 >> `buffer-file-coding-system` is what i would expect, i.e. = undecided-unix=20 >> or utf-8-unix, depending on whether the file contains non-ASCII=20 >> characters. >>=20 >> however, after saving the file, `buffer-file-coding-system` suddenly=20= >> changes to utf-8-hfs-mac. any subsequent save then changes all the = line=20 >> endings to CR, which i have not actively used since 2001 or so... :-) >>=20 >> i can use `set-buffer-file-coding-system` to set utf-8-unix, but the=20= >> problem then occurs again after the next save. other remotes (Linux=20= >> systems) do not exhibit the issue. >>=20 >> Emacs 28.2 works as expected. >=20 > Does this happen only with editing remote files via Tramp, or does it > also happen when you edit local files on macOS? only via Tramp. > If it only happens with Tramp, is it possible for you to login to that > other system and edit files there locally, in case this is triggered > by something specific to that system? yes, i have just now tested the same build on the system in question. = with local files, the issue does not occur. but if i use Tramp/ssh: to = localhost, or to a third mac, i once again get the unexpected line = ending change after saving. on this system too, 28.2 works as expected. >> i am using the build from https://emacsformacosx.com/builds = >=20 > I don't know what that is. Are you sure this uses the official > sources from the emacs-29.0.92 tarball? i have not inspected the build process myself, but at = https://emacsformacosx.com/about , the = author writes: > The scripts I run basically just configure and build right from the = GNU source=E2=80=94I don't add any patches or any extraneous lisp = packages. I do include the old Carbon icon on the disk image because I = like it better than the new Cocoa icon but it is not enabled by default. >=20 > Emacs is built on various versions of Mac OS X: 10.10 and 10.14 as of = 2020-05-12 (64 bit only). All the binaries are combined into a single = executable and a small Rust launcher chooses which binary to run based = on the machine's OS and architecture. >=20 > Why not just use a fat binary? Because fat binaries can only hold 1 of = each architecture and Emacs has multiple x86_64 architectures binaries. >=20 > Why are there multiple x86_64 binaries? Even though recent versions of = Emacs contain runtime feature detection, there is an issue with some = library dependencies. best, miranda= --Apple-Mail=_95A8748F-30BD-4275-B9EC-94DE6348E746 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8

On 19 Jun 2023, at 19.55, Eli Zaretskii <eliz@gnu.org> = wrote:

Date: = Mon, 19 Jun 2023 12:57:39 +0300
From: miranda@pulusound.fi

i am = trying to edit remote files on another macOS system, using Tramp's 
ssh: method. = i am running `emacs -Q`.

when i open any = file on this remote system, the initial value of 
`buffer-file-coding-system` is what i would expect, i.e. = undecided-unix 
or utf-8-unix, depending on whether the file contains = non-ASCII 
characters.

however, after = saving the file, `buffer-file-coding-system` suddenly 
changes to = utf-8-hfs-mac. any subsequent save then changes all the line 
endings to = CR, which i have not actively used since 2001 or so... :-)

i can use `set-buffer-file-coding-system` to = set utf-8-unix, but the 
problem then = occurs again after the next save. other remotes (Linux 
systems) do = not exhibit the issue.

Emacs 28.2 works as = expected.

Does this happen only with editing remote files via Tramp, or = does it
also happen = when you edit local files on macOS?

only via Tramp.

If it only happens with Tramp, is it possible for you to = login to that
other system = and edit files there locally, in case this is triggered
by something specific to that = system?

yes, = i have just now tested the same build on the system in question. with = local files, the issue does not occur. but if i use Tramp/ssh: to = localhost, or to a third mac, i once again get the unexpected line = ending change after saving.

on this = system too, 28.2 works as expected.

i am using the build from https://emacsformacosx.com/builds

I don't know what that is.  Are you sure this uses the = official
sources from = the emacs-29.0.92 tarball?

i have not inspected the build process = myself, but at https://emacsformacosx.com/about, the author = writes:

The = scripts I run basically just configure and build right from the GNU = source=E2=80=94I don't add any patches or any extraneous lisp packages. = I do include the old Carbon icon on the disk image because I like it = better than the new Cocoa icon but it is not enabled by = default.

Emacs = is built on various versions of Mac OS X: 10.10 and 10.14 as of = 2020-05-12 (64 bit only). All the binaries are combined into a single = executable and a small Rust launcher chooses which binary to run based = on the machine's OS and architecture.

Why not just use a fat binary? Because = fat binaries can only hold 1 of each architecture and Emacs has multiple = x86_64 architectures binaries.

Why are there multiple x86_64 binaries? = Even though recent versions of Emacs contain runtime feature detection, = there is an issue with some library dependencies.

best,
miranda
= --Apple-Mail=_95A8748F-30BD-4275-B9EC-94DE6348E746--