[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Go to my CWD!
From: |
Andreas Röhler |
Subject: |
Re: Go to my CWD! |
Date: |
Wed, 27 Jan 2010 22:30:10 +0100 |
User-agent: |
Thunderbird 2.0.0.19 (X11/20081227) |
Andrea Crotti wrote:
> Andreas Röhler <andreas.roehler@easy-emacs.de> writes:
>
>
>> Andrea Crotti wrote:
>> Maybe that way?:
>>
>> (defun my-shell-always-in-default-dir ()
>> (interactive)
>> (shell default-directory))
>>
>> Cheers
>>
>>
>
> Nice thanks that would work, but then I have to setup a wrapper for
> every possible interpreter (octave, python etc etc...)
> Something more automatic is not possible?
>
>
>
>
>
its quite easy to change the function shell for your needs. the
beginning reads
(interactive
(list
(and current-prefix-arg
(prog1
(read-buffer "Shell buffer: "
(generate-new-buffer-name "*shell*"))
(if (file-remote-p default-directory)
;; It must be possible to declare a local default-directory.
(setq default-directory
(expand-file-name
(read-file-name
"Default directory: " default-directory default-directory
t nil 'file-directory-p))))))))
you see the user is queried and our default-directory also will be
delivered per default
To automatize this, just introduce a variable Yes-I-will, ask for it at
the right place(s),
get your extension excuted instead (read-file-name
BTW think its worth a feature request at emacs-devel
Andreas