From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Artur Malabarba Newsgroups: gmane.emacs.devel Subject: Re: package.el problems / autoload url-insert-buffer-contents Date: Tue, 1 Dec 2015 09:20:39 +0000 Message-ID: References: <1205EDD8-36C1-4D05-BFC5-5E1D3A5C4FFC@gmail.com> <87egf67dgn.fsf@kanru.info> Reply-To: bruce.connor.am@gmail.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11c37a8ed7db840525d2abf9 X-Trace: ger.gmane.org 1448961655 3325 80.91.229.3 (1 Dec 2015 09:20:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 1 Dec 2015 09:20:55 +0000 (UTC) Cc: David Reitter , emacs-devel To: =?UTF-8?B?S2FuLVJ1IENoZW4gKOmZs+S+g+Wmgik=?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Dec 01 10:20:54 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1a3h7F-000193-Em for ged-emacs-devel@m.gmane.org; Tue, 01 Dec 2015 10:20:53 +0100 Original-Received: from localhost ([::1]:45435 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a3h79-0001xh-PW for ged-emacs-devel@m.gmane.org; Tue, 01 Dec 2015 04:20:47 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36263) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a3h75-0001xb-DF for emacs-devel@gnu.org; Tue, 01 Dec 2015 04:20:44 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a3h74-0001oi-BZ for emacs-devel@gnu.org; Tue, 01 Dec 2015 04:20:43 -0500 Original-Received: from mail-lf0-x235.google.com ([2a00:1450:4010:c07::235]:36394) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a3h73-0001oW-Vm for emacs-devel@gnu.org; Tue, 01 Dec 2015 04:20:42 -0500 Original-Received: by lfs39 with SMTP id 39so226248252lfs.3 for ; Tue, 01 Dec 2015 01:20:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=C5qU1sPlHmSZAalzBc+G54/mwoLkQLXLzcs8cEFcfyM=; b=Vwyqyy0zfx4qvakxEXxSPCS5SLIx7iGVKJD6us8rLjnIt6utVOWY+yBDnqlkZe+L/k wm317VOlqKGPe2zoqoPNRlL2A4JPmIfu0HeSrIXIgSMu3GcSab54166QuDTf+ic0V3n7 I+B1maAmFX8okxpsc63VSWNydnOnoO3hxXQuLOWZAN1jlRxI5FB0/5Khk0UAGOR/OoDA md9wVT6+DAw23eQ4YJdqZs05BueBpLbucomy5lsNOKXFp5nEV/0xW8ad1KEnXNHoLtyy DblHUmSjMd39jsEVQPQvAo0/wP2mplzWWeOav8I7JTn6Dj7UT3i80Y2itXFclauRpdy/ YatA== X-Received: by 10.112.126.106 with SMTP id mx10mr20665657lbb.3.1448961639961; Tue, 01 Dec 2015 01:20:39 -0800 (PST) Original-Received: by 10.112.202.99 with HTTP; Tue, 1 Dec 2015 01:20:39 -0800 (PST) Original-Received: by 10.112.202.99 with HTTP; Tue, 1 Dec 2015 01:20:39 -0800 (PST) In-Reply-To: <87egf67dgn.fsf@kanru.info> X-Google-Sender-Auth: UkI-gb6C1v0ajHdUotz6k9a_DiA X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:4010:c07::235 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:195662 Archived-At: --001a11c37a8ed7db840525d2abf9 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable This has been fixed both on master and on emacs-25 On 1 Dec 2015 8:58 am, "Kan-Ru Chen (=E9=99=B3=E4=BE=83=E5=A6=82)" wrote: > > David Reitter writes: > > > I=E2=80=99m getting an (void-function url-insert-buffer-contents) error= when > doing `list-packages=E2=80=99. > > > > Either package.el should do (require =E2=80=98url-handlers), or the > `url-insert-buffer-contents=E2=80=99 should be autoloaded. > `url-insert-file-contents=E2=80=9D (undocumented) is autoloaded. I=E2=80= =99m not sure > which one is right, hence the message here. > > > > > > Second, for packages installed from MELPA, I=E2=80=99m seeing an > =E2=80=9Cincomprehensible buffer=E2=80=9D error. (This is perhaps not th= e 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=E2=80=99s 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)) > > --001a11c37a8ed7db840525d2abf9 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

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

On 1 Dec 2015 8:58 am, "Kan-Ru Chen (=E9=99= =B3=E4=BE=83=E5=A6=82)" <kanru@= kanru.info> wrote:

David Reitter <david.reitter@= gmail.com> writes:

> I=E2=80=99m getting an (void-function url-insert-buffer-contents) erro= r when doing `list-packages=E2=80=99.
>
> Either package.el should do (require =E2=80=98url-handlers), or the `u= rl-insert-buffer-contents=E2=80=99 should be autoloaded.=C2=A0 `url-insert-= file-contents=E2=80=9D (undocumented) is autoloaded.=C2=A0 I=E2=80=99m not = sure which one is right, hence the message here.
>
>
> Second, for packages installed from MELPA, I=E2=80=99m seeing an =E2= =80=9Cincomprehensible buffer=E2=80=9D error.=C2=A0 (This is perhaps not th= e most user-friendly error message!)
>
> I think the reason is that the code makes assumptions about where poin= t is after the page has been retrieved.=C2=A0 The patch below works for me.= =C2=A0 If it=E2=80=99s the right one, let me know.

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

> 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
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(let* ((url (concat ,ur= l-1 ,file))
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (= callback (lambda (status)
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (let ((b (current-buffer)))
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (goto-char (point-min))
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (unwind-protect (wrap-erro= rs
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(when-let ((er (plist-get status :err= or)))
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(error "Error retrieving:= %s %S" url er))

--001a11c37a8ed7db840525d2abf9--