GNU bug report logs -
#3274
ido-completing-read doesn't work unless ido-mode is executed
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 3274 in the body.
You can then email your comments to 3274 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#3274
; Package
emacs
.
(Wed, 13 May 2009 18:05:13 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Daniel Colascione <dan.colascione <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
(Wed, 13 May 2009 18:05:13 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):
ido-completing-read acts very strangely when ido-mode hasn't been run.
It creates a minibuffer with default bindings for RET which doesn't
report to C-g. This stub buffer is very difficult to exit.
Ideally, ido-completing-read would read in ido style regardless of
whether ido-mode is run. At the very least, it should act like
completing-read.
To reproduce, run emacs -Q, then evaluate
(ido-completing-read "test" '("1" "2" "3"))
In GNU Emacs 22.3.1 (i386-redhat-linux-gnu, GTK+ Version 2.14.7)
of 2009-02-09 on x86-5.fedora.phx.redhat.com
Windowing system distributor `The X.Org Foundation', version 11.0.10503000
configured using `configure '--build=i386-redhat-linux-gnu' '--host=i386-redhat-linux-gnu' '--target=i386-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/usr/com' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--with-x-toolkit=gtk' 'build_alias=i386-redhat-linux-gnu' 'host_alias=i386-redhat-linux-gnu' 'target_alias=i386-redhat-linux-gnu' 'CFLAGS=-DMAIL_USE_LOCKF -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables''
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
locale-coding-system: utf-8
default-enable-multibyte-characters: t
Major mode: PHP
Minor modes in effect:
shell-dirtrack-mode: t
which-function-mode: t
cua-mode: t
global-hi-lock-mode: t
hi-lock-mode: t
show-paren-mode: t
savehist-mode: t
tooltip-mode: t
mouse-wheel-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
unify-8859-on-encoding-mode: t
utf-translate-cjk-mode: t
auto-compression-mode: t
column-number-mode: t
line-number-mode: t
transient-mark-mode: t
abbrev-mode: t
Recent input:
c o n t a c t _ e m a i l , SPC <left> M-b M-b M-d
<delete> <down-mouse-5> <mouse-5> <double-down-mouse-5>
<double-mouse-5> <down-mouse-5> <mouse-5> <double-down-mouse-5>
<double-mouse-5> <down-mouse-5> <mouse-5> <down-mouse-5>
<mouse-5> <down-mouse-5> <mouse-5> <down-mouse-5> <mouse-5>
<double-down-mouse-5> <double-mouse-5> C-x C-s C-x
v v S y u c <backspace> <backspace> <backspace> <backspace>
<backspace> <backspace> <backspace> <backspace> <backspace>
S u c k SPC e m a i l s SPC i n t o SPC p r o d u c
t i o n SPC s y s t e m SPC ( w h y SPC w a s n ' t
SPC t h i s SPC d o n e SPC b e f o r e ? ) C-c C-c
C-x C-f p r <tab> <backspace> <backspace> <backspace>
<backspace> <backspace> <backspace> p r i <tab> <tab>
<backspace> <backspace> <backspace> <tab> <tab> <tab>
w o <tab> <backspace> <backspace> o r d <tab> <tab>
<tab> . <tab> <backspace> <backspace> <backspace> <backspace>
s / <tab> <tab> r <backspace> p r <tab> <tab> <tab>
o r <tab> . <tab> <return> C-s e m a i l C-s C-s <left>
C-x k M-x g r e C-g C-x C-f <up> <up> <backspace> <backspace>
<backspace> <backspace> <backspace> <backspace> <backspace>
<backspace> <backspace> <backspace> <backspace> <backspace>
<backspace> <backspace> <backspace> <backspace> <backspace>
<backspace> <backspace> <backspace> / o r d <tab> <return>
C-x k C-x C-f <up> s <return> M-x g r e p <return>
p <backspace> e m a i l SPC * . p h p <return> <down-mouse-5>
<mouse-5> <help-echo> <down-mouse-4> <mouse-4> <help-echo>
<down-mouse-2> <help-echo> <mouse-2> <help-echo> <help-echo>
C-x 1 C-s e m a i l C-s C-s C-s C-s C-s C-s C-s C-s
C-s C-s C-s C-s C-s C-s C-s C-s <left> M-x r e p o
r t - e m <tab> <return>
Recent messages:
Making completion list... [4 times]
Mark saved where search started
Quit
(New file)
Loading dired...done
Loading grep...done
Mark set
Mark saved where search started
Loading emacsbug...done
call-interactively: Text is read-only [2 times]
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#3274
; Package
emacs
.
(Sun, 28 Nov 2010 13:33:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 3274 <at> debbugs.gnu.org (full text, mbox):
I also ran into this bug a while back but didn't stop to fix it.
Could you verify the following patch fixes the bug?
commit 6ca8e9da0d6b61424a4f60073be0d42bd5b23d05
Date: Sun Nov 28 13:32:44 2010 +0000
Fix initialization in ido-completing-read
Modified lisp/ido.el
diff --git a/lisp/ido.el b/lisp/ido.el
index 70d2d98..f1fc323 100644
--- a/lisp/ido.el
+++ b/lisp/ido.el
@@ -4853,6 +4853,9 @@ DEF, if non-nil, is the default value."
(ido-directory-too-big nil)
(ido-context-switch-command 'ignore)
(ido-choice-list choices))
+ ;; Initialize ido before invoking ido-read-internal
+ (unless (keymapp ido-common-completion-map)
+ (let (ido-mode) (ido-mode 1)))
(ido-read-internal 'list prompt hist def require-match initial-input)))
(defun ido-unload-function ()
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#3274
; Package
emacs
.
(Sun, 28 Nov 2010 13:49:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 3274 <at> debbugs.gnu.org (full text, mbox):
On 2010-11-28 13:37 +0000, Leo wrote:
> I also ran into this bug a while back but didn't stop to fix it.
>
> Could you verify the following patch fixes the bug?
Please consider this patch instead. While the previous fix is minimal it
does a bit too much by calling (ido-mode 1).
commit eb3f3a514c7ebd2db402ca8c2f3ce7088dd8736a (HEAD, refs/heads/Ferrari)
Date: Sun Nov 28 13:32:44 2010 +0000
Fix initialisation in ido-completing-read (#3274)
Modified lisp/ido.el
diff --git a/lisp/ido.el b/lisp/ido.el
index 70d2d98..2cc10b2 100644
--- a/lisp/ido.el
+++ b/lisp/ido.el
@@ -1490,6 +1490,11 @@ Removes badly formatted data and ignored directories."
;; ido kill emacs hook
(ido-save-history))
+(defun ido-common-initilization ()
+ (ido-init-completion-maps)
+ (add-hook 'minibuffer-setup-hook 'ido-minibuffer-setup)
+ (add-hook 'choose-completion-string-functions 'ido-choose-completion-string))
+
(define-minor-mode ido-everywhere
"Toggle using ido speed-ups everywhere file and directory names are read.
With ARG, turn ido speed-up on if arg is positive, off otherwise."
@@ -1533,12 +1538,9 @@ This function also adds a hook to the minibuffer."
(t nil)))
(ido-everywhere (if ido-everywhere 1 -1))
- (when ido-mode
- (ido-init-completion-maps))
(when ido-mode
- (add-hook 'minibuffer-setup-hook 'ido-minibuffer-setup)
- (add-hook 'choose-completion-string-functions 'ido-choose-completion-string)
+ (ido-common-initilization)
(ido-load-history)
(add-hook 'kill-emacs-hook 'ido-kill-emacs-hook)
@@ -4853,6 +4855,8 @@ DEF, if non-nil, is the default value."
(ido-directory-too-big nil)
(ido-context-switch-command 'ignore)
(ido-choice-list choices))
+ ;; Initialize ido before invoking ido-read-internal
+ (ido-common-initilization)
(ido-read-internal 'list prompt hist def require-match initial-input)))
(defun ido-unload-function ()
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#3274
; Package
emacs
.
(Sun, 28 Nov 2010 20:45:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 3274 <at> debbugs.gnu.org (full text, mbox):
>> I also ran into this bug a while back but didn't stop to fix it.
>> Could you verify the following patch fixes the bug?
> --- a/lisp/ido.el
> +++ b/lisp/ido.el
> @@ -4853,6 +4853,9 @@ DEF, if non-nil, is the default value."
> (ido-directory-too-big nil)
> (ido-context-switch-command 'ignore)
> (ido-choice-list choices))
> + ;; Initialize ido before invoking ido-read-internal
> + (unless (keymapp ido-common-completion-map)
> + (let (ido-mode) (ido-mode 1)))
> (ido-read-internal 'list prompt hist def require-match initial-input)))
"(let (ido-mode) (ido-mode 1))" is an "ugly hack" (not only because it
calls (ido-mode 1) but because of the let-binding).
> Please consider this patch instead. While the previous fix is minimal it
> does a bit too much by calling (ido-mode 1).
Glad you found a better solution. Your patch looks good. Savannah is
down right now, so I'll install it later. Thanks.
Stefan
Reply sent
to
Stefan Monnier <monnier <at> IRO.UMontreal.CA>
:
You have taken responsibility.
(Thu, 02 Dec 2010 23:06:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Daniel Colascione <dan.colascione <at> gmail.com>
:
bug acknowledged by developer.
(Thu, 02 Dec 2010 23:06:02 GMT)
Full text and
rfc822 format available.
Message #19 received at 3274-done <at> debbugs.gnu.org (full text, mbox):
>> Please consider this patch instead. While the previous fix is minimal it
>> does a bit too much by calling (ido-mode 1).
> Glad you found a better solution. Your patch looks good. Savannah is
> down right now, so I'll install it later. Thanks.
Should be fixed in emacs-23 now.
Stefan
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Fri, 31 Dec 2010 12:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 14 years and 176 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.