unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* package.el problems / autoload url-insert-buffer-contents
@ 2015-11-15 23:34 David Reitter
  2015-12-01  8:58 ` Kan-Ru Chen (陳侃如)
  0 siblings, 1 reply; 3+ messages in thread
From: David Reitter @ 2015-11-15 23:34 UTC (permalink / raw)
  To: Emacs development discussions

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




^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: package.el problems / autoload url-insert-buffer-contents
  2015-11-15 23:34 package.el problems / autoload url-insert-buffer-contents David Reitter
@ 2015-12-01  8:58 ` Kan-Ru Chen (陳侃如)
  2015-12-01  9:20   ` Artur Malabarba
  0 siblings, 1 reply; 3+ messages in thread
From: Kan-Ru Chen (陳侃如) @ 2015-12-01  8:58 UTC (permalink / raw)
  To: David Reitter; +Cc: Emacs development discussions


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



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: package.el problems / autoload url-insert-buffer-contents
  2015-12-01  8:58 ` Kan-Ru Chen (陳侃如)
@ 2015-12-01  9:20   ` Artur Malabarba
  0 siblings, 0 replies; 3+ messages in thread
From: Artur Malabarba @ 2015-12-01  9:20 UTC (permalink / raw)
  To: Kan-Ru Chen (陳侃如); +Cc: David Reitter, emacs-devel

[-- Attachment #1: Type: text/plain, Size: 1740 bytes --]

This has been fixed both on master and on emacs-25
On 1 Dec 2015 8:58 am, "Kan-Ru Chen (陳侃如)" <kanru@kanru.info> wrote:

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

[-- Attachment #2: Type: text/html, Size: 2258 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-12-01  9:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-15 23:34 package.el problems / autoload url-insert-buffer-contents David Reitter
2015-12-01  8:58 ` Kan-Ru Chen (陳侃如)
2015-12-01  9:20   ` Artur Malabarba

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).