From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Rusi Newsgroups: gmane.emacs.help Subject: Re: Prob wit init.el / .emacs on two different installation (win - linux) Date: Tue, 28 Jan 2014 08:15:46 -0800 (PST) Message-ID: References: <8179c13a-e17f-48f1-bce9-11be573e9177@googlegroups.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: ger.gmane.org 1390926012 30033 80.91.229.3 (28 Jan 2014 16:20:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 28 Jan 2014 16:20:12 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Jan 28 17:20:20 2014 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 1W8BOe-0004Tv-1M for geh-help-gnu-emacs@m.gmane.org; Tue, 28 Jan 2014 17:20:20 +0100 Original-Received: from localhost ([::1]:38128 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W8BOd-0002I8-3z for geh-help-gnu-emacs@m.gmane.org; Tue, 28 Jan 2014 11:20:19 -0500 X-Received: by 10.42.240.19 with SMTP id ky19mr723440icb.4.1390925747282; Tue, 28 Jan 2014 08:15:47 -0800 (PST) X-Received: by 10.50.213.70 with SMTP id nq6mr169937igc.5.1390925747167; Tue, 28 Jan 2014 08:15:47 -0800 (PST) Original-Path: usenet.stanford.edu!c10no4341066igq.0!news-out.google.com!vg8ni4igb.0!nntp.google.com!uq10no4710028igb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help In-Reply-To: <8179c13a-e17f-48f1-bce9-11be573e9177@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=59.95.34.150; posting-account=mBpa7woAAAAGLEWUUKpmbxm-Quu5D8ui Original-NNTP-Posting-Host: 59.95.34.150 User-Agent: G2/1.0 Injection-Date: Tue, 28 Jan 2014 16:15:47 +0000 Original-Xref: usenet.stanford.edu gnu.emacs.help:203466 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:95734 Archived-At: Renato wrote > I wouild use the variable you sudgested me to obtain that: > - if I'm on linux machine, the .org path this: > /home/renato/Dropbox/Documenti/org/ I think this is not the best variable for this (others should correct me) Better to use user-init-file or user-emacs-directory Also beware of backslashes (\) in emacs strings. Forward (/) will work even on windows and are safer. [Ive been bitten couple of times by this] > > -instead if I' using win, is something like this > C:\Documents and Settings\renatop\Documenti\Dropbox\Documentiorg\ > > so, I think, I need to test the variable window-system to undestand if I'm running emacs from win or from linux, and then use the correct path to set the the correct value for "setq default-directory" This is the best I could find but it will not work for example if you do emacs -nw in linux There must be some variable for "Am I on windows? Linux? Mac?" but I dont know which