From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ramestica@gmail.com Newsgroups: gmane.emacs.help Subject: Re: tramp and how to source remote environment Date: Thu, 5 Mar 2009 06:49:15 -0800 (PST) Organization: http://groups.google.com Message-ID: <622d9fe4-3b8e-4016-8283-dd5518189264@33g2000yqm.googlegroups.com> 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 1236267672 27223 80.91.229.12 (5 Mar 2009 15:41:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 5 Mar 2009 15:41: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 Thu Mar 05 16:42:29 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 1LfFiD-0007Nl-OM for geh-help-gnu-emacs@m.gmane.org; Thu, 05 Mar 2009 16:42:17 +0100 Original-Received: from localhost ([127.0.0.1]:37363 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LfFgs-0004IL-GK for geh-help-gnu-emacs@m.gmane.org; Thu, 05 Mar 2009 10:40:54 -0500 Original-Path: news.stanford.edu!newsfeed.stanford.edu!postnews.google.com!33g2000yqm.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 54 Original-NNTP-Posting-Host: 192.131.232.129 Original-X-Trace: posting.google.com 1236264555 21927 127.0.0.1 (5 Mar 2009 14:49:15 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Thu, 5 Mar 2009 14:49:15 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: 33g2000yqm.googlegroups.com; posting-host=192.131.232.129; posting-account=GyIV7QoAAACC7zm6nA92JhktCMy0igbg User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.6) Gecko/2009012111 Red Hat/3.0.6-1.el5 Firefox/3.0.6, gzip(gfe), gzip(gfe) Original-Xref: news.stanford.edu gnu.emacs.help:167326 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:62623 Archived-At: On Mar 5, 9:05=A0am, Michael Albinus wrote: > 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. I mean the code after the comment ";; Remove non-existing directories.". In general I find a bit too intrusive from tramp to go and do something with my PATH in the remote machine. I would like the call to tramp-set-remote-pat in tramp-open-connection-setup-interactive-shell to be a choice left to the user. What do you think of the attached patch? Rodrigo *** tramp.el.orig 2009-03-05 09:40:40.000000000 -0500 --- tramp.el 2009-03-05 08:48:53.000000000 -0500 *************** *** 871,876 **** --- 871,881 ---- (tramp-set-completion-function "fcp" tramp-completion-function-alist-ssh))) + (defcustom tramp-override-remote-path t + "To guess or not to guess a 'good' remote PATH." + :group 'tramp + :type 'boolean) + (defconst tramp-echo-mark-marker "_echo" "String marker to surround echoed commands.") *************** *** 6048,6054 **** 500 0)))) ;; Set remote PATH variable. ! (tramp-set-remote-path vec) ;; Search for a good shell before searching for a command which ;; checks if a file exists. This is done because Tramp wants to use --- 6053,6060 ---- 500 0)))) ;; Set remote PATH variable. ! (if (eq tramp-override-remote-path t) ! (tramp-set-remote-path vec)) ;; Search for a good shell before searching for a command which ;; checks if a file exists. This is done because Tramp wants to use