From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Newsgroups: gmane.emacs.bugs Subject: bug#61926: 29.0.60; [PATCH] Make tramp-remote-path behave like exec-path Date: Fri, 3 Mar 2023 16:20:29 +0000 Message-ID: References: <87y1oe7kk9.fsf@gmail.com> <83jzzycn75.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39610"; mail-complaints-to="usenet@ciao.gmane.io" Cc: michael.albinus@gmx.de, 61926@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Mar 03 17:21: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 1pY89n-000A5V-S7 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 03 Mar 2023 17:21:19 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pY89Z-0002z3-B4; Fri, 03 Mar 2023 11:21:05 -0500 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 1pY89X-0002tW-BD for bug-gnu-emacs@gnu.org; Fri, 03 Mar 2023 11:21:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pY89X-0001Lw-2W for bug-gnu-emacs@gnu.org; Fri, 03 Mar 2023 11:21:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pY89W-0004tE-F3 for bug-gnu-emacs@gnu.org; Fri, 03 Mar 2023 11:21:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 03 Mar 2023 16:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61926 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 61926-submit@debbugs.gnu.org id=B61926.167786044918755 (code B ref 61926); Fri, 03 Mar 2023 16:21:02 +0000 Original-Received: (at 61926) by debbugs.gnu.org; 3 Mar 2023 16:20:49 +0000 Original-Received: from localhost ([127.0.0.1]:33779 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pY89I-0004sQ-L8 for submit@debbugs.gnu.org; Fri, 03 Mar 2023 11:20:48 -0500 Original-Received: from mail-ot1-f52.google.com ([209.85.210.52]:42876) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pY89G-0004sE-NF for 61926@debbugs.gnu.org; Fri, 03 Mar 2023 11:20:47 -0500 Original-Received: by mail-ot1-f52.google.com with SMTP id g6-20020a056830308600b0068d4b30536aso1701685ots.9 for <61926@debbugs.gnu.org>; Fri, 03 Mar 2023 08:20:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1677860441; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=YH9SuhqrHDerwdysa2Un7twUiQriA7AYo0pX5QyK3so=; b=XvazmyK21k9T661RQ7gKDAIwfxFi4X27jCQJOcIo6Dfcatuu4Bh3fyahtMX1Id5/7O 1R/7CKYOlOOIXhacT+kz+Em53LsaVsF0DYdTOQHD5LXM3Vchf26dBL3dFpiwUM+0/rOH 0aZnY0qQzDPpX2ID3XFq7iHUbOOf7OWfEXjhN8XH8ZFxDEe7KD6pPJTnln2tJEEKhruP 5bDUjmzBWjLvM5X0/QC8MHGMkFS3+14lUM0zjEig60UrYLISNEO+uN0wY4owCziHuUVy xKX+hWCIUBp1dSRP/6AzElmaEAWkbLFAP3IJyPtenzuPUplw1m7KPQQRzAemkkuOmN8H hHLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1677860441; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=YH9SuhqrHDerwdysa2Un7twUiQriA7AYo0pX5QyK3so=; b=yGo7F+oNb3LhO0oRxBfGp6sEIyBLwnQQfmOpsvhnkZyou7LqmZn+lb80QcC1g3AEp6 Ri5+IbTqiDVMrlCwPHJyzbLREVIi7awo3Y0Byf0cniC8TvzNqzlQXqky5v3e7bMP2DpG 5+p9Hlnbk0wtIUyQeFYO/aUmfp5dk3txQo9t9F+CIcu+NH2soGd6Si1NA5F54fcRyqL9 vU+2PNX5jA1KH0YSP0Vh2NJtjM8m7RU2s7PpInSkfCS+sv++IREyLEvZS8C8X8L0q14G QgacmROkmAw0bB9ilqnns11h9n4cIxvgto7vPiF401h0dqIFAwy1nAFCZujThigsWeja uLlg== X-Gm-Message-State: AO0yUKV0swI2gu+kWtKdF0YNWDqEZA29XtWj2bMeb/uJt9nWPnf1d1/n LYXqkHA2Rnj8XxOlWFT+nnyZZRxyw7QumkjgdDE= X-Google-Smtp-Source: AK7set98z47NryHVyYUx7MbhVmN7wSZdXZHyd8q2Dug8pGrLYfWRcJEtanMlVpNF5BaZfdliJPLF10kl9D23IsqNZLI= X-Received: by 2002:a05:6830:2464:b0:688:cfcc:ddaf with SMTP id x36-20020a056830246400b00688cfccddafmr605686otr.3.1677860440813; Fri, 03 Mar 2023 08:20:40 -0800 (PST) In-Reply-To: <83jzzycn75.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:257221 Archived-At: On Fri, Mar 3, 2023 at 7:24=E2=80=AFAM Eli Zaretskii wrote: > We nowadays have variable-watching feature in Emacs, see > add-variable-watcher. Could that facility be used in this case to > allow a more elegant solution? Yes, good idea. But only if we have access to the cache locations that we have to flush. These would be the "remote-path" properties of every Tramp connection, and I _think_ there's an accessor for that, but I have to check. Which reminds me, that patch I sent has a big thinko :-) If you re-set tramp-remote-path you get flushing for the next call to tramp-get-remote-path, which will be for a given connection. At that moment you forget changes by setting tramp-last-used-remote-path so and you will fail to flush for the next connection. Not hard to fix, we just have to make sure to flush _all_ connections when we detect the change, however we detect it. Jo=C3=A3o