From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#62621: 29.0.60; uniquify can't make buffers unique based on things other than filename Date: Fri, 21 Jul 2023 17:37:37 +0300 Message-ID: <83a5vpbaa6.fsf@gnu.org> References: <87bkgfjugn.fsf@catern.com> <83edlb3t0t.fsf@gnu.org> <22ee6190-5946-9bde-b648-a55dd2188576@gutov.dev> <83mszt7a1a.fsf@gnu.org> <5c266c9b-a719-41d9-327e-6a2152adaffe@gutov.dev> <838rbc5c8v.fsf@gnu.org> <83v8eg3ue7.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5148"; mail-complaints-to="usenet@ciao.gmane.io" Cc: dmitry@gutov.dev, 62621@debbugs.gnu.org, sbaugh@catern.com To: Spencer Baugh Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jul 21 16:38:39 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 1qMrHD-000145-03 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 21 Jul 2023 16:38:39 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qMrGv-0006rQ-6c; Fri, 21 Jul 2023 10:38:21 -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 1qMrGg-0006hn-VY for bug-gnu-emacs@gnu.org; Fri, 21 Jul 2023 10:38:09 -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 1qMrGc-0000vh-Fb for bug-gnu-emacs@gnu.org; Fri, 21 Jul 2023 10:38:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qMrGc-0003hA-2b for bug-gnu-emacs@gnu.org; Fri, 21 Jul 2023 10:38:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 21 Jul 2023 14: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.168995023514153 (code B ref 62621); Fri, 21 Jul 2023 14:38:02 +0000 Original-Received: (at 62621) by debbugs.gnu.org; 21 Jul 2023 14:37:15 +0000 Original-Received: from localhost ([127.0.0.1]:34366 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qMrFq-0003gD-V5 for submit@debbugs.gnu.org; Fri, 21 Jul 2023 10:37:15 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47204) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qMrFk-0003fw-RC for 62621@debbugs.gnu.org; Fri, 21 Jul 2023 10:37:12 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qMrFf-0000iJ-1O; Fri, 21 Jul 2023 10:37:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=mu/YFOz4RfSHF1tIQgKgkKIr9mHyfO3jILbHS0VAqFc=; b=Qln6gwqM0wn5 k3pddqx/KI385gzc8e7ISiA7K8cEod8H/nYY4xxgukduUrOVd2Sjr1kLsuUJk2CaHNyfNpEn78yWR zm4rqMFkkzhqiirfaJ/kgBMnDQXrBVvJIkP00Al4TeWiMbfpQGXQZWd9cwV0FJZhN/zrObv9hPqh2 yoMUQpydLDbxx3TMQ6f6rhaXj1Z+M261mgMkxcTfDkuuf69F5IiuAPsPokLs5IVdpnf8t+NC6pg0W dsLAYgvRbewvi0AAhCjnfyFN6eTN+IXYcYwDMuXHrCjFCOw/bh0r1IhKSD9KNGpjC/bKRJ7yQn22v 2+5RC6/hWpYK2r3+F/YT8g==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qMrFe-0002Pz-Gz; Fri, 21 Jul 2023 10:37:02 -0400 In-Reply-To: (message from Spencer Baugh on Fri, 21 Jul 2023 09:34:28 -0400) 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:265720 Archived-At: > From: Spencer Baugh > Cc: dmitry@gutov.dev, 62621@debbugs.gnu.org, sbaugh@catern.com > Date: Fri, 21 Jul 2023 09:34:28 -0400 > > > Thanks, but it still falls short of what Dmitry described above: the > > doc string doesn't "mention several functions that can be used". > > > >> +(defcustom uniquify-dirname-transform #'identity > >> + "Function to transform buffer's directory for uniquifying its name. > >> + > >> +It takes a single argument: the directory of the buffer. It > >> +should return a string filename (which does not need to actually > >> +exist in the filesystem) to use for uniquifying the buffer name." > > > > Please read this carefully and try to put yourself in the shoes of a > > user who needs to make sense out of this description. The immediate > > question I had is what does "transforming a buffer's directory" have > > to do with "uniquifying the buffer name"? Uniquifying a buffer's name > > is not about its directory, at least not in general. IOW, the > > starting point of this description is too "inside" the implementation. > > OK, how about this? The explanation of what project-uniquify-dirname-transform does should in its doc string, not in the doc string of uniquify-dirname-transform (which should refer to the former, and that is enough). The doc string of uniquify-dirname-transform should mention at least 'identity' as the default (what you wrote does that, but without mentioning the function's name), otherwise this still falls short of what Dmitry described. And the last two paragraphs of the doc string of uniquify-dirname-transform should be more-or-less reversed: first describe the default, and that using some function other than 'identity' can affect the result, then describe project-uniquify-dirname-transform as one such non-default transform.