From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: VC's modeline Date: Wed, 10 Feb 2016 10:16:27 -0500 Message-ID: References: <20160208185311.9470.7389@vcs.savannah.gnu.org> <56B8F682.7040404@dancol.org> <83io1zosv7.fsf@gnu.org> <56B8FA6D.9070105@dancol.org> <87zivax3li.fsf@wanadoo.es> <87r3glx0vu.fsf@wanadoo.es> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1455117645 15667 80.91.229.3 (10 Feb 2016 15:20:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 10 Feb 2016 15:20:45 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Feb 10 16:20:36 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aTWYs-0003BQ-CC for ged-emacs-devel@m.gmane.org; Wed, 10 Feb 2016 16:20:10 +0100 Original-Received: from localhost ([::1]:40080 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aTWYr-00041b-O2 for ged-emacs-devel@m.gmane.org; Wed, 10 Feb 2016 10:20:09 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52666) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aTWYc-00041U-Pm for emacs-devel@gnu.org; Wed, 10 Feb 2016 10:19:55 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aTWYX-0005TX-Mo for emacs-devel@gnu.org; Wed, 10 Feb 2016 10:19:54 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:48671) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aTWYX-0005TO-Fs for emacs-devel@gnu.org; Wed, 10 Feb 2016 10:19:49 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1aTWWn-0002Lo-BN for emacs-devel@gnu.org; Wed, 10 Feb 2016 16:18:11 +0100 Original-Received: from 69.157.190.121 ([69.157.190.121]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 10 Feb 2016 16:18:01 +0100 Original-Received: from monnier by 69.157.190.121 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 10 Feb 2016 16:18:01 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 59 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 69.157.190.121 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) Cancel-Lock: sha1:2FM7zHgtoOCgn0GBcBJPxjOHEJ0= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:199694 Archived-At: > Why should you care about the backend? E.g. because there may be various valid options (see vc-switch-backend). > A user can easily lose track of the state of a buffer (is it edited? > does it corresponds with the contents of the file on disk? to which > branch does in belong?) But if the user forgets about which VCS he is > using (suppossing that that info is relevant to him) he has more serious > problems than Emacs being slow :-) Could be. Basically, the "Git" (or "Bzr" ...) would mostly mean "Hey, VC noticed that there's a VCS in use around here". So, yes we could replace it with a red pulsating dot which means that VC is "activated". But to decide whether to put the red pulsating dot we end up necessarily finding out which backend is in use, so we may as well display the backend's name instead. It also has the advantage that the user will probably instinctively know that this "Git" thingy means that Emacs found something out in relation to a VCS, whereas we'd have to explain what the red pulsating dot means (same thing if we use "VC" since the user may not necessarily know that Emacs's builtin generic VCS support is called "VC"). > The info that the VC state gives you is that something changed. Using > C-x v = for just checking if the file contains changes is quite a lot of > work. I just described what I do. I rarely (never?) only care if the file is modified or not. If it is modified I pretty much always want to see what is changed. So I never look at the modeline and just always use `C-x v =' instead. >> So this info is not of very high value. > It is of high value for me. And indeed the colon is hard to notice. > That's why I added faces to each of those VC states. As mentioned, I do think it's good that this info can be displayed. What I think is wrong is to compute this info eagerly/unconditionally by default. E.g. we compute this info even if the file is never displayed. Of course this gets worse if find-file-noselect is called in a loop to collect info about various files none of which are ever displayed. > It is a problem for some users. For me and many others it is just an > annoyance on certain specific circunstances. Indeed. It's also a problem that we have to write ad-hoc code to try and parse internal Bzr/Hg/... data to try and avoid those performance problems, which in turn implies more maintenance. Reducing the amount of detail in the VC modeline would also be a problem for some users. So we should try and find some solution that avoids *all* those problems. > I agree wholeheartedly here. But please note that there is no "eager > computation" of the VC modeline, AFAIK. I think there is, in vc-find-file-hook. Stefan