From: Chong Yidong <cyd@gnu.org>
To: Dave Abrahams <dave@boostpro.com>
Cc: 9814@debbugs.gnu.org
Subject: bug#9814: 23.3; unguarded setq of default-directory in ido.el
Date: Sat, 29 Oct 2011 13:43:39 +0800 [thread overview]
Message-ID: <8739ecuzck.fsf@gnu.org> (raw)
In-Reply-To: <m2ehy7h2qr.fsf@pluto.luannocracy.com> (Dave Abrahams's message of "Thu, 20 Oct 2011 14:53:48 -0400")
Dave Abrahams <dave@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)
next prev parent reply other threads:[~2011-10-29 5:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-20 18:53 bug#9814: 23.3; unguarded setq of default-directory in ido.el Dave Abrahams
2011-10-29 5:43 ` Chong Yidong [this message]
2011-10-31 19:24 ` Dave Abrahams
2013-07-09 4:46 ` Leo Liu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8739ecuzck.fsf@gnu.org \
--to=cyd@gnu.org \
--cc=9814@debbugs.gnu.org \
--cc=dave@boostpro.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).