GNU bug report logs - #12407
url-retrieve-synchronously fails when passed a vector as URL argument

Previous Next

Package: emacs;

Reported by: upgradingdave <upgradingdave <at> gmail.com>

Date: Mon, 10 Sep 2012 18:10:01 UTC

Severity: normal

Merged with 11627

Found in version 24.1.50

Done: Chong Yidong <cyd <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 12407 in the body.
You can then email your comments to 12407 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#12407; Package emacs. (Mon, 10 Sep 2012 18:10:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to upgradingdave <upgradingdave <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 10 Sep 2012 18:10:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: upgradingdave <upgradingdave <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: url-retrieve-synchronously fails when passed a vector as URL argument
Date: Mon, 10 Sep 2012 14:01:09 -0400
[Message part 1 (text/plain, inline)]
`url-retrieve-synchronously` docs claims to accept a parsed URL vector as
an argument, but in latest version of emacs 24.1.50 it seems to break when
passed a URL vector. For example, this throws an error:

(url-retrieve-synchronously
        (url-generic-parse-url
         (concat "http://search.maven.org" "/solrsearch/select?q=\""
                 "log4j" "\"&rows=20&wt=json")))

I think the problem is the following (line 185 of url.el.gz) should
first check to make sure the URL is not a vector:

  (setq url (url-encode-url url))

This is my first time submitting a bug report, so if you need any more
info, please let me know.

Thanks!
Dave


In GNU Emacs 24.1.50.1 (x86_64-pc-linux-gnu, GTK+ Version 3.2.0)
 of 2012-07-28 on meitnerium, modified by Debian
 (emacs-snapshot package, version 2:20120728-fake2-1~ppa~oneiric1)
Windowing system distributor `The X.Org Foundation', version 11.0.11004000
Configured using:
 `configure '--build' 'x86_64-linux-gnu' '--host' 'x86_64-linux-gnu'
 '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib'
 '--localstatedir=/var' '--infodir=/usr/share/info'
 '--mandir=/usr/share/man' '--with-pop=yes'
 '--enable-locallisppath=/etc/emacs-snapshot:/etc/emacs:/usr/local/share/emacs/24.1.50/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.1.50/site-lisp:/usr/share/emacs/site-lisp'
 '--without-compress-info' '--with-crt-dir=/usr/lib/x86_64-linux-gnu/'
 '--with-x=yes' '--with-x-toolkit=gtk3' '--with-imagemagick=yes'
 'build_alias=x86_64-linux-gnu' 'host_alias=x86_64-linux-gnu'
 'CFLAGS=-DDEBIAN -DSITELOAD_PURESIZE_EXTRA=5000 -g -O2' 'LDFLAGS=-g
 -Wl,--as-needed -znocombreloc' 'CPPFLAGS=''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: IELM

Minor modes in effect:
  recentf-mode: t
  ido-ubiquitous-mode: t
  show-paren-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-n C-n C-n
C-n C-n C-n C-n C-p C-f C-f C-f C-f C-x x f <return>
C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n
C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n
C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n
C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n
C-n C-n C-n C-n C-n C-n C-n C-n C-p C-u C-M-x C-x b
p o m <return> C-c m d s l o g 4 j <return> n n n n
n n n n C-b C-b C-b C-b C-b C-b C-b C-h f <return>
<help-echo> C-b C-h f <return> C-x o C-n C-n C-n C-n
C-x b m v n C-g C-x o C-M-x <help-echo> C-u C-g C-l
C-x r m <return> q C-x r b <return> C-x RET r e p o
r t - b u g s <backspace> <backspace> <backspace> <backspace>
e m a c s - b u g <return> C-g C-g C-n C-p C-b C-b
C-b C-b C-b C-b C-b C-b C-b C-b C-b C-b C-b C-f C-f
C-x b i e l <return> C-p C-p C-p C-p C-p C-p C-p C-p
C-p C-p C-p C-p C-SPC C-n C-n C-n C-e M-w C-n C-n C-n
C-n C-n C-n C-n C-n C-n C-y C-p C-p <C-backspace> <C-backspace>
<C-backspace> e n d <backspace> c o d e - u r l ( )
<backspace> <backspace> C-n C-n C-e <return> C-p C-p
C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p
C-p C-p C-f C-f C-h f <return> q <backspace> C-x o
q C-b C-b C-SPC C-n C-n C-n C-e M-w C-x RET <up> <
return>

Recent messages:

Quit
url-retrieve-internal
Quit
Back to top level.
Quit [2 times]
Mark set [2 times]
Contacting host: search.maven.org:80
Type C-x 1 to delete the help window.
Mark set

Load-path shadows:
/usr/share/emacs/24.1.50/site-lisp/debian-startup hides
/usr/share/emacs/site-lisp/debian-startup

Features:
(shadow sort mail-extr network-stream starttls url-http tls url-gw
url-cache emacsbug message rfc822 mml mailabbrev gmm-utils mailheader
sendmail mail-utils bookmark mm-view mml-smime mml-sec smime dig
mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045
ietf-drums edebug ielm pp jka-compr sgml-mode nxml-uchnm rng-xsd
xsd-regexp rng-cmpct rng-nxml rng-valid rng-loc rng-uri rng-parse
nxml-parse rng-match rng-dt rng-util rng-pttrn nxml-ns nxml-mode
nxml-outln nxml-rap nxml-util nxml-glyph nxml-enc xmltok url-auth url
url-proxy url-privacy url-expand url-methods url-history url-cookie
url-domsuf url-util mailcap cua-base ert ewoc debug espuds espuds-misc
espuds-region espuds-movement espuds-input espuds-text espuds-buffer
espuds-helpers ecukes ecukes-setup ecukes-stats ecukes-hooks
ecukes-print ecukes-run ecukes-steps ecukes-parse ecukes-startup
ecukes-directories ecukes-def ecukes-new ecukes-template ansi mvn-mode
mvn-xml mvn-region xml mvn-search xml-to-string json hi-lock recentf
tree-widget wid-edit mule-util cal-move parse-time multi-isearch vc-git
flyspell ispell org-wl org-w3m org-vm org-rmail org-mhe org-mew org-irc
org-jsinfo org-infojs org-html org-exp ob-exp org-exp-blocks find-func
org-agenda org-info org-gnus org-docview org-bibtex bibtex org-bbdb org
warnings ob-emacs-lisp ob-tangle ob-ref ob-lob ob-table org-footnote
org-src ob-comint ob-keys ob ob-eval org-pcomplete org-list org-faces
org-compat org-entities org-macs noutline outline easy-mmode format-spec
cal-menu calendar cal-loaddefs ffap url-parse auth-source eieio byte-opt
bytecomp byte-compile cconv macroexp gnus-util mm-util mail-prsvr
password-cache url-vars help-mode easymenu view em-unix pcomplete comint
ansi-color em-term term disp-table ehelp electric em-script em-prompt
em-ls em-hist em-pred em-glob em-dirs em-cmpl em-basic esh-opt em-banner
em-alias ring esh-var esh-io esh-cmd esh-ext esh-proc esh-arg eldoc
esh-groups eshell esh-module esh-mode esh-util hl-line saveplace
idle-highlight-mode thingatpt ace-jump-mode-autoloads
haml-mode-autoloads jade-mode-autoloads js-comint-autoloads
js2-mode-autoloads markdown-mode-autoloads php-mode-autoloads
scala-mode-autoloads slime-js-autoloads slime-repl-autoloads
slime-autoloads starter-kit-autoloads unbound edmacro kmacro smex cl
starter-kit-misc ido-ubiquitous ido paren starter-kit-defuns uniquify
advice help-fns advice-preload magit-autoloads ido-ubiquitous-autoloads
smex-autoloads find-file-in-project-autoloads
idle-highlight-mode-autoloads paredit-autoloads unbound-autoloads
package time-date tooltip ediff-hook vc-hooks lisp-float-type mwheel
x-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list
newcomment lisp-mode register page menu-bar rfn-eshadow timer select
scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham
georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese hebrew greek romanian slovak czech european ethiopic
indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple
abbrev minibuffer loaddefs button faces cus-face files text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote make-network-process dbusbind
dynamic-setting system-font-setting font-render-setting move-toolbar gtk
x-toolkit x multi-tty emacs)


-- 
Preferred Version LLC
m. 703.989.3562
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#12407; Package emacs. (Tue, 11 Sep 2012 15:45:01 GMT) Full text and rfc822 format available.

Message #8 received at 12407 <at> debbugs.gnu.org (full text, mbox):

From: Bastien <bzg <at> altern.org>
To: upgradingdave <upgradingdave <at> gmail.com>
Cc: 12407 <at> debbugs.gnu.org
Subject: Re: bug#12407: url-retrieve-synchronously fails when passed a vector
	as URL argument
Date: Tue, 11 Sep 2012 17:43:38 +0200
Hi,

upgradingdave <upgradingdave <at> gmail.com> writes:

> `url-retrieve-synchronously` docs claims to accept a parsed URL
> vector as an argument, but in latest version of emacs 24.1.50 it
> seems to break when
> passed a URL vector. For example, this throws an error:
>
> (url-retrieve-synchronously
>         (url-generic-parse-url
>          (concat "http://search.maven.org" "/solrsearch/select?q=\""
>                  "log4j" "\"&rows=20&wt=json")))

This does not throw an error here with GNU Emacs 24.2.50.1
(i686-pc-linux-gnu, GTK+ Version 2.24.10) of 2012-09-10.

Can you (setq debug-on-error t) and report the backtrace you
get when running the code above?

-- 
 Bastien




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#12407; Package emacs. (Wed, 12 Sep 2012 07:48:02 GMT) Full text and rfc822 format available.

Message #11 received at 12407 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: upgradingdave <upgradingdave <at> gmail.com>
Cc: 12407 <at> debbugs.gnu.org
Subject: Re: bug#12407: url-retrieve-synchronously fails when passed a vector
	as URL argument
Date: Wed, 12 Sep 2012 03:47:03 -0400
upgradingdave wrote:

> `url-retrieve-synchronously` docs claims to accept a parsed URL vector as
> an argument, but in latest version of emacs 24.1.50 it seems to break when
> passed a URL vector. For example, this throws an error:
>
> (url-retrieve-synchronously
>         (url-generic-parse-url
>          (concat "http://search.maven.org" "/solrsearch/select?q=\""
>                  "log4j" "\"&rows=20&wt=json")))

Thanks for the report, but this works fine in the current trunk.

> I think the problem is the following (line 185 of url.el.gz) should
> first check to make sure the URL is not a vector:
>
>   (setq url (url-encode-url url))

Such a check was added back in June:

    http://lists.gnu.org/archive/html/emacs-diffs/2012-06/msg00249.html

It seems your sources must be rather out-of-date (they claim to date
from the end of July).

> This is my first time submitting a bug report, so if you need any more
> info, please let me know.

For your next bug report; "throws an error" is vague. Please include the
exact error message (ideally set debug-on-error t and post the
backtrace). Also, saying "line X of file Y" is vague, because we don't
know exactly what your copy of file Y looks like. It is better to quote
a few lines of context. Or even better, send a patch! :)

> In GNU Emacs 24.1.50.1 (x86_64-pc-linux-gnu, GTK+ Version 3.2.0)
>  of 2012-07-28 on meitnerium, modified by Debian




Forcibly Merged 11627 12407. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Wed, 12 Sep 2012 07:49:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#12407; Package emacs. (Wed, 12 Sep 2012 12:26:02 GMT) Full text and rfc822 format available.

Message #16 received at 12407 <at> debbugs.gnu.org (full text, mbox):

From: upgradingdave <upgradingdave <at> gmail.com>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 12407 <at> debbugs.gnu.org
Subject: Re: bug#12407: url-retrieve-synchronously fails when passed a vector
	as URL argument
Date: Wed, 12 Sep 2012 08:24:27 -0400
[Message part 1 (text/plain, inline)]
Thanks for checking into this so quickly. The computer where I saw the
problem was using the latest emacs-snapshot Ubuntu RPM package and so I bet
that is slightly behind the current trunk.

I'll check current trunk before sending a bug report next time.

Thanks also for the tips for submitting bug reports, I'll include a stack
trace as well as more context next time!

Dave

On Wed, Sep 12, 2012 at 3:47 AM, Glenn Morris <rgm <at> gnu.org> wrote:

> upgradingdave wrote:
>
> > `url-retrieve-synchronously` docs claims to accept a parsed URL vector as
> > an argument, but in latest version of emacs 24.1.50 it seems to break
> when
> > passed a URL vector. For example, this throws an error:
> >
> > (url-retrieve-synchronously
> >         (url-generic-parse-url
> >          (concat "http://search.maven.org" "/solrsearch/select?q=\""
> >                  "log4j" "\"&rows=20&wt=json")))
>
> Thanks for the report, but this works fine in the current trunk.
>
> > I think the problem is the following (line 185 of url.el.gz) should
> > first check to make sure the URL is not a vector:
> >
> >   (setq url (url-encode-url url))
>
> Such a check was added back in June:
>
>     http://lists.gnu.org/archive/html/emacs-diffs/2012-06/msg00249.html
>
> It seems your sources must be rather out-of-date (they claim to date
> from the end of July).
>
> > This is my first time submitting a bug report, so if you need any more
> > info, please let me know.
>
> For your next bug report; "throws an error" is vague. Please include the
> exact error message (ideally set debug-on-error t and post the
> backtrace). Also, saying "line X of file Y" is vague, because we don't
> know exactly what your copy of file Y looks like. It is better to quote
> a few lines of context. Or even better, send a patch! :)
>
> > In GNU Emacs 24.1.50.1 (x86_64-pc-linux-gnu, GTK+ Version 3.2.0)
> >  of 2012-07-28 on meitnerium, modified by Debian
>



-- 
Preferred Version LLC
m. 703.989.3562
[Message part 2 (text/html, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 11 Oct 2012 11:24:02 GMT) Full text and rfc822 format available.

This bug report was last modified 12 years and 249 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.