From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.bugs Subject: bug#9814: 23.3; unguarded setq of default-directory in ido.el Date: Sat, 29 Oct 2011 13:43:39 +0800 Message-ID: <8739ecuzck.fsf@gnu.org> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1319867053 2794 80.91.229.12 (29 Oct 2011 05:44:13 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 29 Oct 2011 05:44:13 +0000 (UTC) Cc: 9814@debbugs.gnu.org To: Dave Abrahams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Oct 29 07:44:09 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RK1iD-0003uz-32 for geb-bug-gnu-emacs@m.gmane.org; Sat, 29 Oct 2011 07:44:09 +0200 Original-Received: from localhost ([::1]:33530 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RK1iC-0004MX-DD for geb-bug-gnu-emacs@m.gmane.org; Sat, 29 Oct 2011 01:44:08 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:50796) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RK1i9-0004MM-Bj for bug-gnu-emacs@gnu.org; Sat, 29 Oct 2011 01:44:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RK1i7-0006f7-SB for bug-gnu-emacs@gnu.org; Sat, 29 Oct 2011 01:44:05 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:54087) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RK1i7-0006f2-QX for bug-gnu-emacs@gnu.org; Sat, 29 Oct 2011 01:44:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1RK1k1-0008M3-Oc for bug-gnu-emacs@gnu.org; Sat, 29 Oct 2011 01:46:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Chong Yidong Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 29 Oct 2011 05:46:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 9814 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 9814-submit@debbugs.gnu.org id=B9814.131986714832096 (code B ref 9814); Sat, 29 Oct 2011 05:46:01 +0000 Original-Received: (at 9814) by debbugs.gnu.org; 29 Oct 2011 05:45:48 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RK1jn-0008Lc-Op for submit@debbugs.gnu.org; Sat, 29 Oct 2011 01:45:48 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RK1jk-0008LU-Nn for 9814@debbugs.gnu.org; Sat, 29 Oct 2011 01:45:45 -0400 Original-Received: from [155.69.18.173] (port=56658 helo=furball) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1RK1hp-0003Wj-CD; Sat, 29 Oct 2011 01:43:46 -0400 In-Reply-To: (Dave Abrahams's message of "Thu, 20 Oct 2011 14:53:48 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.90 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Sat, 29 Oct 2011 01:46:01 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:53276 Archived-At: Dave Abrahams 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)