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: remote file editing over ssh with emacs 22.3.1 on Windows Date: Sat, 23 May 2009 22:02:30 +0200 Message-ID: <87d49zy4dl.fsf@gmx.de> References: <4A02A04F.6010307@simplistix.co.uk> <83hbzwdazt.fsf@gnu.org> <0F841C30-5A42-4F96-95CE-49FA51BDBDB6@digg.com> <4A04A18F.2020404@simplistix.co.uk> <833abedact.fsf@gnu.org> <4A0543A3.9000007@simplistix.co.uk> <83y6t6bp8l.fsf@gnu.org> <4A05C052.10607@simplistix.co.uk> <83bpq2ytya.fsf@gnu.org> <87fxfbibjr.wl%anselm.helbig+news2009@googlemail.com> <4A0EF0FC.2020608@simplistix.co.uk> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1243108988 19317 80.91.229.12 (23 May 2009 20:03:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 23 May 2009 20:03:08 +0000 (UTC) Cc: "help-gnu-emacs@gnu.org >> Emacs Help" , anselm.helbig+news2009@googlemail.com To: Chris Withers Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat May 23 22:03:01 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 1M7xQq-0007oS-V8 for geh-help-gnu-emacs@m.gmane.org; Sat, 23 May 2009 22:03:01 +0200 Original-Received: from localhost ([127.0.0.1]:34106 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M7xQq-0002sl-Fc for geh-help-gnu-emacs@m.gmane.org; Sat, 23 May 2009 16:03:00 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M7xQX-0002sZ-50 for help-gnu-emacs@gnu.org; Sat, 23 May 2009 16:02:41 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M7xQS-0002oO-PC for help-gnu-emacs@gnu.org; Sat, 23 May 2009 16:02:40 -0400 Original-Received: from [199.232.76.173] (port=60374 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M7xQS-0002oL-L9 for help-gnu-emacs@gnu.org; Sat, 23 May 2009 16:02:36 -0400 Original-Received: from mail.gmx.net ([213.165.64.20]:39002) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1M7xQR-0004Vy-OZ for help-gnu-emacs@gnu.org; Sat, 23 May 2009 16:02:36 -0400 Original-Received: (qmail invoked by alias); 23 May 2009 20:02:33 -0000 Original-Received: from brln-4db9288c.pool.einsundeins.de (EHLO arthur.local) [77.185.40.140] by mail.gmx.net (mp016) with SMTP; 23 May 2009 22:02:33 +0200 X-Authenticated: #3708877 X-Provags-ID: V01U2FsdGVkX18XbygIzJAXk0DWBaOtovE4eMG7w9XK67ZV8HGfl/ dSWeEUkNGb1ZJ6 In-Reply-To: <4A0EF0FC.2020608@simplistix.co.uk> (Chris Withers's message of "Sat, 16 May 2009 17:59:40 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.92 (gnu/linux) X-Y-GMX-Trusted: 0 X-FuHaFi: 0.62 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) 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:64659 Archived-At: Chris Withers writes: [Sorry for the late reply, I was offline last weeks due to vacations] > Anselm Helbig wrote: >> You do it something like this: >> >> (add-to-list 'tramp-default-proxies-alist >> '("\\`host.example.com\\'" nil "/ssh:remoteuser@%h:")) >> >> And then >> >> C-x C-f /sudo:privilegeduser@host.example.com:/ > > Okay, I haven't tried this, but that's because it appears I need to > add code to my .emacs file for every username/hostname combination > that I want to log in to. > > Is there no way I can specify both the username to use to log in with > *and* the username to sudo to as part of the C-x C-f process? Could you, please, give me an example? I guess Tramp 2.1 could be configured the way you like. The manual discusses several scenarios already for exactly this point. See and the examples for usage of %u and %h. > cheers, > > Chris Best regards, Michael.