[Top][All Lists]

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

Re: package.el problems / autoload url-insert-buffer-contents

From: Artur Malabarba
Subject: Re: package.el problems / autoload url-insert-buffer-contents
Date: Tue, 1 Dec 2015 09:20:39 +0000

This has been fixed both on master and on emacs-25

On 1 Dec 2015 8:58 am, "Kan-Ru Chen (陳侃如)" <address@hidden> wrote:

David Reitter <address@hidden> writes:

> I’m getting an (void-function url-insert-buffer-contents) error when doing `list-packages’.
> Either package.el should do (require ‘url-handlers), or the `url-insert-buffer-contents’ should be autoloaded.  `url-insert-file-contents” (undocumented) is autoloaded.  I’m not sure which one is right, hence the message here.
> Second, for packages installed from MELPA, I’m seeing an “incomprehensible buffer” error.  (This is perhaps not the most user-friendly error message!)
> I think the reason is that the code makes assumptions about where point is after the page has been retrieved.  The patch below works for me.  If it’s the right one, let me know.

+1, I don't know if it's the right one but it fix the symptom for me.

> diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
> index d811db9..ac52c08 100644
> --- a/lisp/emacs-lisp/package.el
> +++ b/lisp/emacs-lisp/package.el
> @@ -1161,6 +1161,7 @@ package--with-work-buffer
>             (let* ((url (concat ,url-1 ,file))
>                    (callback (lambda (status)
>                                (let ((b (current-buffer)))
> +                                (goto-char (point-min))
>                                  (unwind-protect (wrap-errors
>                                                   (when-let ((er (plist-get status :error)))
>                                                     (error "Error retrieving: %s %S" url er))

reply via email to

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