* vc-git feature proposale: modeline and annotate
@ 2022-12-14 21:36 Uwe Brauer
2022-12-15 7:53 ` Eli Zaretskii
0 siblings, 1 reply; 6+ messages in thread
From: Uwe Brauer @ 2022-12-14 21:36 UTC (permalink / raw)
To: emacs-devel
Hi
I would like to suggest to have, at least optionally, the result
of
(shell-command "git name-rev HEAD")
In the modeline and/or in the annotation buffer.
I know that the HASH is more reliable but I find the result of the above
command sometimes a convenient alternative.
Regards
Uwe Brauer
--
Warning: Content may be disturbing to some audiences
I strongly condemn Putin's war of aggression against the Ukraine.
I support to deliver weapons to Ukraine's military.
I support the ban of Russia from SWIFT.
I support the EU membership of the Ukraine.
https://addons.thunderbird.net/en-US/thunderbird/addon/gmail-conversation-view/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: vc-git feature proposale: modeline and annotate
2022-12-14 21:36 vc-git feature proposale: modeline and annotate Uwe Brauer
@ 2022-12-15 7:53 ` Eli Zaretskii
2022-12-15 8:26 ` Uwe Brauer
0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2022-12-15 7:53 UTC (permalink / raw)
To: Uwe Brauer; +Cc: emacs-devel
> From: Uwe Brauer <oub@mat.ucm.es>
> Date: Wed, 14 Dec 2022 22:36:56 +0100
>
> I would like to suggest to have, at least optionally, the result
> of
> (shell-command "git name-rev HEAD")
>
> In the modeline and/or in the annotation buffer.
What prevents you from having that? IOW, why are you posting this
here, when you can already customize the heck out your mode lines?
> I know that the HASH is more reliable but I find the result of the above
> command sometimes a convenient alternative.
We currently show the branch, but not the commit. So what you want is
to have the "HEAD" thingy to be on the mode line, literally? Since
that is almost always true, why is that addition useful?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: vc-git feature proposale: modeline and annotate
2022-12-15 7:53 ` Eli Zaretskii
@ 2022-12-15 8:26 ` Uwe Brauer
2022-12-15 9:00 ` Eli Zaretskii
0 siblings, 1 reply; 6+ messages in thread
From: Uwe Brauer @ 2022-12-15 8:26 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: Uwe Brauer, emacs-devel
[-- Attachment #1: Type: text/plain, Size: 2407 bytes --]
>>> "EZ" == Eli Zaretskii <eliz@gnu.org> writes:
>> From: Uwe Brauer <oub@mat.ucm.es>
>> Date: Wed, 14 Dec 2022 22:36:56 +0100
>>
>> I would like to suggest to have, at least optionally, the result
>> of
>> (shell-command "git name-rev HEAD")
>>
>> In the modeline and/or in the annotation buffer.
> What prevents you from having that? IOW, why are you posting this
> here, when you can already customize the heck out your mode lines?
Are we talking about the mode line? I don't know how to obtain the
feature I discuss below. As for the vc-annotate command
Currently (taking auctex as an example) I obtain
f7c0c735d (Tassilo Horn 2020-09-04 1) ;;; tex.el --- Support for TeX documents. -*- lexical-binding: t; -*-
fedf75103 (Per Abrahamsen 1994-04-07 2)
4b1c7015a (Ikumi Keita 2022-03-19 3) ;; Copyright (C) 1985-2022 Free Software Foundation, Inc.
f23d8867d (Ralf Angeli 2004-05-02 4)
5b40e9b1b (David Kastrup 2005-03-28 5) ;; Maintainer: auctex-devel@gnu.org
7e5d40a53 (David Kastrup 2003-02-15 14)
But I would like to have something like this
master~2 (Tassilo Horn 2020-09-04 1) ;;; tex.el --- Support for TeX documents. -*- lexical-binding: t; -*-
master~100 (Per Abrahamsen 1994-04-07 2)
master~40 (Ikumi Keita 2022-03-19 3) ;; Copyright (C) 1985-2022 Free Software Foundation, Inc.
master~10 (Ralf Angeli 2004-05-02 4)
master~5 (David Kastrup 2005-03-28 5) ;; Maintainer: auctex-devel@gnu.org
master~100 (David Kastrup 2003-02-15 14)
The doctring of vc-annotate does not indicate how to achieve that.
Can you tell me how?
>> I know that the HASH is more reliable but I find the result of the above
>> command sometimes a convenient alternative.
> We currently show the branch, but not the commit. So what you want is
> to have the "HEAD" thingy to be on the mode line, literally? Since
> that is almost always true, why is that addition useful?
No. I tend to checkout previous commits.
In such a case case the command
git name-rev HEAD
Would give, say,
master~3
meaning = three commits before HEAD on the master branch)!
That I found very useful
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5673 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: vc-git feature proposale: modeline and annotate
2022-12-15 8:26 ` Uwe Brauer
@ 2022-12-15 9:00 ` Eli Zaretskii
2022-12-15 9:38 ` Uwe Brauer
2022-12-15 13:34 ` Uwe Brauer
0 siblings, 2 replies; 6+ messages in thread
From: Eli Zaretskii @ 2022-12-15 9:00 UTC (permalink / raw)
To: Uwe Brauer; +Cc: emacs-devel
> From: Uwe Brauer <oub@mat.ucm.es>
> Cc: Uwe Brauer <oub@mat.ucm.es>, emacs-devel@gnu.org
> Date: Thu, 15 Dec 2022 09:26:21 +0100
>
> >> I would like to suggest to have, at least optionally, the result
> >> of
> >> (shell-command "git name-rev HEAD")
> >>
> >> In the modeline and/or in the annotation buffer.
>
> > What prevents you from having that? IOW, why are you posting this
> > here, when you can already customize the heck out your mode lines?
>
> Are we talking about the mode line? I don't know how to obtain the
> feature I discuss below.
One way is by using the :eval construct in mode-line-format.
> Currently (taking auctex as an example) I obtain
>
> f7c0c735d (Tassilo Horn 2020-09-04 1) ;;; tex.el --- Support for TeX documents. -*- lexical-binding: t; -*-
> fedf75103 (Per Abrahamsen 1994-04-07 2)
> 4b1c7015a (Ikumi Keita 2022-03-19 3) ;; Copyright (C) 1985-2022 Free Software Foundation, Inc.
> f23d8867d (Ralf Angeli 2004-05-02 4)
> 5b40e9b1b (David Kastrup 2005-03-28 5) ;; Maintainer: auctex-devel@gnu.org
> 7e5d40a53 (David Kastrup 2003-02-15 14)
>
>
> But I would like to have something like this
>
> master~2 (Tassilo Horn 2020-09-04 1) ;;; tex.el --- Support for TeX documents. -*- lexical-binding: t; -*-
> master~100 (Per Abrahamsen 1994-04-07 2)
> master~40 (Ikumi Keita 2022-03-19 3) ;; Copyright (C) 1985-2022 Free Software Foundation, Inc.
> master~10 (Ralf Angeli 2004-05-02 4)
> master~5 (David Kastrup 2005-03-28 5) ;; Maintainer: auctex-devel@gnu.org
> master~100 (David Kastrup 2003-02-15 14)
>
> The doctring of vc-annotate does not indicate how to achieve that.
> Can you tell me how?
I don't think "git blame" can do that.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-12-15 13:34 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-14 21:36 vc-git feature proposale: modeline and annotate Uwe Brauer
2022-12-15 7:53 ` Eli Zaretskii
2022-12-15 8:26 ` Uwe Brauer
2022-12-15 9:00 ` Eli Zaretskii
2022-12-15 9:38 ` Uwe Brauer
2022-12-15 13:34 ` Uwe Brauer
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).