From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.bugs Subject: bug#65356: 30.0.50; [wishlist] Support Tramp method, user name and host name completion in eshell Date: Fri, 18 Aug 2023 08:45:26 +0200 Message-ID: <87il9crgqh.fsf@gmx.de> References: <87r0o1r1io.fsf@gmx.de> <4b4a64de-846a-ed2a-f409-80ea75e9cb57@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13392"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 65356@debbugs.gnu.org, monnier@iro.umontreal.ca To: Jim Porter Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Aug 18 08:46:20 2023 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 1qWtFU-0003II-JV for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 18 Aug 2023 08:46:20 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qWtFM-0005Wo-U3; Fri, 18 Aug 2023 02:46:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qWtFC-0005TB-7z for bug-gnu-emacs@gnu.org; Fri, 18 Aug 2023 02:46:10 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qWtFB-0007kU-Tk for bug-gnu-emacs@gnu.org; Fri, 18 Aug 2023 02:46:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qWtFC-0000xJ-5B for bug-gnu-emacs@gnu.org; Fri, 18 Aug 2023 02:46:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 18 Aug 2023 06:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65356 X-GNU-PR-Package: emacs Original-Received: via spool by 65356-submit@debbugs.gnu.org id=B65356.16923411423643 (code B ref 65356); Fri, 18 Aug 2023 06:46:02 +0000 Original-Received: (at 65356) by debbugs.gnu.org; 18 Aug 2023 06:45:42 +0000 Original-Received: from localhost ([127.0.0.1]:46008 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qWtEr-0000wg-PH for submit@debbugs.gnu.org; Fri, 18 Aug 2023 02:45:42 -0400 Original-Received: from mout.gmx.net ([212.227.17.20]:53097) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qWtEo-0000wK-3P for 65356@debbugs.gnu.org; Fri, 18 Aug 2023 02:45:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.de; s=s31663417; t=1692341128; x=1692945928; i=michael.albinus@gmx.de; bh=pWPRte2j60DHNv2cMGAB0C6vhD3rox2ESkGMLpaexMo=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date; b=XRCcX0GyoZq1ftGYxFg08IN9EWgckPlm+rYjY0KIxZ4DKpGYG8/eFTAM3yKLfWk5Rwa8U1x sSuEVfQKM76jV7SrRXkTTJnHejGjT5sV0BMN279ZHW4A2tIiy8E3b/v77RWZpsH31mg+n76Lz MEN+nbcM1rEgX/jD/1iMxf54X/7QJVLvMpc3rM5ZKuqaFxj2Hmjr6jD+5469+GlwuHCicEJ2T gydv41ZRO/86Hv+s88zjtLJPeBl/xyRuHCrgt8E2lBml4HLI/Cg363Vn8JvIGJjGT8yk8OcqJ wCnV0GkedEDlvWuhQlU2wGAHsYAF66bAPnHIOkQF62KQkeG/5Btg== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Original-Received: from gandalf.gmx.de ([185.89.39.27]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1M3DNt-1qTKKb0ggv-003a7H; Fri, 18 Aug 2023 08:45:28 +0200 In-Reply-To: <4b4a64de-846a-ed2a-f409-80ea75e9cb57@gmail.com> (Jim Porter's message of "Thu, 17 Aug 2023 20:31:54 -0700") X-Provags-ID: V03:K1:661jpZDyeC9VELBDu+n03W2ykAo6dKL8X/hSJL1/DIh4Iobc+UX MD9dG4xAj1puoVJVetOZNzEwflCRaNQvY5MEZZarZDhHSbWDqSY8qtYrkj0FckZDk0YpYQB iyatHYwUMLa5cgR7MANdABK10HffqqSJ+s8Y9j0TnpslorvcI52gEnqksOLo/H/l4Q3kIOd c8a00AEBk8gUyHfnSq+sA== UI-OutboundReport: notjunk:1;M01:P0:CV5R39rwTGs=;qIQ8F9eBzi7W4bHR4A9QdOWM1Xo 1gb0qOznvl3Bh+JWmsf+Xp6el32xEt9r9RBWb945YIajUlJzeCCIam44E5oDNTHCHEuNIHLVM DkH+1N/Tp5QA2pKPzehmK/ITlUbWz/ZPKl44/GC5yzQUqzysgR3/L4YIziFxQ28OyJT4yk1EE Z93Z2SZoh0YScLBKa5Lq1w52C5yGtb44TmeLQ7v3nXHxnv8oph7OMcKk6/EIMUyhYY4ioNlKl 7WgzOlfFUZ/94y4KHkR1Eo7L7aKJwiNoyhP2rKCeTqF2ilCLNOlL7XkCFheQX3/0UTDiBaT3e Ps6TNHegCmGFwzhnidyRbCHEW1RuDbRkKoS1P/NpC46WtCCKnxmwQeSyihKXm9CzUBJGJmXRd VdIxmXVYKfvoMsmJXMphbt+Q76EQ/zBvaHkf4d+hXdwGEKBwrYs7DTHlqD4MLDr9NylyPYfvf aO+04jwsFZCJaxV5GQHfJh8DZ7AK3X+KgKoGvpxCTXeqgVIK15GZIf0Cqqo4ZAwt3nykseD5i zYGIzXswIduCwN95LNGmqEfXGyGik008EEuMNFW0NA/REgMFNbXWIvXU4DzYzhf16WbiNz0Gj JxCT8VkLyTpEh9KChykDPaZ9ApbTQQVXEtQr/ZzxzaS6gnGQ2O4PSXeiAMfQJ9ee9/qFR8Vfs 9blfKuCpQVC7GMI4gqsd5H2WEeBQgKogQRo0b33DzTXyqDXptbyUwclAa3L4Si/K0qvYgt0/3 3a8Hv8/TvM5MTatZZyd57pLE8YsbaePwdxfCcfU8BmVMvWhyXiyf3E2POCAxtMkL8ye8qSlm 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:267731 Archived-At: Jim Porter writes: Hi Jim, > X-Debbugs-Cc: monnier@iro.umontreal.ca Well, this works only if you *submit* a new bug. If you *reply*, just use Cc. I've added Stefan in this reply. >> In eshell, this feature does not exist. I would like if I could type >> "cd /ss TAB" and could see the same offering of "ssh:", "sshfs:" and >> "sshx:". Same for user name and host name. >> >> The appended patch does this for me. I have no idea how good it fits >> into the eshell machinery, for example whether there are problems with >> the em-elecslash.el module. Comments welcome! > > Thanks. This would be a useful feature indeed. I have a couple of main > concerns, which I'm not quite sure what to do about at the moment: > > 1) Should this go in the Eshell Tramp extension module? Currently, > that module is there to add built-in versions of su/sudo/doas, as an > alternative to the "standard" Eshell way of connecting to a remote > host: "cd /ssh:user@host:~". Therefore, I think we'd want > tab-completion of Tramp file names even (or especially!) when the > Tramp extension module is disabled (which is the default). I have no preference where it shall be in eshell. I've used em-tramp.el during my work, because it is the least invasive place: it requires already Tramp. You might have seen, that the new function uses two Tramp variables. > 2) I'm not sure 'pcomplete-try-first-hook' is the right way to enable > this. Pcomplete has quite a few ways of performing completions, and it > already knows when it should specifically complete file names (as > opposed to "--options" for example). Maybe we should enhance Pcomplete > itself so that you can opt into completion of remote file names too? > Then when you tab-complete in Eshell, it would just work in all the > contexts where you can normally complete a file name. I Cc'ed Stefan > since he might have some thoughts on the Pcomplete machinery here. When I've started to implement this, I was a n00b wrt pcomplete. Well, I'm still a n00b, all what I have done is stealing code from somewhere else, shamelessly. It would be great if this completion function applies only to possible *Lisp* file names. Roughly said, to arguments of commands not being external, and not in a pipe. If this could be arranged I'd appreciate it. So I count on you and Stefan :-) Best regards, Michael.