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



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.



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




Programming list archiving by: Enterprise Git Hosting