From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Sean Allred Newsgroups: gmane.emacs.bugs Subject: bug#65120: 29.1; directory-abbrev-alist breaks various things when inside an abbreviated directory Date: Wed, 09 Aug 2023 06:28:55 -0500 Message-ID: References: <83leemonyk.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32497"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.11.1; emacs 29.1 Cc: Sean Allred , 65120@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Aug 09 13:46:06 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 1qThde-0008HY-Ha for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 09 Aug 2023 13:46:06 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qThdb-0005NA-M3; Wed, 09 Aug 2023 07: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 1qThda-0005N2-6l for bug-gnu-emacs@gnu.org; Wed, 09 Aug 2023 07: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 1qThdZ-0007Zt-Rc for bug-gnu-emacs@gnu.org; Wed, 09 Aug 2023 07:46:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qThdZ-00022M-Hv for bug-gnu-emacs@gnu.org; Wed, 09 Aug 2023 07:46:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Sean Allred Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 09 Aug 2023 11:46:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65120 X-GNU-PR-Package: emacs Original-Received: via spool by 65120-submit@debbugs.gnu.org id=B65120.16915815417803 (code B ref 65120); Wed, 09 Aug 2023 11:46:01 +0000 Original-Received: (at 65120) by debbugs.gnu.org; 9 Aug 2023 11:45:41 +0000 Original-Received: from localhost ([127.0.0.1]:38396 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qThdE-00021m-Pr for submit@debbugs.gnu.org; Wed, 09 Aug 2023 07:45:41 -0400 Original-Received: from mail-yw1-x1132.google.com ([2607:f8b0:4864:20::1132]:41046) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qThdC-00021Z-Nw for 65120@debbugs.gnu.org; Wed, 09 Aug 2023 07:45:39 -0400 Original-Received: by mail-yw1-x1132.google.com with SMTP id 00721157ae682-5862a72ddb9so5032467b3.0 for <65120@debbugs.gnu.org>; Wed, 09 Aug 2023 04:45:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691581533; x=1692186333; h=mime-version:message-id:in-reply-to:date:subject:cc:to:from :user-agent:references:from:to:cc:subject:date:message-id:reply-to; bh=7ETDA/MOC5+ICsxtFGTXxGQXk+dUk7ms7sh37PINld8=; b=YOZJPz85likYSy4ThcDh5GZWv7I354TqyMHXlvUjIeINV7j8bPnUtnGFehY7Tld35c 8vL6vFW7imFwJvlIFY5LkYerDlGZ5EGuCygqJtQKLnwZvJ363Mh5SyAky5MmuHc/W01P 8eBbC2wmE29eSn4f4cpjHpPX2R6HsQSiYOQvV4G1cAU2xYk3tHfb9DIEJsE2LzYsLODW 662x3eX3Me6vrx8HKnCZG91VJd5IULUGgn2kZWjBeSyWSFoL60l7q83AYZ/SIC1VfEqN r24BdnAz7QpDWt3LVLDvGs4mpD6n2OwVX+u/3/1P5+ZhXA2URGlayRg8IMAlLHGrIlsh lEKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691581533; x=1692186333; h=mime-version:message-id:in-reply-to:date:subject:cc:to:from :user-agent:references:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=7ETDA/MOC5+ICsxtFGTXxGQXk+dUk7ms7sh37PINld8=; b=ErpGcxHo82+Nd0B5/Mip8ouhSjpLfYh1EK5KfjiIlK47YiwX5T21ViEtXBLpERXy1t 5r554sAywAOnsMcvULnZkNcLWKnFGD7p3EJtKOy0o7l3BD5k54F5xpV3W9645R+D9tV/ wk7IL+sp+O7iQYJtXWM5HohFQvBQs0DeGTHaMvHPXj4CodfI+mRinppiKfHtDYJ9qPlu 3TaiCLuOtS7TY7Kbxw7sc5u2WByF37XRM8ftkpjavhcPDtj7u5BV45UGG9MTnabRrflq +N2Luo1oEwc7G3LqbEQUuEHZi+V3It3lh+l2PpT3CRiREqW+GtMgG2e67mlRkPsBaRYM eGGg== X-Gm-Message-State: AOJu0YwVdpbsFIuCuqs0pUsR3Cg0LO7XQkS3XKUHHBV2GRI2TuBMaRoR x8z4/ugPdB63I01Ozdg4fwwLaavQ5H4= X-Google-Smtp-Source: AGHT+IHEJMuGMYqATMO87MyEnE2sEecgeyZTNrmu/Qvsfug8RbX94W3nPlYLdTrCqyPD8rxiA1Mcxw== X-Received: by 2002:a0d:df04:0:b0:583:cf8d:bc0e with SMTP id i4-20020a0ddf04000000b00583cf8dbc0emr1184039ywe.5.1691581532896; Wed, 09 Aug 2023 04:45:32 -0700 (PDT) Original-Received: from epic96565.epic.com ([2620:72:0:6480::18f]) by smtp.gmail.com with ESMTPSA id t17-20020a81c251000000b005771872a8dbsm3879825ywg.132.2023.08.09.04.45.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Aug 2023 04:45:32 -0700 (PDT) In-reply-to: <83leemonyk.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:267020 Archived-At: Eli Zaretskii writes: > This is not how directory-abbrev-alist should be used, according to > documentation. The cdr of each alist element ("tmp" in your case) is > supposed to be an absolute file name, and "tmp" isn't. Also, the car > of each element is supposed to be an anchored regexp. > > What did you want to accomplish with directory-abbrev-alist such as > the above, and why did you want that? Ah, I missed this key part of the docstring of `directory-abbrev-alist'; my apologies for that: Use this feature when you have directories that you normally refer to via absolute symbolic links. Make TO the name of the link, and FROM a regexp matching the name it is linked to. I jumped the gun on that one a bit. These are definitely not actual symlinks. In fact, symlinks are categorically a no-go in the target environment -- Windows on a corporate network. Other solutions like junctions are probably not something my target audience is going to be comfortable maintaining. What I'm trying to do: I work on the internal tools team at a large-ish software company (~2500 devs). I'm creating a Magit 'distribution' of sorts for Windows to try to promote its adoption -- since it's the only application in which I can build first-class support for our workflows. Part of this support (since I'm developing to lower the barrier to entry for non-Emacs users) is the creation of a GUI menu that has all the different repositories and worktrees I can find on their system. The problem is that our standard folder structure for source code yields very long paths that look pretty ugly in this menu system. I'm talking things like 'C:/$MegaCorpSource/git/$host/project/path/here.git' and 'C:/$MegaCorpSource/$version/$SomeDevelopmentIdentifier'. For various reasons (mostly a _huge_ corpus of other tooling that relies on this structure), this path structure cannot change. I'm also not limited to things in $MegaCorpSource; I'm trying to collect all repositories in `magit-repository-directories'. So, I'd like to shorten this $MegaCorpSource path using built-in functionality where possible. My users aren't going to care about most of the path components. I can roll my own, but is there something like `abbreviate-file-name' that doesn't assume we're working with symlinks? (Should/could there be? Thoughts on whether or not it is A Good Idea(tm)?) -- Sean Allred