Subject: bug#20484: 25.0.50; Directory tracking in ansi-term broken.

From: Jacob Oursland <[email-masked]>
Date: Fri, 01 May 2015 23:36:19 +0000

My inferior shell is bash.  I have confirmed that this problem exists
with 'emacs -Q'.  Re-setting my PS1 to the bash default PS1='\h:\w\$ '
and starting Emacs didn't help either.

Steps to reproduce:
1. emacs -Q
2. M-x ansi-term RET RET
3. cd /tmp (or any other directory)
4. C-x C-f

Expected behavior:
Emacs will indicate the shell's working directory (/tmp) in the
find-file minibuffer prompt.

Actual behavior:
Emacs indicates the Emacs working directory working directory ($HOME,
for me) in the find-file minibuffer prompt.

I found that if I revert commit aad65192332dfc4a1df0cd2953554c21da243b51
the problem goes away.

In GNU Emacs 25.0.50.1 (x86_64-pc-linux-gnu, GTK+ Version 3.10.8)
 of 2015-04-19 on lgw01-10
Windowing system distributor `The X.Org Foundation', version 11.0.11501000
System Description: Ubuntu 14.04.2 LTS

Configured using:
 `configure --build=x86_64-linux-gnu --prefix=/usr
 '--includedir=${prefix}/include' '--mandir=${prefix}/share/man'
 '--infodir=${prefix}/share/info' --sysconfdir=/etc --localstatedir=/var
 '--libdir=${prefix}/lib/x86_64-linux-gnu'
 '--libexecdir=${prefix}/lib/x86_64-linux-gnu' --disable-maintainer-mode
 --disable-dependency-tracking --prefix=/usr --sharedstatedir=/var/lib
 --program-suffix=-snapshot --with-x=yes --with-x-toolkit=gtk3
 'CFLAGS=-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat
 -Werror=format-security' CPPFLAGS=-D_FORTIFY_SOURCE=2
 'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro''

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GCONF GSETTINGS
NOTIFY LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB

Important settings:
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  TeX-PDF-mode: t
  global-auto-complete-mode: t
  dirtrack-debug-mode: t
  magit-auto-revert-mode: t
  diff-auto-refine-mode: t
  elisp-slime-nav-mode: t
  display-time-mode: t
  shell-dirtrack-mode: t
  global-company-mode: t
  company-mode: t
  xterm-mouse-mode: t
  winner-mode: t
  which-function-mode: t
  show-paren-mode: t
  global-auto-revert-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-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
  column-number-mode: t
  line-number-mode: t

Recent messages:
Creating group entries...done
Creating customization items ...done
Resetting customization items...done
Creating customization setup...done
Auto-saving...done
Save all settings in this buffer? (y or n) y
Saving file /home/jso/.emacs.d/init.el...
Wrote /home/jso/.emacs.d/init.el [2 times]
Mark set [4 times]
Buffer *unsent mail to [email-masked]* modified; kill anyway? (y or
n) y

Load-path shadows:
/home/jso/.emacs.d/elpa/cmake-mode-20150120.620/cmake-mode hides
/usr/share/emacs/site-lisp/cmake-mode
/usr/share/emacs/site-lisp/rst hides
/usr/share/emacs/25.0.50/lisp/textmodes/rst
/usr/share/emacs/site-lisp/dictionaries-common/ispell hides
/usr/share/emacs/25.0.50/lisp/textmodes/ispell
/usr/share/emacs/site-lisp/dictionaries-common/flyspell hides
/usr/share/emacs/25.0.50/lisp/textmodes/flyspell
~/.emacs.d/cc-mode/cc-guess hides
/usr/share/emacs/25.0.50/lisp/progmodes/cc-guess
~/.emacs.d/cc-mode/cc-vars hides
/usr/share/emacs/25.0.50/lisp/progmodes/cc-vars
~/.emacs.d/cc-mode/cc-mode hides
/usr/share/emacs/25.0.50/lisp/progmodes/cc-mode
~/.emacs.d/cc-mode/cc-bytecomp hides
/usr/share/emacs/25.0.50/lisp/progmodes/cc-bytecomp
~/.emacs.d/cc-mode/cc-styles hides
/usr/share/emacs/25.0.50/lisp/progmodes/cc-styles
~/.emacs.d/cc-mode/cc-fonts hides
/usr/share/emacs/25.0.50/lisp/progmodes/cc-fonts
~/.emacs.d/cc-mode/cc-menus hides
/usr/share/emacs/25.0.50/lisp/progmodes/cc-menus
~/.emacs.d/cc-mode/cc-cmds hides
/usr/share/emacs/25.0.50/lisp/progmodes/cc-cmds
~/.emacs.d/cc-mode/cc-align hides
/usr/share/emacs/25.0.50/lisp/progmodes/cc-align
~/.emacs.d/cc-mode/cc-engine hides
/usr/share/emacs/25.0.50/lisp/progmodes/cc-engine
~/.emacs.d/cc-mode/cc-defs hides
/usr/share/emacs/25.0.50/lisp/progmodes/cc-defs
~/.emacs.d/cc-mode/cc-awk hides
/usr/share/emacs/25.0.50/lisp/progmodes/cc-awk
~/.emacs.d/cc-mode/cc-langs hides
/usr/share/emacs/25.0.50/lisp/progmodes/cc-langs
/usr/share/emacs/site-lisp/latex-cjk-thai/thai-word hides
/usr/share/emacs/25.0.50/lisp/language/thai-word
~/.emacs.d/cc-mode/cc-compat hides
/usr/share/emacs/25.0.50/lisp/obsolete/cc-compat

Features:
(uudecode uce supercite regi spam-report spam spam-stat gnus-uu yenc
gnus-msg gnus-art mm-uu mml2015 mm-view mml-smime smime dig smtpmail
sieve-manage rmail pop3 mspools mh-e mh-compat mh-acros mh-buffers
mh-loaddefs mairix mailclient browse-url mailalias mail-hist imap
hashcash gnus-dired fortune feedmail eudc-vars ecomplete binhex apropos
footnote shadow sort mail-extr emacsbug sendmail mm-archive url-handlers
eieio-opt speedbar sb-image ezimage dframe pcmpl-unix em-unix em-term
em-script em-prompt em-ls em-hist em-pred em-glob em-dirs em-cmpl
em-basic em-banner em-alias magit-blame cmake-mode ruler-mode hl-line
hexl smerge-mode ert timezone texinfo toolbar-x prv-emacs reporter
desktop frameset context plain-tex latex tex-style tex-buf tex dbus xml
crm tempo company-dabbrev hippie-exp debug json irony-cdb jedi-core
python-environment epc ctable concurrent deferred ediff-merg ediff-wind
ediff-diff ediff-mult ediff-help ediff-init ediff-util ediff dired-x
org-rmail org-mhe org-irc org-info org-gnus org-docview org-bibtex
org-bbdb org-w3m rng-loc rng-uri rng-parse rng-match rng-dt rng-util
rng-pttrn nxml-parse nxml-ns nxml-enc xmltok nxml-util ox-latex
ox-icalendar ox-html table ox-ascii ox-publish ox org-element org-table
org-agenda esh-var esh-io esh-cmd esh-opt esh-ext esh-proc esh-arg
esh-groups eshell esh-module esh-mode esh-util doc-view jka-compr
image-mode bibtex org-id org org-macro org-footnote org-pcomplete
org-list org-faces org-entities org-version ob-python ob-emacs-lisp
org-loaddefs cal-menu calendar cal-loaddefs gnus-sum gnus-group
gnus-undo gnus-start gnus-cloud nnimap nnmail mail-source utf7 netrc
nnoo parse-time gnus-spec gnus-int gnus-range gnus-win gnus gnus-ems
nnheader ob-octave noutline outline calc calc-loaddefs calc-macs ob
ob-tangle ob-ref ob-lob ob-table ob-exp org-src ob-keys ob-comint
ob-core ob-eval org-compat org-macs rx auto-complete rtags popup repeat
bookmark company-template warnings autoload lisp-mnt tar-mode url-http
url-gw url-cache url-auth url url-proxy url-privacy url-expand
url-methods url-history url-cookie url-domsuf url-util url-parse
url-vars mailcap sgml-mode make-mode novice dirtrack sql socks
network-stream nsm starttls tls rlogin proced metamail gud flyspell
ispell pp cus-edit wid-edit magit-key-mode magit view grep epa derived
epg git-rebase-mode git-commit-mode log-edit message dired rfc822 mml
mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045
ietf-drums mailabbrev mail-utils gmm-utils mailheader pcvs-util xterm
conf-mode add-log sh-script smie executable thingatpt misearch
multi-isearch vc vc-dispatcher vc-git diff-mode cpp cc-mode cc-fonts
cc-awk cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-langs
cc-vars cc-defs cc-bytecomp tabify man tramp-cache elisp-slime-nav
help-mode company-cmake company-irony irony-completion irony-snippet
server term disp-table ehelp powerline time cl windmove ido tramp
tramp-compat auth-source gnus-util mm-util mail-prsvr password-cache
tramp-loaddefs trampver shell pcomplete format-spec advice help-fns
irony find-func company easy-mmode cl-macs ggtags etags xref eieio
eieio-core cl-generic byte-opt gv bytecomp byte-compile cl-extra seq
cconv compile comint ansi-color ewoc edmacro kmacro cl-loaddefs pcase
cl-lib finder-inf tex-site info easymenu package epg-config saveplace
leuven-theme xt-mouse winner ring which-func imenu paren autorevert
filenotify cus-start cus-load mule-util time-date tooltip eldoc electric
uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar
dnd fontset image regexp-opt fringe tabulated-list newcomment elisp-mode
lisp-mode prog-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 cl-preloaded nadvice 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 gfilenotify dynamic-setting
system-font-setting font-render-setting move-toolbar gtk x-toolkit x
multi-tty emacs)

Memory information:
((conses 16 5101727 455519)
 (symbols 48 74114 0)
 (miscs 40 12397 14840)
 (strings 32 207635 114021)
 (string-bytes 1 6335085)
 (vectors 16 79150)
 (vector-slots 8 2022361 83492)
 (floats 8 982 3084)
 (intervals 56 838741 22842)
 (buffers 976 184)
 (heap 1024 216591 159638))