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: Wed, 07 Dec 2022 09:50:14 +0200 Organization: LINKOV.NET Message-ID: <86y1rjveix.fsf@mail.linkov.net> References: <87fse7lacm.fsf@gmail.com> <864ju8a5ch.fsf@mail.linkov.net> <9b353f38-9e1d-9bb6-4512-9e4db594a2a6@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="15792"; 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 Wed Dec 07 08:55:34 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 1p2pHC-0003xQ-4D for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 07 Dec 2022 08:55:34 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p2pGn-0004eJ-8e; Wed, 07 Dec 2022 02:55:09 -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 1p2pGh-0004e6-5b for bug-gnu-emacs@gnu.org; Wed, 07 Dec 2022 02:55:03 -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 1p2pGg-0001De-TZ for bug-gnu-emacs@gnu.org; Wed, 07 Dec 2022 02:55:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p2pGg-0000Um-PY for bug-gnu-emacs@gnu.org; Wed, 07 Dec 2022 02:55:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 07 Dec 2022 07:55:02 +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.16703996841873 (code B ref 59502); Wed, 07 Dec 2022 07:55:02 +0000 Original-Received: (at 59502) by debbugs.gnu.org; 7 Dec 2022 07:54:44 +0000 Original-Received: from localhost ([127.0.0.1]:48267 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p2pGO-0000U9-KI for submit@debbugs.gnu.org; Wed, 07 Dec 2022 02:54:44 -0500 Original-Received: from relay7-d.mail.gandi.net ([217.70.183.200]:38097) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p2pGM-0000U2-Ka for 59502@debbugs.gnu.org; Wed, 07 Dec 2022 02:54:43 -0500 Original-Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id 717B320014; Wed, 7 Dec 2022 07:54:32 +0000 (UTC) In-Reply-To: <9b353f38-9e1d-9bb6-4512-9e4db594a2a6@yandex.ru> (Dmitry Gutov's message of "Wed, 7 Dec 2022 04:31:26 +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:250165 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))