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.devel Subject: Re: Emacs syntax for filenames to mean "absolute location on the current remote host"? Date: Fri, 1 Sep 2023 11:36:02 -0700 Message-ID: <18af9a0a-f3cf-ee01-7dcf-ee1641b13eca@gmail.com> References: <749b83b2-a8f8-76c5-83e8-2f4044476f74@gmail.com> <877cpeuwyi.fsf@gmx.de> <3ba84988-49d4-1a9f-471b-0436658c6ee2@gmail.com> <87o7injouu.fsf@gmx.de> <0585b415-4b54-95c3-4454-9317d7a79c61@gmail.com> <874jkdrccr.fsf@gmx.de> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7091"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Michael Albinus Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Sep 01 20:36:59 2023 Return-path: Envelope-to: ged-emacs-devel@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 1qc90s-0001dr-Ex for ged-emacs-devel@m.gmane-mx.org; Fri, 01 Sep 2023 20:36:58 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qc907-00063C-Hd; Fri, 01 Sep 2023 14:36:11 -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 1qc904-0005z9-7n for emacs-devel@gnu.org; Fri, 01 Sep 2023 14:36:08 -0400 Original-Received: from mail-pl1-x634.google.com ([2607:f8b0:4864:20::634]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qc901-0007gH-TA for emacs-devel@gnu.org; Fri, 01 Sep 2023 14:36:07 -0400 Original-Received: by mail-pl1-x634.google.com with SMTP id d9443c01a7336-1bdb7b0c8afso17749485ad.3 for ; Fri, 01 Sep 2023 11:36:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693593364; x=1694198164; darn=gnu.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:mime-version:date:message-id:from:to:cc :subject:date:message-id:reply-to; bh=Gx9OqUpJAh27fUxWEsFHAUrL97zlMq1QjQ5nAUwGyBw=; b=RECrSEsMp5jw4j9UR8IuOVewdsVRM6Y5Elg5V9NUlvIIVxsi7uPKM/1dAVZ5ZFt82c on+J6VcImKCTKIk7TVd/4D8ci1BRzuLOR0madZzWMlssdGI8ALNQi8d8V/XN6clGOQp/ BCyVFmtilf/7fL+jGeQtYd442hexhFhaA0F2wpVVH5o9Cyglv+pnFyD5/gWol5BPvFp9 OGDz7V4JL082jXv77P6nL0dFgoON8zFwR9ZLjZQq4WgtNzlFWW1pqx9hH/MIv2JQ9wlE z6LdKT4iw8kasEaQsWExPX3l8yfPzWwgi0ezuTq7yY3BA7XVelHBid1irhLM3ow9qr19 BeaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693593364; x=1694198164; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Gx9OqUpJAh27fUxWEsFHAUrL97zlMq1QjQ5nAUwGyBw=; b=B61q8DzbG7fqIgcInCYd4BG6ZmMTUIzghAkqcrXOMu3IbvL08xa3Uvs4fS54cDuZk4 CP2ilt6KDy6EERPltTJgz0qk/Qnatr0syRIFbqjWrVNRaGga+oHqEfkxFbfgJbXD9NYU JOGTn8dDIj3mPu0fW4xHcJSMm1hnnMIlNnu4Tsr25IH2CSQet1pPzqVGvj7QpRGdlAlC iTE46fFVrlK37+8OCioJPZj7OifOy6u3JvkDo1UcgDZR+R/hASnsY/HvfbyA52ovPLy7 8Fep/TjjbGyXmPY9kl7n23NBMGSzXUSKosOi9j4JtnhVGWbF3hnXvtIa2EAU3SJzxMHy UYHQ== X-Gm-Message-State: AOJu0YzxLQi9oy3o3mrJK+8TByLwkUM+n2aIncBPsGTQpDHZQeOdB1w2 FbDOgXhsJFOR99PDNEDgdMzkltMIpo8= X-Google-Smtp-Source: AGHT+IFMISkYg7tgxSb0+84qn8Js2N1IUCO+j1jVmrtQzz5I2BFByuFXE7bUYvMjvt+yD+wS+XmNUw== X-Received: by 2002:a17:902:e850:b0:1c0:c174:3695 with SMTP id t16-20020a170902e85000b001c0c1743695mr3823655plg.13.1693593363962; Fri, 01 Sep 2023 11:36:03 -0700 (PDT) Original-Received: from [192.168.1.2] (cpe-76-168-148-233.socal.res.rr.com. [76.168.148.233]) by smtp.googlemail.com with ESMTPSA id d13-20020a170902cecd00b001b8c6890623sm3312335plg.7.2023.09.01.11.36.03 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 01 Sep 2023 11:36:03 -0700 (PDT) Content-Language: en-US In-Reply-To: <874jkdrccr.fsf@gmx.de> Received-SPF: pass client-ip=2607:f8b0:4864:20::634; envelope-from=jporterbugs@gmail.com; helo=mail-pl1-x634.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:309830 Archived-At: On 9/1/2023 11:13 AM, Michael Albinus wrote: > Jim Porter writes: > >> But the Emacs manual says: >> >>> ‘/:’ can also prevent ‘~’ from being treated as a special character >> for a user’s home directory. >> >> So according to that rule, "/:~" would mean "the file named tilde in >> the current directory". > > Hmm, I've never stumbled over this sentence in the manual. And it is a > little bit vague: "can also prevent". > > A short test shows that it doesn't if the tilde comes directly after the quoting: > > --8<---------------cut here---------------start------------->8--- > M-x cd RET /net RET > M-x pwd > => /net > M-x cd RET /:~ RET > M-x pwd > => /home/albinus > > M-x cd RET /:~user RET > M-x pwd > => /home/user > --8<---------------cut here---------------end--------------->8--- > > It even works for remote file names (although there are still some quirks): > > --8<---------------cut here---------------start------------->8--- > C-x C-f /ssh:ford:/:~ RET > => dired buffer of remote user's home directory > --8<---------------cut here---------------end--------------->8--- > > What doesn't work are file names like "/:/tmp/~hack", as said in the manual. Huh. I never realized it worked that way (though I never actually *tried* this case). I think the first thing I'll do then is to try and understand *exactly* how quoted file names work, and then update the manual to clarify this. Once I know exactly how they work, it should be easier to be sure that I won't mess anything up with these Eshell improvements.