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: Wed, 19 Jul 2023 16:25:52 +0300 Message-ID: <83v8eg3ue7.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> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20544"; 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 Wed Jul 19 15:26:14 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 1qM7C2-000544-97 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 19 Jul 2023 15:26:14 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qM7Bs-0008UC-KA; Wed, 19 Jul 2023 09:26: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 1qM7Br-0008Tz-6R for bug-gnu-emacs@gnu.org; Wed, 19 Jul 2023 09:26:03 -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 1qM7Bq-000649-V9 for bug-gnu-emacs@gnu.org; Wed, 19 Jul 2023 09:26:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qM7Bq-0008V5-9w for bug-gnu-emacs@gnu.org; Wed, 19 Jul 2023 09:26: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: Wed, 19 Jul 2023 13:26: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.168977313332639 (code B ref 62621); Wed, 19 Jul 2023 13:26:02 +0000 Original-Received: (at 62621) by debbugs.gnu.org; 19 Jul 2023 13:25:33 +0000 Original-Received: from localhost ([127.0.0.1]:55204 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qM7BM-0008UN-HX for submit@debbugs.gnu.org; Wed, 19 Jul 2023 09:25:33 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46292) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qM7BH-0008U5-Rk for 62621@debbugs.gnu.org; Wed, 19 Jul 2023 09:25:31 -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 1qM7BB-0005sI-Vu; Wed, 19 Jul 2023 09:25:22 -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=fewcWfc2UdiKUBVkE+PP99EjXhMKtpE/Mco4wAH2uYY=; b=CdtcOB7MQDFm MoHpbgQcFA7F6iwGU1yGc1urthFk2JzcgcqQFkwvg4Gs6p13+RF9TQWTvQgW34LSf3p5cpwMj128q w6LOPF2gtrcsoX2pEN97c3Xo0OLcKawrmT6+m08m4TU4C5RaLO8BixKphyBgYgLKAmhep9Yp13yRY kKQLt80auugovf1lKppouLLbiaXDOQq36aIKk8qF1P+aR8Fy+kbOF2/FNVU+KCG5vSLAnDBlBjTcN T33DwRDXdABVdVTeqcT/m3309xLuvWcD97AVfI5De7hxRJ8sAu4FKkSKiAwq7FucroY2bRZd3Kqyk tcRssPlWnOvMYq4pP+zVIA==; 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 1qM7BA-0006S3-V7; Wed, 19 Jul 2023 09:25:21 -0400 In-Reply-To: (message from Spencer Baugh on Wed, 19 Jul 2023 08:31:00 -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:265535 Archived-At: > From: Spencer Baugh > Cc: Dmitry Gutov , sbaugh@catern.com, 62621@debbugs.gnu.org > Date: Wed, 19 Jul 2023 08:31:00 -0400 > > >> >>> Repeat after me: Use options whose values are functions > >> >>> are hard on our users, because they require them to be Lisp > >> >>> programmers. > >> >> That doesn't have to be the case. If the defcustom's docstring mentions > >> >> several functions that can be used, and the :type widget includes them > >> >> as well, the user can decide to switch to any of them without writing > >> >> any Lisp (or having to understand the implementations). > >> > But that was not so in this particular case. > >> > >> That's easy to fix, as long as you don't have additional objections to > >> that approach. > > > > I'd need to see the fix first, because I don't think I have a clear > > idea of what you have in mind. > > > > (My objections, btw, where very minor and of pure usability nature. > > Frankly, I'm surprised such a simple and more-or-less agreed-upon > > comment got such a long thread of discussing various loosely-related > > issues.) > > Like this: 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.