From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Samuel Wales Newsgroups: gmane.emacs.help Subject: dirtrack (shell mode) not working Date: Sun, 3 May 2009 19:09:07 -0700 Message-ID: <20524da70905031909j5426ee1fpde7e1e93f83a8a88@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1241403008 10832 80.91.229.12 (4 May 2009 02:10:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 4 May 2009 02:10:08 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon May 04 04:09:58 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1M0ncz-00087l-UZ for geh-help-gnu-emacs@m.gmane.org; Mon, 04 May 2009 04:09:58 +0200 Original-Received: from localhost ([127.0.0.1]:46157 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M0ncz-0002Tm-Bf for geh-help-gnu-emacs@m.gmane.org; Sun, 03 May 2009 22:09:57 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M0ncd-0002Qq-Ba for help-gnu-emacs@gnu.org; Sun, 03 May 2009 22:09:35 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M0ncX-0002NP-ND for help-gnu-emacs@gnu.org; Sun, 03 May 2009 22:09:34 -0400 Original-Received: from [199.232.76.173] (port=52861 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M0ncX-0002NM-Gk for help-gnu-emacs@gnu.org; Sun, 03 May 2009 22:09:29 -0400 Original-Received: from rv-out-0708.google.com ([209.85.198.240]:46149) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1M0ncX-0005Zw-3e for help-gnu-emacs@gnu.org; Sun, 03 May 2009 22:09:29 -0400 Original-Received: by rv-out-0708.google.com with SMTP id f25so3726704rvb.6 for ; Sun, 03 May 2009 19:09:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:from:date:message-id :subject:to:content-type:content-transfer-encoding; bh=xqOD9e9OUYxKKV2rOyTfBL2RthxXav6qKINxlxi9t/I=; b=L+yCK5StBUPBxtceKlPdjeqaLRcYSWvBVKNRy8fBhgw8HMfGImmi31gn6T7xNrR5QH qDace4wWGJpQ26c+nCuOyXjY5mYbHARAD0MyVPU5UGVO9BhW6z/Xuf7c8CLVf071WEfu mkextSnfj8tnbHxMAj7EvUQUOG6qPWOQA+I3g= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type :content-transfer-encoding; b=PmLBayKvyzccL0sOlx2+5VheK0vVhLIWA9droJtzm04xfLGRtgaDOaoWGPlP5vT47z iE+F6HpFkWIO5IIuSEJoBR/eJwgGwXWxQnNjEl51CAEJ0rfoI00i+SYp7xYsimskzhBo IQJcYh6KioW8UOF2hxs0Jt9eDOZ2QZ56KjiCc= Original-Received: by 10.114.144.1 with SMTP id r1mr3835457wad.2.1241402967188; Sun, 03 May 2009 19:09:27 -0700 (PDT) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:64161 Archived-At: 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