mirror of
https://github.com/protesilaos/dotfiles.git
synced 2026-09-10 07:16:20 -04:00
emacs: BREAKING stop using use-package for vc and related
This commit is contained in:
parent
6c4800ef0f
commit
36454ec12c
|
|
@ -23,10 +23,7 @@
|
|||
(define-key project-prefix-map (kbd "p") #'prot-project-maybe-in-tab))
|
||||
|
||||
;;;; `diff-mode'
|
||||
(use-package diff-mode
|
||||
:ensure nil
|
||||
:defer t
|
||||
:config
|
||||
(prot-emacs-configure
|
||||
(setq diff-default-read-only t)
|
||||
(setq diff-advance-after-apply-hunk t)
|
||||
(setq diff-update-on-the-fly t)
|
||||
|
|
@ -36,135 +33,130 @@
|
|||
(setq diff-font-lock-syntax nil))
|
||||
|
||||
;;;; `ediff'
|
||||
(use-package ediff
|
||||
:ensure nil
|
||||
:commands (ediff-buffers ediff-files ediff-buffers3 ediff-files3)
|
||||
:init
|
||||
(prot-emacs-configure
|
||||
(setq ediff-split-window-function 'split-window-horizontally)
|
||||
(setq ediff-window-setup-function 'ediff-setup-windows-plain)
|
||||
:config
|
||||
(setq ediff-keep-variants nil)
|
||||
(setq ediff-make-buffers-readonly-at-startup nil)
|
||||
(setq ediff-merge-revisions-with-ancestor t)
|
||||
(setq ediff-show-clashes-only t))
|
||||
(setq ediff-show-clashes-only t)
|
||||
|
||||
(use-package prot-ediff
|
||||
:ensure nil
|
||||
:bind
|
||||
(prot-emacs-autoload
|
||||
(prot-ediff-visible-buffers-2
|
||||
prot-ediff-visible-buffers-3
|
||||
prot-ediff-store-layout
|
||||
prot-ediff-restore-layout)
|
||||
"prot-ediff")
|
||||
;; The C-x v prefix is for all "version control" commands that are
|
||||
;; already built into Emacs. It makes sense to extend it for this
|
||||
;; use-case.
|
||||
(("C-x v 2" . prot-ediff-visible-buffers-2)
|
||||
("C-x v 3" . prot-ediff-visible-buffers-3))
|
||||
:hook
|
||||
((ediff-before-setup . prot-ediff-store-layout)
|
||||
(ediff-quit . prot-ediff-restore-layout)))
|
||||
(prot-emacs-keybind global-map
|
||||
"C-x v 2" #'prot-ediff-visible-buffers-2
|
||||
"C-x v 3" #'prot-ediff-visible-buffers-3)
|
||||
(add-hook 'ediff-before-setup-hook #'prot-ediff-store-layout)
|
||||
(add-hook 'ediff-quit-hook #'prot-ediff-restore-layout))
|
||||
|
||||
;;;; `smerge-mode'
|
||||
(use-package smerge-mode
|
||||
:ensure nil
|
||||
:defer t
|
||||
:config
|
||||
(prot-emacs-configure
|
||||
(setq smerge-diff-buffer-name "*smerge-diff*")
|
||||
(setq smerge-refine-shadow-cursor nil)) ; Emacs 31
|
||||
|
||||
;;; Version control framework (vc.el, vc-git.el, and more)
|
||||
(use-package vc
|
||||
:ensure nil
|
||||
:bind
|
||||
(;; NOTE: I override lots of the defaults
|
||||
:map global-map
|
||||
("C-x v B" . vc-annotate) ; Blame mnemonic
|
||||
("C-x v e" . vc-ediff)
|
||||
("C-x v k" . vc-delete-file) ; 'k' for kill==>delete is more common
|
||||
("C-x v G" . vc-log-search) ; git log --grep
|
||||
("C-x v t" . vc-create-tag)
|
||||
("C-x v c" . vc-clone) ; Emacs 31
|
||||
("C-x v d" . vc-diff)
|
||||
("C-x v ." . vc-dir-root) ; `vc-dir-root' is from Emacs 28
|
||||
("C-x v <return>" . vc-dir-root)
|
||||
:map vc-dir-mode-map
|
||||
("t" . vc-create-tag)
|
||||
("O" . vc-log-outgoing)
|
||||
("o" . vc-dir-find-file-other-window)
|
||||
("d" . vc-diff) ; parallel to D: `vc-root-diff'
|
||||
("k" . vc-dir-delete-file)
|
||||
("G" . vc-revert)
|
||||
:map vc-git-stash-shared-map
|
||||
("a" . vc-git-stash-apply-at-point)
|
||||
("c" . vc-git-stash) ; "create" named stash
|
||||
("k" . vc-git-stash-delete-at-point) ; symmetry with `vc-dir-delete-file'
|
||||
("p" . vc-git-stash-pop-at-point)
|
||||
("s" . vc-git-stash-snapshot)
|
||||
:map vc-annotate-mode-map
|
||||
("M-q" . vc-annotate-toggle-annotation-visibility)
|
||||
("C-c C-c" . vc-annotate-goto-line)
|
||||
("<return>" . vc-annotate-find-revision-at-line)
|
||||
:map log-edit-mode-map
|
||||
("M-s" . nil) ; I use M-s for my search commands
|
||||
("M-r" . nil) ; I use `consult-history'
|
||||
:map log-view-mode-map
|
||||
("<tab>" . log-view-toggle-entry-display)
|
||||
("<return>" . log-view-find-revision)
|
||||
("s" . vc-log-search)
|
||||
("o" . vc-log-outgoing)
|
||||
("f" . vc-log-incoming)
|
||||
("F" . vc-update)
|
||||
("P" . vc-push))
|
||||
:init
|
||||
;;; Version control framework (vc.el, vc-git.el, and more)
|
||||
(prot-emacs-configure
|
||||
;; NOTE: I override lots of the defaults
|
||||
(prot-emacs-keybind global-map
|
||||
"C-x v B" #'vc-annotate ; Blame mnemonic
|
||||
"C-x v e" #'vc-ediff
|
||||
"C-x v k" #'vc-delete-file ; 'k' for kill==>delete is more common
|
||||
"C-x v G" #'vc-log-search ; git log --grep
|
||||
"C-x v t" #'vc-create-tag
|
||||
"C-x v c" #'vc-clone ; Emacs 31
|
||||
"C-x v d" #'vc-diff
|
||||
"C-x v ." #'vc-dir-root ; `vc-dir-root' is from Emacs 28
|
||||
"C-x v <return>" #'vc-dir-root)
|
||||
(prot-emacs-keybind vc-dir-mode-map
|
||||
"t" #'vc-create-tag
|
||||
"O" #'vc-log-outgoing
|
||||
"o" #'vc-dir-find-file-other-window
|
||||
"d" #'vc-diff ; parallel to D: `vc-root-diff'
|
||||
"k" #'vc-dir-delete-file
|
||||
"G" #'vc-revert)
|
||||
(prot-emacs-keybind vc-git-stash-shared-map
|
||||
"a" #'vc-git-stash-apply-at-point
|
||||
"c" #'vc-git-stash ; "create" named stash
|
||||
"k" #'vc-git-stash-delete-at-point ; symmetry with `vc-dir-delete-file'
|
||||
"p" #'vc-git-stash-pop-at-point
|
||||
"s" #'vc-git-stash-snapshot)
|
||||
(prot-emacs-keybind vc-annotate-mode-map
|
||||
"M-q" #'vc-annotate-toggle-annotation-visibility
|
||||
"C-c C-c" #'vc-annotate-goto-line
|
||||
"<return>" #'vc-annotate-find-revision-at-line)
|
||||
(prot-emacs-keybind log-edit-mode-map
|
||||
"M-s" #'nil ; I use M-s for my search commands
|
||||
"M-r" #'nil) ; I use `consult-history'
|
||||
(prot-emacs-keybind log-view-mode-map
|
||||
"<tab>" #'log-view-toggle-entry-display
|
||||
"<return>" #'log-view-find-revision
|
||||
"s" #'vc-log-search
|
||||
"o" #'vc-log-outgoing
|
||||
"f" #'vc-log-incoming
|
||||
"F" #'vc-update
|
||||
"P" #'vc-push)
|
||||
|
||||
(setq vc-follow-symlinks t)
|
||||
:config
|
||||
;; Those offer various types of functionality, such as blaming,
|
||||
;; viewing logs, showing a dedicated buffer with changes to affected
|
||||
;; files.
|
||||
(require 'vc-annotate)
|
||||
(require 'vc-dir)
|
||||
(require 'vc-git)
|
||||
(require 'add-log)
|
||||
(require 'log-view)
|
||||
|
||||
;; I only use Git. If I ever need another, I will include it here.
|
||||
;; This may have an effect on performance, as Emacs will not try to
|
||||
;; check for a bunch of backends.
|
||||
(setq vc-handled-backends '(Git))
|
||||
(with-eval-after-load 'vc
|
||||
;; Those offer various types of functionality, such as blaming,
|
||||
;; viewing logs, showing a dedicated buffer with changes to affected
|
||||
;; files.
|
||||
(require 'vc-annotate)
|
||||
(require 'vc-dir)
|
||||
(require 'vc-git)
|
||||
(require 'add-log)
|
||||
(require 'log-view)
|
||||
|
||||
(setq vc-dir-save-some-buffers-on-revert t) ; Emacs 31
|
||||
;; I only use Git. If I ever need another, I will include it here.
|
||||
;; This may have an effect on performance, as Emacs will not try to
|
||||
;; check for a bunch of backends.
|
||||
(setq vc-handled-backends '(Git))
|
||||
|
||||
;; This one is for editing commit messages.
|
||||
(require 'log-edit)
|
||||
(setq log-edit-confirm 'changed)
|
||||
(setq log-edit-keep-buffer nil)
|
||||
(setq log-edit-require-final-newline t)
|
||||
(setq log-edit-setup-add-author nil)
|
||||
;; I can see the files from the Diff with C-c C-d
|
||||
(remove-hook 'log-edit-hook #'log-edit-show-files)
|
||||
(setq vc-dir-save-some-buffers-on-revert t) ; Emacs 31
|
||||
|
||||
(setq vc-find-revision-no-save t)
|
||||
(setq vc-annotate-display-mode 'scale) ; scale to oldest
|
||||
;; I use a different account for git commits
|
||||
(setq add-log-mailing-address "info@protesilaos.com")
|
||||
(setq add-log-keep-changes-together t)
|
||||
(setq vc-git-diff-switches '("--patch-with-stat" "--histogram"))
|
||||
(setq vc-git-log-switches '("--stat"))
|
||||
(setq vc-git-print-log-follow t)
|
||||
(setq vc-git-revision-complete-only-branches nil) ; Emacs 28
|
||||
(setq vc-git-root-log-format
|
||||
`("%d %h %ai %an: %s"
|
||||
;; The first shy group matches the characters drawn by --graph.
|
||||
;; We use numbered groups because `log-view-message-re' wants the
|
||||
;; revision number to be group 1.
|
||||
,(concat "^\\(?:[*/\\|]+\\)\\(?:[*/\\| ]+\\)?"
|
||||
"\\(?2: ([^)]+) \\)?\\(?1:[0-9a-z]+\\) "
|
||||
"\\(?4:[0-9]\\{4\\}-[0-9-]\\{4\\}[0-9\s+:-]\\{16\\}\\) "
|
||||
"\\(?3:.*?\\):")
|
||||
((1 'log-view-message)
|
||||
(2 'change-log-list nil lax)
|
||||
(3 'change-log-name)
|
||||
(4 'change-log-date))))
|
||||
;; This one is for editing commit messages.
|
||||
(require 'log-edit)
|
||||
(setq log-edit-confirm 'changed)
|
||||
(setq log-edit-keep-buffer nil)
|
||||
(setq log-edit-require-final-newline t)
|
||||
(setq log-edit-setup-add-author nil)
|
||||
;; I can see the files from the Diff with C-c C-d
|
||||
(remove-hook 'log-edit-hook #'log-edit-show-files)
|
||||
|
||||
;; These two are from Emacs 29
|
||||
(setq vc-git-log-edit-summary-target-len 50)
|
||||
(setq vc-git-log-edit-summary-max-len 70))
|
||||
(setq vc-find-revision-no-save t)
|
||||
(setq vc-annotate-display-mode 'scale) ; scale to oldest
|
||||
;; I use a different account for git commits
|
||||
(setq add-log-mailing-address "info@protesilaos.com")
|
||||
(setq add-log-keep-changes-together t)
|
||||
(setq vc-git-diff-switches '("--patch-with-stat" "--histogram"))
|
||||
(setq vc-git-log-switches '("--stat"))
|
||||
(setq vc-git-print-log-follow t)
|
||||
(setq vc-git-revision-complete-only-branches nil) ; Emacs 28
|
||||
(setq vc-git-root-log-format
|
||||
`("%d %h %ai %an: %s"
|
||||
;; The first shy group matches the characters drawn by --graph.
|
||||
;; We use numbered groups because `log-view-message-re' wants the
|
||||
;; revision number to be group 1.
|
||||
,(concat "^\\(?:[*/\\|]+\\)\\(?:[*/\\| ]+\\)?"
|
||||
"\\(?2: ([^)]+) \\)?\\(?1:[0-9a-z]+\\) "
|
||||
"\\(?4:[0-9]\\{4\\}-[0-9-]\\{4\\}[0-9\s+:-]\\{16\\}\\) "
|
||||
"\\(?3:.*?\\):")
|
||||
((1 'log-view-message)
|
||||
(2 'change-log-list nil lax)
|
||||
(3 'change-log-name)
|
||||
(4 'change-log-date))))
|
||||
|
||||
;; These two are from Emacs 29
|
||||
(setq vc-git-log-edit-summary-target-len 50)
|
||||
(setq vc-git-log-edit-summary-max-len 70)))
|
||||
|
||||
;;; Agitate
|
||||
;; A package of mine to complement VC and friends. Read the manual
|
||||
|
|
|
|||
|
|
@ -6764,10 +6764,7 @@ section of this file).
|
|||
|
||||
#+begin_src emacs-lisp :tangle "prot-emacs-modules/prot-emacs-git.el"
|
||||
;;;; `diff-mode'
|
||||
(use-package diff-mode
|
||||
:ensure nil
|
||||
:defer t
|
||||
:config
|
||||
(prot-emacs-configure
|
||||
(setq diff-default-read-only t)
|
||||
(setq diff-advance-after-apply-hunk t)
|
||||
(setq diff-update-on-the-fly t)
|
||||
|
|
@ -6811,29 +6808,28 @@ refinements to the core Ediff functionality ([[#h:3937b784-af0f-47c0-8c89-c74d90
|
|||
|
||||
#+begin_src emacs-lisp :tangle "prot-emacs-modules/prot-emacs-git.el" :mkdirp yes
|
||||
;;;; `ediff'
|
||||
(use-package ediff
|
||||
:ensure nil
|
||||
:commands (ediff-buffers ediff-files ediff-buffers3 ediff-files3)
|
||||
:init
|
||||
(prot-emacs-configure
|
||||
(setq ediff-split-window-function 'split-window-horizontally)
|
||||
(setq ediff-window-setup-function 'ediff-setup-windows-plain)
|
||||
:config
|
||||
(setq ediff-keep-variants nil)
|
||||
(setq ediff-make-buffers-readonly-at-startup nil)
|
||||
(setq ediff-merge-revisions-with-ancestor t)
|
||||
(setq ediff-show-clashes-only t))
|
||||
(setq ediff-show-clashes-only t)
|
||||
|
||||
(use-package prot-ediff
|
||||
:ensure nil
|
||||
:bind
|
||||
(prot-emacs-autoload
|
||||
(prot-ediff-visible-buffers-2
|
||||
prot-ediff-visible-buffers-3
|
||||
prot-ediff-store-layout
|
||||
prot-ediff-restore-layout)
|
||||
"prot-ediff")
|
||||
;; The C-x v prefix is for all "version control" commands that are
|
||||
;; already built into Emacs. It makes sense to extend it for this
|
||||
;; use-case.
|
||||
(("C-x v 2" . prot-ediff-visible-buffers-2)
|
||||
("C-x v 3" . prot-ediff-visible-buffers-3))
|
||||
:hook
|
||||
((ediff-before-setup . prot-ediff-store-layout)
|
||||
(ediff-quit . prot-ediff-restore-layout)))
|
||||
(prot-emacs-keybind global-map
|
||||
"C-x v 2" #'prot-ediff-visible-buffers-2
|
||||
"C-x v 3" #'prot-ediff-visible-buffers-3)
|
||||
(add-hook 'ediff-before-setup-hook #'prot-ediff-store-layout)
|
||||
(add-hook 'ediff-quit-hook #'prot-ediff-restore-layout))
|
||||
#+end_src
|
||||
|
||||
*** The =prot-emacs-git.el= section about ~smerge-mode~
|
||||
|
|
@ -6860,10 +6856,7 @@ of the latter, it even works in the Magit status buffer:
|
|||
|
||||
#+begin_src emacs-lisp :tangle "prot-emacs-modules/prot-emacs-git.el"
|
||||
;;;; `smerge-mode'
|
||||
(use-package smerge-mode
|
||||
:ensure nil
|
||||
:defer t
|
||||
:config
|
||||
(prot-emacs-configure
|
||||
(setq smerge-diff-buffer-name "*smerge-diff*")
|
||||
(setq smerge-refine-shadow-cursor nil)) ; Emacs 31
|
||||
#+end_src
|
||||
|
|
@ -6950,103 +6943,102 @@ many extras on top of ~vc~ that I use daily in my workflow
|
|||
([[#h:257b9118-4407-410e-a56a-134fd5d1a3b4][The =prot-emacs-git.el= section about ~agitate~]]).
|
||||
|
||||
#+begin_src emacs-lisp :tangle "prot-emacs-modules/prot-emacs-git.el"
|
||||
;;; Version control framework (vc.el, vc-git.el, and more)
|
||||
(use-package vc
|
||||
:ensure nil
|
||||
:bind
|
||||
(;; NOTE: I override lots of the defaults
|
||||
:map global-map
|
||||
("C-x v B" . vc-annotate) ; Blame mnemonic
|
||||
("C-x v e" . vc-ediff)
|
||||
("C-x v k" . vc-delete-file) ; 'k' for kill==>delete is more common
|
||||
("C-x v G" . vc-log-search) ; git log --grep
|
||||
("C-x v t" . vc-create-tag)
|
||||
("C-x v c" . vc-clone) ; Emacs 31
|
||||
("C-x v d" . vc-diff)
|
||||
("C-x v ." . vc-dir-root) ; `vc-dir-root' is from Emacs 28
|
||||
("C-x v <return>" . vc-dir-root)
|
||||
:map vc-dir-mode-map
|
||||
("t" . vc-create-tag)
|
||||
("O" . vc-log-outgoing)
|
||||
("o" . vc-dir-find-file-other-window)
|
||||
("d" . vc-diff) ; parallel to D: `vc-root-diff'
|
||||
("k" . vc-dir-delete-file)
|
||||
("G" . vc-revert)
|
||||
:map vc-git-stash-shared-map
|
||||
("a" . vc-git-stash-apply-at-point)
|
||||
("c" . vc-git-stash) ; "create" named stash
|
||||
("k" . vc-git-stash-delete-at-point) ; symmetry with `vc-dir-delete-file'
|
||||
("p" . vc-git-stash-pop-at-point)
|
||||
("s" . vc-git-stash-snapshot)
|
||||
:map vc-annotate-mode-map
|
||||
("M-q" . vc-annotate-toggle-annotation-visibility)
|
||||
("C-c C-c" . vc-annotate-goto-line)
|
||||
("<return>" . vc-annotate-find-revision-at-line)
|
||||
:map log-edit-mode-map
|
||||
("M-s" . nil) ; I use M-s for my search commands
|
||||
("M-r" . nil) ; I use `consult-history'
|
||||
:map log-view-mode-map
|
||||
("<tab>" . log-view-toggle-entry-display)
|
||||
("<return>" . log-view-find-revision)
|
||||
("s" . vc-log-search)
|
||||
("o" . vc-log-outgoing)
|
||||
("f" . vc-log-incoming)
|
||||
("F" . vc-update)
|
||||
("P" . vc-push))
|
||||
:init
|
||||
;;; Version control framework (vc.el, vc-git.el, and more)
|
||||
(prot-emacs-configure
|
||||
;; NOTE: I override lots of the defaults
|
||||
(prot-emacs-keybind global-map
|
||||
"C-x v B" #'vc-annotate ; Blame mnemonic
|
||||
"C-x v e" #'vc-ediff
|
||||
"C-x v k" #'vc-delete-file ; 'k' for kill==>delete is more common
|
||||
"C-x v G" #'vc-log-search ; git log --grep
|
||||
"C-x v t" #'vc-create-tag
|
||||
"C-x v c" #'vc-clone ; Emacs 31
|
||||
"C-x v d" #'vc-diff
|
||||
"C-x v ." #'vc-dir-root ; `vc-dir-root' is from Emacs 28
|
||||
"C-x v <return>" #'vc-dir-root)
|
||||
(prot-emacs-keybind vc-dir-mode-map
|
||||
"t" #'vc-create-tag
|
||||
"O" #'vc-log-outgoing
|
||||
"o" #'vc-dir-find-file-other-window
|
||||
"d" #'vc-diff ; parallel to D: `vc-root-diff'
|
||||
"k" #'vc-dir-delete-file
|
||||
"G" #'vc-revert)
|
||||
(prot-emacs-keybind vc-git-stash-shared-map
|
||||
"a" #'vc-git-stash-apply-at-point
|
||||
"c" #'vc-git-stash ; "create" named stash
|
||||
"k" #'vc-git-stash-delete-at-point ; symmetry with `vc-dir-delete-file'
|
||||
"p" #'vc-git-stash-pop-at-point
|
||||
"s" #'vc-git-stash-snapshot)
|
||||
(prot-emacs-keybind vc-annotate-mode-map
|
||||
"M-q" #'vc-annotate-toggle-annotation-visibility
|
||||
"C-c C-c" #'vc-annotate-goto-line
|
||||
"<return>" #'vc-annotate-find-revision-at-line)
|
||||
(prot-emacs-keybind log-edit-mode-map
|
||||
"M-s" #'nil ; I use M-s for my search commands
|
||||
"M-r" #'nil) ; I use `consult-history'
|
||||
(prot-emacs-keybind log-view-mode-map
|
||||
"<tab>" #'log-view-toggle-entry-display
|
||||
"<return>" #'log-view-find-revision
|
||||
"s" #'vc-log-search
|
||||
"o" #'vc-log-outgoing
|
||||
"f" #'vc-log-incoming
|
||||
"F" #'vc-update
|
||||
"P" #'vc-push)
|
||||
|
||||
(setq vc-follow-symlinks t)
|
||||
:config
|
||||
;; Those offer various types of functionality, such as blaming,
|
||||
;; viewing logs, showing a dedicated buffer with changes to affected
|
||||
;; files.
|
||||
(require 'vc-annotate)
|
||||
(require 'vc-dir)
|
||||
(require 'vc-git)
|
||||
(require 'add-log)
|
||||
(require 'log-view)
|
||||
|
||||
;; I only use Git. If I ever need another, I will include it here.
|
||||
;; This may have an effect on performance, as Emacs will not try to
|
||||
;; check for a bunch of backends.
|
||||
(setq vc-handled-backends '(Git))
|
||||
(with-eval-after-load 'vc
|
||||
;; Those offer various types of functionality, such as blaming,
|
||||
;; viewing logs, showing a dedicated buffer with changes to affected
|
||||
;; files.
|
||||
(require 'vc-annotate)
|
||||
(require 'vc-dir)
|
||||
(require 'vc-git)
|
||||
(require 'add-log)
|
||||
(require 'log-view)
|
||||
|
||||
(setq vc-dir-save-some-buffers-on-revert t) ; Emacs 31
|
||||
;; I only use Git. If I ever need another, I will include it here.
|
||||
;; This may have an effect on performance, as Emacs will not try to
|
||||
;; check for a bunch of backends.
|
||||
(setq vc-handled-backends '(Git))
|
||||
|
||||
;; This one is for editing commit messages.
|
||||
(require 'log-edit)
|
||||
(setq log-edit-confirm 'changed)
|
||||
(setq log-edit-keep-buffer nil)
|
||||
(setq log-edit-require-final-newline t)
|
||||
(setq log-edit-setup-add-author nil)
|
||||
;; I can see the files from the Diff with C-c C-d
|
||||
(remove-hook 'log-edit-hook #'log-edit-show-files)
|
||||
(setq vc-dir-save-some-buffers-on-revert t) ; Emacs 31
|
||||
|
||||
(setq vc-find-revision-no-save t)
|
||||
(setq vc-annotate-display-mode 'scale) ; scale to oldest
|
||||
;; I use a different account for git commits
|
||||
(setq add-log-mailing-address "info@protesilaos.com")
|
||||
(setq add-log-keep-changes-together t)
|
||||
(setq vc-git-diff-switches '("--patch-with-stat" "--histogram"))
|
||||
(setq vc-git-log-switches '("--stat"))
|
||||
(setq vc-git-print-log-follow t)
|
||||
(setq vc-git-revision-complete-only-branches nil) ; Emacs 28
|
||||
(setq vc-git-root-log-format
|
||||
`("%d %h %ai %an: %s"
|
||||
;; The first shy group matches the characters drawn by --graph.
|
||||
;; We use numbered groups because `log-view-message-re' wants the
|
||||
;; revision number to be group 1.
|
||||
,(concat "^\\(?:[*/\\|]+\\)\\(?:[*/\\| ]+\\)?"
|
||||
"\\(?2: ([^)]+) \\)?\\(?1:[0-9a-z]+\\) "
|
||||
"\\(?4:[0-9]\\{4\\}-[0-9-]\\{4\\}[0-9\s+:-]\\{16\\}\\) "
|
||||
"\\(?3:.*?\\):")
|
||||
((1 'log-view-message)
|
||||
(2 'change-log-list nil lax)
|
||||
(3 'change-log-name)
|
||||
(4 'change-log-date))))
|
||||
;; This one is for editing commit messages.
|
||||
(require 'log-edit)
|
||||
(setq log-edit-confirm 'changed)
|
||||
(setq log-edit-keep-buffer nil)
|
||||
(setq log-edit-require-final-newline t)
|
||||
(setq log-edit-setup-add-author nil)
|
||||
;; I can see the files from the Diff with C-c C-d
|
||||
(remove-hook 'log-edit-hook #'log-edit-show-files)
|
||||
|
||||
;; These two are from Emacs 29
|
||||
(setq vc-git-log-edit-summary-target-len 50)
|
||||
(setq vc-git-log-edit-summary-max-len 70))
|
||||
(setq vc-find-revision-no-save t)
|
||||
(setq vc-annotate-display-mode 'scale) ; scale to oldest
|
||||
;; I use a different account for git commits
|
||||
(setq add-log-mailing-address "info@protesilaos.com")
|
||||
(setq add-log-keep-changes-together t)
|
||||
(setq vc-git-diff-switches '("--patch-with-stat" "--histogram"))
|
||||
(setq vc-git-log-switches '("--stat"))
|
||||
(setq vc-git-print-log-follow t)
|
||||
(setq vc-git-revision-complete-only-branches nil) ; Emacs 28
|
||||
(setq vc-git-root-log-format
|
||||
`("%d %h %ai %an: %s"
|
||||
;; The first shy group matches the characters drawn by --graph.
|
||||
;; We use numbered groups because `log-view-message-re' wants the
|
||||
;; revision number to be group 1.
|
||||
,(concat "^\\(?:[*/\\|]+\\)\\(?:[*/\\| ]+\\)?"
|
||||
"\\(?2: ([^)]+) \\)?\\(?1:[0-9a-z]+\\) "
|
||||
"\\(?4:[0-9]\\{4\\}-[0-9-]\\{4\\}[0-9\s+:-]\\{16\\}\\) "
|
||||
"\\(?3:.*?\\):")
|
||||
((1 'log-view-message)
|
||||
(2 'change-log-list nil lax)
|
||||
(3 'change-log-name)
|
||||
(4 'change-log-date))))
|
||||
|
||||
;; These two are from Emacs 29
|
||||
(setq vc-git-log-edit-summary-target-len 50)
|
||||
(setq vc-git-log-edit-summary-max-len 70)))
|
||||
#+end_src
|
||||
|
||||
*** The =prot-emacs-git.el= section about ~agitate~
|
||||
|
|
|
|||
Loading…
Reference in a new issue