From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#64088: [PATCH] Make project-root for vc projects return an absolute path Date: Sat, 12 Aug 2023 03:45:26 +0300 Message-ID: <16c053e0-cd4b-295d-2dae-e97bcf25f3b3@gutov.dev> References: <3c6078aa-4089-46fd-18bb-d92be101ca4f@gutov.dev> <2690528f-bfc8-d164-c522-cd2fcf2ba1ba@gutov.dev> 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="19871"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Cc: 64088@debbugs.gnu.org To: Spencer Baugh Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Aug 12 02:46:16 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 1qUclj-0004zu-Ag for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 12 Aug 2023 02:46:16 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qUclX-0007Rn-Il; Fri, 11 Aug 2023 20:46:03 -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 1qUclW-0007Re-Jb for bug-gnu-emacs@gnu.org; Fri, 11 Aug 2023 20:46:02 -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 1qUclW-0001Xr-1r for bug-gnu-emacs@gnu.org; Fri, 11 Aug 2023 20:46:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qUclV-0006lw-MB for bug-gnu-emacs@gnu.org; Fri, 11 Aug 2023 20:46:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 12 Aug 2023 00:46:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64088 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 64088-submit@debbugs.gnu.org id=B64088.169180113725991 (code B ref 64088); Sat, 12 Aug 2023 00:46:01 +0000 Original-Received: (at 64088) by debbugs.gnu.org; 12 Aug 2023 00:45:37 +0000 Original-Received: from localhost ([127.0.0.1]:48293 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qUcl6-0006l9-Fv for submit@debbugs.gnu.org; Fri, 11 Aug 2023 20:45:36 -0400 Original-Received: from wout5-smtp.messagingengine.com ([64.147.123.21]:47087) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qUcl4-0006kw-TN for 64088@debbugs.gnu.org; Fri, 11 Aug 2023 20:45:35 -0400 Original-Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id 412E13200906; Fri, 11 Aug 2023 20:45:29 -0400 (EDT) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Fri, 11 Aug 2023 20:45:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm2; t= 1691801128; x=1691887528; bh=9GMaiSPHn096ksyfd8LugSICoGKBmVI4HRh kTxqg6fg=; b=nyRHHDgIdVNFfIhdQodDTw1Ki2Sv+hlFmey8OFxfgjGPWx6vTGw zcfjlG6jKVOXLa1vCsdJD5AeRbhcRVqRTXPpykVwCoJSHyiSikZiNiL75x/7gk0o 0/SjThZxGZAzybMBV9eWhPDSRxO4ilAbXc+G+b9lwk7vlmgxwsRmy8GMvB9dGLg+ jkYw0feJauliZuAUWWcAn/7bIwSIWUt4xi7EmzE+X/l2Gn7kwOJ8yKZ/19PPU6/8 qWo8mfNzkIt9OzFA7a924Il6GXQwp/VJ7r0v4Akw2IVLsdOPyhteE62IAMumj1RY VV8KFGy7fcqu58J1adylp5lgJojh7A/Ssgg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1691801128; x=1691887528; bh=9GMaiSPHn096ksyfd8LugSICoGKBmVI4HRh kTxqg6fg=; b=Ik0su3JjtI1b0SeBttI91EdAwlMTc6aaJQb9VQM3MVyJHXZEA2g cQl0/GxUHHmq9HsmxnuLPtXCq+9mJ0jrl82+XGqjCO6eP+FcsXb67xRpvgLt9icT TuU2PG28dwiax3EiDTXPTSbHHFUj4x9FFsYbMHQ9B5AIMT5lYxGBl/fKn6nWt3+y 1orZoyaVuqkBR6tl3YdIHPYJIOIzQ3tph+BMeTdyjso29/fUMZle+f7j9CUpb64d qOq7ZpSVNNUAUL/1XaUIfTIgkrRdBy0KuzNgqtJ8e4/pZMn74SeECQf2WU+hC+Ir O4FIchnZAdmnQ5Rlj1LkPxghieknH9ifvZA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrleelgdefjecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefkffggfgfuvfevfhfhjggtgfesthejredttdefjeenucfhrhhomhepffhmihht rhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvghvqeenucggtffrrghtth gvrhhnpeeigfetveehveevffehledtueekieeikeeufeegudfgfeeghfdulefgfeevledv veenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegumh hithhrhiesghhuthhovhdruggvvh X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 11 Aug 2023 20:45:27 -0400 (EDT) Content-Language: en-US In-Reply-To: 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:267238 Archived-At: On 11/07/2023 02:45, Spencer Baugh wrote: > Dmitry Gutov writes: >> On 27/06/2023 23:01, Spencer Baugh wrote: >>> OK, how about this? >> >> Maybe we should go in the other direction? And call >> abbreviate-file-name on them? >> >> Because otherwise in project-prompt-project-dir we'll always show the >> expanded directory names, taking up extra space and usually repeating >> the full name of the user's home directory for no good reason. > > That seems reasonable if we let-bind directory-abbrev-alist to nil > around it; otherwise we'll be dependent on the user's configuration and > we might add a directory in one way, and then they add a new value to > directory-abbrev-alist and we add it again a second way. That's also fair. > Although maybe that's fine? And probably users of > directory-abbrev-alist would like to have those abbreviations show up in > project-prompt-project-dir. They probably would. But indeed if the list was saved with one configuration, and read with another, it could lead to a mistake. > Also we could always call abbreviate-file-name at > project-prompt-project-dir time. Meaning it will be called N times (for the number of projects) every time the list is displayed, instead of just once, when the project is saved/visited. But maybe it's fine too? How slow could that be? It's probably not too significant problem either way, no matter which direction we choose. And we could revert later. What do you think? Feel free to submit a new patch (note that the one you submitted previously would need the abbreviate-file-name calls added to it, before the list is displayed).