unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#11954: 24.1.50; Ido in dired buffers
@ 2012-07-17  5:52 Marius Hofert
  2013-07-11  4:52 ` Leo Liu
  0 siblings, 1 reply; 6+ messages in thread
From: Marius Hofert @ 2012-07-17  5:52 UTC (permalink / raw)
  To: 11954

This bug report will be sent to the Bug-GNU-Emacs mailing list
and the GNU bug tracker at debbugs.gnu.org.  Please check that
the From: line contains a valid email address.  After a delay of up
to one day, you should receive an acknowledgement at that address.

Please write in English if possible, as the Emacs maintainers
usually do not have translators for other languages.

Please describe exactly what actions triggered the bug, and
the precise symptoms of the bug.  If you can, give a recipe
starting from `emacs -Q':

###

I use dired mode a lot and have recently started to use ido mode. I have the
following settings in .emacs to use ido mode in buffers and for finding files:

(ido-mode 1); enable ido-mode
(setq ido-enable-flex-matching t); flexibly match names via fuzzy matching
(ido-everywhere t); use ido-mode everywhere, in buffers and for finding files
(setq ido-use-filename-at-point 'guess); for find-file-at-point
(setq ido-use-url-at-point t); look for URLs at point
(setq ffap-require-prefix t); get find-file-at-point with C-u C-x C-f (used to
be C-x C-f without ido)

I was wondering if it is possible to use ido mode when copying ('C') or renaming
('R') files in dired mode. I asked on stackoverflow (see
http://stackoverflow.com/questions/11505878/get-ido-in-dired-buffers) and as the
user "assem" pointed out, I should submit this question as a bug report/feature
request. By calling ido-everywhere correctly, 'C' is already working in dired
mode. "assem" also gave a hint towards a solution for 'R':

,----
| The problem is the 'ido property in the symbol for 'dired-do-rename has been specifically set to 'ignore. As a result, inside of ido-read-file-name the (and ...) clause that falls into completing-read fails, and it jumps into the fallback, ultimately to read-file-name-default
`----

and

,----
| Surely they had a very good reason for this, but I will say that doing (put 'dired-do-rename 'ido 'find-file) gives an ido-completing read and had no adverse consequences for me to rename a basic file and directory. I don't recommend this though - instead I would submit a bug report/feature request
`----

It would be great if dired mode ("in ido mode") would work as expected and use
ido when 'R'-ing files. 

Cheers,

Marius

###

If Emacs crashed, and you have the Emacs process in the gdb debugger,
please include the output from the following gdb commands:
    `bt full' and `xbacktrace'.
For information about debugging Emacs, please read the file
/usr/share/emacs/24.1.50/etc/DEBUG.


In GNU Emacs 24.1.50.1 (x86_64-pc-linux-gnu, GTK+ Version 3.4.2)
 of 2012-07-13 on lychee, modified by Debian
 (emacs-snapshot package, version 2:20120712-1~ppa1~precise1)
Windowing system distributor `The X.Org Foundation', version 11.0.11103000
Configured using:
 `configure '--build' 'x86_64-linux-gnu' '--host' 'x86_64-linux-gnu'
 '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib'
 '--localstatedir=/var' '--infodir=/usr/share/info' '--mandir=/usr/share/man'
 '--with-pop=yes'
 '--enable-locallisppath=/etc/emacs-snapshot:/etc/emacs:/usr/local/share/emacs/24.1.50/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.1.50/site-lisp:/usr/share/emacs/site-lisp'
 '--without-compress-info' '--with-crt-dir=/usr/lib/x86_64-linux-gnu/'
 '--with-x=yes' '--with-x-toolkit=gtk3' '--with-imagemagick=yes'
 'build_alias=x86_64-linux-gnu' 'host_alias=x86_64-linux-gnu' 'CFLAGS=-DDEBIAN
 -DSITELOAD_PURESIZE_EXTRA=5000 -g -O2' 'LDFLAGS=-g -Wl,--as-needed
 -znocombreloc' 'CPPFLAGS=-D_FORTIFY_SOURCE=2''

Important settings:
  value of $LC_MONETARY: en_US.UTF-8
  value of $LC_TIME: en_US.UTF-8
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: ESS[S]

Minor modes in effect:
  gnus-desktop-notify-mode: t
  ess-roxy-mode: t
  TeX-PDF-mode: t
  flyspell-mode: t
  shell-dirtrack-mode: t
  eldoc-mode: t
  yas/global-mode: t
  yas/minor-mode: t
  desktop-save-mode: t
  ido-everywhere: t
  show-paren-mode: t
  delete-selection-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
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s <left> <left> 
<left> <left> <left> <left> <left> <left> <left> <left> 
<left> <left> <left> <left> <left> <left> <left> <left> 
<left> <left> C-SPC <down> C-e <down> C-w C-/ <up> 
<up> C-a C-SPC <down> <down> C-w C-/ <up> <up> C-SPC 
<down> <down> C-e C-w <backspace> C-x C-s M-> <left> 
<tab> s <return> * SPC <backspace> * SPC x u b n u 
t n <backspace> <backspace> <backspace> <backspace> 
<backspace> b u n u t <backspace> <backspace> <backspace> 
n t u <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <return> * * SPC e m a c s <return> C-y 
<up> <up> <up> <left> <left> <left> <left> <backspace> 
E C-e <down> <down> C-e <return> * * SPC o r g - m 
o d e C-x C-s <up> <up> <up> <up> <up> <up> <up> <up> 
<up> <up> <up> <left> <left> <left> <left> <left> <left> 
<down> <left> <backspace> X C-x C-s C-r b u g C-r C-r 
C-r C-r C-r C-r C-r C-r C-r C-r C-r C-r C-r C-r C-r 
C-r C-r C-r C-r C-r C-r C-r C-r <left> <left> <left> 
<left> <left> <left> <left> <left> <left> <left> <left> 
<left> <left> <left> <left> <left> <left> <left> <left> 
<left> <left> <left> <left> C-e <left> <left> <left> 
<left> <left> <left> <left> <left> <left> <left> <left> 
<right> <right> <left> <left> <left> <left> <left> 
<left> <left> i n f o SPC <right> <right> <right> <right> 
r e p o r t i n g SPC C-e <left> <left> <backspace> 
<backspace> <backspace> <backspace> <backspace> <backspace> 
<backspace> C-x C-s M-> C-x C-s <switch-frame> M-x 
g <return> <return> <return> E <return> q g <switch-frame> 
<switch-frame> <switch-frame> <switch-frame> m b u 
g <tab> <tab> <tab> C-x k <return> y q C-x k <return> 
M-x r e p o <tab> r <tab> <return>

Recent messages:
Reading active file via nndraft...done
Checking new news...done
Mark set [2 times]
No match [2 times]
Buffer *unsent mail* modified; kill anyway? (y or n)  y
Saving /home/mhofert/.newsrc.eld...
Saving file /home/mhofert/.newsrc.eld...
Wrote /home/mhofert/.newsrc.eld
Saving /home/mhofert/.newsrc.eld...done
Making completion list...

Load-path shadows:








^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#11954: 24.1.50; Ido in dired buffers
  2012-07-17  5:52 bug#11954: 24.1.50; Ido in dired buffers Marius Hofert
@ 2013-07-11  4:52 ` Leo Liu
  2013-07-11  8:45   ` Kim Storm
  0 siblings, 1 reply; 6+ messages in thread
From: Leo Liu @ 2013-07-11  4:52 UTC (permalink / raw)
  To: Kim F. Storm; +Cc: 11954, Marius Hofert

Hi Kim,

On 2012-07-17 13:52 +0800, Marius Hofert wrote:
> It would be great if dired mode ("in ido mode") would work as expected and use
> ido when 'R'-ing files.

I wonder if you remember the rationale behind disabling ido for
dired-do-rename as by this line in ido.el

        (put 'dired-do-rename 'ido 'ignore)

Any harm in turning ido on for it? Thanks.

Leo





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#11954: 24.1.50; Ido in dired buffers
  2013-07-11  4:52 ` Leo Liu
@ 2013-07-11  8:45   ` Kim Storm
  2013-07-11 16:02     ` Leo Liu
  0 siblings, 1 reply; 6+ messages in thread
From: Kim Storm @ 2013-07-11  8:45 UTC (permalink / raw)
  To: Leo Liu; +Cc: 11954, Marius Hofert

On 2013-07-11 06:52, Leo Liu wrote:
> Hi Kim,
>
> On 2012-07-17 13:52 +0800, Marius Hofert wrote:
>> It would be great if dired mode ("in ido mode") would work as expected and use
>> ido when 'R'-ing files.
> I wonder if you remember the rationale behind disabling ido for
> dired-do-rename as by this line in ido.el
>
>          (put 'dired-do-rename 'ido 'ignore)
>
> Any harm in turning ido on for it? Thanks.
>
> Leo
>
As far as I remember it was disabled because - as you type the new name 
- ido would suggest names of existing files,
and when you hit return, the first suggested file (if any matches the 
new name) is overwritten.

So I think it was too dangerous to enable by default .

Kim





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#11954: 24.1.50; Ido in dired buffers
  2013-07-11  8:45   ` Kim Storm
@ 2013-07-11 16:02     ` Leo Liu
  2013-07-11 16:36       ` Kim Storm
  0 siblings, 1 reply; 6+ messages in thread
From: Leo Liu @ 2013-07-11 16:02 UTC (permalink / raw)
  To: Kim Storm; +Cc: 11954, Marius Hofert

On 2013-07-11 16:45 +0800, Kim Storm wrote:
> As far as I remember it was disabled because - as you type the new
> name - ido would suggest names of existing files,
> and when you hit return, the first suggested file (if any matches the
> new name) is overwritten.
>
> So I think it was too dangerous to enable by default .
>
> Kim

Thanks, Kim, for the information.

We don't opt out `dired-do-copy' for ido and people seem to handle it
alright. Also `dired-do-rename' provides confirmation query when
overwriting an existing file.

So I am leaning towards enabling ido for dired-do-rename. WDYT?

Leo





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#11954: 24.1.50; Ido in dired buffers
  2013-07-11 16:02     ` Leo Liu
@ 2013-07-11 16:36       ` Kim Storm
  2013-07-12  1:08         ` Leo Liu
  0 siblings, 1 reply; 6+ messages in thread
From: Kim Storm @ 2013-07-11 16:36 UTC (permalink / raw)
  To: Leo Liu; +Cc: 11954, Marius Hofert

On 2013-07-11 18:02, Leo Liu wrote:
> On 2013-07-11 16:45 +0800, Kim Storm wrote:
>> As far as I remember it was disabled because - as you type the new
>> name - ido would suggest names of existing files,
>> and when you hit return, the first suggested file (if any matches the
>> new name) is overwritten.
>>
>> So I think it was too dangerous to enable by default .
>>
>> Kim
> Thanks, Kim, for the information.
>
> We don't opt out `dired-do-copy' for ido and people seem to handle it
> alright. Also `dired-do-rename' provides confirmation query when
> overwriting an existing file.
>
> So I am leaning towards enabling ido for dired-do-rename. WDYT?
>
> Leo
>

IIRC this is first complaint against the default since ido was included, 
so maybe most
users actually prefer the default.  In most cases, rename works better 
without ido.
And I probably got bitten more than once back when I decided to disable it.

The exception might be when you want to move the file to another directory,
then ido may help locating the target directory.

So I would prefer to keep the default
- and maybe even disable ido for dired-do-copy as well  :-)

Kim








^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#11954: 24.1.50; Ido in dired buffers
  2013-07-11 16:36       ` Kim Storm
@ 2013-07-12  1:08         ` Leo Liu
  0 siblings, 0 replies; 6+ messages in thread
From: Leo Liu @ 2013-07-12  1:08 UTC (permalink / raw)
  To: Kim Storm; +Cc: Marius Hofert, 11954-done

Fixed in trunk.

On 2013-07-12 00:36 +0800, Kim Storm wrote:
> So I would prefer to keep the default
> - and maybe even disable ido for dired-do-copy as well  :-)

OK, I just did as suggested.

People who like ido for dired-do-rename and dired-do-copy could use
something along these lines:

(with-eval-after-load 'ido
  ;; Make 'R' and 'C' in dired use ido.
  (put 'dired-do-rename 'ido nil)
  (put 'dired-do-copy 'ido nil))

Leo





^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-07-12  1:08 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-17  5:52 bug#11954: 24.1.50; Ido in dired buffers Marius Hofert
2013-07-11  4:52 ` Leo Liu
2013-07-11  8:45   ` Kim Storm
2013-07-11 16:02     ` Leo Liu
2013-07-11 16:36       ` Kim Storm
2013-07-12  1:08         ` Leo Liu

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).