From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rick Frankel Subject: Re: Org-Mode and Mac OS X advice Date: Sat, 28 Mar 2015 12:26:32 -0400 Message-ID: <20150328162632.GA71345@eyeBook.home> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49980) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YbtZH-0006sE-VG for emacs-orgmode@gnu.org; Sat, 28 Mar 2015 12:26:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YbtZE-00084p-PS for emacs-orgmode@gnu.org; Sat, 28 Mar 2015 12:26:39 -0400 Received: from mail.rickster.com ([204.62.15.78]:49544) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YbtZE-00084d-Mf for emacs-orgmode@gnu.org; Sat, 28 Mar 2015 12:26:36 -0400 Content-Disposition: inline In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Alan Schmitt Cc: emacs-orgmode , Bernd Haug , chris@meliser.co.uk On Thu, Mar 26, 2015 at 02:57:40PM +0100, Alan Schmitt wrote: > On 2015-03-26 14:50, Bernd Haug writes: > > I'm using this nice trick (passed to me by a colleague) that sets the > environment variables and path to be the same in zsh and emacs (launched > From the GUI). > > #+begin_src emacs-lisp > (let ((vars (split-string-and-unquote (shell-command-to-string ". ~/.zshrc; export") "\n"))) > (mapcar (lambda (X) (let ((var_val (split-string-and-unquote X "="))) > (setenv (car var_val) (cadr var_val)))) vars) > (setq exec-path > (append > (split-string-and-unquote (getenv "PATH") ":") > exec-path))) > #+end_src You could also use the `exec-path-from-shell' package, which will set a specified list of variables (defaults to MANPATH, PATH) from the shell. rick