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: Wed, 8 May 2024 09:13:59 -0700 Message-ID: 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> 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="29292"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 70792@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed May 08 18:14:55 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 1s4jwV-0007TY-39 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 08 May 2024 18:14:55 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s4jwG-0000Rj-11; Wed, 08 May 2024 12:14:40 -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 1s4jwD-0000RS-4b for bug-gnu-emacs@gnu.org; Wed, 08 May 2024 12:14:37 -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 1s4jwC-000461-Qu for bug-gnu-emacs@gnu.org; Wed, 08 May 2024 12:14:36 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s4jwc-0005ZY-3y for bug-gnu-emacs@gnu.org; Wed, 08 May 2024 12:15:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jim Porter Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 08 May 2024 16:15:02 +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.171518487321397 (code B ref 70792); Wed, 08 May 2024 16:15:02 +0000 Original-Received: (at 70792) by debbugs.gnu.org; 8 May 2024 16:14:33 +0000 Original-Received: from localhost ([127.0.0.1]:49624 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s4jw8-0005Z3-RH for submit@debbugs.gnu.org; Wed, 08 May 2024 12:14:33 -0400 Original-Received: from mail-pl1-x62c.google.com ([2607:f8b0:4864:20::62c]:58669) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s4jw6-0005Yv-Lr for 70792@debbugs.gnu.org; Wed, 08 May 2024 12:14:31 -0400 Original-Received: by mail-pl1-x62c.google.com with SMTP id d9443c01a7336-1eb24e3a2d9so42829605ad.1 for <70792@debbugs.gnu.org>; Wed, 08 May 2024 09:14:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715184839; x=1715789639; 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=GuQZ2yn0abNcdEzgMS7E5GlcYw7U8aixSZxwXNKtN9g=; b=cKLBivDsPY5kXVxUd0X4NFVVIzAEUaYr/kyVWMlkTIWeE4TbtH6cBx35sS5ZTnR8I2 0oANH7uQT8kuUR4B6PftBMx4PGfec5ZlfFgrxitCRbezjIVgdYmv3h3j3DBcdsCH6MCj ZZ+LhcqWiKcDBvSmq2H/z8cz8AOnvGL5lDkRrG44U/vFZhaUrZ9SmATg7pOxJ8UjIFM8 ahVNjje53LG5Kg4mCW8pNUTOdWIwCYiqsH3nAZD46TIroxNEzZtrVpW8DENuRhMKRy9k dM+cPIk2bRyoMiTR9V30p7deF2u7rYeKp2bc2DyxKEL3o6M3U6BDtGoPPmX1cj9J9Vk6 T88w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715184839; x=1715789639; 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=GuQZ2yn0abNcdEzgMS7E5GlcYw7U8aixSZxwXNKtN9g=; b=Cy5c9hs+Wi8BtCsK329j2uOVLuqM7vUJUGNEH8xw0I7V9cM0RXKgaa6HFXTFtcWXpH wiFrU9geT4Bxor8UAUuHJTFADSEjGDI9iSs1CrNs1eqXvE9Nz+ecclPnJMrWhFax0qQV YxZ4hAiBgT2sOnsong+tBlMTViEf9n9XOcAM7YHTkYchUSUZB3RX9HEKpPc6cl3YJ7rO +Dqo9WivhpZlAH72FoZxO5ZSnnLIbISlwHyvJPuuW8cBs+RYnQdRe7rEYgQ6htmlxVOW PT+rM5c6iGdZVqRZ9zNQZuYC/Xl5mDGpBn9Hse8RBLWur48qbCIsX5OWI9kRpMNQek0m ZDLQ== X-Gm-Message-State: AOJu0YzYretp+5jQURXWcr56ctrrcSfYGhs0dOtUtT6uVK7OGT3Pc4de lZiLYaFJRkmDI1z7rdeel1OZRBqwxostu0C1b2sWwctwU4dVt+PN X-Google-Smtp-Source: AGHT+IGjUyZhKjGSpjFLqtsNKbd+wN965D4LvBIBK5Ebm997c4zaKOXPDGNmcDqTPtUxcPXhHilaBQ== X-Received: by 2002:a17:902:b085:b0:1e5:a025:12f9 with SMTP id d9443c01a7336-1eeb03a1fbfmr32028435ad.28.1715184839131; Wed, 08 May 2024 09:13: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 d13-20020a170903230d00b001e43df03096sm12059755plh.30.2024.05.08.09.13.57 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 08 May 2024 09:13:58 -0700 (PDT) Content-Language: en-US In-Reply-To: <86a5l0a195.fsf@gnu.org> 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:284681 Archived-At: On 5/8/2024 6:20 AM, Eli Zaretskii wrote: > I think "/:" quoting should not change the host of the file name. > That's because the user might need this quoting for file names on the > remote host. Not to say we *should* do this, but if we kept the "/:" syntax of my patch, a user could still /:-quote a remote file name in Eshell by using the fully-qualified name like: "/ssh:user@remote:/:/blah". I can construct an argument for why using /: this way in Eshell would make sense, but maybe it's just needlessly "clever"... (As a note, Eshell already uses /:-quoting to mean "on the local host" in one spot: for the command to run. However, I added that for Emacs 30, so we can still change it without worrying about compatibility issues. See the manual here for more info: .) > If the user wants to specify a local file name while default-directory > is remote, the user can use the normal Tramp "/METHOD:..." notation. How about a new "local" method? Then users would type "/local::~/some-file.txt". That's more typing, but it's also more clear, and doesn't repurpose an existing syntax used elsewhere in Emacs. I don't think the extra typing is *too* bad, since cross-host file names are probably a lot rarer than regular intra-host ones. Most likely, users will use cross-host file names primarily when cd'ing to a different host. If I go this route, I'm not sure whether it would be better to make "local" a real file name handler available everywhere in Emacs despite only being useful for Eshell, or if Eshell should just strip out the "/local::" prefix before sending it to other parts of Emacs. I'm leaning towards the former though, since the latter seems like a hack that could have unforeseen consequences.