From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs 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 Message-ID: <83o8srdt6t.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="30442"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 40148@debbugs.gnu.org To: Michael Angelozzi Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Mar 20 14:59:18 2020 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 1jFIBB-0007m1-Tu for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 20 Mar 2020 14:59:17 +0100 Original-Received: from localhost ([::1]:53290 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jFIBA-0004bu-VA for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 20 Mar 2020 09:59:16 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45114) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jFIB1-0004ZX-MA for bug-gnu-emacs@gnu.org; Fri, 20 Mar 2020 09:59:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jFIAw-0003ul-DS for bug-gnu-emacs@gnu.org; Fri, 20 Mar 2020 09:59:07 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39329) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jFIAw-0003uV-A4 for bug-gnu-emacs@gnu.org; Fri, 20 Mar 2020 09:59:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jFIAw-00074M-5H for bug-gnu-emacs@gnu.org; Fri, 20 Mar 2020 09:59:02 -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, 20 Mar 2020 13:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 40148 X-GNU-PR-Package: emacs Original-Received: via spool by 40148-submit@debbugs.gnu.org id=B40148.158471272727154 (code B ref 40148); Fri, 20 Mar 2020 13:59:02 +0000 Original-Received: (at 40148) by debbugs.gnu.org; 20 Mar 2020 13:58:47 +0000 Original-Received: from localhost ([127.0.0.1]:45302 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jFIAh-00073u-JP for submit@debbugs.gnu.org; Fri, 20 Mar 2020 09:58:47 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:58170) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jFIAf-00073g-Ne for 40148@debbugs.gnu.org; Fri, 20 Mar 2020 09:58:46 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:51071) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1jFIAa-0003bp-6m; Fri, 20 Mar 2020 09:58:40 -0400 Original-Received: from [176.228.60.248] (port=1081 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jFIAU-0003SM-9K; Fri, 20 Mar 2020 09:58:39 -0400 In-Reply-To: (message from Michael Angelozzi on Fri, 20 Mar 2020 10:50:59 +0200) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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" Xref: news.gmane.io gmane.emacs.bugs:177561 Archived-At: > From: Michael Angelozzi > 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.