GNU bug report logs - #20309
25.0.50; Coding conversion error during clojure-mode package upgrade

Previous Next

Package: emacs;

Reported by: Dmitry Gutov <dgutov <at> yandex.ru>

Date: Sun, 12 Apr 2015 13:47:02 UTC

Severity: normal

Found in version 25.0.50

Done: Dmitry Gutov <dgutov <at> yandex.ru>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#21319: closed (`package-install-file' fails with CRLF
 (Windows) line endings)
Date: Tue, 22 Oct 2019 13:04:05 +0000
[Message part 1 (text/plain, inline)]
Your message dated Tue, 22 Oct 2019 16:03:12 +0300
with message-id <5bac93e7-290f-0ea4-4194-d80b7d647482 <at> yandex.ru>
and subject line Re: bug#20309: 25.0.50; Coding conversion error during clojure-mode package upgrade
has caused the debbugs.gnu.org bug report #20309,
regarding `package-install-file' fails with CRLF (Windows) line endings
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
20309: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=20309
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: steckerhalter <emacs <at> postmomentum.ch>
To: bug-gnu-emacs <at> gnu.org
Subject: `package-install-file' fails with CRLF (Windows) line endings
Date: Sat, 22 Aug 2015 06:30:30 +0200
package.el contains this code:

(defun package-install-file (file)
  "Install a package from a file.
The file can either be a tar file or an Emacs Lisp file."
  (interactive "fPackage file name: ")
  (with-temp-buffer
    (insert-file-contents-literally file)
    (when (string-match "\\.tar\\'" file) (tar-mode))
    (package-install-from-buffer)))

Since `insert-file-contents-literally' does not do any conversion
`package-buffer-info' fails to parse the info if the file is .el and
contains CRLF line endings. It then errors out with:

Debugger entered--Lisp error: (error "Package lacks a \"Version\" or
\"Package-Version\" header")
  signal(error ("Package lacks a \"Version\" or \"Package-Version\" header"))
  error("Package lacks a \"Version\" or \"Package-Version\" header")
  package-buffer-info()

This affects all recent Emacs versions (including trunk).

What we did now is to replace `insert-file-contents-literally' with
`insert-file-contents' dynamically for non-tar files and that seems to
work, although I'm not sure if that's a good solution since I don't
know if there might be side-effects somewhere that can cause other
problems.

The other solution I can think of might be to adapt the regexp in
`package-buffer-info` so that in can deal with CRLF.

cheers,
steckerhalter


[Message part 3 (message/rfc822, inline)]
From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Stefan Kangas <stefan <at> marxist.se>
Cc: 20309-done <at> debbugs.gnu.org
Subject: Re: bug#20309: 25.0.50; Coding conversion error during clojure-mode
 package upgrade
Date: Tue, 22 Oct 2019 16:03:12 +0300
On 22.10.2019 3:57, Stefan Kangas wrote:
> I can't reproduce this on current master.  I believe that it has been
> fixed by the following commit (if not before)

Thank you for the reminder.

I haven't seen this lately, so: closing.


This bug report was last modified 5 years and 271 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.