* bug#14806: 24.3.50; Enabling read-file-name-completion-ignore-case breaks url-handler-mode
@ 2013-07-06 19:57 Stephen Berman
2013-07-10 20:41 ` Glenn Morris
0 siblings, 1 reply; 4+ messages in thread
From: Stephen Berman @ 2013-07-06 19:57 UTC (permalink / raw
To: 14806
[-- Attachment #1: Type: text/plain, Size: 216 bytes --]
0. emacs -Q
1. M-: (setq read-file-name-completion-ignore-case t) (or customize it,
or use set-variable)
2. M-x url-handler-mode
3. C-x C-f http://www.gnu.org RET
=> error "Unimplemented"
Here's the backtrace:
[-- Attachment #2: backtrace --]
[-- Type: text/plain, Size: 10925 bytes --]
Debugger entered--Lisp error: (error "Unimplemented")
signal(error ("Unimplemented"))
completion--some(#[257 "\303\302\x02\300\301$\207" ["http://www.gnu.org" file-exists-p nil complete-with-action] 6 "\n\n(fn TABLE)"] (completion--embedded-envvar-table completion--file-name-table))
read-file-name-internal("http://www.gnu.org" file-exists-p nil)
try-completion("http://www.gnu.org" read-file-name-internal file-exists-p)
minibuffer--complete-and-exit(#[0 "\301\302\303D\304\302\305\301EDC\217\211\306>\203\x17\0\307 \202/\0\211\310=\203.\0\b\204&\0\307 \202/\0\311\312!\210\313\202/\0\313\207" [minibuffer-completion-confirm err funcall #[0 "\300\301\302\"\207" [completion--do-completion nil expect-exact] 3 "\n\n(fn)"] error #[257 "\300\207" [1] 2 "\n\n(fn IGNORED)"] (1 3) exit-minibuffer 7 minibuffer-message "Confirm" nil] 6 "\n\n(fn)"])
minibuffer-complete-and-exit()
call-interactively(minibuffer-complete-and-exit nil nil)
command-execute(minibuffer-complete-and-exit)
read-from-minibuffer("Find file: " "/data/steve/bzr/emacs/quickfixes/lisp/" (keymap (keymap (32)) keymap (10 . minibuffer-complete-and-exit) (13 . minibuffer-complete-and-exit) keymap (menu-bar keymap (minibuf "Minibuf" keymap (tab menu-item "Complete" minibuffer-complete :help "Complete as far as possible") (space menu-item "Complete Word" minibuffer-complete-word :help "Complete at most one word") (63 menu-item "List Completions" minibuffer-completion-help :help "Display all possible completions") "Minibuf")) (27 keymap (118 . switch-to-completions)) (prior . switch-to-completions) (63 . minibuffer-completion-help) (32 . minibuffer-complete-word) (9 . minibuffer-complete) keymap (menu-bar keymap (minibuf "Minibuf" keymap (previous menu-item "Previous History Item" previous-history-element :help "Put previous minibuffer history element in the minibuffer") (next menu-item "Next History Item" next-history-element :help "Put next minibuffer history element in the minibuffer") (isearch-backward menu-item "Isearch History Backward" isearch-backward :help "Incrementally search minibuffer history backward") (isearch-forward menu-item "Isearch History Forward" isearch-forward :help "Incrementally search minibuffer history forward") (return menu-item "Enter" exit-minibuffer :key-sequence "\r" :help "Terminate input and exit minibuffer") (quit menu-item "Quit" abort-recursive-edit :help "Abort input and exit minibuffer") "Minibuf")) (10 . exit-minibuffer) (13 . exit-minibuffer) (7 . abort-recursive-edit) (C-tab . file-cache-minibuffer-complete) (9 . self-insert-command) (XF86Back . previous-history-element) (up . previous-history-element) (prior . previous-history-element) (XF86Forward . next-history-element) (down . next-history-element) (next . next-history-element) (27 keymap (114 . previous-matching-history-element) (115 . next-matching-history-element) (112 . previous-history-element) (110 . next-history-element))) nil file-name-history "/data/steve/bzr/emacs/quickfixes/lisp/" nil)
completing-read-default("Find file: " read-file-name-internal file-exists-p confirm-after-completion "/data/steve/bzr/emacs/quickfixes/lisp/" file-name-history "/data/steve/bzr/emacs/quickfixes/lisp/" nil)
completing-read("Find file: " read-file-name-internal file-exists-p confirm-after-completion "/data/steve/bzr/emacs/quickfixes/lisp/" file-name-history "/data/steve/bzr/emacs/quickfixes/lisp/")
(progn (add-hook (quote minibuffer-setup-hook) setup-hook) (completing-read prompt (quote read-file-name-internal) pred mustmatch insdef (quote file-name-history) default-filename))
(unwind-protect (progn (add-hook (quote minibuffer-setup-hook) setup-hook) (completing-read prompt (quote read-file-name-internal) pred mustmatch insdef (quote file-name-history) default-filename)) (remove-hook (quote minibuffer-setup-hook) setup-hook))
(let (setup-hook) (setq setup-hook (function (lambda nil (remove-hook (quote minibuffer-setup-hook) setup-hook) (funcall (function (lambda nil (setq default-directory dir) (if ... ...) (set ... ...) (set-syntax-table minibuffer-local-filename-syntax))))))) (unwind-protect (progn (add-hook (quote minibuffer-setup-hook) setup-hook) (completing-read prompt (quote read-file-name-internal) pred mustmatch insdef (quote file-name-history) default-filename)) (remove-hook (quote minibuffer-setup-hook) setup-hook)))
(let ((dir (file-name-as-directory (expand-file-name dir)))) (let (setup-hook) (setq setup-hook (function (lambda nil (remove-hook (quote minibuffer-setup-hook) setup-hook) (funcall (function (lambda nil ... ... ... ...)))))) (unwind-protect (progn (add-hook (quote minibuffer-setup-hook) setup-hook) (completing-read prompt (quote read-file-name-internal) pred mustmatch insdef (quote file-name-history) default-filename)) (remove-hook (quote minibuffer-setup-hook) setup-hook))))
(if (or (not (next-read-file-uses-dialog-p)) (file-remote-p dir)) (let ((dir (file-name-as-directory (expand-file-name dir)))) (let (setup-hook) (setq setup-hook (function (lambda nil (remove-hook (quote minibuffer-setup-hook) setup-hook) (funcall (function ...))))) (unwind-protect (progn (add-hook (quote minibuffer-setup-hook) setup-hook) (completing-read prompt (quote read-file-name-internal) pred mustmatch insdef (quote file-name-history) default-filename)) (remove-hook (quote minibuffer-setup-hook) setup-hook)))) (let ((file (file-name-nondirectory dir)) (dialog-mustmatch (not (memq mustmatch (quote (nil confirm confirm-after-completion)))))) (if (and (not default-filename) (not (zerop (length file)))) (progn (setq default-filename file) (setq dir (file-name-directory dir)))) (if default-filename (progn (setq default-filename (expand-file-name (if (consp default-filename) (car default-filename) default-filename) dir)))) (setq add-to-history t) (x-file-dialog prompt dir default-filename dialog-mustmatch (eq predicate (quote file-directory-p)))))
(let* ((val (if (or (not (next-read-file-uses-dialog-p)) (file-remote-p dir)) (let ((dir (file-name-as-directory ...))) (let (setup-hook) (setq setup-hook (function ...)) (unwind-protect (progn ... ...) (remove-hook ... setup-hook)))) (let ((file (file-name-nondirectory dir)) (dialog-mustmatch (not ...))) (if (and (not default-filename) (not ...)) (progn (setq default-filename file) (setq dir ...))) (if default-filename (progn (setq default-filename ...))) (setq add-to-history t) (x-file-dialog prompt dir default-filename dialog-mustmatch (eq predicate (quote file-directory-p)))))) (replace-in-history (eq (car-safe file-name-history) val))) (if (consp default-filename) (progn (setq default-filename (car default-filename)))) (if (eq val default-filename) (progn (if (not replace-in-history) (setq add-to-history t)) (setq val ""))) (if val nil (error "No file name specified")) (if (and default-filename (string-equal val (if (consp insdef) (car insdef) insdef))) (setq val default-filename)) (setq val (substitute-in-file-name val)) (if replace-in-history (let ((val1 (minibuffer--double-dollars val))) (if history-delete-duplicates (setcdr file-name-history (delete val1 (cdr file-name-history)))) (if (string= val1 (cadr file-name-history)) (car (prog1 file-name-history (setq file-name-history (cdr file-name-history)))) (setcar file-name-history val1))) (if add-to-history (let ((val1 (minibuffer--double-dollars val))) (if (and (consp file-name-history) (equal (car file-name-history) val1)) nil (setq file-name-history (cons val1 (if history-delete-duplicates ... file-name-history))))))) val)
(let ((completion-ignore-case read-file-name-completion-ignore-case) (minibuffer-completing-file-name t) (pred (or predicate (quote file-exists-p))) (add-to-history nil)) (let* ((val (if (or (not (next-read-file-uses-dialog-p)) (file-remote-p dir)) (let ((dir ...)) (let (setup-hook) (setq setup-hook ...) (unwind-protect ... ...))) (let ((file ...) (dialog-mustmatch ...)) (if (and ... ...) (progn ... ...)) (if default-filename (progn ...)) (setq add-to-history t) (x-file-dialog prompt dir default-filename dialog-mustmatch (eq predicate ...))))) (replace-in-history (eq (car-safe file-name-history) val))) (if (consp default-filename) (progn (setq default-filename (car default-filename)))) (if (eq val default-filename) (progn (if (not replace-in-history) (setq add-to-history t)) (setq val ""))) (if val nil (error "No file name specified")) (if (and default-filename (string-equal val (if (consp insdef) (car insdef) insdef))) (setq val default-filename)) (setq val (substitute-in-file-name val)) (if replace-in-history (let ((val1 (minibuffer--double-dollars val))) (if history-delete-duplicates (setcdr file-name-history (delete val1 (cdr file-name-history)))) (if (string= val1 (cadr file-name-history)) (car (prog1 file-name-history (setq file-name-history ...))) (setcar file-name-history val1))) (if add-to-history (let ((val1 (minibuffer--double-dollars val))) (if (and (consp file-name-history) (equal ... val1)) nil (setq file-name-history (cons val1 ...)))))) val))
(let ((insdef (cond ((and insert-default-directory (stringp dir)) (if initial (cons (minibuffer--double-dollars ...) (length ...)) (minibuffer--double-dollars dir))) (initial (cons (minibuffer--double-dollars initial) 0))))) (let ((completion-ignore-case read-file-name-completion-ignore-case) (minibuffer-completing-file-name t) (pred (or predicate (quote file-exists-p))) (add-to-history nil)) (let* ((val (if (or (not ...) (file-remote-p dir)) (let (...) (let ... ... ...)) (let (... ...) (if ... ...) (if default-filename ...) (setq add-to-history t) (x-file-dialog prompt dir default-filename dialog-mustmatch ...)))) (replace-in-history (eq (car-safe file-name-history) val))) (if (consp default-filename) (progn (setq default-filename (car default-filename)))) (if (eq val default-filename) (progn (if (not replace-in-history) (setq add-to-history t)) (setq val ""))) (if val nil (error "No file name specified")) (if (and default-filename (string-equal val (if (consp insdef) (car insdef) insdef))) (setq val default-filename)) (setq val (substitute-in-file-name val)) (if replace-in-history (let ((val1 (minibuffer--double-dollars val))) (if history-delete-duplicates (setcdr file-name-history (delete val1 ...))) (if (string= val1 (cadr file-name-history)) (car (prog1 file-name-history ...)) (setcar file-name-history val1))) (if add-to-history (let ((val1 ...)) (if (and ... ...) nil (setq file-name-history ...))))) val)))
read-file-name-default("Find file: " nil "/data/steve/bzr/emacs/quickfixes/lisp/" confirm-after-completion nil nil)
read-file-name("Find file: " nil "/data/steve/bzr/emacs/quickfixes/lisp/" confirm-after-completion)
find-file-read-args("Find file: " confirm-after-completion)
byte-code("\300\301\302 \"\207" [find-file-read-args "Find file: " confirm-nonexistent-file-or-buffer] 3)
call-interactively(find-file nil nil)
command-execute(find-file)
[-- Attachment #3: Type: text/plain, Size: 716 bytes --]
If you leave read-file-name-completion-ignore-case nil (the default) and
do the rest of recipe, it downloads the content of the URL, as expected.
I suspect this bug is related to bug#11339.
In GNU Emacs 24.3.50.6 (x86_64-suse-linux-gnu, GTK+ Version 3.4.4)
of 2013-07-05 on rosalinde
Bzr revision: 113286 sdl.web@gmail.com-20130705023739-rabvfwfbinmi56v3
Windowing system distributor `The X.Org Foundation', version 11.0.11203000
System Description: openSUSE 12.2 (x86_64)
Configured using:
`configure --without-toolkit-scroll-bars CFLAGS=-g3 -O0'
Important settings:
value of $LANG: en_US.UTF-8
value of $XMODIFIERS: @im=local
locale-coding-system: utf-8-unix
default enable-multibyte-characters: t
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#14806: 24.3.50; Enabling read-file-name-completion-ignore-case breaks url-handler-mode
2013-07-06 19:57 bug#14806: 24.3.50; Enabling read-file-name-completion-ignore-case breaks url-handler-mode Stephen Berman
@ 2013-07-10 20:41 ` Glenn Morris
2013-07-10 22:20 ` Stephen Berman
0 siblings, 1 reply; 4+ messages in thread
From: Glenn Morris @ 2013-07-10 20:41 UTC (permalink / raw
To: Stephen Berman; +Cc: 14806
Stephen Berman wrote:
> 0. emacs -Q
> 1. M-: (setq read-file-name-completion-ignore-case t) (or customize it,
> or use set-variable)
> 2. M-x url-handler-mode
> 3. C-x C-f http://www.gnu.org RET
> => error "Unimplemented"
RET actually runs minibuffer-complete-and-exit, when
completion-ignore-case is non-nil it tries to complete the input,
completion is (obviously) not implemented for URLs.
Dunno what to do about that.
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#14806: 24.3.50; Enabling read-file-name-completion-ignore-case breaks url-handler-mode
2013-07-10 20:41 ` Glenn Morris
@ 2013-07-10 22:20 ` Stephen Berman
2013-07-31 4:19 ` Stefan Monnier
0 siblings, 1 reply; 4+ messages in thread
From: Stephen Berman @ 2013-07-10 22:20 UTC (permalink / raw
To: Glenn Morris; +Cc: 14806
On Wed, 10 Jul 2013 16:41:39 -0400 Glenn Morris <rgm@gnu.org> wrote:
> Stephen Berman wrote:
>
>> 0. emacs -Q
>> 1. M-: (setq read-file-name-completion-ignore-case t) (or customize it,
>> or use set-variable)
>> 2. M-x url-handler-mode
>> 3. C-x C-f http://www.gnu.org RET
>> => error "Unimplemented"
>
> RET actually runs minibuffer-complete-and-exit, when
> completion-ignore-case is non-nil it tries to complete the input,
> completion is (obviously) not implemented for URLs.
> Dunno what to do about that.
To prevent the problem I reported, we could either change
(defun url-file-name-completion (url directory &optional predicate)
(error "Unimplemented"))
to
(defun url-file-name-completion (url directory &optional predicate)
(ignore))
or replace
(put 'file-name-completion 'url-file-handlers 'url-file-name-completion)
by
(put 'file-name-completion 'url-file-handlers 'ignore)
url-handlers.el already does the latter for "operations that we do not
support yet (DAV!!!)". If the user tries to complete with TAB,
url-file-name-all-completions errors with "Unimplemented". If we use
'ignore here too, then trying to complete gives "[No match]". But as
long as the URL is valid and real, the page gets downloaded, so this
certainly seems better than the current state. Is there some other
reason not to do this?
Steve Berman
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-07-31 4:19 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-06 19:57 bug#14806: 24.3.50; Enabling read-file-name-completion-ignore-case breaks url-handler-mode Stephen Berman
2013-07-10 20:41 ` Glenn Morris
2013-07-10 22:20 ` Stephen Berman
2013-07-31 4:19 ` Stefan Monnier
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.