GNU bug report logs - #1438
23.0.60; Wrong file/directory completion in *shell* buffers

Previous Next

Package: emacs;

Reported by: Tassilo Horn <thorn <at> fastmail.fm>

Date: Thu, 27 Nov 2008 08:30:03 UTC

Severity: wishlist

Done: Glenn Morris <rgm <at> gnu.org>

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 1438 in the body.
You can then email your comments to 1438 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-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1438; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to Tassilo Horn <thorn <at> fastmail.fm>:
New bug report received and forwarded. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Tassilo Horn <thorn <at> fastmail.fm>
To: emacs-pretest-bug <at> gnu.org
Subject: 23.0.60; Wrong file/directory completion in *shell* buffers
Date: Thu, 27 Nov 2008 09:24:38 +0100
Please write in English if possible, because the Emacs maintainers
usually do not have translators to read other languages for them.

Your bug report will be posted to the emacs-pretest-bug <at> gnu.org mailing list.

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:

With ZSH (and maybe some option I'm not aware of) you can go up one
directory by typing ".." as a shorthand for "cd ..".  Now I have this
directory tree.

foo/
foo/bar/
foo/baz/
foo/baz/one/
foo/baz/two/

I invoke `shell' and change to foo/baz/.  Now I type

  cd TAB

and the completion shows one/ and two/.  Now I go up one directory with
"..".  Another

  cd TAB

shows again the completions one/ and two/, but I'm in foo/ (as `pwd'
says) now and the correct completions would be bar/ and baz/.

So it seems `default-directory' is only updated with "cd ..", but not
for the shorthand "..".

The same applies if I have an alias xxx="cd foo/bar/baz".  Then

  xxx RET
  cd TAB

will print the completions for the directory I was before.

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'.
If you would like to further debug the crash, please read the file
/usr/share/emacs/23.0.60/etc/DEBUG for instructions.


In GNU Emacs 23.0.60.1 (x86_64-pc-linux-gnu, GTK+ Version 2.14.4)
 of 2008-11-25 on thinkpad
Windowing system distributor `The X.Org Foundation', version 11.0.10502000
configured using `configure  '--prefix=/usr' '--host=x86_64-pc-linux-gnu' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--datadir=/usr/share' '--sysconfdir=/etc' '--localstatedir=/var/lib' '--libdir=/usr/lib64' '--program-suffix=-emacs-23' '--infodir=/usr/share/info/emacs-23' '--with-sound' '--with-x' '--with-toolkit-scroll-bars' '--with-gif' '--with-jpeg' '--with-png' '--with-rsvg' '--with-tiff' '--with-xpm' '--with-freetype' '--with-xft' '--with-libotf' '--with-m17n-flt' '--with-x-toolkit=gtk' '--without-hesiod' '--without-kerberos' '--without-kerberos5' '--with-gpm' '--with-dbus' '--build=x86_64-pc-linux-gnu' 'build_alias=x86_64-pc-linux-gnu' 'host_alias=x86_64-pc-linux-gnu' 'CFLAGS=-g -ggdb -O1 -pipe' 'LDFLAGS=''

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: Group

Minor modes in effect:
  gnus-topic-mode: t
  gnus-undo-mode: t
  rcirc-track-minor-mode: t
  yas/minor-mode: t
  shell-dirtrack-mode: t
  recentf-mode: t
  iswitchb-mode: t
  window-number-meta-mode: t
  window-number-mode: t
  savehist-mode: t
  exec-abbrev-cmd-mode: t
  show-paren-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  global-auto-composition-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:
<backspace> <backspace> <backspace> <backspace> b r 
i c h t SPC s i e SPC d a n n SPC w i e d e r SPC i 
m <backspace> <backspace> u m . . . <up> <up> <up> 
<up> <up> C-k C-k C-k C-k C-k C-k C-k C-k <return> 
g <tab> C-c C-c q <return> c <return> c <return> SPC 
SPC SPC SPC SPC c <return> <return> B <backspace> y 
q l s 1 g C-c s . . <return> . . <return> c d SPC j 
g r <tab> <backspace> <backspace> <backspace> <backspace> 
<backspace> <backspace> <backspace> <backspace> <backspace> 
<backspace> <backspace> <backspace> p w d <return> 
l s <return> c d SPC j g <tab> <tab> <tab> r <tab> 
<tab> <tab> <backspace> <backspace> <backspace> <backspace> 
<backspace> <backspace> <backspace> <backspace> <backspace> 
<backspace> <backspace> <backspace> <backspace> <backspace> 
<backspace> . . <return> c d SPC <tab> <backspace> 
<backspace> <backspace> <backspace> <backspace> <backspace> 
<backspace> <backspace> <backspace> <backspace> <backspace> 
<backspace> <backspace> <backspace> p w d <return> 
~ <return> c d SPC u n <tab> <tab> <tab> <backspace> 
<backspace> <backspace> <backspace> <backspace> <backspace> 
<backspace> <backspace> <backspace> <backspace> <tab> 
<tab> c d SPC <tab> <tab> <tab> <tab> <tab> <tab> . 
<tab> <return> C-x k <return> C-c s c d SPC u n <tab> 
r <tab> j g r <tab> <return> <escape> <escape> <escape> 
. . <return> c d SPC <tab> <tab> <backspace> <backspace> 
<backspace> <backspace> <backspace> <backspace> <backspace> 
<backspace> <backspace> c d SPC j g r a l a b <return> 
c d SPC <tab> <tab> <tab> <tab> <backspace> <backspace> 
<backspace> <backspace> <backspace> <backspace> <backspace> 
<backspace> l s <return> <escape> <escape> <escape> 
c d SPC <tab> <backspace> <backspace> <backspace> <backspace> 
<backspace> <backspace> <backspace> a n t <return> 
<switch-frame> M-x r e b <return> r p o r <tab> <backspace> 
<backspace> <backspace> e p o <tab> <return>

Recent messages:
Completed [2 times]
Partially completed
~/uni/repos/jgralab 
Type space to flush; repeat completion command to scroll
call-interactively: Text is read-only [6 times]
Type space to flush; repeat completion command to scroll
call-interactively: Text is read-only [5 times]
Type space to flush; repeat completion command to scroll
call-interactively: Text is read-only [4 times]
call-interactively: End of buffer [8 times]

-- 
No person,  no idea, and no  religion deserves to be  illegal to insult,
not even the Church of Emacs. (Richard M. Stallman)




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1438; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to Stefan Monnier <monnier <at> iro.umontreal.ca>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Message #10 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Tassilo Horn <thorn <at> fastmail.fm>
Cc: 1438 <at> debbugs.gnu.org, emacs-pretest-bug <at> gnu.org
Subject: Re: bug#1438: 23.0.60; Wrong file/directory completion in *shell* buffers
Date: Thu, 27 Nov 2008 11:41:23 -0500
> Now I go up one directory with "..".

The directory tracking code only recognizes some commands such as "cd",
"pushd", and a couple more.  You may want to look into dirtrack.el.


        Stefan




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1438; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to Stefan Monnier <monnier <at> iro.umontreal.ca>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1438; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to Chong Yidong <cyd <at> stupidchicken.com>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Message #20 received at 1438 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Chong Yidong <cyd <at> stupidchicken.com>
To: Tassilo Horn <thorn <at> fastmail.fm>
Cc: 1438 <at> debbugs.gnu.org
Subject: Re: 23.0.60; Wrong file/directory completion in *shell* buffers
Date: Thu, 27 Nov 2008 12:54:05 -0500
> With ZSH (and maybe some option I'm not aware of) you can go up one
> directory by typing ".." as a shorthand for "cd ..".
>
> it seems `default-directory' is only updated with "cd ..", but not
> for the shorthand "..".

Have you tried using shell-dirtrack-mode?




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1438; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to Tassilo Horn <thorn <at> fastmail.fm>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Message #25 received at 1438 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Tassilo Horn <thorn <at> fastmail.fm>
To: Chong Yidong <cyd <at> stupidchicken.com>
Cc: Tassilo Horn <thorn <at> fastmail.fm>, 1438 <at> debbugs.gnu.org
Subject: Re: 23.0.60; Wrong file/directory completion in *shell* buffers
Date: Thu, 27 Nov 2008 21:23:41 +0100
Chong Yidong <cyd <at> stupidchicken.com> writes:

>> With ZSH (and maybe some option I'm not aware of) you can go up one
>> directory by typing ".." as a shorthand for "cd ..".
>>
>> it seems `default-directory' is only updated with "cd ..", but not
>> for the shorthand "..".
>
> Have you tried using shell-dirtrack-mode?

That's on by default.  Now I try dirtrack-mode as Stefan suggested.

Bye,
Tassilo




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1438; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to Tassilo Horn <thorn <at> fastmail.fm>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Message #30 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Tassilo Horn <thorn <at> fastmail.fm>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: Tassilo Horn <thorn <at> fastmail.fm>, 1438 <at> debbugs.gnu.org,
        emacs-pretest-bug <at> gnu.org
Subject: Re: bug#1438: 23.0.60; Wrong file/directory completion in *shell* buffers
Date: Thu, 27 Nov 2008 21:39:58 +0100
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

>> Now I go up one directory with "..".
>
> The directory tracking code only recognizes some commands such as
> "cd", "pushd", and a couple more.  You may want to look into
> dirtrack.el.

Dirtrack-debug-mode says that my prompt doesn't match dirtrack-regexp,
but that variable doesn't exist.  It seems to be known as dirtrack-list
now.

I configured it to match my prompt, and it seems to work fine.  It's not
too elegant, though...

Bye,
Tassilo




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1438; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to Tassilo Horn <thorn <at> fastmail.fm>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Severity set to `wishlist' from `normal' Request was from Chong Yidong <cyd <at> stupidchicken.com> to control <at> emacsbugs.donarmstrong.com. (Sun, 30 Nov 2008 17:45:03 GMT) Full text and rfc822 format available.

Reply sent to Glenn Morris <rgm <at> gnu.org>:
You have taken responsibility. (Mon, 19 Sep 2011 22:05:01 GMT) Full text and rfc822 format available.

Notification sent to Tassilo Horn <thorn <at> fastmail.fm>:
bug acknowledged by developer. (Mon, 19 Sep 2011 22:05:01 GMT) Full text and rfc822 format available.

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

From: Glenn Morris <rgm <at> gnu.org>
To: 1438-done <at> debbugs.gnu.org
Subject: Re: bug#1438: 23.0.60;
	Wrong file/directory completion in *shell* buffers
Date: Mon, 19 Sep 2011 17:59:11 -0400
Closing this since the alternative method provided by dirtrack.el
handles this case.
It is impossible for shell-directory-tracker to know about non-standard
command/aliases such as using ".." to mean "cd ..".




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#1438; Package emacs. (Mon, 19 Sep 2011 22:23:02 GMT) Full text and rfc822 format available.

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

From: Glenn Morris <rgm <at> gnu.org>
To: 1438 <at> debbugs.gnu.org
Subject: Re: bug#1438: 23.0.60;
	Wrong file/directory completion in *shell* buffers
Date: Mon, 19 Sep 2011 18:17:13 -0400
On reflection, I opened #9555 which summarizes the issue.




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

This bug report was last modified 13 years and 248 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.