From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] New option to make C-x 4 a use file-less ChangeLog buffers (was Re: git history tracking across renames (and emacs support)) Date: Mon, 16 Jul 2018 11:44:45 -0400 Message-ID: References: <838t6jgl1k.fsf@gnu.org> <601m6cc6.fsf@lifelogs.com> <83o9fefnv9.fsf@gnu.org> <83in5lg4ol.fsf@gnu.org> <83efg9fxnj.fsf@gnu.org> <838t6hfa4h.fsf@gnu.org> <87h8l4lt9q.fsf@gmail.com> <831sc8fttu.fsf@gnu.org> <87sh4lwwg6.fsf_-_@gmail.com> <87wotvebk6.fsf@gmail.com> <871sc3e0s8.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1531755815 4371 195.159.176.226 (16 Jul 2018 15:43:35 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 16 Jul 2018 15:43:35 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: =?windows-1252?B?Sm/jbyBU4XZvcmE=?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jul 16 17:43:30 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ff5ep-0000xI-AJ for ged-emacs-devel@m.gmane.org; Mon, 16 Jul 2018 17:43:27 +0200 Original-Received: from localhost ([::1]:52470 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ff5gw-0008QG-5m for ged-emacs-devel@m.gmane.org; Mon, 16 Jul 2018 11:45:38 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34164) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ff5gF-0008Q6-6F for emacs-devel@gnu.org; Mon, 16 Jul 2018 11:44:56 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ff5gA-0005As-A8 for emacs-devel@gnu.org; Mon, 16 Jul 2018 11:44:55 -0400 Original-Received: from chene.dit.umontreal.ca ([132.204.246.20]:55558) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ff5gA-00058w-2k for emacs-devel@gnu.org; Mon, 16 Jul 2018 11:44:50 -0400 Original-Received: from ceviche.home (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id w6GFjSRc008254; Mon, 16 Jul 2018 11:45:28 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id EC5A2660E5; Mon, 16 Jul 2018 11:44:45 -0400 (EDT) In-Reply-To: <871sc3e0s8.fsf@gmail.com> (=?windows-1252?Q?=22Jo=E3o_T=E1vo?= =?windows-1252?Q?ra=22's?= message of "Mon, 16 Jul 2018 15:02:47 +0100") X-NAI-Spam-Flag: NO X-NAI-Spam-Level: X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0.2 X-NAI-Spam-Rules: 3 Rules triggered LNG_SB_1=0.2, EDT_SA_DN_PASS=0, RV6330=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6330> : inlines <6750> : streams <1792723> : uri <2674503> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 132.204.246.20 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:227458 Archived-At: > * This isn't a file, it's a file-less buffer. I haven't seen uniquify > ever used for those, That's because you don't use vc-dir and haven't use PCL-CVS before that. [ IIUC it can only be made to work for *shell* buffers, but I don't use them enough to know for sure, and it doesn't work that way out of the box anyway, from what I know. ] > so it would probably confuse users into thinking > there's a funnily named file after all; I haven't seen any sign of users being confused by it back in the PCL-CVS days, nor now with vc-dir. > * Uniquify is designed to have a very shortest possible distinguishing > string because the file's name is foremost in importance. It's quite > different here. The file's name doesn't exist. The buffer's name does > exist, but is quite irrelevant. The path to the directory, on the > contrary, isn't. And I want that bit to show even if I have only one > *ChangeLog* buffer. We're just replacing "ChangeLog" files with "*ChangeLog*" buffers. Currently, if you have a single ChangeLog file opened, it just says "ChangeLog", so I don't see a strong reason to impose that the sole "*ChangeLog*" buffer you have opened states in its buffer name which directory it's associated to. >>> In practice, I find the "|" much harder to read, >> Harder then what? > Harder than reading a short, plain-english phrase using the "for" > preposition: "*ChangeLog for project-path*". Maybe you'd like (setq uniquify-separator " for ") better? > Can I make add-log.el set this buffer-locally by default in the > *ChangeLog* buffer, so that the suffix always appears even if I have > only one? I don't think so, no. But as a user I'd personally not want that "at least 1 dir element" behavior. > Can I make it so that the suffix is inside the *EarMuffs*? No. >> Yes, but it's not as nice for the user. > The problem is that I don't understand the niceness being advocated > here? And zero niceness versus non-zero complexity always loses. You don't have to it, indeed. It's just a suggestion. I'll probably sooner or later apply such a patch either into `master` or into my own local branch because I find such long buffer names insuperable. >> These are awfully long, with a lot of redundancy in the middle, making >> it harder to find the relevant information. > Really, I don't think it's redundant: it's the only thing semantically > (and formally) tying that buffer to the directory whose (vc-)project > it's representing. Formally, clearly not: default-directory and list-buffers-directory tye that buffer to the directory (and you can add the new `add-log--buffer-file-name` to those two). The file names introduced by `C-x 4 a` more informally do as well. > If there's a part of it that is so common as to be distracting, we > should use `abbreviate-file-name' (which you can probably customize to > abbreviate extremely using directory-abbrev-alist). abbreviate-file-name is supposed to return a valid file name. And it can't abbreviate in a context-sensitive manner (e.g. if I have two ChangeLog buffers opened, one for .../src/emacs/master and another for .../src/typer/master, it can't shorten things to "ChangeLog | emacs" and "ChangeLog | typer" like uniquify does). Stefan