From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ismael Valladolid Torres Newsgroups: gmane.emacs.help Subject: Eval environment variables using Lisp code Date: Wed, 19 Apr 2006 12:12:16 +0200 Message-ID: <20060419101216.GA552@spma33> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1145441559 15702 80.91.229.2 (19 Apr 2006 10:12:39 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 19 Apr 2006 10:12:39 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Apr 19 12:12:36 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FW9fm-0000ha-9n for geh-help-gnu-emacs@m.gmane.org; Wed, 19 Apr 2006 12:12:34 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FW9fl-0003m3-H3 for geh-help-gnu-emacs@m.gmane.org; Wed, 19 Apr 2006 06:12:33 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FW9fa-0003kz-03 for help-gnu-emacs@gnu.org; Wed, 19 Apr 2006 06:12:22 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FW9fY-0003kh-0s for help-gnu-emacs@gnu.org; Wed, 19 Apr 2006 06:12:21 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FW9fX-0003kb-SH for help-gnu-emacs@gnu.org; Wed, 19 Apr 2006 06:12:19 -0400 Original-Received: from [213.4.149.12] (helo=csmtpout3.frontal.correo) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FW9gc-0007eq-NC for help-gnu-emacs@gnu.org; Wed, 19 Apr 2006 06:13:27 -0400 Original-Received: from spma33 (80.26.95.88) by csmtpout3.frontal.correo (7.2.056.6) (authenticated as 914074246.terra.es) id 4445FCCA00002940 for help-gnu-emacs@gnu.org; Wed, 19 Apr 2006 12:10:32 +0200 Original-Received: by spma33 (sSMTP sendmail emulation); Wed, 19 Apr 2006 12:12:16 +0200 Original-To: help-gnu-emacs@gnu.org Mail-Followup-To: help-gnu-emacs@gnu.org Content-Disposition: inline User-Agent: Mutt/1.4.2.1i 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:34452 Archived-At: In my setup, I run ssh-agent making it create a script that can be sourced from any shell giving it access to the agent: $ ssh-agent -a /tmp/.ssh-socket >/tmp/.ssh-script $ cat /tmp/.ssh-script SSH_AUTH_SOCK=/tmp/.ssh-socket; export SSH_AUTH_SOCK; SSH_AGENT_PID=148; export SSH_AGENT_PID; echo Agent pid 148; To be able to use Tramp, I'd need emacs to eval that shell code so environment variables are properly defined. Can this be done via Lisp code in my .emacs? This is NT Emacs and ssh is the Cygwin version. So running ssh-agent via the window manager is not an option, and making ssh not use the agent and ask for a password instead isn't, either. If I eval that code on a Bash shell and run emacs from it, it works, but I'd like it to work when using the Emacs icon. Thanks in advance for any idea. Cordially, Ismael -- Ismael Valladolid Torres OpenPGP key ID: 0xDE721AF4 [^[$B$?$S$?$S$9$_$^$;$s^[(B] Jabber ID: ivalladt@jabberes.org http://lamediahostia.blogspot.com =?iso-2022-jp?B?GyJE0hREjAGyhC?=