From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#66255: 29.1; package-generate-autoloads utf-8-emacs-unix coding and git on windows breaks Date: Fri, 29 Sep 2023 17:50:10 +0300 Message-ID: <83fs2xyqxp.fsf@gnu.org> References: <915FB26A-E539-4CAD-8CD3-30366938EB40@gmx.net> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21335"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 66255@debbugs.gnu.org To: Robert Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Sep 29 16:52:36 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 1qmEr6-0005DE-Cx for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 29 Sep 2023 16:52:36 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qmEql-0005Yg-W0; Fri, 29 Sep 2023 10:52:16 -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 1qmEqk-0005Y1-Dd for bug-gnu-emacs@gnu.org; Fri, 29 Sep 2023 10:52:14 -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 1qmEqK-0004Z2-4T for bug-gnu-emacs@gnu.org; Fri, 29 Sep 2023 10:52:14 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qmEqX-0000fI-RQ for bug-gnu-emacs@gnu.org; Fri, 29 Sep 2023 10:52:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 29 Sep 2023 14:52:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66255 X-GNU-PR-Package: emacs Original-Received: via spool by 66255-submit@debbugs.gnu.org id=B66255.16959990622466 (code B ref 66255); Fri, 29 Sep 2023 14:52:01 +0000 Original-Received: (at 66255) by debbugs.gnu.org; 29 Sep 2023 14:51:02 +0000 Original-Received: from localhost ([127.0.0.1]:56889 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qmEpU-0000dK-Hl for submit@debbugs.gnu.org; Fri, 29 Sep 2023 10:51:01 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46970) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qmEpQ-0000cz-CH; Fri, 29 Sep 2023 10:50:54 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qmEp3-0004P0-2J; Fri, 29 Sep 2023 10:50:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=MUGpkAjnYP9guJxzEZeNJ1TrUvgG8zOBN+UUs8QSYHU=; b=f+j20vbIPIUA NMik9PkDRfP5yg09A+BBMd/oRuAPjCQvD3ypNG4tGmzNynZIK1uHU8PONXq7YQn3mKq8YqW8qE4DF kc6wuoYnXVPu6AV3owG4Cm/5WnRQSW3zDxEkAK4CPDQrpmFST6LaFu4nuWZw6UTYcfkWg7oLaLInI h74NYezaqrYyO9l8FXIA9la2rPilTNkB6DhzS9tiRDyuYutd/sEIi0Gws+oJQOsW15iXwIsnsGoaN IHAylDvy51rHT9e2A2pSbpCUzul91/wH/pmp8dYZH0PnqeYsG/2DKvc0Z9szvL4X4ret4/0c3wpzv 8ERlcHVozOzTfO2iilMqsA==; In-Reply-To: <915FB26A-E539-4CAD-8CD3-30366938EB40@gmx.net> (message from Robert on Thu, 28 Sep 2023 12:21:54 +0200) 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:271493 Archived-At: tags 66255 notabug wontfix thanks > From: Robert > Date: Thu, 28 Sep 2023 12:21:54 +0200 > > When installing packages on emacs 29.1 the interaction with git on > windows can lead to breakage. > > The behaviour can be reproduced on windows with the following steps. > > - With an empty .emacs.d: > (install-package 'seq) > observe that .emacs.d/elpa/seq-2.24/seq-autoloads.el is created and > coding at the very bottom is set to utf-8-emacs-unix > > - On the command line inside the directory .emacs.d: > git init > git add -A elpa > git commit -m "testing encodings" > rm -rf elpa > git checkout -f master > > - now emacs doesn't properly load seq-autoloads.el. Since git converts > the line endings when writing the file, it now has crlf line endings. > This conflicts with the coding set to utf-8-emacs-unix on the > bottom of the file. As a result the error message is shown: "File mode > specification error: (user-error Local variables entry is missing > the suffix)". It is very hard to figure out why this happens. You must configure Git on Windows not to convert the line endings. Nothing else will work reliably on Windows, especially since the Emacs Git repository has both files with Unix LF-only EOL format and files with DOS/Windows CR-LF EOL format. Emacs now assumes that Git on Windows was configured not to convert EOL format of files when committing or when checking out. > A workaround is to set git config core.autocrlf false in the .emacs.d > repository on windows. This however is hard to discover. This is what everyone should do. (Actually, you should have selected that option when you installed Git for Windows.) I have this set globally in my ~/.gitconfig, so it is in effect for all the Git repositories on my system. > If feasible, I suggest to make the default coding system in the autoloads utf-8 as it > used to be. No, we cannot go back to that, since it produces problems that are impossible to solve, see the discussion to which Arash pointed. Those problems are now solved, but te solution assumes that EOL format is not changed by Git.