From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "David Strozzi" Newsgroups: gmane.emacs.help Subject: Re: emacs current directory when shell commands change Date: Mon, 23 Apr 2007 17:38:22 -0700 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1177375124 32607 80.91.229.12 (24 Apr 2007 00:38:44 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 24 Apr 2007 00:38:44 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Apr 24 02:38:40 2007 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 1Hg93I-0004nW-0t for geh-help-gnu-emacs@m.gmane.org; Tue, 24 Apr 2007 02:38:40 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Hg98j-0003oH-T9 for geh-help-gnu-emacs@m.gmane.org; Mon, 23 Apr 2007 20:44:17 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Hg98X-0003o4-Pe for help-gnu-emacs@gnu.org; Mon, 23 Apr 2007 20:44:05 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Hg98V-0003ns-BW for help-gnu-emacs@gnu.org; Mon, 23 Apr 2007 20:44:04 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Hg98V-0003np-4m for help-gnu-emacs@gnu.org; Mon, 23 Apr 2007 20:44:03 -0400 Original-Received: from wr-out-0506.google.com ([64.233.184.239]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Hg932-0003KN-LR for help-gnu-emacs@gnu.org; Mon, 23 Apr 2007 20:38:24 -0400 Original-Received: by wr-out-0506.google.com with SMTP id i23so1704028wra for ; Mon, 23 Apr 2007 17:38:23 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=HctLMW6sOnI+L/ajZpOitCy34ZSJ6t73BOsh22Itwbw/nYFI3qXDlbUV+oGWvjJg9QkLkEUOVtUlZy5zcACBNon59vCco9erRadMSHODu4zLZRpn6i1cNXTIcZ+BWpbOCLem0j0U9zGmspeiSAEFI7oRFpdccwYcRAyVy2G+v2Y= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=aSiso1dftrnCmrWInulOgUaeJvNajtz3h+HG2IApYXE7b0ri4GR58+NQUWXEoMEI/j3XsTqUqO1eRWA6Czyp154DjtJBoi5ITn1krb2xU0fCNzcYULfs19uZiPF7Spzt0EeZIADFcdHKmt1uBBXKcHPFg8cbmujsHYQ0COccr38= Original-Received: by 10.114.160.1 with SMTP id i1mr2790555wae.1177375102999; Mon, 23 Apr 2007 17:38:22 -0700 (PDT) Original-Received: by 10.115.47.5 with HTTP; Mon, 23 Apr 2007 17:38:22 -0700 (PDT) Content-Disposition: inline X-detected-kernel: Linux 2.4-2.6 (Google crawlbot) 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:43036 Archived-At: Hi, Thanks to those who gave help with this. I still haven't reached Nirvana though. I'd like to use 'regular' shell mode (M-x shell), unless some other mode is preferred for doing serious bash shelling. I put this in my .emacs: (setq shell-cd-regexp "cd.*") This should make the shell think anything starting with cd is a change dir. command. In my .bashrc I set an alias: alias cder='cd ~/elvis/runs' >>From shell, cder indeed works (i.e., the shell thinks I'm in the new dir). However, emacs always thinks I've cd'ed to ~. The same thing happens if I write out the full path and don't use ~ in the alias def. So it seems emacs is interpreting all these aliases as being equivalent to a bare 'cd', which of course moved to ~. Maybe I mis-understood what shell-cd-regexp does.... The functionality I want is having a bunch of 5 or 6 char aliases that take me to some god-forsaken dirs buried in the filesystem, and I want emacs to know where I'm going. How do I do this? Thanks again, Dave