From: Eli Zaretskii <eliz@gnu.org>
To: Michael Angelozzi <mangelozzi@gmail.com>
Cc: 40148@debbugs.gnu.org
Subject: bug#40148: 26.3; Custom package header checked out from GIT in Windows will not parse
Date: Fri, 20 Mar 2020 15:58:18 +0200 [thread overview]
Message-ID: <83o8srdt6t.fsf@gnu.org> (raw)
In-Reply-To: <CAFNYG9dX3dDqoA-V3YRgD5Ppf9DwXZ4ZEKCW=fOa-=YBX0N_VQ@mail.gmail.com> (message from Michael Angelozzi on Fri, 20 Mar 2020 10:50:59 +0200)
> From: Michael Angelozzi <mangelozzi@gmail.com>
> Date: Fri, 20 Mar 2020 10:50:59 +0200
>
> Been using a custom theme in Ubuntu 18.04 with no problems.
> Now tweaking my setup to also work with Windows 10, but I
> get the following error (even though it has a package version):
> emacs error: Package lacks a "Version" or "Package-Version" header
>
> As you can see it does have a version:
> ;;; michael-theme.el --- Emacs theme with a dark background and bright colors for use with a projector.
>
> ;; Author: Michael
> ;; Version: 0.1
> ;; Keywords: michael theme
>
> I see other people have encountered the problem here:
> https://emacs.stackexchange.com/questions/52142/debugging-package-lacks-a-file-header
> https://github.com/syl20bnr/spacemacs/issues/10645
>
> It is most perplexing when trying to solve. It one version controls one's config with GIT (as many do), GIT
> automatically changes CR's to CRLF's in windows when checking out the code. I am guessing the package
> header parser part that split fields is not identifying the line termination character.
>
> Curse the day CRLF ever became a thing!
Contrary to the advice on the Internet and the defaults of the Git for
Windows installation, you are well advised (by me) to configure Git
not to convert the end-of-line convention. That is, install Git with
"check out as-is, commit in as-is" option. Then all your problems
with CRLF will go away.
It may be the case that package.el should be more tolerant in this
case, but that's just the tip of an iceberg, because there are files
out there where LF to CR-LF conversions are a no-no (just one example:
Unix shell scripts). Just say no to this "feature", and Bob's your
uncle.
next prev parent reply other threads:[~2020-03-20 13:58 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-20 8:50 bug#40148: 26.3; Custom package header checked out from GIT in Windows will not parse Michael Angelozzi
2020-03-20 13:58 ` Eli Zaretskii [this message]
2020-03-20 14:25 ` Noam Postavsky
2020-03-20 14:47 ` Eli Zaretskii
2020-03-20 19:47 ` Noam Postavsky
2020-03-21 7:35 ` Eli Zaretskii
2021-12-05 1:18 ` Lars Ingebrigtsen
2021-12-05 1:19 ` Lars Ingebrigtsen
[not found] ` <CAFNYG9f3OaP=a+NbKq73XNxKdK4SJX9T4EBL-hbCCwD82+P+Kw@mail.gmail.com>
2021-12-05 19:55 ` Lars Ingebrigtsen
2021-12-07 4:13 ` Richard Stallman
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=83o8srdt6t.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=40148@debbugs.gnu.org \
--cc=mangelozzi@gmail.com \
/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).