all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: emacs-devel@gnu.org
Subject: Re: VC's modeline
Date: Wed, 10 Feb 2016 10:16:27 -0500	[thread overview]
Message-ID: <jwvpow4bonx.fsf-monnier+gmane.emacs.devel@gnu.org> (raw)
In-Reply-To: 87r3glx0vu.fsf@wanadoo.es

> 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




  reply	other threads:[~2016-02-10 15:16 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20160208185311.9470.7389@vcs.savannah.gnu.org>
     [not found] ` <E1aSqvv-0002TM-Vt@vcs.savannah.gnu.org>
2016-02-08 19:55   ` [Emacs-diffs] master de76a16: Performance improvements for vc-hg Stefan Monnier
2016-02-08 20:11     ` Daniel Colascione
2016-02-08 20:21       ` Eli Zaretskii
2016-02-08 20:28         ` Daniel Colascione
2016-02-08 21:01           ` Eli Zaretskii
2016-02-08 21:09             ` Daniel Colascione
2016-02-08 21:39           ` VC's modeline (was: [Emacs-diffs] master de76a16: Performance improvements for vc-hg) Stefan Monnier
2016-02-08 22:02             ` VC's modeline Óscar Fuentes
2016-02-09 15:15               ` Stefan Monnier
2016-02-09 17:13                 ` Óscar Fuentes
2016-02-10 15:16                   ` Stefan Monnier [this message]
2016-02-13 20:01                     ` Dmitry Gutov
2016-02-13  9:33                 ` Markus Triska
2016-02-08 23:29             ` Daniel Colascione
2016-02-13  9:35               ` Markus Triska

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvpow4bonx.fsf-monnier+gmane.emacs.devel@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.