emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

package-archives terminating slash


From: Robert Pluim
Subject: package-archives terminating slash
Date: Wed, 09 Feb 2022 16:42:44 +0100

Hi,

if I do

M-: (add-to-list 'package-archives '("melpa" . "https://melpa.org/packages";))
M-x package-list-packages RET

then the package list retrieval works, but I get the following in
*Messages*, since Iʼve forgotten the trailing '/'

error in process filter: Error retrieving: 
https://melpa.org/packagesarchive-contents (error http 404)

We can (ab)use `file-name-concat' as follows, but is this too DWIM?

diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index 2e01449613..fdaab6f92d 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -1307,7 +1307,7 @@ package--unless-error
 
 (cl-defun package--with-response-buffer-1 (url body &key async file 
error-function noerror &allow-other-keys)
   (if (string-match-p "\\`https?:" url)
-        (let ((url (concat url file)))
+        (let ((url (file-name-concat url file)))
           (if async
               (package--unless-error #'ignore
                 (url-retrieve



reply via email to

[Prev in Thread] Current Thread [Next in Thread]