|
From: | Dmitry Gutov |
Subject: | bug#63469: 29.0.90; project.el doesn't add menu-bar entries |
Date: | Thu, 25 May 2023 19:17:51 +0300 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 |
On 25/05/2023 09:35, Juri Linkov wrote:
Sharing between vc and project would be nice. If possible, this will allow a shorter modeline indicator that will combine vc and project like --- project-branch --- where the project name replaces the vc-backend name.That indeed sounds like something that should require specific configuration. There can be projects without a branch, or branches without "current project". Or situations like the project root is not the vc root. E.g. when the current buffer is in a submodule (so the current branch is submodule's), and the project pertains to the parent repository.The idea is simple: just to replace the backend name by the project name when the project and its name are non-nil.I'm not sure the effect will be clear enough and appreciated by all of our users.This is intended only after customization like this that shows the backend by default: (defcustom vc-mode-line-format '(backend status revision) "What items to display on the mode line. Possible values: `project' - the current project name; `backend' - backend name; `status' - a character that denotes the vc status; `revision' - revision number and/or lock status; `commit' - commit name; `commit-abbr' - abbreviated commit name; `branch' - branch name; `separator' - a string between items. See more at Info node (emacs) VC Mode Line." :type '(repeat (choice (const :tag "Project name" project) (const :tag "Backend name" backend) (const :tag "Status character" status) (const :tag "Revision number/Lock status" revision) (const :tag "Commit name" commit) (const :tag "Abbreviated commit name" commit-abbr) (const :tag "Branch name" branch) (function :tag "Custom function") (string :tag "Separator"))) :version "30.1" :group 'vc)
It's not quite ideal, since there are projects without VCS and VC without projects (as mentioned previously), but it sounds like a worthy experiment.
Especially since the new behavior will be optional.
[Prev in Thread] | Current Thread | [Next in Thread] |