[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/vc-jj f7a58c19d1 25/58: Optionally colorize the log buf
From: |
ELPA Syncer |
Subject: |
[elpa] externals/vc-jj f7a58c19d1 25/58: Optionally colorize the log buffer |
Date: |
Sat, 15 Mar 2025 07:01:40 -0400 (EDT) |
branch: externals/vc-jj
commit f7a58c19d182b500c98930e399ac3171844c4f41
Author: Rudi Schlatte <rudi@constantly.at>
Commit: Wojciech Siewierski <vifon@noreply.codeberg.org>
Optionally colorize the log buffer
---
vc-jj.el | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/vc-jj.el b/vc-jj.el
index fb57583bb3..5f740bfeed 100644
--- a/vc-jj.el
+++ b/vc-jj.el
@@ -26,6 +26,7 @@
(require 'seq)
(autoload 'vc-switches "vc")
+(autoload 'ansi-color-apply-on-region "ansi-color")
(add-to-list 'vc-handled-backends 'JJ)
@@ -33,6 +34,13 @@
(defun vc-jj-checkout-model (_files) 'implicit)
(defun vc-jj-update-on-retrieve-tag () nil)
+(defgroup vc-jj nil
+ "VC Jujutsu backend."
+ :group 'vc)
+
+(defcustom vc-jj-colorize-log t
+ "Control whether to have jj colorize the log."
+ :type 'boolean)
(defun vc-jj--file-tracked (file)
(with-temp-buffer
@@ -230,6 +238,9 @@ self.hidden(), \"\\n\"
(call-process "jj" nil nil nil "restore" "--" file))
(defun vc-jj-print-log (files buffer &optional _shortlog start-revision limit)
+ "Print commit log associated with FILES into specified BUFFER."
+ ;; FIXME: limit can be a revision string, in which case we should
+ ;; print revisions between start-revision and limit
(let ((inhibit-read-only t)
(erase-buffer)
(args (append
@@ -237,9 +248,13 @@ self.hidden(), \"\\n\"
(list "-n" (number-to-string limit)))
(when start-revision
(list "-r" (concat ".." start-revision)))
+ (when vc-jj-colorize-log (list "--color" "always"))
(list "--")
files)))
- (apply #'call-process "jj" nil buffer nil "log" args))
+ (apply #'call-process "jj" nil buffer nil "log" args)
+ (when vc-jj-colorize-log
+ (with-current-buffer buffer
+ (ansi-color-apply-on-region (point-min) (point-max)))))
(goto-char (point-min)))
(defun vc-jj-show-log-entry (revision)
- [elpa] externals/vc-jj 47baadf4f7 11/58: Don't fail in vc-jj-registered, (continued)
- [elpa] externals/vc-jj 47baadf4f7 11/58: Don't fail in vc-jj-registered, ELPA Syncer, 2025/03/15
- [elpa] externals/vc-jj 4370fc9a49 12/58: Check for the presence of the jj executable, ELPA Syncer, 2025/03/15
- [elpa] externals/vc-jj 346bd34848 13/58: Unbreak dired, vc-dir, ELPA Syncer, 2025/03/15
- [elpa] externals/vc-jj 8c0f9ffa2f 14/58: Add headers, ELPA Syncer, 2025/03/15
- [elpa] externals/vc-jj 4c332e328d 03/58: Add a project.el implementation for better file listing, ELPA Syncer, 2025/03/15
- [elpa] externals/vc-jj d90028623a 18/58: Refactor vc-jj-find-ignore-file, ELPA Syncer, 2025/03/15
- [elpa] externals/vc-jj b247615b82 23/58: Show conflicts in vc-dir, mode line, ELPA Syncer, 2025/03/15
- [elpa] externals/vc-jj 5bdbf0d375 26/58: Make log template customizable., ELPA Syncer, 2025/03/15
- [elpa] externals/vc-jj 5eae1d07b5 28/58: Merge pull request 'Make the log customizable' (#9) from rudi/vc-jj.el:push-ooxqzmotyxxz into master, ELPA Syncer, 2025/03/15
- [elpa] externals/vc-jj 1b26a80078 27/58: Properly call erase-buffer in vc-print-log, ELPA Syncer, 2025/03/15
- [elpa] externals/vc-jj f7a58c19d1 25/58: Optionally colorize the log buffer,
ELPA Syncer <=
- [elpa] externals/vc-jj b46fc7ea38 31/58: Update README somewhat, ELPA Syncer, 2025/03/15
- [elpa] externals/vc-jj 0b0f423ea9 37/58: Use expand-file-name instead of file-name-concat, ELPA Syncer, 2025/03/15
- [elpa] externals/vc-jj f8563a006d 16/58: Tell jj about ignored files, ELPA Syncer, 2025/03/15
- [elpa] externals/vc-jj e18e288bcf 30/58: Add package.el metadata, ELPA Syncer, 2025/03/15
- [elpa] externals/vc-jj a6fab35d8a 35/58: Make changes according to code review, ELPA Syncer, 2025/03/15
- [elpa] externals/vc-jj 92a4612ad2 36/58: Make sure default-directory is well-formed throughout, ELPA Syncer, 2025/03/15
- [elpa] externals/vc-jj 61444d3221 46/58: Add vc-jj-command, ELPA Syncer, 2025/03/15
- [elpa] externals/vc-jj 7d72dc47d3 45/58: Fix vc-annotate author parsing, ELPA Syncer, 2025/03/15
- [elpa] externals/vc-jj e0fcb943d2 48/58: Fix vc-jj-annotate breaking on following previous revisions, ELPA Syncer, 2025/03/15
- [elpa] externals/vc-jj aee981846f 51/58: Fix tests in previous commit, ELPA Syncer, 2025/03/15