[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#21805: 25.0.50; feature proposal: change vc-hg-annotate-command to s
From: |
Uwe Brauer |
Subject: |
bug#21805: 25.0.50; feature proposal: change vc-hg-annotate-command to something better readable |
Date: |
Sun, 01 Nov 2015 17:40:41 +0000 |
Hello
the current form of vc-hg-annotate-command leads to
138 Tue Oct 20 16:49:01 2015 +0300 Trns/P1-Met/p1-met.tex:
\usepackage[latin1]{inputenc}
145 Sun Oct 25 17:10:38 2015 +0200 Trns/P1-Met/p1-met.tex:
%\usepackage[T1]{fontenc}
138 Tue Oct 20 16:49:01 2015 +0300 Trns/P1-Met/p1-met.tex:
\usepackage[spanish]{babel}
153 Tue Oct 27 12:37:31 2015 +0000 Trns/P1-Met/p1-met.tex: %\usepackage{helvet}
which is very difficult to read on not too wide screens. The reason is
the "-d" and the "-f" or "--follow" option.
So I propose to use
(defun vc-hg-annotate-command (file buffer &optional revision)
"Execute \"hg annotate\" on FILE, inserting the contents in BUFFER.
Optional arg REVISION is a revision to annotate from."
(apply #'vc-hg-command buffer 0 file "annotate" "-dq" "-n" "-u"
(append (vc-switches 'hg 'annotate)
(if revision (list (concat "-r" revision))))))
Here "-u" is denotes the user "-dq" is the short date option, moreover
optionally --follow if this possible
the output would be
oub 138 2015-10-20: \usepackage[latin1]{inputenc}
oub 145 2015-10-20: %\usepackage[T1]{fontenc}
oub 138 2015-10-20:\usepackage[spanish]{babel}
oub 153 2015-10-20: %\usepackage{helvet}
In order that the coloring would work, one should also modify the
regexp:
(defconst vc-hg-annotate-re ;org
"^[ \t]*\\([0-9]+\\) \\(.\\{30\\}\\)\\(?:\\(: \\)\\|\\(?:
+\\([^:\n]+\\(?::\\(?:[^: \n][^:\n]*\\)?\\)*\\): \\)\\)")
Thanks
Uwe Brauer
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- bug#21805: 25.0.50; feature proposal: change vc-hg-annotate-command to something better readable,
Uwe Brauer <=