all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@linkov.net>
To: Dmitry Gutov <dmitry@gutov.dev>
Cc: 66464@debbugs.gnu.org
Subject: bug#66464: Vc mode-line
Date: Fri, 10 Nov 2023 09:33:42 +0200	[thread overview]
Message-ID: <868r76p16h.fsf@mail.linkov.net> (raw)
In-Reply-To: <5c8d51aa-8625-9b2c-3c15-037b5d10de08@gutov.dev> (Dmitry Gutov's message of "Fri, 10 Nov 2023 04:04:36 +0200")

[-- Attachment #1: Type: text/plain, Size: 242 bytes --]

>> It would be a pity not to add this handy feature.
>> So here is a small patch that joins the project name and vc status
>> on the mode line:
>
> Could you described the intended look?

Here is the screenshot how the mode line looks like:


[-- Attachment #2: project_branch.png --]
[-- Type: image/png, Size: 30946 bytes --]

[-- Attachment #3: Type: text/plain, Size: 1124 bytes --]


> Two mode-line entries one right by another, without a space between?

The format is "project-branch" instead of "backend-branch".

> And with the backend name removed? Wouldn't you say we're losing some
> useful information this way? Or perhaps the backend name is not essential.

I'm sure that showing the backend name in all file buffers is useless
for most users and wastes the precious screen space.

But I don't propose to change the default.

> In any case, it seems like
>
>   (const :tag "Show project name and status" with-project)
>
> describes the option inaccurately, since VC's mode line doesn't show the
> project name.

Technically it's not vc-mode that shows the project name indeed.
I already tried such things as calling '(project-mode-line-format)'
from 'vc-mode-line-string'.  But it's an unnecessary complication.

> And if you customize 'vc-display-status' to 'with-project' but don't
> set project-mode-line to t, the project name won't be shown at all.

This is why the condition already handles this case:

  (and (eq vc-display-status 'with-project)
       (bound-and-true-p project-mode-line))

  reply	other threads:[~2023-11-10  7:33 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-11 16:29 bug#66464: Vc mode-line Juri Linkov
2023-10-16  1:11 ` Dmitry Gutov
2023-10-16 17:14   ` Juri Linkov
2023-10-31  7:40 ` Juri Linkov
2023-11-09 16:41   ` Juri Linkov
2023-11-10  2:04     ` Dmitry Gutov
2023-11-10  7:33       ` Juri Linkov [this message]
2023-11-10 23:54         ` Dmitry Gutov
2023-11-11 18:50           ` Juri Linkov
2023-11-11 22:05             ` Dmitry Gutov
2023-11-12  8:07               ` Juri Linkov
2023-11-12 10:59                 ` Dmitry Gutov
2023-11-13  7:11                   ` Juri Linkov

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=868r76p16h.fsf@mail.linkov.net \
    --to=juri@linkov.net \
    --cc=66464@debbugs.gnu.org \
    --cc=dmitry@gutov.dev \
    /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.