[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: 陳侃如
Subject: Re: package.el problems / autoload url-insert-buffer-contents
Date: Tue, 01 Dec 2015 16:58:00 +0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

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]