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#62621: 29.0.60; uniquify can't make buffers unique based on things other than filename Date: Tue, 18 Jul 2023 04:37:41 +0300 Message-ID: <4abafd65-fad0-f723-9bd1-e6e2a77bb837@gutov.dev> References: <87bkgfjugn.fsf@catern.com> <83edlb3t0t.fsf@gnu.org> <878rbika0i.fsf@catern.com> <83h6q6g0qx.fsf@gnu.org> <83edlafzht.fsf@gnu.org> 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="37156"; 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: sbaugh@catern.com, 62621@debbugs.gnu.org To: Spencer Baugh , Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jul 18 03:38:24 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 1qLZfT-0009Uf-0M for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 18 Jul 2023 03:38:23 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qLZfA-0001WW-Fp; Mon, 17 Jul 2023 21:38:04 -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 1qLZf8-0001WB-T5 for bug-gnu-emacs@gnu.org; Mon, 17 Jul 2023 21:38: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 1qLZf8-0007tW-K3 for bug-gnu-emacs@gnu.org; Mon, 17 Jul 2023 21:38:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qLZf8-0007FY-G5 for bug-gnu-emacs@gnu.org; Mon, 17 Jul 2023 21:38:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 18 Jul 2023 01:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62621 X-GNU-PR-Package: emacs Original-Received: via spool by 62621-submit@debbugs.gnu.org id=B62621.168964427327851 (code B ref 62621); Tue, 18 Jul 2023 01:38:02 +0000 Original-Received: (at 62621) by debbugs.gnu.org; 18 Jul 2023 01:37:53 +0000 Original-Received: from localhost ([127.0.0.1]:51271 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qLZez-0007F9-Dt for submit@debbugs.gnu.org; Mon, 17 Jul 2023 21:37:53 -0400 Original-Received: from wout3-smtp.messagingengine.com ([64.147.123.19]:51897) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qLZew-0007Eu-QO for 62621@debbugs.gnu.org; Mon, 17 Jul 2023 21:37:52 -0400 Original-Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id 7DC11320093A; Mon, 17 Jul 2023 21:37:44 -0400 (EDT) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Mon, 17 Jul 2023 21:37:44 -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=fm1; t= 1689644264; x=1689730664; bh=ZpBd87DzZ/Ct2RWFnGCrA+NRQpOoQCzy8Mm vxL/2jHQ=; b=brdOqQE7zR7mh31GIzM24h1hGocTWhZDmmeRyZD7sKXuRi0ZmsI v9gn6MoFHTCls/HphMHjUpPolAoli1k6BI08/E5T5eV/U/xS/GWic4fUNosuAN+x cK5PCzjEBZ7CrRc6b+zyfSUvEHhI/v1fOH+N4Jgn9B8apTG3d4SAePv0KCAE2eDe 4F7dXgYBCWNutkFkEzkoCd6JlRBcdft+BdJ1FtV96RYcfWtWR8+Ux/DanyIUJyvX PCq7h0oL2yNDqVMnKrnbfqcnWxikqmRO85Ulmw/Qus+1ldDERo+U2BeJISBsiOWi H5ZUmUFy7COMnRxR44Son26vkeMjxsHCkwA== 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= 1689644264; x=1689730664; bh=ZpBd87DzZ/Ct2RWFnGCrA+NRQpOoQCzy8Mm vxL/2jHQ=; b=gNuWoH5hWugFCiCZi92Bp0EGZdG5A2nko3izw42FeqDIMmcHJFV nhzN7cXVd7bp+hcoDwqT5ntrc4KfwbDbtaBSTdbHsFsz211w5XItxE6oxSUA7RlY TFssD2ztwwHpiQxMDU+p9zAwF4Bx2ShVsyjP7qrK0EY7viJvqF4jLr89HpW1NTir 2Msqpn1GRD1/XHf02Dbk41jCxASezCxENshjGfNR15OvfxTC8ANttcfiIax9YhFG ZGSK5LIx6d/z/59g4VoQIuw9/eHOljFnS7nVk7EF6LGSDA/Ej05cxioCj93VqFpE xw++at6UQl/KbfOXlpJcmZrhSXOC0Cec/jg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrgeefgdegkecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefkffggfgfuvfevfhfhjggtgfesthejredttdefjeenucfhrhhomhepffhmihht rhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvghvqeenucggtffrrghtth gvrhhnpefhuedtkeevgeegteetkeefjeffgeduudduhfeuveelfedtffffgeegiedvvdej leenucffohhmrghinhepghhnuhdrohhrghenucevlhhushhtvghrufhiiigvpedtnecurf grrhgrmhepmhgrihhlfhhrohhmpegumhhithhrhiesghhuthhovhdruggvvh X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 17 Jul 2023 21:37:42 -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:265419 Archived-At: On 14/07/2023 15:46, Spencer Baugh wrote: >>>> If the symbolic values are specific to project, simply let-bind >>>> uniquify-dirname-transform to the value of the appropriate project.el >>>> defcustom when project.el calls uniquify. >>> These customizations are in effect all the time, not just when the user >>> is calling a project.el command. e.g. rename-buffer triggers uniquify. >> Then you can set the buffer-local value of uniquify-dirname-transform >> in the project.el buffers. Would that solve the problem? > The buffers it should affect are all file-visiting buffers. project.el > doesn't currently have any code which runs for every new buffer. I > guess we've considered adding that, but I'm not sure this is a good > reason... I'm not sure every project.el user will want this particular behavior anyway. project-switch-buffer is handy, but personally, I still most often use 'C-x b'. But there definitely is demand for this option, as evidenced by the previously mentioned bug#59502, as well as this (unexpectedly, years-old) thread: https://lists.gnu.org/archive/html/emacs-devel/2021-03/msg00083.html Speaking of those, do you think it would be feasible to also offer these tweaks (as options, or for particular buffers): - Make the presence of the buffer name mandatory. As shown in the examples in bug#59502, it could be useful to always see in buffers like *eshell* produced by project-eshell. Or project-vc-dir, for example. - Hide the parent directory from the uniquification logic (only keeping the project name). So that, for example, if I call 'M-x project-eshell' and then 'C-u M-x project-eshell', the generated buffer names would not try to use the parent segment to uniquify, and just stay as /*eshell* and /*eshell-2*. There is currently some bespoke logic for naming these particular buffers, but if we could move to uniquify (and obey its custom vars), that would probably be an improvement.