GNU bug report logs -
#19884
24.3; Unimplemented `url-handler' functions
Previous Next
Reported by: Eli Barzilay <eli <at> barzilay.org>
Date: Tue, 17 Feb 2015 05:20:02 UTC
Severity: normal
Found in version 24.3
Fixed in version 24.4
Done: Glenn Morris <rgm <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 19884 in the body.
You can then email your comments to 19884 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#19884
; Package
emacs
.
(Tue, 17 Feb 2015 05:20:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Eli Barzilay <eli <at> barzilay.org>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Tue, 17 Feb 2015 05:20:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
I'm not sure what the intended use of `url-handler-mode' is, or how to
get the `url-dav' thing to work -- but it seems that the only thing
that stands in my way of loading a URL in Emacs is these two functions
from "url-handlers.el": `url-file-name-completion' and
`url-file-name-all-completions', both just throw an "Unimplemented"
error.
I have redefined them with trivial versions:
(defun url-file-name-completion (_url _directory &optional _predicate) t)
(defun url-file-name-all-completions (file _directory) (list file))
and with that I can now load remote files via HTTP. This is obviously
limited in a way that makes a proper DAV client (with a matching
server) better, but I suspect that for most people this is irrelevant,
and I don't see any explanation why the error-throwing is needed. (It
seems that the url-dav thing has its own functions anyway.)
(I'm leaving the following information because of all those things
that I'm not sure about, as I said in the beginning.)
In GNU Emacs 24.3.1 (i386-mingw-nt6.2.9200)
of 2013-03-17 on MARVIN
Windowing system distributor `Microsoft Corp.', version 6.2.9200
Configured using:
`configure --with-gcc (4.7) --cflags
-ID:/devel/emacs/libs/libXpm-3.5.8/include
-ID:/devel/emacs/libs/libXpm-3.5.8/src
-ID:/devel/emacs/libs/libpng-dev_1.4.3-1/include
-ID:/devel/emacs/libs/zlib-dev_1.2.5-2/include
-ID:/devel/emacs/libs/giflib-4.1.4-1/include
-ID:/devel/emacs/libs/jpeg-6b-4/include
-ID:/devel/emacs/libs/tiff-3.8.2-1/include
-ID:/devel/emacs/libs/gnutls-3.0.9/include
-ID:/devel/emacs/libs/libiconv-1.13.1-1-dev/include
-ID:/devel/emacs/libs/libxml2-2.7.8/include/libxml2'
Important settings:
value of $LANG: ENU
locale-coding-system: cp1252
default enable-multibyte-characters: t
Major mode: Text
Minor modes in effect:
desktop-save-mode: t
cua-mode: t
display-time-mode: t
minibuffer-electric-default-mode: t
url-handler-mode: t
tooltip-mode: t
mouse-wheel-mode: t
global-font-lock-mode: t
font-lock-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
temp-buffer-resize-mode: t
size-indication-mode: t
column-number-mode: t
line-number-mode: t
transient-mark-mode: t
Features:
(shadow mailalias vm-reply vm-rfaddons vm-menu vm-window vm-toolbar
vm-folder vm-mime vm-undo vm-virtual vm-summary-faces vm-summary
vm-mouse vm-page vm-motion vm-minibuf vm-message vm-misc vm-macro
vm-autoloads vm-vars vm-version vm emacsbug message format-spec rfc822
mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums
mail-utils misearch multi-isearch view apropos help-mode desktop
filladapt scroll-in-place cua-base time edmacro kmacro minibuf-eldef
electric paren mic-paren whitespace jka-compr uniquify warnings advice
help-fns cl-lib advice-preload cal-x cal-menu easymenu calendar
cal-loaddefs netrc url-handlers url-parse auth-source eieio byte-opt
bytecomp byte-compile cconv gnus-util mm-util mail-prsvr
password-cache url-vars time-date tooltip ediff-hook vc-hooks
lisp-float-type mwheel dos-w32 ls-lisp w32-common-fns disp-table
w32-win w32-vars 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 macroexp files text-properties overlay sha1 md5 base64 format
env code-pages mule custom widget hashtable-print-readable backquote
make-network-process w32 multi-tty emacs)
--
((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay:
http://barzilay.org/ Maze is Life!
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#19884
; Package
emacs
.
(Tue, 17 Feb 2015 21:54:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 19884 <at> debbugs.gnu.org (full text, mbox):
Please could you say exactly what you are trying to do.
It's something to do with "loading a URL in Emacs", but you don't say
precisely how. I think a complete recipe starting from emacs -Q would be
helpful.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#19884
; Package
emacs
.
(Tue, 17 Feb 2015 23:11:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 19884 <at> debbugs.gnu.org (full text, mbox):
On Tue, Feb 17, 2015 at 4:53 PM, Glenn Morris <rgm <at> gnu.org> wrote:
>
> Please could you say exactly what you are trying to do. It's
> something to do with "loading a URL in Emacs", but you don't say
> precisely how. I think a complete recipe starting from emacs -Q would
> be helpful.
You're right -- I was too lazy to pinpoint the problem, but now I did
it. Here's a complete and exact sequence:
* Start a bare emacs:
emacs -Q
* Change this option using `set-variable' or a plain `setq':
(setq read-file-name-completion-ignore-case t)
* Activate the url-handler mode
M-x url-handler-mode RET
* Try to load some URL:
C-x C-f C-a C-k http://barzilay.org/ RET
I get an "Unimplemented" error, because the ignore-case option makes it
do one completion before loading the file -- and that fails since the
respective url-handler functions throw up. If I make them trivially
accept the curret path things work fine.
I find that ...-completion-ignore-case option very useful (even in
Linux), and I don't think that there's a reasonable way to avoid that
completion-before-accepting-a-name behavior to get it to work. To have
a less-impactful change, the url-handler functions could throw up
*unless* this option is set, but I don't see any reasonable use for that
error. In fact, since HTTP always has some content to send you for any
URL -- as long as there is a server on the specified address/port you'll
get some 404 document -- and when dealing with just plain HTTP (no DAV)
it makes sense to just get you that 404 page.
(And hopefully the utility of having the url-handler feature on is
clear: saving you a silly save-to-temp-file-then-open-in-emacs
roundtrip, and allowing you to just open it directly.)
--
((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay:
http://barzilay.org/ Maze is Life!
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#19884
; Package
emacs
.
(Wed, 18 Feb 2015 00:27:01 GMT)
Full text and
rfc822 format available.
Message #14 received at submit <at> debbugs.gnu.org (full text, mbox):
On 2015-02-18T10:10:25+1100, Eli Barzilay said:
EB> You're right -- I was too lazy to pinpoint the problem, but
now I EB> did it. Here's a complete and exact sequence:
EB> * Start a bare emacs: emacs -Q
EB> * Change this option using `set-variable' or a plain `setq':
EB> (setq read-file-name-completion-ignore-case t)
EB> * Activate the url-handler mode M-x url-handler-mode RET
EB> * Try to load some URL: C-x C-f C-a C-k http://barzilay.org/
RET
EB> I get an "Unimplemented" error
With a manually compiled Emacs 24.4.1 on Debian Wheezy(+updates)
x86_64, and following the above steps, i'm unable to reproduce
this error. (Instead i get an unrendered XHTML document in a
buffer named "barzilay.org".)
Might it perhaps have been an issue with 24.3 that was fixed by
24.4?
Alexis.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#19884
; Package
emacs
.
(Wed, 18 Feb 2015 01:52:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 19884 <at> debbugs.gnu.org (full text, mbox):
On Tue, Feb 17, 2015 at 6:10 PM, Eli Barzilay <eli <at> barzilay.org> wrote:
> On Tue, Feb 17, 2015 at 4:53 PM, Glenn Morris <rgm <at> gnu.org> wrote:
>>
>> Please could you say exactly what you are trying to do. It's
>> something to do with "loading a URL in Emacs", but you don't say
>> precisely how. I think a complete recipe starting from emacs -Q would
>> be helpful.
>
> You're right -- I was too lazy to pinpoint the problem, but now I did
> it. Here's a complete and exact sequence:
>
> * Start a bare emacs:
> emacs -Q
>
> * Change this option using `set-variable' or a plain `setq':
> (setq read-file-name-completion-ignore-case t)
>
> * Activate the url-handler mode
> M-x url-handler-mode RET
>
> * Try to load some URL:
> C-x C-f C-a C-k http://barzilay.org/ RET
>
> I get an "Unimplemented" error, because the ignore-case option makes it
> do one completion before loading the file -- and that fails since the
> respective url-handler functions throw up. If I make them trivially
> accept the curret path things work fine.
>
> I find that ...-completion-ignore-case option very useful (even in
> Linux), and I don't think that there's a reasonable way to avoid that
> completion-before-accepting-a-name behavior to get it to work. To have
> a less-impactful change, the url-handler functions could throw up
> *unless* this option is set, but I don't see any reasonable use for that
> error. In fact, since HTTP always has some content to send you for any
> URL -- as long as there is a server on the specified address/port you'll
> get some 404 document -- and when dealing with just plain HTTP (no DAV)
> it makes sense to just get you that 404 page.
>
> (And hopefully the utility of having the url-handler feature on is
> clear: saving you a silly save-to-temp-file-then-open-in-emacs
> roundtrip, and allowing you to just open it directly.)
>
> --
> ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay:
> http://barzilay.org/ Maze is Life!
--
((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay:
http://barzilay.org/ Maze is Life!
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#19884
; Package
emacs
.
(Wed, 18 Feb 2015 01:59:01 GMT)
Full text and
rfc822 format available.
Message #20 received at 19884 <at> debbugs.gnu.org (full text, mbox):
On Tue, Feb 17, 2015 at 6:10 PM, Eli Barzilay <eli <at> barzilay.org> wrote:
> [...]
*sigh*
I just looked at the updated source tree, and the current code is
different, and in fact, it's doing something close to what I suggested.
Marked as a reply to bug #14806 which is pretty much an identical
description to mine, and fixed by Stefan Monnier (CCed). So this can be
closed as a duplicate of that one.
But one note is that as far as I can tell, my version is looks more
correct, since the doc of `file-name-completion' says:
If there is only one and file matches it exactly, returns t.
and the description of `file-name-all-completions' make it seem like
returning a list with the url is more correct than returning nil.
--
((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay:
http://barzilay.org/ Maze is Life!
Reply sent
to
Glenn Morris <rgm <at> gnu.org>
:
You have taken responsibility.
(Wed, 18 Feb 2015 07:47:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Eli Barzilay <eli <at> barzilay.org>
:
bug acknowledged by developer.
(Wed, 18 Feb 2015 07:47:03 GMT)
Full text and
rfc822 format available.
Message #25 received at 19884-done <at> debbugs.gnu.org (full text, mbox):
Version: 24.4
Eli Barzilay wrote:
> emacs -Q
>
> * Change this option using `set-variable' or a plain `setq':
> (setq read-file-name-completion-ignore-case t)
>
> * Activate the url-handler mode
> M-x url-handler-mode RET
>
> * Try to load some URL:
> C-x C-f C-a C-k http://barzilay.org/ RET
Thanks. By experiment, this was present in 24.3 but fixed in 24.4.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Wed, 18 Mar 2015 11:24:05 GMT)
Full text and
rfc822 format available.
This bug report was last modified 10 years and 174 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.