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 08:33:23 -0400 Message-ID: References: <83tvw6chqv.fsf@gnu.org> <86shbprix7.fsf_-_@dod.no> <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> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1531744335 2541 195.159.176.226 (16 Jul 2018 12:32:15 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 16 Jul 2018 12:32:15 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jul 16 14:32:11 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 1ff2fi-0000Z5-Rj for ged-emacs-devel@m.gmane.org; Mon, 16 Jul 2018 14:32:10 +0200 Original-Received: from localhost ([::1]:51067 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ff2hp-0001BG-PW for ged-emacs-devel@m.gmane.org; Mon, 16 Jul 2018 08:34:21 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36012) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ff2h7-0001BB-Ga for emacs-devel@gnu.org; Mon, 16 Jul 2018 08:33:38 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ff2h4-0005Po-Aq for emacs-devel@gnu.org; Mon, 16 Jul 2018 08:33:37 -0400 Original-Received: from [195.159.176.226] (port=55592 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ff2h4-0005PH-26 for emacs-devel@gnu.org; Mon, 16 Jul 2018 08:33:34 -0400 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1ff2eu-00086G-1K for emacs-devel@gnu.org; Mon, 16 Jul 2018 14:31:20 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 41 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:zSzfLel8JrBmZXfXq8sGVLwQK20= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 195.159.176.226 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:227448 Archived-At: > To tell you the truth, I was hoping to *avoid* uniquify here. IMO, it > is designed for those cases where the file creator could reasonably be > convinced that his/her file would be unique (probably within a > dir/project). This is not one of these cases, since Emacs is generally > useful for working more than one project at the same time. I don't follow. `uniquify` is designed specifically for those cases where the same file name can occur in multiple projects and lets you see "foo|bar" and "foo|baz" instead of "foo" and "foo<1>". > In practice, I find the "|" much harder to read, Harder then what? In any case, you should be able to get pretty much the same as what your patch currently does by setting uniquify-buffer-name-style and uniquify-min-dir-content appropriately. > This would also avoid the added complexity that you foresee. Yes, but it's not as nice for the user. > Right, that is clearer. But will it fit in the miniscule column limit? We can split it into two sentences if needed ;-) > As I said, I was hoping to avoid this. "*ChangeLog for > *" seems acceptable to me, but we could shorten it to > $HOME or sth (how?). [ We call those things "filenames" rather than "path" in the GNU project. ] These are awfully long, with a lot of redundancy in the middle, making it harder to find the relevant information. This part will be easy to fix if you `setq` a buffer-local variable in the buffer, e.g.: (defun add-log--changelog-buffer-p (file-name buffer) (equal file-name (or buffer-file-name add-log--buffer-file-name))) -- Stefan