help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

dirtrack (shell mode) not working


From: Samuel Wales
Subject: dirtrack (shell mode) not working
Date: Sun, 3 May 2009 19:09:07 -0700

Shell directory tracking fails to understand when I cd to a
symlink or do anything else that emacs cannot figure out.
Doing cd .. seems to make emacs think that pwd is above the
previous directory.  In the shell, for what it's worth, I
have this:

        #i like physical directories.  this might only be needed for bash.
        alias cd='cd -P'

I have tried various ways.  The following should work -- it
should read from the prompt, which looks like
"03-Sun-18-57-17 L4 ~/Desktop/A/alpha$ ".  The regular
expression works when performed manually, so it doesn't seem
to be an issue with text properties.

What am I doing wrong?

Thanks.

;;will need updating if change prompt in shell
;;(progn (search-backward-regexp (first dirtrack-list)) (match-string 1))
;;this re works, but dirtrack does not actualy use the prompt :(
(setq-default dirtrack-list '("^[0-9][0-9]-.* L[0-9] \\(.*\\)[$#] " 1))
(add-to-list 'comint-output-filter-functions 'dirtrack)

(setf comint-buffer-maximum-size (* 10 1000))
(add-to-list 'comint-output-filter-functions 'comint-truncate-buffer)

(ansi-color-for-comint-mode-on)

-- 
Myalgic encephalomyelitis denialism is causing death and severe suffering
worse than MS.  Conflicts of interest are destroying science.  Anybody can
get the disease at any time permanently.  Do science and justice matter to
you?  http://www.meactionuk.org.uk/What_Is_ME_What_Is_CFS.htm




reply via email to

[Prev in Thread] Current Thread [Next in Thread]