From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Sven Joachim Newsgroups: gmane.emacs.help Subject: Re: Open terminal window from emacs Date: Sat, 28 Sep 2013 09:56:01 +0200 Organization: Gnus News User Services Message-ID: <87pprtnzvy.fsf@turtle.gmx.de> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1380355217 12453 80.91.229.3 (28 Sep 2013 08:00:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 28 Sep 2013 08:00:17 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Sep 28 10:00:19 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VPpRp-0002lL-Fm for geh-help-gnu-emacs@m.gmane.org; Sat, 28 Sep 2013 10:00:17 +0200 Original-Received: from localhost ([::1]:40033 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VPpRo-0000D5-Tm for geh-help-gnu-emacs@m.gmane.org; Sat, 28 Sep 2013 04:00:16 -0400 Original-Path: usenet.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!uio.no!quimby.gnus.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 29 Original-NNTP-Posting-Host: port-212-202-249-157.static.qsc.de Original-X-Trace: quimby.gnus.org 1380354962 31957 212.202.249.157 (28 Sep 2013 07:56:02 GMT) Original-X-Complaints-To: usenet@quimby.gnus.org Original-NNTP-Posting-Date: Sat, 28 Sep 2013 07:56:02 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) Cancel-Lock: sha1:kWQCX9sSZT/yxXk6cK6BOo2UOZ8= Original-Xref: usenet.stanford.edu gnu.emacs.help:201423 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:93692 Archived-At: On 2013-09-27 22:46 +0200, Frederik wrote: > I try to open up urxvt from emacs and make the terminal emulator > automatically switch to the current working directory of the current > buffer (i.e. to the value of default-directory). Shouldn't the terminal emulator start in that directory automatically? At least xterm does, I don't have urxvt around ATM. > This is what I've come up with: > > (call-process "/usr/bin/urxvt" nil 0 nil > (concat "-cd" default-directory)) > > But this doesn't work. > > This > (call-process "/usr/bin/urxvt" nil 0 nil > "-cd ~/test") > doesn't work either, even though the directory exits. > > Any pointers? Seems to me the tilde does not get expanded here, so you would have to use (expand-file-name default-directory) rather than just default-directory. Cheers, Sven