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

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

Re: Problem with setting default-directory for shell buffer


From: rodman
Subject: Re: Problem with setting default-directory for shell buffer
Date: Thu, 24 Sep 2015 08:36:04 -0700 (PDT)
User-agent: G2/1.0

On Wednesday, September 23, 2015 at 6:48:03 PM UTC-7, Barry Margolin wrote:
> In article <2dc06caf-b00a-4863-aada-f63af3381916@googlegroups.com>,
>  rodman@google.com wrote:
> 
> > Every N years I seem to need to flip between xemacs and emacs.
> > 
> > Now I'm back on emacs..love the nfs free setup and just
> > doing 
> > 
> > require 'google
> > 
> > etc. Whoever-all made that happen, thanks a bunch!
> > 
> > My problem:
> > 
> > I use a python program to implement a set of 'directory marks'
> > The program is really simple and it works in concert with this bash 
> > function:
> > 
> > 
> > function ccd {
> >     eval `~/git/py/cd_marks.py $1 $2 `;
> >     emacsclient --eval "(cd \"`pwd`\")" >&/dev/null;
> > }
> > 
> > 
> > so I say stuff like
> > 
> > ccd foo
> > 
> > in a shell, and if I then do a find-file in that buffer the directory
> > shows up properly. (i.e. the shell pwd is "tracked" whenever I use the ccd 
> > command)
> > 
> > I have tried of ton of ideas but nothing works.
> 
> Each Emacs buffer has its own default directory. When emacsclient 
> executes the --eval code, it's in a temporary buffer, not your shell 
> buffer.
> 
> Maybe this will work: 
> 
> --eval "(progn (set-buffer \"*shell*\")(cd \"`pwd`\"))"
> 
> -- 
> Barry Margolin, barmar@alum.mit.edu
> Arlington, MA
> *** PLEASE post questions in newsgroups, not directly to me ***


It did work! Thanks a bunch!


reply via email to

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