From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jim Porter Newsgroups: gmane.emacs.bugs Subject: bug#70792: 30.0.50; [PATCH] Add Eshell support for expanding absolute file names within the current remote connection Date: Thu, 9 May 2024 15:28:58 -0700 Message-ID: <1aff1b77-1512-0b81-5067-54af5803a519@gmail.com> References: <5b881f54-4c29-f8d8-d1f7-57b44e7cfc80@gmail.com> <86y18nb3ap.fsf@gnu.org> <86cypybx3f.fsf@gnu.org> <320dbb86-07b5-03ce-3ef0-a25d7978c214@gmail.com> <865xvpbzvq.fsf@gnu.org> <920fab98-d9e8-b4cd-c9bd-8bec428813eb@gmail.com> <86a5l0a195.fsf@gnu.org> <86wmo4888l.fsf@gnu.org> <87cypu4zv4.fsf@gmx.de> <86h6f66cm9.fsf@gnu.org> <8734qq4x8r.fsf@gmx.de> <26ee9e8b-0aad-46bc-a748-e611bf237575@gmail.com> <87y18i3a4t.fsf@gmx.de> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5562"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , 70792@debbugs.gnu.org To: Michael Albinus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri May 10 00:31:57 2024 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 1s5CIr-00016t-7O for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 10 May 2024 00:31:53 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s5CIc-0005JT-ET; Thu, 09 May 2024 18:31:38 -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 1s5CIO-0005CO-U8 for bug-gnu-emacs@gnu.org; Thu, 09 May 2024 18:31:29 -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 1s5CI4-00088q-Ut for bug-gnu-emacs@gnu.org; Thu, 09 May 2024 18:31:23 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s5CI3-0002H1-9U for bug-gnu-emacs@gnu.org; Thu, 09 May 2024 18:31:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jim Porter Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 09 May 2024 22:31:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70792 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 70792-submit@debbugs.gnu.org id=B70792.17152938078633 (code B ref 70792); Thu, 09 May 2024 22:31:03 +0000 Original-Received: (at 70792) by debbugs.gnu.org; 9 May 2024 22:30:07 +0000 Original-Received: from localhost ([127.0.0.1]:40997 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s5CH8-0002FA-NO for submit@debbugs.gnu.org; Thu, 09 May 2024 18:30:07 -0400 Original-Received: from mail-pf1-f169.google.com ([209.85.210.169]:45097) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s5CH6-0002EI-5b for 70792@debbugs.gnu.org; Thu, 09 May 2024 18:30:05 -0400 Original-Received: by mail-pf1-f169.google.com with SMTP id d2e1a72fcca58-6f44dc475f4so1213220b3a.2 for <70792@debbugs.gnu.org>; Thu, 09 May 2024 15:30:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715293740; x=1715898540; darn=debbugs.gnu.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:mime-version:date:message-id:from:to:cc :subject:date:message-id:reply-to; bh=SsXSJkHq0SC55cGE/iBMTQgt3xkGFCzqtu9Ff7MbVio=; b=bSYMLQu/aulJA2aYQd697PW/BENHHyOsnsMDSH6oECchgRFr33idiBzSBijdMpbYkZ JUWjEd23iWj1ztJK6rB9Yq9SxWqqJhp3/qLVld036i2BplEznhxeHQljoEavd4xKsuyr Fh08T/eAl0jsbaXxtiZiZvBWA23l7aUoNOoiLTcXOTbF887rb6aawm4GbCF/5djHXW9y wbpPfTUBTir2nru69RltZH1/AxWt+9im9gX31DEGtAl47s3XEyaXfOijmD36oXhuRjsN kGBe4eeta+0RJhjYUiaNehrSzmVtT6NFlIG+J9JfknzNPtIrfnZQS9bw5k4LkcXlI7Et kk6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715293740; x=1715898540; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=SsXSJkHq0SC55cGE/iBMTQgt3xkGFCzqtu9Ff7MbVio=; b=xBzmzq94NtQ3IHLLcRmzzVg/kbKLHeAJV9XQRXzr2IMC3ulBoGZhloUrHYdPKWxjMz uOdupGBbQHSoP8ayfi8BPXj+5E9t035fvL/9Osgu95roxcZtybF+jD7vzx/NuIBxkJ3Y t2vE9g7onfY8vAGK6sylGOgF6QKlU8QC+BlLLMoC7x5EO++ya+fwP5S31UhdwTKAH/Dg JafgAn3ZkW5MGyXXDRB5g7KrtfHeAdK6guAz8CrzbLgdzSgip1QIbnQSaRmequf2ao03 k+eIsMcoH9K29p5VO2tbyn0dptb9Wx60bwVpD6sCPHML63heVzlGe8m7veHZlmk3zcgp V+BQ== X-Forwarded-Encrypted: i=1; AJvYcCU5t+Tox2/nQuGAAr5yHnmYS9rxSuebXow4WBDOsIH2vj5M8poUEaFLWptpwIJg6PV68YmtgU5QKSAIum5DszrSJzT+Nk0= X-Gm-Message-State: AOJu0YxGN3Terz5Qd+agDSKACQ61H7Mn9SaCieMoBFmVTIibQGhR9/F+ alPNR7o9XzjbPkOf9EZxYZHzM2F2WjUp8Ie6FIGYNAKRS8g+6t+u X-Google-Smtp-Source: AGHT+IFbSPt5VjljYEpv+I/5ooLub3McLoOy2FgjwBUAGKOmOlk5o2LFfsnbttCuZ7mchXRIC6cnJw== X-Received: by 2002:a05:6a21:616:b0:1af:8832:a03d with SMTP id adf61e73a8af0-1afde201d1emr1246558637.48.1715293739599; Thu, 09 May 2024 15:28:59 -0700 (PDT) Original-Received: from [192.168.1.2] (syn-023-240-098-037.res.spectrum.com. [23.240.98.37]) by smtp.googlemail.com with ESMTPSA id 41be03b00d2f7-6340b768f17sm1847643a12.22.2024.05.09.15.28.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 09 May 2024 15:28:59 -0700 (PDT) Content-Language: en-US In-Reply-To: <87y18i3a4t.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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:284781 Archived-At: On 5/9/2024 3:15 PM, Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors wrote: > Promised. Tramp uses just a tramp-file-name structure in tramp-null-hop, > that's it. Thanks for the promise. :) >> (If in the future, we came up with an Emacs-wide use case for this, it >> should be possible to upgrade "/local:" to a full magic file name. I'm >> not sure why we'd want this though.) >> >> [1] Note the single colon, though I'm not dead-set on this. If it's >> just an Eshell notation and not part of Tramp, we don't necessarily >> need to follow Tramp syntax. Of course, if we wanted to keep open the >> possibility that this becomes a new Tramp method, maybe the "::" is >> the more forward-thinking route. > > Anyway, even if you implement this completely in Eshell, I recommend to > write a file-name-handler for this. Potential 70+ primitive file > operations cannot be handled w/o such a basis, I fear. My initial plan here was to have Eshell treat "/local:" similarly to any other Eshell-specific syntax (e.g. $VARIABLE expansions): Eshell would parse it, convert it to a regular filename, and then no other code would ever see the "/local:". That might not actually work in practice though (I haven't written the code yet to prove it), so another option would be to do like you say and add a real file-name-handler within Eshell buffers for this.