unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#1438: 23.0.60; Wrong file/directory completion in *shell* buffers
@ 2008-11-27  8:24 Tassilo Horn
  2008-11-27 16:41 ` Stefan Monnier
  0 siblings, 1 reply; 7+ messages in thread
From: Tassilo Horn @ 2008-11-27  8:24 UTC (permalink / raw)
  To: emacs-pretest-bug


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@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)






^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#1438: 23.0.60; Wrong file/directory completion in *shell* buffers
  2008-11-27  8:24 bug#1438: 23.0.60; Wrong file/directory completion in *shell* buffers Tassilo Horn
@ 2008-11-27 16:41 ` Stefan Monnier
  2008-11-27 20:39   ` Tassilo Horn
  0 siblings, 1 reply; 7+ messages in thread
From: Stefan Monnier @ 2008-11-27 16:41 UTC (permalink / raw)
  To: Tassilo Horn; +Cc: emacs-pretest-bug, 1438

> 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






^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#1438: 23.0.60; Wrong file/directory completion in *shell* buffers
@ 2008-11-27 17:54 Chong Yidong
  2008-11-27 20:23 ` Tassilo Horn
  0 siblings, 1 reply; 7+ messages in thread
From: Chong Yidong @ 2008-11-27 17:54 UTC (permalink / raw)
  To: Tassilo Horn; +Cc: 1438

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






^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#1438: 23.0.60; Wrong file/directory completion in *shell* buffers
  2008-11-27 17:54 Chong Yidong
@ 2008-11-27 20:23 ` Tassilo Horn
  0 siblings, 0 replies; 7+ messages in thread
From: Tassilo Horn @ 2008-11-27 20:23 UTC (permalink / raw)
  To: Chong Yidong; +Cc: Tassilo Horn, 1438

Chong Yidong <cyd@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






^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#1438: 23.0.60; Wrong file/directory completion in *shell* buffers
  2008-11-27 16:41 ` Stefan Monnier
@ 2008-11-27 20:39   ` Tassilo Horn
  2011-09-19 21:59     ` Glenn Morris
  0 siblings, 1 reply; 7+ messages in thread
From: Tassilo Horn @ 2008-11-27 20:39 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-pretest-bug, Tassilo Horn, 1438

Stefan Monnier <monnier@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






^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#1438: 23.0.60; Wrong file/directory completion in *shell* buffers
  2008-11-27 20:39   ` Tassilo Horn
@ 2011-09-19 21:59     ` Glenn Morris
  2011-09-19 22:17       ` Glenn Morris
  0 siblings, 1 reply; 7+ messages in thread
From: Glenn Morris @ 2011-09-19 21:59 UTC (permalink / raw)
  To: 1438-done


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 ..".





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#1438: 23.0.60; Wrong file/directory completion in *shell* buffers
  2011-09-19 21:59     ` Glenn Morris
@ 2011-09-19 22:17       ` Glenn Morris
  0 siblings, 0 replies; 7+ messages in thread
From: Glenn Morris @ 2011-09-19 22:17 UTC (permalink / raw)
  To: 1438


On reflection, I opened #9555 which summarizes the issue.





^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-09-19 22:17 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-27  8:24 bug#1438: 23.0.60; Wrong file/directory completion in *shell* buffers Tassilo Horn
2008-11-27 16:41 ` Stefan Monnier
2008-11-27 20:39   ` Tassilo Horn
2011-09-19 21:59     ` Glenn Morris
2011-09-19 22:17       ` Glenn Morris
  -- strict thread matches above, loose matches on Subject: below --
2008-11-27 17:54 Chong Yidong
2008-11-27 20:23 ` Tassilo Horn

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).