From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.help Subject: Re: tramp and how to source remote environment Date: Thu, 05 Mar 2009 15:05:42 +0100 Message-ID: References: <0d00b462-9d63-43d6-b54d-ea120d2fa50a@l39g2000yqn.googlegroups.com> <8704ba36-37be-4a6e-adc7-82be9b3e330f@f3g2000yqf.googlegroups.com> <0a66d772-a732-405f-b637-a7ecd3d36f7b@e10g2000vbe.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1236261940 4708 80.91.229.12 (5 Mar 2009 14:05:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 5 Mar 2009 14:05:40 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: ramestica@gmail.com Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Mar 05 15:06:48 2009 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 1LfECT-0005wR-GQ for geh-help-gnu-emacs@m.gmane.org; Thu, 05 Mar 2009 15:05:44 +0100 Original-Received: from localhost ([127.0.0.1]:35611 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LfEB8-0005LT-28 for geh-help-gnu-emacs@m.gmane.org; Thu, 05 Mar 2009 09:04:02 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LfEAm-0005Kz-Bl for help-gnu-emacs@gnu.org; Thu, 05 Mar 2009 09:03:40 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LfEAk-0005Km-Pm for help-gnu-emacs@gnu.org; Thu, 05 Mar 2009 09:03:39 -0500 Original-Received: from [199.232.76.173] (port=38027 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LfEAk-0005Kj-L0 for help-gnu-emacs@gnu.org; Thu, 05 Mar 2009 09:03:38 -0500 Original-Received: from mailrelay2.alcatel.de ([194.113.59.96]:58314) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LfEAk-00031V-0f for help-gnu-emacs@gnu.org; Thu, 05 Mar 2009 09:03:38 -0500 Original-Received: from slbhab.alcatel.de (slbhab.de.alcatel-lucent.com [149.204.245.33]) by mailrelay2.alcatel.de (8.13.8/8.13.8/ICT) with ESMTP id n25E3LBI015962; Thu, 5 Mar 2009 15:03:21 +0100 In-Reply-To: <0a66d772-a732-405f-b637-a7ecd3d36f7b@e10g2000vbe.googlegroups.com> (ramestica@gmail.com's message of "Wed\, 4 Mar 2009 20\:59\:38 -0800 \(PST\)") User-Agent: Gnus/5.101 (Gnus v5.10.10) Emacs/21.3 (hpux) X-Scanned-By: MIMEDefang 2.57 on 149.204.45.73 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 2) 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:62622 Archived-At: ramestica@gmail.com writes: > On Mar 3, 11:36=A0am, Michael Albinus wrote: >> Tramp has the variable tramp-remote-path. You can add there your >> preferred paths, like >> >> (add-to-list 'tramp-remote-path "/my/path" 'append) > > this is not convenient because different machines have different > paths. The logic for setting up those paths (based on the machine > name) is part of my remote bash_profile. Repeating that logic in my > local emacs configuration its simply not good. That's right. Tramp is not designed for that case. Maybe I shall extend it this way ... >> Maybe the following works (not tested): >> >> (add-to-list 'tramp-remote-path "${PATH}") > > This does not work because in tramp-get-remote-path the function delq > removes "${PATH}" from remote-path. I don't understand. Do you mean this line: (setq remote-path (delq 'tramp-default-remote-path remote-path))) This deletes the *symbol* `tramp-default-remote-path', and nothing else. > Rodrigo Best regards, Michael.