emacs-devel
[Top][All Lists]
Advanced

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

Re: package-archives terminating slash


From: Andreas Schwab
Subject: Re: package-archives terminating slash
Date: Wed, 09 Feb 2022 18:16:11 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.91 (gnu/linux)

On Feb 09 2022, Robert Pluim wrote:

> 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)))

url-expand-file-name perhaps?

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."



reply via email to

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