all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Kan-Ru Chen (陳侃如)" <kanru@kanru.info>
To: David Reitter <david.reitter@gmail.com>
Cc: Emacs development discussions <emacs-devel@gnu.org>
Subject: Re: package.el problems / autoload url-insert-buffer-contents
Date: Tue, 01 Dec 2015 16:58:00 +0800	[thread overview]
Message-ID: <87egf67dgn.fsf@kanru.info> (raw)
In-Reply-To: <1205EDD8-36C1-4D05-BFC5-5E1D3A5C4FFC@gmail.com> (David Reitter's message of "Sun, 15 Nov 2015 18:34:22 -0500")


David Reitter <david.reitter@gmail.com> 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	other threads:[~2015-12-01  8:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-15 23:34 package.el problems / autoload url-insert-buffer-contents David Reitter
2015-12-01  8:58 ` Kan-Ru Chen (陳侃如) [this message]
2015-12-01  9:20   ` Artur Malabarba

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87egf67dgn.fsf@kanru.info \
    --to=kanru@kanru.info \
    --cc=david.reitter@gmail.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.