GNU bug report logs -
#9814
23.3; unguarded setq of default-directory in ido.el
Previous Next
Reported by: Dave Abrahams <dave <at> boostpro.com>
Date: Thu, 20 Oct 2011 19:41:01 UTC
Severity: normal
Tags: moreinfo
Found in version 23.3
Done: Leo Liu <sdl.web <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 9814 <at> debbugs.gnu.org (full text, mbox):
Dave Abrahams <dave <at> boostpro.com> writes:
> I'm sorry that I don't have a reproducer at the moment. I was having
> some failures during startup that would leave my Emacs unable to change
> buffers with `M-x switch-to-buffer', which was remapped to
> ido-switch-buffer, because it would attempt to make a Tramp connection
> to some nonexistent host. I could get around this by `M-: (setq
> default-directory "~")', so I went hunting in ido.el for mentions of
> default-directory and found 2 instances of (setq default-directory...)
> that were not apparently surrounded by a let. This seems like a likely
> cause of the problem.
I'm not too familiar with ido, and do not know whether those setqs are
intentional. Could you try let-binding default-directory in those
locations and test it out for a while, and see if there is any effect?
=== modified file 'lisp/ido.el'
*** lisp/ido.el 2011-10-26 08:42:22 +0000
--- lisp/ido.el 2011-10-29 05:42:48 +0000
***************
*** 2381,2389 ****
((eq method 'alt-file)
(ido-record-work-file filename)
! (setq default-directory ido-current-directory)
! (ido-record-work-directory)
! (find-alternate-file filename))
((memq method '(dired list-directory))
(if (equal filename ".")
--- 2381,2389 ----
((eq method 'alt-file)
(ido-record-work-file filename)
! (let ((default-directory ido-current-directory))
! (ido-record-work-directory)
! (find-alternate-file filename)))
((memq method '(dired list-directory))
(if (equal filename ".")
***************
*** 2421,2432 ****
((eq method 'write)
(ido-record-work-file filename)
! (setq default-directory ido-current-directory)
! (setq filename (concat ido-current-directory filename))
! (ido-record-command 'write-file filename)
! (add-to-history 'file-name-history filename)
! (ido-record-work-directory)
! (write-file filename t))
((eq method 'read-only)
(ido-record-work-file filename)
--- 2421,2432 ----
((eq method 'write)
(ido-record-work-file filename)
! (let ((default-directory ido-current-directory))
! (setq filename (concat ido-current-directory filename))
! (ido-record-command 'write-file filename)
! (add-to-history 'file-name-history filename)
! (ido-record-work-directory)
! (write-file filename t)))
((eq method 'read-only)
(ido-record-work-file filename)
This bug report was last modified 12 years and 41 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.