* bug#5211: Color escape codes in the output of vc-git-print-log
@ 2009-12-14 16:12 ` Juanma Barranquero
2009-12-15 4:27 ` Stefan Monnier
` (2 more replies)
0 siblings, 3 replies; 14+ messages in thread
From: Juanma Barranquero @ 2009-12-14 16:12 UTC (permalink / raw
To: Bug-Gnu-Emacs
Package: emacs,vc
Tags: patch
Version: 23.1.90
Severity: minor
Depending of your setting of color.diff, color is used for log output,
and vc-print-log shows garbage (OK, escape codes for color):
^[[33mcommit 43a3bf88e5e495ad048b3a6d3cf852e1e7a02f1c^[[m
Author: xxx <yyy@zzz>
Date: 2009-12-14 17:11:35 +0200
blah blah blah
As color in *vc-change-log* buffers is an issue for font-locking, and
not for git log, the command should be called with --no-color.
OK to the following patch?
Juanma
2009-12-14 Juanma Barranquero <lekktu@gmail.com>
* vc-git.el (vc-git-print-log): Pass --no-color to `git log'.
=== modified file 'lisp/vc-git.el'
--- lisp/vc-git.el 2009-12-08 15:56:57 +0000
+++ lisp/vc-git.el 2009-12-14 16:08:54 +0000
@@ -555,7 +555,7 @@
(apply 'vc-git-command buffer
'async files
(append
- '("log")
+ '("log" "--no-color")
(when shortlog
'("--graph" "--decorate"
"--date=short" "--pretty=format:%d%h %ad %s" "--abbrev-commit"))
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#5211: Color escape codes in the output of vc-git-print-log
2009-12-14 16:12 ` bug#5211: Color escape codes in the output of vc-git-print-log Juanma Barranquero
@ 2009-12-15 4:27 ` Stefan Monnier
2009-12-15 4:31 ` Juanma Barranquero
2009-12-15 14:57 ` Dan Nicolaescu
2009-12-28 2:49 ` bug#5211: marked as done (Color escape codes in the output of vc-git-print-log) Emacs bug Tracking System
2 siblings, 1 reply; 14+ messages in thread
From: Stefan Monnier @ 2009-12-15 4:27 UTC (permalink / raw
To: Juanma Barranquero; +Cc: Bug-Gnu-Emacs, 5211
> * vc-git.el (vc-git-print-log): Pass --no-color to `git log'.
Would using a pipe rather than a tty solve the problem as well?
Stefan
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#5211: Color escape codes in the output of vc-git-print-log
2009-12-15 4:27 ` Stefan Monnier
@ 2009-12-15 4:31 ` Juanma Barranquero
2009-12-15 5:36 ` Eli Zaretskii
0 siblings, 1 reply; 14+ messages in thread
From: Juanma Barranquero @ 2009-12-15 4:31 UTC (permalink / raw
To: Stefan Monnier; +Cc: 5211
On Tue, Dec 15, 2009 at 05:27, Stefan Monnier <monnier@iro.umontreal.ca> wrote:
> Would using a pipe rather than a tty solve the problem as well?
I'm not sure I understand... Do you mean, would piping the output of
"git log" fix the problem? No, with color.diff=always, pipes get the
escape codes too.
Juanma
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#5211: Color escape codes in the output of vc-git-print-log
2009-12-15 4:31 ` Juanma Barranquero
@ 2009-12-15 5:36 ` Eli Zaretskii
2009-12-15 11:15 ` Juanma Barranquero
0 siblings, 1 reply; 14+ messages in thread
From: Eli Zaretskii @ 2009-12-15 5:36 UTC (permalink / raw
To: Juanma Barranquero, 5211; +Cc: monnier
> From: Juanma Barranquero <lekktu@gmail.com>
> Date: Tue, 15 Dec 2009 05:31:02 +0100
> Cc: 5211@emacsbugs.donarmstrong.com
> Reply-To: Juanma Barranquero <lekktu@gmail.com>,
> 5211@emacsbugs.donarmstrong.com
>
> No, with color.diff=always, pipes get the escape codes too.
On what OS?
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#5211: Color escape codes in the output of vc-git-print-log
2009-12-15 5:36 ` Eli Zaretskii
@ 2009-12-15 11:15 ` Juanma Barranquero
2009-12-15 13:01 ` Eli Zaretskii
0 siblings, 1 reply; 14+ messages in thread
From: Juanma Barranquero @ 2009-12-15 11:15 UTC (permalink / raw
To: Eli Zaretskii; +Cc: 5211
> On what OS?
Windows 7
I have
[color]
branch = always
diff = always
interactive = always
pager = true
status = always
ui = always
showbranch = always
in my .gitconfig, and
git log | more
in a personal repo shows
←[33mcommit ed210d6b291c13b3e2c6cbfed39ffd0e96d5b634←[m
Author: Juanma Barranquero <lekktu@gmail.com>
Date: 2009-12-14 18:58:38 +0100
That is not a bug in my setup or git, it's intended to pass color
escapes to less (which I usually use with git).
Juanma
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#5211: Color escape codes in the output of vc-git-print-log
2009-12-15 11:15 ` Juanma Barranquero
@ 2009-12-15 13:01 ` Eli Zaretskii
2009-12-15 13:09 ` Juanma Barranquero
0 siblings, 1 reply; 14+ messages in thread
From: Eli Zaretskii @ 2009-12-15 13:01 UTC (permalink / raw
To: Juanma Barranquero; +Cc: 5211
> From: Juanma Barranquero <lekktu@gmail.com>
> Date: Tue, 15 Dec 2009 12:15:42 +0100
> Cc: 5211@emacsbugs.donarmstrong.com, monnier@iro.umontreal.ca
>
> > On what OS?
>
> Windows 7
I asked because pipes on Windows have their quirks.
> I have
>
> [color]
> branch = always
> diff = always
> interactive = always
> pager = true
> status = always
> ui = always
> showbranch = always
>
> in my .gitconfig, and
>
> git log | more
>
> in a personal repo shows
>
> ←[33mcommit ed210d6b291c13b3e2c6cbfed39ffd0e96d5b634←[m
If the escapes go away when you remove "always", then there's no
problem here. And if we want to cater to users who set "always" like
you do, then resetting it in vc-git-print-log is IMO the way to go.
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#5211: Color escape codes in the output of vc-git-print-log
2009-12-15 13:01 ` Eli Zaretskii
@ 2009-12-15 13:09 ` Juanma Barranquero
0 siblings, 0 replies; 14+ messages in thread
From: Juanma Barranquero @ 2009-12-15 13:09 UTC (permalink / raw
To: Eli Zaretskii; +Cc: 5211
On Tue, Dec 15, 2009 at 14:01, Eli Zaretskii <eliz@gnu.org> wrote:
> If the escapes go away when you remove "always", then there's no
> problem here.
Yes, they do indeed disappear.
> And if we want to cater to users who set "always" like
> you do, then resetting it in vc-git-print-log is IMO the way to go.
That's my thinking too.
Juanma
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#5211: Color escape codes in the output of vc-git-print-log
2009-12-14 16:12 ` bug#5211: Color escape codes in the output of vc-git-print-log Juanma Barranquero
2009-12-15 4:27 ` Stefan Monnier
@ 2009-12-15 14:57 ` Dan Nicolaescu
2009-12-15 15:42 ` Juanma Barranquero
2009-12-28 2:49 ` bug#5211: marked as done (Color escape codes in the output of vc-git-print-log) Emacs bug Tracking System
2 siblings, 1 reply; 14+ messages in thread
From: Dan Nicolaescu @ 2009-12-15 14:57 UTC (permalink / raw
To: Juanma Barranquero; +Cc: 5211
Juanma Barranquero <lekktu@gmail.com> writes:
> Package: emacs,vc
> Tags: patch
> Version: 23.1.90
> Severity: minor
>
>
> Depending of your setting of color.diff, color is used for log output,
> and vc-print-log shows garbage (OK, escape codes for color):
>
> ^[[33mcommit 43a3bf88e5e495ad048b3a6d3cf852e1e7a02f1c^[[m
> Author: xxx <yyy@zzz>
> Date: 2009-12-14 17:11:35 +0200
>
> blah blah blah
>
>
> As color in *vc-change-log* buffers is an issue for font-locking, and
> not for git log, the command should be called with --no-color.
>
> OK to the following patch?
>
> Juanma
>
>
> 2009-12-14 Juanma Barranquero <lekktu@gmail.com>
>
> * vc-git.el (vc-git-print-log): Pass --no-color to `git log'.
When did the --no-color option appear?
If we pass it by default, then it will break C-x v l for git versions
that do not support it.
If --no-color is old enough, the it might not matter...
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#5211: Color escape codes in the output of vc-git-print-log
2009-12-15 14:57 ` Dan Nicolaescu
@ 2009-12-15 15:42 ` Juanma Barranquero
2009-12-15 18:32 ` Andreas Schwab
0 siblings, 1 reply; 14+ messages in thread
From: Juanma Barranquero @ 2009-12-15 15:42 UTC (permalink / raw
To: Dan Nicolaescu; +Cc: 5211
On Tue, Dec 15, 2009 at 15:57, Dan Nicolaescu <dann@ics.uci.edu> wrote:
> When did the --no-color option appear?
> If we pass it by default, then it will break C-x v l for git versions
> that do not support it.
> If --no-color is old enough, the it might not matter...
Good question. According to the logs, in July 2006
commit fef88bb0134dfd47b4bd17e668bbb860588dcb39
Author: Junio C Hamano <junkio@cox.net>
Date: 2006-07-07 05:27:24 -0700
diff.c: --no-color to defeat diff.color configuration.
Signed-off-by: Junio C Hamano <junkio@cox.net>
which means, if I'm not mistaken, that it appeared in git 1.4.2.
Juanma
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#5211: Color escape codes in the output of vc-git-print-log
2009-12-15 15:42 ` Juanma Barranquero
@ 2009-12-15 18:32 ` Andreas Schwab
2009-12-15 18:36 ` Juanma Barranquero
0 siblings, 1 reply; 14+ messages in thread
From: Andreas Schwab @ 2009-12-15 18:32 UTC (permalink / raw
To: Juanma Barranquero; +Cc: Dan Nicolaescu, 5211
Juanma Barranquero <lekktu@gmail.com> writes:
> Good question. According to the logs, in July 2006
>
>
> commit fef88bb0134dfd47b4bd17e668bbb860588dcb39
> Author: Junio C Hamano <junkio@cox.net>
> Date: 2006-07-07 05:27:24 -0700
>
> diff.c: --no-color to defeat diff.color configuration.
>
> Signed-off-by: Junio C Hamano <junkio@cox.net>
>
>
> which means, if I'm not mistaken, that it appeared in git 1.4.2.
$ git describe fef88bb0134dfd47b4bd17e668bbb860588dcb39
v1.4.1-91-gfef88bb
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#5211: Color escape codes in the output of vc-git-print-log
2009-12-15 18:32 ` Andreas Schwab
@ 2009-12-15 18:36 ` Juanma Barranquero
2009-12-15 23:34 ` Andreas Schwab
0 siblings, 1 reply; 14+ messages in thread
From: Juanma Barranquero @ 2009-12-15 18:36 UTC (permalink / raw
To: Andreas Schwab; +Cc: 5211
On Tue, Dec 15, 2009 at 19:32, Andreas Schwab <schwab@linux-m68k.org> wrote:
> $ git describe fef88bb0134dfd47b4bd17e668bbb860588dcb39
Thanks, I didn't remember that command.
> v1.4.1-91-gfef88bb
That's a beta for 1.4.2, isn't it?
Juanma
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#5211: Color escape codes in the output of vc-git-print-log
2009-12-15 18:36 ` Juanma Barranquero
@ 2009-12-15 23:34 ` Andreas Schwab
2009-12-15 23:57 ` Juanma Barranquero
0 siblings, 1 reply; 14+ messages in thread
From: Andreas Schwab @ 2009-12-15 23:34 UTC (permalink / raw
To: Juanma Barranquero; +Cc: 5211
Juanma Barranquero <lekktu@gmail.com> writes:
> On Tue, Dec 15, 2009 at 19:32, Andreas Schwab <schwab@linux-m68k.org> wrote:
>
>> $ git describe fef88bb0134dfd47b4bd17e668bbb860588dcb39
>
> Thanks, I didn't remember that command.
>
>> v1.4.1-91-gfef88bb
>
> That's a beta for 1.4.2, isn't it?
That just means the commit is 91 commits after tag v1.4.1, and there is
no other tag in between.
$ git tag --contains fef88bb0134dfd47b4bd17e668bbb860588dcb39 | head -1
v1.4.2
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#5211: Color escape codes in the output of vc-git-print-log
2009-12-15 23:34 ` Andreas Schwab
@ 2009-12-15 23:57 ` Juanma Barranquero
0 siblings, 0 replies; 14+ messages in thread
From: Juanma Barranquero @ 2009-12-15 23:57 UTC (permalink / raw
To: Andreas Schwab; +Cc: 5211
On Wed, Dec 16, 2009 at 00:34, Andreas Schwab <schwab@linux-m68k.org> wrote:
> That just means the commit is 91 commits after tag v1.4.1, and there is
> no other tag in between.
OK, thanks.
> $ git tag --contains fef88bb0134dfd47b4bd17e668bbb860588dcb39 | head -1
> v1.4.2
So --no-color was first included in a release of 2006-08-13. Is that
old enough? (git 1.0.0 is from 2005-12-21, barely eight months
earlier, so 1.4.2 is quite old indeed).
Juanma
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#5211: marked as done (Color escape codes in the output of vc-git-print-log)
2009-12-14 16:12 ` bug#5211: Color escape codes in the output of vc-git-print-log Juanma Barranquero
2009-12-15 4:27 ` Stefan Monnier
2009-12-15 14:57 ` Dan Nicolaescu
@ 2009-12-28 2:49 ` Emacs bug Tracking System
2 siblings, 0 replies; 14+ messages in thread
From: Emacs bug Tracking System @ 2009-12-28 2:49 UTC (permalink / raw
To: Juanma Barranquero; +Cc: emacs-bug-tracker
[-- Attachment #1: Type: text/plain, Size: 894 bytes --]
Your message dated Mon, 28 Dec 2009 03:47:52 +0100
with message-id <f7ccd24b0912271847j7f282733y358910002b582b49@mail.gmail.com>
and subject line Re: bug#5211: Color escape codes in the output of vc-git-print-log
has caused the Emacs bug report #5211,
regarding Color escape codes in the output of vc-git-print-log
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact bug-gnu-emacs@gnu.org
immediately.)
--
5211: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=5211
Emacs Bug Tracking System
Contact bug-gnu-emacs@gnu.org with problems
[-- Attachment #2: Type: message/rfc822, Size: 3832 bytes --]
From: Juanma Barranquero <lekktu@gmail.com>
To: Bug-Gnu-Emacs <bug-gnu-emacs@gnu.org>
Subject: Color escape codes in the output of vc-git-print-log
Date: Mon, 14 Dec 2009 17:12:24 +0100
Message-ID: <f7ccd24b0912140812jfe0104ek67d91233840138a7@mail.gmail.com>
Package: emacs,vc
Tags: patch
Version: 23.1.90
Severity: minor
Depending of your setting of color.diff, color is used for log output,
and vc-print-log shows garbage (OK, escape codes for color):
^[[33mcommit 43a3bf88e5e495ad048b3a6d3cf852e1e7a02f1c^[[m
Author: xxx <yyy@zzz>
Date: 2009-12-14 17:11:35 +0200
blah blah blah
As color in *vc-change-log* buffers is an issue for font-locking, and
not for git log, the command should be called with --no-color.
OK to the following patch?
Juanma
2009-12-14 Juanma Barranquero <lekktu@gmail.com>
* vc-git.el (vc-git-print-log): Pass --no-color to `git log'.
=== modified file 'lisp/vc-git.el'
--- lisp/vc-git.el 2009-12-08 15:56:57 +0000
+++ lisp/vc-git.el 2009-12-14 16:08:54 +0000
@@ -555,7 +555,7 @@
(apply 'vc-git-command buffer
'async files
(append
- '("log")
+ '("log" "--no-color")
(when shortlog
'("--graph" "--decorate"
"--date=short" "--pretty=format:%d%h %ad %s" "--abbrev-commit"))
[-- Attachment #3: Type: message/rfc822, Size: 3470 bytes --]
From: Juanma Barranquero <lekktu@gmail.com>
To: Andreas Schwab <schwab@linux-m68k.org>
Cc: 5211-done@debbugs.gnu.org
Subject: Re: bug#5211: Color escape codes in the output of vc-git-print-log
Date: Mon, 28 Dec 2009 03:47:52 +0100
Message-ID: <f7ccd24b0912271847j7f282733y358910002b582b49@mail.gmail.com>
On Wed, Dec 16, 2009 at 00:57, Juanma Barranquero <lekktu@gmail.com> wrote:
> So --no-color was first included in a release of 2006-08-13. Is that
> old enough? (git 1.0.0 is from 2005-12-21, barely eight months
> earlier, so 1.4.2 is quite old indeed).
I've committed this change (with the acquiescence of Chong Yidong).
Juanma
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2009-12-28 2:49 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <f7ccd24b0912271847j7f282733y358910002b582b49@mail.gmail.com>
2009-12-14 16:12 ` bug#5211: Color escape codes in the output of vc-git-print-log Juanma Barranquero
2009-12-15 4:27 ` Stefan Monnier
2009-12-15 4:31 ` Juanma Barranquero
2009-12-15 5:36 ` Eli Zaretskii
2009-12-15 11:15 ` Juanma Barranquero
2009-12-15 13:01 ` Eli Zaretskii
2009-12-15 13:09 ` Juanma Barranquero
2009-12-15 14:57 ` Dan Nicolaescu
2009-12-15 15:42 ` Juanma Barranquero
2009-12-15 18:32 ` Andreas Schwab
2009-12-15 18:36 ` Juanma Barranquero
2009-12-15 23:34 ` Andreas Schwab
2009-12-15 23:57 ` Juanma Barranquero
2009-12-28 2:49 ` bug#5211: marked as done (Color escape codes in the output of vc-git-print-log) Emacs bug Tracking System
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.