From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philipp Stephani Newsgroups: gmane.emacs.bugs Subject: bug#53847: 28.0.91; Tramp SSHFS: incorrect remote home directory Date: Fri, 18 Mar 2022 17:53:32 +0100 Message-ID: References: <871r0ct40m.fsf@gmx.de> <87r17bv5b5.fsf@gmx.de> <87ilsmujg7.fsf@gmx.de> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26531"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 53847@debbugs.gnu.org To: Michael Albinus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Mar 18 17:54:19 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nVFrl-0006jy-Ok for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 18 Mar 2022 17:54:17 +0100 Original-Received: from localhost ([::1]:58272 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nVFrk-0002YY-JB for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 18 Mar 2022 12:54:16 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:40750) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nVFrW-0002Hm-Pk for bug-gnu-emacs@gnu.org; Fri, 18 Mar 2022 12:54:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36106) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nVFrW-00049u-HE for bug-gnu-emacs@gnu.org; Fri, 18 Mar 2022 12:54:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nVFrW-0002Vk-Fp for bug-gnu-emacs@gnu.org; Fri, 18 Mar 2022 12:54:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Philipp Stephani Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 18 Mar 2022 16:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53847 X-GNU-PR-Package: emacs Original-Received: via spool by 53847-submit@debbugs.gnu.org id=B53847.16476224339632 (code B ref 53847); Fri, 18 Mar 2022 16:54:02 +0000 Original-Received: (at 53847) by debbugs.gnu.org; 18 Mar 2022 16:53:53 +0000 Original-Received: from localhost ([127.0.0.1]:58236 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nVFrM-0002VH-Jw for submit@debbugs.gnu.org; Fri, 18 Mar 2022 12:53:53 -0400 Original-Received: from mail-oi1-f177.google.com ([209.85.167.177]:45847) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nVFrI-0002Ul-LU for 53847@debbugs.gnu.org; Fri, 18 Mar 2022 12:53:48 -0400 Original-Received: by mail-oi1-f177.google.com with SMTP id 12so9316124oix.12 for <53847@debbugs.gnu.org>; Fri, 18 Mar 2022 09:53:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=iVfl3bgvRadkMkxnZmbZyt+O3ofBLllOp78O1EJLmuk=; b=hGaAihFiQD2D5Q2erfESkzto15seQw3pGwxrDDEubitaD/dSlFydcjtAQvEmp2t/kp 6jkDmrWrnX49dKXBFwHfxsW7ScRqhx48UOdUKHaDz5bbKP47QqM1Rqkw43m1UmSwuQwz HgVdNGitNtqhZlxsilfDTsdMWwWa9IlUE5+q88msKqBQ9BljkU0O+W5PAsagygJva6s1 Vc5eJZopKZRTzjZgRkBNDmMcGW3wpM+9i1kY9m4vhiti3Y/uqCrCzw8pXQ6oEMmsaHjr unuFGV0jWjQX4iNiuRGri/m43KWrJiv8i/qmnYlBt5LPcY8n1R0uuVKWfj1mpEVeCgmE SEZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=iVfl3bgvRadkMkxnZmbZyt+O3ofBLllOp78O1EJLmuk=; b=w9tSxN22gm+O2Qvu7IeEpIvUyMZqZEzHJY0jIu2EUGlehKSNfIBtTnNkuIkwx6TBz+ AFl2YeQiIl+WrqyOb+pYeDlI0oXmQoSoybVBwuhszbFyzIgCoMcVtu+9usNY9n/vPPsZ 1yVLzJE6D3FzI2dfCHNqR8H8yv7EM/W/kz/SKe/hJU0P7fK1Flz+SFmAOWie7DSKtQJ6 F4RcK3KnAL5tD3wrU2tPPU7/22i8tz7boln1Dr37giHtiBfbH17mrOGOQLJPJqeuQXki dnaBJy2niGxp0lHIzauPcfVaQ4gicZgme9S6WKaFSoL4m+JjoBIR21ZKcGOaLV4zSyry cnJA== X-Gm-Message-State: AOAM531WCFjc+BQfCvt4yLhodIaR7QrJHk9znrnfGDAqeAwcA80fFFRN A0Ql4OE64J7yQ8nsxbguzJe0rBK/XQRG2No/TvU= X-Google-Smtp-Source: ABdhPJxScoaUUqLQGU9mGTC6EZTJPTjA45jJpplT+OG1r9hFJ2CNrgbZUs00gdle/ht711QRKxZKwlm1PdoVNMxwXNs= X-Received: by 2002:a05:6808:171a:b0:2ef:b06:c6cc with SMTP id bc26-20020a056808171a00b002ef0b06c6ccmr4464066oib.134.1647622422968; Fri, 18 Mar 2022 09:53:42 -0700 (PDT) In-Reply-To: <87ilsmujg7.fsf@gmx.de> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:228560 Archived-At: Am Do., 10. M=C3=A4rz 2022 um 12:37 Uhr schrieb Michael Albinus : > > Michael Albinus writes: > > Hi Philipp, > > >> Thanks, but would it maybe be possible to find a better solution? I've > >> been using SSHFS for a while now, and this particular issue is pretty > >> annoying in practice. How about any of the following: > >> - When connecting over SSHFS, ask the remote host (via SSH) for the > >> home directory and cache the result. > >> - Allow the user to configure a per-host static home directory (i.e. > >> just a customizable mapping from hosts + users to home directories). I > >> regularly only connect to 2 hosts with known hostnames and home > >> directories, so at least for me maintaining such a mapping would be > >> feasible. > >> WDYT? > > > > Tramp uses already a cached value for the home directory, under the key > > "~". You could try the following: > > > > (add-to-list 'tramp-connection-properties > > (list (regexp-quote "/sshfs:user@randomhost.your.domain:") > > "~" "/home/user")) > > > > It is untested, and you need a fresh git checkout of master. Please > > report whether it works; I would add the recipe to the manual then. > > Well, it didn't work out of the box. So I've pushed a fix to the master > branch in order to support this. Note, that you need the connection > property "~user", with "user" being your remote user name. Thanks, I'll try this out for a while to see whether it works for me.