From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?ISO-8859-1?Q?Andreas_R=F6hler?= Newsgroups: gmane.emacs.help Subject: Re: Create shell from ido Date: Thu, 28 Jan 2010 11:46:00 +0100 Message-ID: <4B616AE8.3090602@easy-emacs.de> References: <5df65c2e-6a63-4989-a562-a10b768dd6d6@k41g2000yqm.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1264675532 11978 80.91.229.12 (28 Jan 2010 10:45:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 28 Jan 2010 10:45:32 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jan 28 11:45:30 2010 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.69) (envelope-from ) id 1NaRsN-0000k4-SL for geh-help-gnu-emacs@m.gmane.org; Thu, 28 Jan 2010 11:45:28 +0100 Original-Received: from localhost ([127.0.0.1]:54867 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NaRsN-0006th-1O for geh-help-gnu-emacs@m.gmane.org; Thu, 28 Jan 2010 05:45:27 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NaRro-0006tU-Kc for help-gnu-emacs@gnu.org; Thu, 28 Jan 2010 05:44:52 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NaRrj-0006si-Gw for help-gnu-emacs@gnu.org; Thu, 28 Jan 2010 05:44:51 -0500 Original-Received: from [199.232.76.173] (port=39007 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NaRrj-0006sf-4L for help-gnu-emacs@gnu.org; Thu, 28 Jan 2010 05:44:47 -0500 Original-Received: from moutng.kundenserver.de ([212.227.126.171]:51130) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NaRri-00031r-DO for help-gnu-emacs@gnu.org; Thu, 28 Jan 2010 05:44:46 -0500 Original-Received: from [192.168.178.27] (p54BE8A42.dip0.t-ipconnect.de [84.190.138.66]) by mrelayeu.kundenserver.de (node=mreu1) with ESMTP (Nemesis) id 0LkUgR-1OCFSI0pBL-00cLVF; Thu, 28 Jan 2010 11:44:45 +0100 User-Agent: Thunderbird 2.0.0.19 (X11/20081227) In-Reply-To: <5df65c2e-6a63-4989-a562-a10b768dd6d6@k41g2000yqm.googlegroups.com> X-Provags-ID: V01U2FsdGVkX18oIrC791ijiGRQQitNKPuseAs3AMgI1jAPfVp bPBHy4h/59OABfRE/eP3SZNYBPgvaFbOkwCVL8nb18Lzl+Kpqp sU/+XiIIufJVDdhDTUA41Ol2j4VZ4WNZBmnecdhmvo= X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. 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:71540 Archived-At: José A. Romero L. wrote: > On 28 Sty, 02:54, Nathaniel Flath wrote: > >> Hello, >> I have ido activated. If I do C-x C-f and navigate to a directory, C-d will >> open a dired buffer in that directory. Is there a way to open a shell >> buffer instead? >> >> Thanks, >> Nathaniel Flath >> > > Depends on the shell you want to use. For regular shell you could use > something like this: > > (defun nf/openshell (&optional dir) > (interactive "DDirectory to open shell into: ") > (shell) > (if dir > (comint-send-string > (current-buffer) > (concat "cd " (shell-quote-wildcard-pattern dir) " > > ")))) > > in any case, it doesn't seem to be possible to open a shell directly > in any arbitrary directory other than default-directory. It's not ido, but it should do it: (defun My-Shell-where-I-want-it () (interactive) (dired "My-precious-directory") (shell)) Maybe adapt that for ido, if necessary. Cheers Andreas > You always > have to send a "cd something" to move to where you want to be (though > I'd be glad to find out I'm wrong). In any case, that's the same I do > in SrC (http://www.emacswiki.org/emacs/Sunrise_Commander) and works > quite well for me. > > Cheers, > -- > José A. Romero L. > escherdragon at gmail.com > "We who cut mere stones must always be envisioning cathedrals." > (Quarry worker's creed) > >