mirror of
https://github.com/protesilaos/dotfiles.git
synced 2026-09-10 07:16:20 -04:00
emacs: disambiguate VC root logs on a per-project basis
This commit is contained in:
parent
89f1ff4625
commit
251c9f6768
|
|
@ -15039,6 +15039,16 @@ the project in DIRECTORY using `project-dired'."
|
|||
(select-frame-by-name name)
|
||||
(prot-project--switch directory 'project-dired))))
|
||||
|
||||
;;;; Produce a VC root log for the project
|
||||
|
||||
(defun prot-project-rename-vc-root-log (&rest _)
|
||||
"Rename the buffer of `vc-print-root-log' to mention the project."
|
||||
(when-let ((root (vc-root-dir))
|
||||
((consp project--list))
|
||||
((member root (mapcar #'car project--list))))
|
||||
(rename-buffer (format "*vc-root-log: %s*" root))))
|
||||
|
||||
(advice-add #'vc-print-root-log :after #'prot-project-rename-vc-root-log)
|
||||
|
||||
;;;; One tab per project
|
||||
|
||||
|
|
|
|||
|
|
@ -69,6 +69,16 @@ the project in DIRECTORY using `project-dired'."
|
|||
(select-frame-by-name name)
|
||||
(prot-project--switch directory 'project-dired))))
|
||||
|
||||
;;;; Produce a VC root log for the project
|
||||
|
||||
(defun prot-project-rename-vc-root-log (&rest _)
|
||||
"Rename the buffer of `vc-print-root-log' to mention the project."
|
||||
(when-let ((root (vc-root-dir))
|
||||
((consp project--list))
|
||||
((member root (mapcar #'car project--list))))
|
||||
(rename-buffer (format "*vc-root-log: %s*" root))))
|
||||
|
||||
(advice-add #'vc-print-root-log :after #'prot-project-rename-vc-root-log)
|
||||
|
||||
;;;; One tab per project
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue