From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#59502: 29.0.50; [PATCH] Dedicated buffers per project Date: Sat, 10 Dec 2022 19:34:20 +0200 Organization: LINKOV.NET Message-ID: <86v8mji417.fsf@mail.linkov.net> References: <87fse7lacm.fsf@gmail.com> <864ju8a5ch.fsf@mail.linkov.net> <9b353f38-9e1d-9bb6-4512-9e4db594a2a6@yandex.ru> <86y1rjveix.fsf@mail.linkov.net> <86ea8d5d-1a47-08ff-3e06-ee32d7362211@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28684"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) Cc: Gabriel , 59502@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Dec 10 18:48:29 2022 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 1p43xd-0007GJ-Ml for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 10 Dec 2022 18:48:29 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p43xD-0002vu-SM; Sat, 10 Dec 2022 12:48:03 -0500 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 1p43xC-0002uw-B1 for bug-gnu-emacs@gnu.org; Sat, 10 Dec 2022 12:48:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p43xC-0002Mx-3L for bug-gnu-emacs@gnu.org; Sat, 10 Dec 2022 12:48:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p43xB-0001a6-VV for bug-gnu-emacs@gnu.org; Sat, 10 Dec 2022 12:48:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 10 Dec 2022 17:48:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59502 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 59502-submit@debbugs.gnu.org id=B59502.16706944455928 (code B ref 59502); Sat, 10 Dec 2022 17:48:01 +0000 Original-Received: (at 59502) by debbugs.gnu.org; 10 Dec 2022 17:47:25 +0000 Original-Received: from localhost ([127.0.0.1]:44186 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p43wa-0001XY-Ro for submit@debbugs.gnu.org; Sat, 10 Dec 2022 12:47:25 -0500 Original-Received: from relay1-d.mail.gandi.net ([217.70.183.193]:44723) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p43wY-0001X7-7O for 59502@debbugs.gnu.org; Sat, 10 Dec 2022 12:47:23 -0500 Original-Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id D9C29240005; Sat, 10 Dec 2022 17:47:12 +0000 (UTC) In-Reply-To: <86ea8d5d-1a47-08ff-3e06-ee32d7362211@yandex.ru> (Dmitry Gutov's message of "Sat, 10 Dec 2022 03:50:56 +0200") 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:250535 Archived-At: >>>> (setopt project-buffer-name-function >>>> (lambda (project _command-symbol buffer-name) >>>> (format "%s<%s>" buffer-name (project-name project)))) >>> I think*prjname/Shell Command Output* sounds nice enough. >>> >>> If it doesn't, we probably wouldn't choose*Shell Command Output* as the >>> name for non-project buffers of this type, would we? >> For designing a naming scheme, I suggest to keep in mind that >> the users might already have customized the behavior for >> displaying these buffers by using display-buffer-alist >> that often takes into account a uniquified suffix, e.g.: >> "\\`\\*\\(?:Shell Command Output\\|xref\\|vc-dir\\|compilation\\) >> \\*\\(?:<[^>]+>\\)?\\'" >> So for compatibility it would be better to add the project name >> in the suffix without changing the standard base buffer names, e.g.: >> "*Shell Command Output*", "*xref*" >> But if you want to add the project name after the first asterisk, >> this is easy to do as well with just: >> (setf (substring buffer-name 1 1) (project-name project)) > > The naming scheme is often affected by the uniquify package, and different > people use different ordering. Should we really go there? It was an example of my customization preference. So anyone can customize project-buffer-name-function to comply with own uniquification scheme. My point was to ensure that project-buffer-name-function should support any format.