From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.help Subject: RE: default directory for windows Date: Wed, 13 Feb 2008 08:44:24 -0800 Message-ID: <000601c86e5f$b18cc3c0$9eb22382@us.oracle.com> References: <9bf9bf15-3c7e-4d00-9c25-7a367ee8742b@s13g2000prd.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1202921205 31054 80.91.229.12 (13 Feb 2008 16:46:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 13 Feb 2008 16:46:45 +0000 (UTC) To: "'rustom'" , Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Feb 13 17:47:08 2008 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 1JPKkz-0002gl-NU for geh-help-gnu-emacs@m.gmane.org; Wed, 13 Feb 2008 17:46:50 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JPKkV-0001sx-UK for geh-help-gnu-emacs@m.gmane.org; Wed, 13 Feb 2008 11:46:19 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JPKkC-0001rn-6g for help-gnu-emacs@gnu.org; Wed, 13 Feb 2008 11:46:00 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JPKkA-0001q1-Hh for help-gnu-emacs@gnu.org; Wed, 13 Feb 2008 11:45:59 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JPKkA-0001pn-CU for help-gnu-emacs@gnu.org; Wed, 13 Feb 2008 11:45:58 -0500 Original-Received: from rgminet01.oracle.com ([148.87.113.118]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JPKk9-0006Xd-UE for help-gnu-emacs@gnu.org; Wed, 13 Feb 2008 11:45:58 -0500 Original-Received: from agmgw1.us.oracle.com (agmgw1.us.oracle.com [152.68.180.212]) by rgminet01.oracle.com (Switch-3.2.4/Switch-3.1.6) with ESMTP id m1DGjNXQ017357; Wed, 13 Feb 2008 09:45:23 -0700 Original-Received: from acsmt351.oracle.com (acsmt351.oracle.com [141.146.40.151]) by agmgw1.us.oracle.com (Switch-3.2.0/Switch-3.2.0) with ESMTP id m1D24TFd030020; Wed, 13 Feb 2008 09:45:21 -0700 Original-Received: from inet-141-146-46-1.oracle.com by acsmt350.oracle.com with ESMTP id 3573499071202921065; Wed, 13 Feb 2008 08:44:25 -0800 Original-Received: from dradamslap1 (/130.35.178.158) by bhmail.oracle.com (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 13 Feb 2008 08:44:25 -0800 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <9bf9bf15-3c7e-4d00-9c25-7a367ee8742b@s13g2000prd.googlegroups.com> Thread-Index: AchuVvLPDj3bpbk5SLeMmg14qkceIwABuFQg X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 X-Brightmail-Tracker: AAAAAQAAAAI= X-Brightmail-Tracker: AAAAAQAAAAI= X-Whitelist: TRUE X-Whitelist: TRUE X-detected-kernel: by monty-python.gnu.org: Linux 2.4-2.6 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:51493 Archived-At: > One of the (many) problems I have using emacs under windows is that ti > starts off with the pwd being in the directory where emacs is > installed rather than my home. > > So my .emacs has (cd "~") to get around this > > But I imagine this is not the proper way to correcting the problem. Is > there not some 'pre-variable' from which default-directory is set? Since the subject line mentions Windows... this is what I do: Create a shortcut to runemacs.exe, and use that to start Emacs. In the shortcut definition (right-click > Properties), Shortcut tab, field "Start in:", put the directory where you want Emacs to start. Using the shortcut then starts Emacs in Dired mode in that directory (which is what I want). Otherwise, yes, just use `cd' in your init file. Or you can do (setq default-directory "C:/your/path/to/dir") in your init file. See also variable `dired-directory-alist', which lets you set the `default-directory' for different modes. If you use emacsclient (e.g. if you use EmacsW32), you can also no doubt specify the startup directory for that. And you can specify a startup directory on the command line, using option `-f' and a function that cd's to your directory - see `M-x man RET emacs'.