« Return to Thread: Re: [Emms-patches] darcs patch: emms-url: Improve emms-url-quote.

Re: [Emms-patches] darcs patch: emms-url: Improve emms-url-quote.

by William Xu-2 :: Rate this Message:

Reply to Author | View in Thread

Michael Olson <mwolson@...> writes:

> Thu Feb 14 20:58:00 CST 2008  Michael Olson <mwolson@...>
>   * emms-url: Improve emms-url-quote.
>  
>    - Don't clobber the match data.
>    - Don't escape the colon in "http://".

For escaping the colon in "http://", the patch uses:

    (string-match "\\`\\([^:]+:\\)\\(.+\\)\\'" s)
    (let ((handler (match-string 1 s))
          (loc (or (match-string 2 s) s))

Do you assume that argument must be a full uri path like `http://foo' ?
And how to handle cases like 'http://foo@:bar'?

I thought the argument could be any string, so that this function would
be generally useful. For creating a full uri path, i would rather use
something like:

    (concat "http://" (emms-url-quote "blahblah"))

--
William


_______________________________________________
Emms-help mailing list
Emms-help@...
http://lists.gnu.org/mailman/listinfo/emms-help

 « Return to Thread: Re: [Emms-patches] darcs patch: emms-url: Improve emms-url-quote.