GNU bug report logs - #11861
24.1.1; ido-mode and interactive f

Previous Next

Package: emacs;

Reported by: Michael Brand <michael.ch.brand <at> gmail.com>

Date: Wed, 4 Jul 2012 18:43:13 UTC

Severity: normal

Found in version 24.1.1

Done: Leo Liu <sdl.web <at> gmail.com>

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 11861 in the body.
You can then email your comments to 11861 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#11861; Package emacs. (Wed, 04 Jul 2012 18:43:13 GMT) Full text and rfc822 format available.

Acknowledgement sent to Michael Brand <michael.ch.brand <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 04 Jul 2012 18:43:13 GMT) Full text and rfc822 format available.

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

From: Michael Brand <michael.ch.brand <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.1.1; ido-mode and interactive f
Date: Wed, 4 Jul 2012 16:53:08 +0200
Hi all

There is an unexpected behaviour of ido-mode that I could only drill
down from org-babel-load-file but not analyse further. Emacs 23.3.1
shows test.el as the first ido suggestion as expected, 24.1.1 does
not. Is this a bug in 24.1.1?

The issue is easily reproduced with the shell command:
emacs -q test.el --eval '(eval-buffer)'

and this file test.el:
#+BEGIN_SRC emacs-lisp
  (ido-mode 1)
  (ido-everywhere 1)
  (defun my-test (file)
    (interactive "fFile to load: ")
    (message "my-test file: %s" file))
  (call-interactively 'my-test)
#+END_SRC

Michael




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11861; Package emacs. (Tue, 09 Jul 2013 05:29:02 GMT) Full text and rfc822 format available.

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

From: Leo Liu <sdl.web <at> gmail.com>
To: Michael Brand <michael.ch.brand <at> gmail.com>
Cc: 11861 <at> debbugs.gnu.org
Subject: Re: bug#11861: 24.1.1; ido-mode and interactive f
Date: Tue, 09 Jul 2013 13:28:14 +0800
On 2012-07-04 22:53 +0800, Michael Brand wrote:
> There is an unexpected behaviour of ido-mode that I could only drill
> down from org-babel-load-file but not analyse further. Emacs 23.3.1
> shows test.el as the first ido suggestion as expected, 24.1.1 does
> not. Is this a bug in 24.1.1?

I can't see any abnormal behaviour with latest ido in emacs trunk. Would
you be able to explain what the problem was? Thanks.

Leo




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11861; Package emacs. (Tue, 09 Jul 2013 14:09:01 GMT) Full text and rfc822 format available.

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

From: Michael Brand <michael.ch.brand <at> gmail.com>
To: Leo Liu <sdl.web <at> gmail.com>
Cc: 11861 <at> debbugs.gnu.org
Subject: Re: bug#11861: 24.1.1; ido-mode and interactive f
Date: Tue, 9 Jul 2013 16:08:02 +0200
Hi Leo

Thank you for looking into this.

On Tue, Jul 9, 2013 at 7:28 AM, Leo Liu <sdl.web <at> gmail.com> wrote:
> On 2012-07-04 22:53 +0800, Michael Brand wrote:
>> There is an unexpected behaviour of ido-mode that I could only drill
>> down from org-babel-load-file but not analyse further. Emacs 23.3.1
>> shows test.el as the first ido suggestion as expected, 24.1.1 does
>> not. Is this a bug in 24.1.1?
>
> I can't see any abnormal behaviour with latest ido in emacs trunk. Would
> you be able to explain what the problem was? Thanks.

Emacs 23.3 invoked as described in my first post ("emacs -q test.el
--eval '(eval-buffer)'" with this

;;-----------------------------------------------------------
(ido-mode 1)
(ido-everywhere 1)
(defun my-test (file)
  (interactive "fFile to load: ")
  (message "my-test file: %s" file))
(call-interactively 'my-test)
;;-----------------------------------------------------------

in the file test.el and invoked from the directory where the file is
located) shows test.el highlighted as the first ido-suggestion in the
modeline prompt "File to load:". That is the file of the current
buffer test.el, as expected.

But Emacs 24.1, 24.2 and 24.3 show the alphabetically first file in
the directory, highlighted as the first ido-suggestion in the prompt.

Michael




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11861; Package emacs. (Tue, 09 Jul 2013 15:26:02 GMT) Full text and rfc822 format available.

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

From: Leo Liu <sdl.web <at> gmail.com>
To: Michael Brand <michael.ch.brand <at> gmail.com>
Cc: 11861 <at> debbugs.gnu.org
Subject: Re: bug#11861: 24.1.1; ido-mode and interactive f
Date: Tue, 09 Jul 2013 23:25:41 +0800
On 2013-07-09 22:08 +0800, Michael Brand wrote:
> in the file test.el and invoked from the directory where the file is
> located) shows test.el highlighted as the first ido-suggestion in the
> modeline prompt "File to load:". That is the file of the current
> buffer test.el, as expected.
>
> But Emacs 24.1, 24.2 and 24.3 show the alphabetically first file in
> the directory, highlighted as the first ido-suggestion in the prompt.

I loaded a version of ido.el from 28 Feb 2011 which is a few days before
the release of 23.3 and still couldn't reproduce this bug. I have 23.4
installed and couldn't reproduce either.

But from reading the code, the behaviour as you described in 23.3 would
be wrong anyway. You didn't specify any default filename in the
interactive form, there is no reason for ido to pick test.el as the
default.

HTH,
Leo




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11861; Package emacs. (Tue, 09 Jul 2013 20:30:03 GMT) Full text and rfc822 format available.

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

From: Michael Brand <michael.ch.brand <at> gmail.com>
To: Leo Liu <sdl.web <at> gmail.com>
Cc: 11861 <at> debbugs.gnu.org
Subject: Re: bug#11861: 24.1.1; ido-mode and interactive f
Date: Tue, 9 Jul 2013 22:28:53 +0200
Hi Leo

On Tue, Jul 9, 2013 at 5:25 PM, Leo Liu <sdl.web <at> gmail.com> wrote:
> On 2013-07-09 22:08 +0800, Michael Brand wrote:
>> in the file test.el and invoked from the directory where the file is
>> located) shows test.el highlighted as the first ido-suggestion in the
>> modeline prompt "File to load:". That is the file of the current
>> buffer test.el, as expected.
>>
>> But Emacs 24.1, 24.2 and 24.3 show the alphabetically first file in
>> the directory, highlighted as the first ido-suggestion in the prompt.
>
> I loaded a version of ido.el from 28 Feb 2011 which is a few days before
> the release of 23.3 and still couldn't reproduce this bug. I have 23.4
> installed and couldn't reproduce either.

?

There is no such bug in 23.3 and 23.4, both suggest test.el as
expected. I can reproduce the issue with 24.1, 24.2 and 24.3, these do
not suggest test.el. Did you try one of the latter with my example
command line with -q and my example file? I also assume you tried
while having additional files in the same directory with names
alphabetically before test.el.

> But from reading the code, the behaviour as you described in 23.3 would
> be wrong anyway.

> You didn't specify any default filename in the interactive form,

My previous interactive form in test.el seems not to be a good
example, so let me suggest to replace it with test_2.el with an
automated "M-x load-file":

emacs -q test_2.el -f eval-buffer

test_2.el:
;;-----------------------------------------------------------
(ido-mode 1)
(ido-everywhere 1)
(call-interactively 'load-file)
;;-----------------------------------------------------------

With 23.3 ido suggests the current buffer which I then can select,
with 24.1, 24.2 and 24.3 ido suggest the alphabetically first file of
the current directory, so I have to type the current buffer's file
name again.

> there is no reason for ido to pick test.el as the default.

Ok, for "M-x load-file" one could argue to use "M-x eval-buffer"
instead. But for "M-x org-babel-load-file" the ido suggestion was very
useful for me as I see no alternative except writing my own wrapper
for 24.1, 24.2 and 24.3 with the function current-buffer.

Michael




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11861; Package emacs. (Wed, 10 Jul 2013 02:49:02 GMT) Full text and rfc822 format available.

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

From: Leo Liu <sdl.web <at> gmail.com>
To: Michael Brand <michael.ch.brand <at> gmail.com>
Cc: 11861 <at> debbugs.gnu.org
Subject: Re: bug#11861: 24.1.1; ido-mode and interactive f
Date: Wed, 10 Jul 2013 10:48:33 +0800
On 2013-07-10 04:28 +0800, Michael Brand wrote:
> emacs -q test_2.el -f eval-buffer
>
> test_2.el:
> ;;-----------------------------------------------------------
> (ido-mode 1)
> (ido-everywhere 1)
> (call-interactively 'load-file)
> ;;-----------------------------------------------------------
>
> With 23.3 ido suggests the current buffer which I then can select,
> with 24.1, 24.2 and 24.3 ido suggest the alphabetically first file of
> the current directory, so I have to type the current buffer's file
> name again.

OK, I find a version of emacs 23.1 and was able to reproduce it i.e.
test_2.el is the first item.

But when I load the ido.el in 23.1 with emacs 24.x, test_2.el is no
longer the first item.

Could you check if this is the case for you too?

I am clueless where things might go wrong.

Leo




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11861; Package emacs. (Wed, 10 Jul 2013 13:21:02 GMT) Full text and rfc822 format available.

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

From: Michael Brand <michael.ch.brand <at> gmail.com>
To: Leo Liu <sdl.web <at> gmail.com>
Cc: 11861 <at> debbugs.gnu.org
Subject: Re: bug#11861: 24.1.1; ido-mode and interactive f
Date: Wed, 10 Jul 2013 15:20:51 +0200
Hi Leo

On Wed, Jul 10, 2013 at 4:48 AM, Leo Liu <sdl.web <at> gmail.com> wrote:
> OK, I find a version of emacs 23.1 and was able to reproduce it i.e.
> test_2.el is the first item.
>
> But when I load the ido.el in 23.1 with emacs 24.x, test_2.el is no
> longer the first item.
>
> Could you check if this is the case for you too?

Yes, confirmed, with minimal distance 23.3=23.4 vs. 24.1:
- Emacs 23.3:
  - ido.el original from 23.3: test_2.el is the first item, as expected
  - ido.el replaced from 24.1: test_2.el is the first item, as expected
- Emacs 24.1:
  - ido.el original from 24.1: test_2.el is not the first item, not as
    expected
  - ido.el replaced from 23.3: test_2.el is not the first item, not as
    expected

Michael




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11861; Package emacs. (Thu, 11 Jul 2013 03:14:02 GMT) Full text and rfc822 format available.

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

From: Leo Liu <sdl.web <at> gmail.com>
To: Michael Brand <michael.ch.brand <at> gmail.com>
Cc: 11861 <at> debbugs.gnu.org
Subject: Re: bug#11861: 24.1.1; ido-mode and interactive f
Date: Thu, 11 Jul 2013 11:13:11 +0800
On 2013-07-10 21:20 +0800, Michael Brand wrote:
> Yes, confirmed, with minimal distance 23.3=23.4 vs. 24.1:
> - Emacs 23.3:
>   - ido.el original from 23.3: test_2.el is the first item, as expected
>   - ido.el replaced from 24.1: test_2.el is the first item, as expected
> - Emacs 24.1:
>   - ido.el original from 24.1: test_2.el is not the first item, not as
>     expected
>   - ido.el replaced from 23.3: test_2.el is not the first item, not as
>     expected

I have committed a change to emacs-trunk. Will you be able to test it
and let me know if there are problems? Thanks.

Leo




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11861; Package emacs. (Thu, 11 Jul 2013 07:04:02 GMT) Full text and rfc822 format available.

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

From: Michael Brand <michael.ch.brand <at> gmail.com>
To: Leo Liu <sdl.web <at> gmail.com>
Cc: 11861 <at> debbugs.gnu.org
Subject: Re: bug#11861: 24.1.1; ido-mode and interactive f
Date: Thu, 11 Jul 2013 09:02:51 +0200
Hi Leo

On Thu, Jul 11, 2013 at 5:13 AM, Leo Liu <sdl.web <at> gmail.com> wrote:
> I have committed a change to emacs-trunk. Will you be able to test it
> and let me know if there are problems? Thanks.

Tested with Emacs 24.3 with your change for revision 113366 applied on
the original lisp/ido.el: Bug resolved, thank you.

Michael




Reply sent to Leo Liu <sdl.web <at> gmail.com>:
You have taken responsibility. (Thu, 11 Jul 2013 15:44:03 GMT) Full text and rfc822 format available.

Notification sent to Michael Brand <michael.ch.brand <at> gmail.com>:
bug acknowledged by developer. (Thu, 11 Jul 2013 15:44:04 GMT) Full text and rfc822 format available.

Message #34 received at 11861-done <at> debbugs.gnu.org (full text, mbox):

From: Leo Liu <sdl.web <at> gmail.com>
To: Michael Brand <michael.ch.brand <at> gmail.com>
Cc: 11861-done <at> debbugs.gnu.org
Subject: Re: bug#11861: 24.1.1; ido-mode and interactive f
Date: Thu, 11 Jul 2013 23:42:47 +0800
Fixed in trunk.

On 2013-07-11 15:02 +0800, Michael Brand wrote:
> Tested with Emacs 24.3 with your change for revision 113366 applied on
> the original lisp/ido.el: Bug resolved, thank you.

Thanks for the confirmation.

Leo




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 09 Aug 2013 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 10 years and 283 days ago.

Previous Next


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