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#54001: 29.0.50; abbreviate-file-name has side-effects Date: Mon, 14 Feb 2022 12:52:22 -0800 Message-ID: <506247fd-ed3a-f560-c8b5-1ece88cdfa76@gmail.com> References: <96603590-acc9-65d1-4086-7e2f114f9441@gmail.com> 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="24885"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Daniel Mendler , 54001@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Feb 14 21:53:10 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 1nJiLO-0006Eq-4c for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 14 Feb 2022 21:53:10 +0100 Original-Received: from localhost ([::1]:48484 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nJiLM-0007As-Pi for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 14 Feb 2022 15:53:08 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:50312) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nJiLG-0007Aj-N2 for bug-gnu-emacs@gnu.org; Mon, 14 Feb 2022 15:53:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48887) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nJiLG-0001jf-E5 for bug-gnu-emacs@gnu.org; Mon, 14 Feb 2022 15:53:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nJiLG-00069E-Du for bug-gnu-emacs@gnu.org; Mon, 14 Feb 2022 15:53:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Jim Porter Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 14 Feb 2022 20:53:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54001 X-GNU-PR-Package: emacs Original-Received: via spool by 54001-submit@debbugs.gnu.org id=B54001.164487195223595 (code B ref 54001); Mon, 14 Feb 2022 20:53:02 +0000 Original-Received: (at 54001) by debbugs.gnu.org; 14 Feb 2022 20:52:32 +0000 Original-Received: from localhost ([127.0.0.1]:42784 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nJiKm-00068U-HT for submit@debbugs.gnu.org; Mon, 14 Feb 2022 15:52:32 -0500 Original-Received: from mail-pj1-f48.google.com ([209.85.216.48]:38481) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nJiKj-00068E-NZ for 54001@debbugs.gnu.org; Mon, 14 Feb 2022 15:52:31 -0500 Original-Received: by mail-pj1-f48.google.com with SMTP id h14-20020a17090a130e00b001b88991a305so418655pja.3 for <54001@debbugs.gnu.org>; Mon, 14 Feb 2022 12:52:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=subject:to:cc:references:from:message-id:date:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=WgOi7ESJdfqDHR0qNnyq5TQ0mouw6t8L9QKJd3IKl74=; b=oMK19GnJrUpk5PpSWSRzl5EBcXH++vQ0F/AjNA4RCkkoY+2nYdhRu9SLm4aHBLmf6x QTzYr5llfnQz8cAR93halB6WPLnf8sLVPhtZznYdLbg6hacTAFMQeq37wwtAG5yWQCA1 R1/Q8cAMXfrRf1WlhuXYI2rQan2bkYAjN/2pxfztkWpwVG2l7Fg/roJci/fkOok6pJU3 Hx5PoPS7knRehvJR4jvNsVbRaGnOeXwiAT7cqQIu2JFnh8a+E/9a1BOfclKWMrDoLNN/ dSG1+rg+vvpPXHrGbv/qrU399G3KCKeOOedRsjOe61YNF/It5Jn/5AdiRgstf2TG8rnj cXBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=WgOi7ESJdfqDHR0qNnyq5TQ0mouw6t8L9QKJd3IKl74=; b=M/ApMTAwYsloMstdKqs0OsyxY/JDebJYAB6RL4DjsZfXb9uDTsGAmOpbe12d09NEAe c9vCEA+RDvvkOLyPdECldERDllbfBagCiNXwYK2dBQshuQ6bs0C6K33h+xJdXa6ZrGP3 tktqdJLvDopLRvcfTz1gY0I9z6m3mT1HRRlmWphipVF1gGRf5B2DjkJ8uU/FJ/LIAshs euQ9bPX1PEkcwr9rt5zPRm4HZryNoKIzJU0XynZNGH18FfjT58EsE9jytrwtYjC4553X tgwSu3PT44XqwkQicQjvT2O/3Ua2p5TtHRR5rAMKF0PMWQHPTdRcZ48D1xBVdCrhmcZq MaKw== X-Gm-Message-State: AOAM5321tfgbcAP3uAuWP3fa47utCTMs+6tY/c5ikyOvyXvTu5YTNPeP O5IeuiAD/LAEhM1bbSvTURdw5+kQexI= X-Google-Smtp-Source: ABdhPJzYYRyAYPRiWuDndbJV6hdsb6oqiiMzb8KKFYaFQjSXp7AgsHXevI7Z0AZ2e7UEM9l1bUfJAg== X-Received: by 2002:a17:90a:cc14:b0:1b9:f392:56f7 with SMTP id b20-20020a17090acc1400b001b9f39256f7mr621539pju.44.1644871943793; Mon, 14 Feb 2022 12:52:23 -0800 (PST) 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 mn7sm15042689pjb.8.2022.02.14.12.52.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 14 Feb 2022 12:52:23 -0800 (PST) In-Reply-To: Content-Language: en-US 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:226918 Archived-At: On 2/14/2022 11:48 AM, Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors wrote: >>> I suggest we take a step back and think of how to get that feature >>> without having to contact any remote host during `abbreviate-file-name`. >>> Maybe we can do that by making Tramp opportunistically add entries to >>> `directory-abbrev-alist` when it performs expansion? [snip] >> Another option might be to store the abbreviations for a given >> file-name-handler somewhere internally and consult that when calling that >> file-name-handler's implementation of `abbreviate-file-name'. > > That would work as well. Looking at my original patch again, this value is already cached as a Tramp connection property named "home-directory". If the code were changed to set that connection property in a more-appropriate place, and `tramp-handle-abbreviate-file-name' simply *reads* that connection property, then I think that should resolve this issue.