GNU bug report logs - #9814
23.3; unguarded setq of default-directory in ido.el

Previous Next

Package: emacs;

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.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 9814 in the body.
You can then email your comments to 9814 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#9814; Package emacs. (Thu, 20 Oct 2011 19:41:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Dave Abrahams <dave <at> boostpro.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 20 Oct 2011 19:41:02 GMT) Full text and rfc822 format available.

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

From: Dave Abrahams <dave <at> boostpro.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 23.3; unguarded setq of default-directory in ido.el
Date: Thu, 20 Oct 2011 14:53:48 -0400
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.

In GNU Emacs 23.3.1 (x86_64-apple-darwin10.8.0, Carbon Version 1.6.0 AppKit 1038.36)
 of 2011-09-12 on pluto.luannocracy.com
Windowing system distributor `Apple Inc.', version 10.6.8
configured using `configure  '--with-mac' '--enable-mac-app' '--prefix=/usr/local/stow/emacs-23.3' 'CC=gcc -arch x86_64''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Fundamental

Minor modes in effect:
  highlight-changes-visible-mode: t
  diff-auto-refine-mode: t
  recentf-mode: t
  pretty-control-l-mode: t
  Info-breadcrumbs-in-mode-line-mode: t
  workgroups-mode: t
  shell-dirtrack-mode: t
  me-minor-mode: t
  show-paren-mode: t
  ido-everywhere: t
  global-auto-revert-mode: t
  display-time-mode: t
  delete-selection-mode: t
  tooltip-mode: t
  mac-mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
C-p C-p C-p C-p C-p C-p C-p C-p C-p C-n C-n C-p C-n 
C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n 
C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n 
C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n 




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#9814; Package emacs. (Sat, 29 Oct 2011 05:46:01 GMT) Full text and rfc822 format available.

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

From: Chong Yidong <cyd <at> gnu.org>
To: Dave Abrahams <dave <at> boostpro.com>
Cc: 9814 <at> debbugs.gnu.org
Subject: Re: bug#9814: 23.3; unguarded setq of default-directory in ido.el
Date: Sat, 29 Oct 2011 13:43:39 +0800
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)





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#9814; Package emacs. (Mon, 31 Oct 2011 19:38:01 GMT) Full text and rfc822 format available.

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

From: Dave Abrahams <dave <at> boostpro.com>
To: Chong Yidong <cyd <at> gnu.org>
Cc: 9814 <at> debbugs.gnu.org
Subject: Re: bug#9814: 23.3; unguarded setq of default-directory in ido.el
Date: Mon, 31 Oct 2011 11:24:18 -0800
on Fri Oct 28 2011, Chong Yidong <cyd-AT-gnu.org> wrote:

> 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?

I've made the changes... I guess the best report you can expect, unless
I get myself into trouble at startup again, is that it has no effect.
Will you check back with me in a week?

-- 
Dave Abrahams
BoostPro Computing
http://www.boostpro.com




Reply sent to Leo Liu <sdl.web <at> gmail.com>:
You have taken responsibility. (Tue, 09 Jul 2013 04:47:02 GMT) Full text and rfc822 format available.

Notification sent to Dave Abrahams <dave <at> boostpro.com>:
bug acknowledged by developer. (Tue, 09 Jul 2013 04:47:04 GMT) Full text and rfc822 format available.

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

From: Leo Liu <sdl.web <at> gmail.com>
To: Dave Abrahams <dave <at> boostpro.com>
Cc: Chong Yidong <cyd <at> gnu.org>, 9814-done <at> debbugs.gnu.org
Subject: Re: bug#9814: 23.3; unguarded setq of default-directory in ido.el
Date: Tue, 09 Jul 2013 12:46:26 +0800
On 2011-11-01 03:24 +0800, Dave Abrahams wrote:
> I've made the changes... I guess the best report you can expect, unless
> I get myself into trouble at startup again, is that it has no effect.
> Will you check back with me in a week?

I believe this bug might have been fixed already. It might have
something to do with ido-may-cache-directory trying tramp hosts.

Leo




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

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.