From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#60505: 29.0.60; Fido Mode and Tramp Completion Date: Fri, 03 Feb 2023 13:43:07 -0500 Message-ID: References: <87k024918k.fsf@jroy.ca> <8dea9f3e0e411c315b04@heytings.org> <87tu15m6g7.fsf@gmx.de> <8dea9f3e0eb47ac9e4ab@heytings.org> <371ba1d0be1f14c7c798@heytings.org> <8aadf0ddd54d67a3213d@heytings.org> <87a62jmwj6.fsf@gmx.de> <87o7qwm3dd.fsf@gmx.de> <43562d4dd9c31382eb40@heytings.org> <87k011dtw2.fsf@gmx.de> <43562d4dd93037f7d01f@heytings.org> <834js4zi69.fsf@gnu.org> <87cz6seanu.fsf@gmx.de> <87mt5udaey.fsf@gmx.de> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27846"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 60505@debbugs.gnu.org, Eli Zaretskii , Gregory Heytings , julien@jroy.ca To: Michael Albinus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Feb 03 19:44:18 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 1pO12o-00075t-CL for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 03 Feb 2023 19:44:18 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pO12Z-0005NB-Vz; Fri, 03 Feb 2023 13:44:04 -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 1pO12Y-0005N0-Jf for bug-gnu-emacs@gnu.org; Fri, 03 Feb 2023 13:44:02 -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 1pO12Y-0000w1-By for bug-gnu-emacs@gnu.org; Fri, 03 Feb 2023 13:44:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pO12X-00082I-L9 for bug-gnu-emacs@gnu.org; Fri, 03 Feb 2023 13:44:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 03 Feb 2023 18:44:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60505 X-GNU-PR-Package: emacs Original-Received: via spool by 60505-submit@debbugs.gnu.org id=B60505.167544979930831 (code B ref 60505); Fri, 03 Feb 2023 18:44:01 +0000 Original-Received: (at 60505) by debbugs.gnu.org; 3 Feb 2023 18:43:19 +0000 Original-Received: from localhost ([127.0.0.1]:39958 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pO11q-00081C-Sr for submit@debbugs.gnu.org; Fri, 03 Feb 2023 13:43:19 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:20445) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pO11o-00080w-QU for 60505@debbugs.gnu.org; Fri, 03 Feb 2023 13:43:17 -0500 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 0C357810E7; Fri, 3 Feb 2023 13:43:11 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 6CFF48091E; Fri, 3 Feb 2023 13:43:09 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1675449789; bh=GlljTha3boui4cuv9xG0QC6eZxfd8oYtCPTJ/MNoepo=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=jogDT37N+Pb9GN7hFafKApg5wQ8hYxm1P4KEPv9R2yVuhwuDuD1UXyUzAt11Aq31X iVPQmrgNYr+KuhQ95qI3WVY4r8syDfvCuyyiVnUs9lRXYdgFEfmAdApa5en1tWnjmz pWtDNnSHJTqSjHyDKi0Te6VFR2ARWa77tsByJgOhkkIr+CzXg0T/jyyjJa9jREi+S2 /kc0XSso5y0OioUbXzeLbBt05BP9pPJIzkjYHxG8JLpW8PGXrY7wBKpkVn/iZ2rmhm BHDaMX74mYi5hM+5kTGZwnZbPdJizq5nCAkrFVB3JvyLn77cx3aXuOcRih+MUVP0Me FvoEdBIK842NA== Original-Received: from ceviche (unknown [45.44.229.252]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 31DE0121AB9; Fri, 3 Feb 2023 13:43:09 -0500 (EST) In-Reply-To: <87mt5udaey.fsf@gmx.de> (Michael Albinus's message of "Fri, 03 Feb 2023 16:40:53 +0100") 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:254739 Archived-At: > +(defun tramp-completion-handle-expand-file-name (filename &optional directory) > + "Like `expand-file-name' for partial Tramp files." > + (if (file-name-absolute-p filename) > + filename > + (concat (or directory default-directory "/") filename))) Hmm... shouldn't a "/" may need to be added if `directory` or `default-directory` doesn't end with one (except in cases like `/ssh:`)? Then again, maybe not. I don't understand enough of the details of when `tramp-completion-file-name-handler` is used (IOW what is meant exactly by "partial Tramp file name"). IIUC the `tramp-completion-file-name*` thingies operate only for "partial Tramp file name" (so the "completion" part of their name is technically a misnomer, tho they make sense in practice since this part of the code is only really important during completion), i.e. file names that should be handled by Tramp but that are incomplete because they end before getting to specifying the desired directory/file at the remote end (or even specifying the remote host's name). I didn't remember this part of the design, but it sounds good and does make changes to that part (like the proposed patch) "safer", so it's probably OK to try it on `master`. I wonder how this patch interacts with `locate-dominating-file`. Stefan