From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jacob Gerlach Newsgroups: gmane.emacs.bugs Subject: bug#17656: 24.3; default-directory with aliases in shell-mode Date: Sat, 31 May 2014 10:16:12 -0400 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a113abec8ecb3fa04fab2cdf2 X-Trace: ger.gmane.org 1401556880 13647 80.91.229.3 (31 May 2014 17:21:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 31 May 2014 17:21:20 +0000 (UTC) To: 17656@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat May 31 19:21:13 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Wqmxz-0001At-11 for geb-bug-gnu-emacs@m.gmane.org; Sat, 31 May 2014 19:21:11 +0200 Original-Received: from localhost ([::1]:60655 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wqmxy-0000m6-Hk for geb-bug-gnu-emacs@m.gmane.org; Sat, 31 May 2014 13:21:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43880) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wqmxu-0000m1-7F for bug-gnu-emacs@gnu.org; Sat, 31 May 2014 13:21:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wqmxq-00078E-SN for bug-gnu-emacs@gnu.org; Sat, 31 May 2014 13:21:06 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:40218) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wqmxq-00078A-Oo for bug-gnu-emacs@gnu.org; Sat, 31 May 2014 13:21:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Wqmxq-0003bj-Au for bug-gnu-emacs@gnu.org; Sat, 31 May 2014 13:21:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jacob Gerlach Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 31 May 2014 17:21:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 17656 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.140155682613811 (code B ref -1); Sat, 31 May 2014 17:21:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 31 May 2014 17:20:26 +0000 Original-Received: from localhost ([127.0.0.1]:39095 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WqmxE-0003ag-LY for submit@debbugs.gnu.org; Sat, 31 May 2014 13:20:25 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:43101) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Wqk5A-00061M-E3 for submit@debbugs.gnu.org; Sat, 31 May 2014 10:16:25 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wqk53-00072o-B3 for submit@debbugs.gnu.org; Sat, 31 May 2014 10:16:18 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:41990) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wqk53-00072i-7S for submit@debbugs.gnu.org; Sat, 31 May 2014 10:16:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44823) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wqk51-0005bJ-GW for bug-gnu-emacs@gnu.org; Sat, 31 May 2014 10:16:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wqk4z-00071r-QO for bug-gnu-emacs@gnu.org; Sat, 31 May 2014 10:16:15 -0400 Original-Received: from mail-qa0-x22f.google.com ([2607:f8b0:400d:c00::22f]:53342) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wqk4z-00071i-Jj for bug-gnu-emacs@gnu.org; Sat, 31 May 2014 10:16:13 -0400 Original-Received: by mail-qa0-f47.google.com with SMTP id s7so398626qap.6 for ; Sat, 31 May 2014 07:16:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=UVe47kyIlBEH7Nh51mcZ4mnBRbiWeogFuC2EpY7nOiU=; b=BqtkzcUnGzBM06D0PwRcKng/qS9phpw8shjo6pkUGbrRP0l2wTeE0GLjwfbMGhdj+M WOOhCL/+qO5fGFgSpnMYrROxopm/kO/y2Vm2TJndE6OP2tGZNudYs8u6TcHzaALPFo+I eIIS4p1aZv4fFl0G+SvziiewG+tPy7rH3wwPE0KFyzxtJz4j2fuvegg8CDXkS9pFHted o8vOtrMqgI+7n8dl+aNIulrfLU7eeKxC7m046JErObTGhbxRUGxMGlU9upw4S5+ibhL7 6wGM0hH0PrVrCz6jh6Jjk3AdZg1G2tkP478cGAT+Pen/eq+5wkLIYutLM+OA2F0CFGam fj4Q== X-Received: by 10.140.33.181 with SMTP id j50mr29290195qgj.81.1401545772805; Sat, 31 May 2014 07:16:12 -0700 (PDT) Original-Received: by 10.229.239.6 with HTTP; Sat, 31 May 2014 07:16:12 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Mailman-Approved-At: Sat, 31 May 2014 13:20:22 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x 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:89813 Archived-At: --001a113abec8ecb3fa04fab2cdf2 Content-Type: text/plain; charset=UTF-8 Changing directories with a shell alias does not update default-directory. This affects subsequent commands such as dired, and shell behavior such as tab completion. Follow on relative path changes such as `$ cd ..' have the expected effect in the shell, and move default-directory relative to the working directory before using a cd alias. Subsequent non-aliased cd commands do not affect default-directory unless the working directory of the shell matches default-directory. $ emacs -q `M-x shell RET' ~$ pwd /home/user `C-h v default-directory RET' => default-directory is a variable defined in `C source code'. Its value is "/home/user/" ~$ mkdir foobar ~$ cd foobar ~/foobar$ `C-h v default-directory RET' => ... Its value is "/home/user/foobar/" ~/foobar$ alias fb='cd foobar' ~/foobar$ cd .. ~$ fb ~/foobar$ `C-h v default-directory RET' => ...Its value is "/home/user/" ~/foobar$ cd .. ~$ `C-h v default-directory RET' => ...Its value is "/home/" ~$ cd foobar ~/foobar$ `C-h v default-directory RET' => ...Its value is "/home/" ~/foobar$ cd /home /home$ cd user/foobar ~/foobar$ `C-h v default-directory RET' => ...Its value is "/home/user/foobar/" 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'. For information about debugging Emacs, please read the file /usr/share/emacs/24.3/etc/DEBUG. In GNU Emacs 24.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.4.2) of 2014-02-22 on king, modified by Debian Windowing system distributor `The X.Org Foundation', version 11.0.11303000 System Description: Ubuntu 12.04.4 LTS Configured using: `configure '--build' 'x86_64-linux-gnu' '--build' 'x86_64-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var/lib' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs24:/etc/emacs:/usr/local/share/emacs/24.3/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.3/site-lisp:/usr/share/emacs/site-lisp' '--with-crt-dir=/usr/lib/x86_64-linux-gnu' '--with-x=yes' '--with-x-toolkit=gtk3' '--with-toolkit-scroll-bars' 'build_alias=x86_64-linux-gnu' 'CFLAGS=-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -Wall' 'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro' 'CPPFLAGS=-D_FORTIFY_SOURCE=2'' Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix default enable-multibyte-characters: t Major mode: Shell Minor modes in effect: shell-dirtrack-mode: t tooltip-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent input: s h e l l C-h v d e f a u d i r c d SPC f o o b a r C-h v m k c d SPC . . f b a l i a s SPC f b = ' c d SPC f o o b a r ' l s f b C-h v c d SPC . . f b C-h v c d SPC . . C-h v c d SPC f o o b a r C-h v c d SPC / c d SPC h o j a C-h v r e p o r t - e m Recent messages: /home / No match / ~ Load-path shadows: /usr/share/emacs/24.3/site-lisp/cmake-data/cmake-mode hides /usr/share/emacs/site-lisp/cmake-mode /usr/share/emacs/24.3/site-lisp/debian-startup hides /usr/share/emacs/site-lisp/debian-startup /usr/share/emacs24/site-lisp/dictionaries-common/ispell hides /usr/share/emacs/24.3/lisp/textmodes/ispell /usr/share/emacs24/site-lisp/dictionaries-common/flyspell hides /usr/share/emacs/24.3/lisp/textmodes/flyspell Features: (shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils pcmpl-unix misearch multi-isearch pp help-mode easymenu help-fns shell pcomplete comint ansi-color ring emacs-goodies-el emacs-goodies-custom emacs-goodies-loaddefs easy-mmode time-date tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process dbusbind dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs) --001a113abec8ecb3fa04fab2cdf2 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Changing directories with a shell alias does not update
default-directory. This affe= cts subsequent commands such as dired, and
shell behavior such as tab compl= etion. Follow on relative path changes
such as `$ cd ..' have the expected effect in the sh= ell, and move
default-directory relative to th= e working directory before using a cd
alias. Subsequent non-aliased cd commands do not affect
default-directory unless the wor= king directory of the shell matches
default-directory.

$ emacs -q
`M-x shell RET'
~$ pwd
/home/user
`C-h v default-directory RET'= ;
=C2=A0 =3D> def= ault-directory is a variable defined in `C source code'.
=C2=A0 Its value is "/home/us= er/"
~$ mkdir foobar
~$ cd foobar
~/foobar$
`C-h v default-directory RET'
=C2=A0 =3D> ...=C2=A0<= span style=3D"font-family:'courier new',monospace">Its value is &qu= ot;/home/user/foobar/"
~/foobar$ alias fb=3D'cd foobar'
~/foobar$ cd ..
~$ fb
~/foobar$=C2=A0
`C-h v default-directory RET'
=C2=A0 =3D> ...Its value is "/ho= me/user/"
~/foo= bar$ cd ..
~$=C2=A0
`C-h v default-directory RET'
=C2=A0 =3D> ...Its value is "= /home/"
~$ cd foobar
~/foobar$
`C-h v default-directory RET'
<= div> =C2=A0 =3D> ...Its value is "/home/&= quot;
~/foobar$ cd /= home
/home$ cd user/foobar
~/foobar$
`C-h v default-directory RET'=
=C2=A0 =3D> ...Its value is "/ho= me/user/foobar/"
If Emacs crashed, and you have t= he Emacs process in the gdb debugger,
please include the output from the following gdb commands= :
=C2=A0 =C2=A0 `bt full' and = `xbacktrace'.
Fo= r information about debugging Emacs, please read the file
= /usr/share/emacs/24.3/etc/DEBUG.


In GNU Emacs 24.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.4.2)<= /font>
=C2=A0of 2014-02-22 on king, mod= ified by Debian
Wind= owing system distributor `The X.Org Foundation', version 11.0.11303000<= /font>
System Description: Ubuntu 12.04.4 LTS

Configured using:
=C2=A0`configure '--build= 9; 'x86_64-linux-gnu' '--build' 'x86_64-linux-gnu'<= /font>
=C2=A0'--prefix= =3D/usr' '--sharedstatedir=3D/var/lib' '--libexecdir=3D/usr= /lib'
=C2=A0'--localstatedir=3D/va= r/lib' '--infodir=3D/usr/share/info'
=C2=A0'--mandir=3D/usr/share/man' '= ;--with-pop=3Dyes'
=C2=A0'--enable-locallisppat= h=3D/etc/emacs24:/etc/emacs:/usr/local/share/emacs/24.3/site-lisp:/usr/loca= l/share/emacs/site-lisp:/usr/share/emacs/24.3/site-lisp:/usr/share/emacs/si= te-lisp'
=C2=A0'--with-crt-dir=3D/usr= /lib/x86_64-linux-gnu' '--with-x=3Dyes'
=C2=A0'--with-x-toolkit=3Dgtk3' = 9;--with-toolkit-scroll-bars'
=C2=A0'build_alias=3Dx86_64-= linux-gnu' 'CFLAGS=3D-g -O2 -fstack-protector
=C2=A0--param=3Dssp-buffer-size=3D4 -Wfor= mat -Wformat-security
=C2=A0-Werror=3Dformat-security = -Wall' 'LDFLAGS=3D-Wl,-Bsymbolic-functions
=C2=A0-Wl,-z,relro' 'CPPFLAGS=3D-D_F= ORTIFY_SOURCE=3D2''

Important settings:
=C2=A0 value of $LANG: en_US.UTF-8
=
=C2=A0 locale-coding-system: utf= -8-unix
=C2=A0 default enable-multibyte-= characters: t

Major mode: Shell

Minor modes in effect:
=C2=A0 shell-dirtrack-mode: t
=C2=A0 tooltip-mode: t
=C2=A0 mouse-wheel-mode: t
=C2=A0 tool-bar-mode: t
=C2=A0 menu-bar-mode:= t
=C2=A0 file-name-shadow-mode: t
=C2=A0 global-font-lock-m= ode: t
=C2=A0 font-l= ock-mode: t
=C2=A0 blink-cursor-mode: t
=C2=A0 auto-composition-= mode: t
=C2=A0 auto-= encryption-mode: t
=C2=A0 auto-compression-mode: t<= /font>
=C2=A0 line-number-m= ode: t
=C2=A0 transi= ent-mark-mode: t

Recent input:

<menu> s h e l l <return> C-h v d e f a u <tab> d = i r <tab> <return> c d
SPC f o o b a r <return> C= -h v <up> <return> m k <backspace> <backspace>
c d SPC . . <return&g= t; f b <return> a l i a s SPC f b =3D ' c d SPC f o o b
a r ' <return> l s <= ;return> f b <return> C-h v <up> <return> c d SPC
. . <return> f b &= lt;return> C-h v <up> <return> c d SPC . . <return> C-= h v
<up> <return> c d SP= C f o <tab> o b a r <return> C-h v <up> <return> c = d
SPC / <return&g= t; c d SPC h o <tab> j a <tab> <return> C-h v <up> = <return>
<menu> r e p o r t - e m &= lt;tab> <return>

Recent me= ssages:

/home=C2=A0

/=C2=A0

No match

~=C2=A0


Load-path shadows:
/usr/share/emacs/24.3/site-lisp/= cmake-data/cmake-mode hides /usr/share/emacs/site-lisp/cmake-mode
/usr/share/emacs/24.3/site-li= sp/debian-startup hides /usr/share/emacs/site-lisp/debian-startup
/usr/share/emacs24/site-lisp/dic= tionaries-common/ispell hides /usr/share/emacs/24.3/lisp/textmodes/ispell
/usr/share/emacs24/si= te-lisp/dictionaries-common/flyspell hides /usr/share/emacs/24.3/lisp/textm= odes/flyspell

Features:
(shadow sort gnus-util mail-extr emacsbug message format-= spec rfc822 mml
mml-sec mm-decode mm-bodies mm-e= ncode mail-parse rfc2231 mailabbrev
gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm= -util
mail-prsvr mail-utils pcmpl-unix= misearch multi-isearch pp help-mode
easymenu help-fns shell pcomplete comint ansi-color ring
emacs-goodies-el emacs-goodies-c= ustom emacs-goodies-loaddefs easy-mmode
time-date tooltip ediff-hook vc-hooks lisp-float-type m= wheel x-win x-dnd
tool-bar dnd fontset image regex= p-opt fringe tabulated-list newcomment
lisp-mode register page menu-bar rfn-eshadow timer selec= t scroll-bar
mouse jit-lock font-lock syntax = facemenu font-core frame cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet la= o korean
japanese hebrew greek romanian s= lovak czech european ethiopic indian
cyrillic chinese case-table epa-hook jka-cmpr-hook help si= mple abbrev
minibuffer loaddefs button faces= cus-face macroexp files text-properties
overlay sha1 md5 base64 format env code-pages mule cus= tom widget
hashtable-print-readable backquo= te make-network-process dbusbind
dynamic-setting system-font-setting font-render-setting move-t= oolbar gtk
x-toolkit x multi-tty emacs)

--001a113abec8ecb3fa04fab2cdf2--