unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Kangas <stefankangas@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Robert <robewald@gmx.net>, 66255-done@debbugs.gnu.org
Subject: bug#66255: 29.1; package-generate-autoloads utf-8-emacs-unix coding and git on windows breaks
Date: Fri, 22 Dec 2023 06:52:03 -0800	[thread overview]
Message-ID: <CADwFkmkdQjmR+FRcw8mkxQ4FeyFsYyhJD16XpAbsUW3L-BC8Yw@mail.gmail.com> (raw)
In-Reply-To: <83fs2xyqxp.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 29 Sep 2023 17:50:10 +0300")

Eli Zaretskii <eliz@gnu.org> writes:

> tags 66255 notabug wontfix
> thanks
>
>> From: Robert <robewald@gmx.net>
>> 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.

I'm therefore closing this bug report.





      reply	other threads:[~2023-12-22 14:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-28 10:21 bug#66255: 29.1; package-generate-autoloads utf-8-emacs-unix coding and git on windows breaks Robert
2023-09-28 13:24 ` Arash Esbati
2023-09-29 14:50 ` Eli Zaretskii
2023-12-22 14:52   ` Stefan Kangas [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CADwFkmkdQjmR+FRcw8mkxQ4FeyFsYyhJD16XpAbsUW3L-BC8Yw@mail.gmail.com \
    --to=stefankangas@gmail.com \
    --cc=66255-done@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=robewald@gmx.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).