unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#6745: 24.0.50; vc-annotate should allow to configure the width of blame info
@ 2010-07-28 14:55 Aneesh Kumar K.V
  2022-05-09 16:16 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 6+ messages in thread
From: Aneesh Kumar K.V @ 2010-07-28 14:55 UTC (permalink / raw)
  To: 6745


This is with vc-git.el. With C-x v g it would be nice to be able to
customize the width of blame info. That allows to see both the code
and associate sha1 on the same window. Another option is to display the
source and commit in separate window thereby being able to scroll
them. But this have the issue that we will not be able to search both
the blame information and source at the same time. Limiting blame info
to a configuration 'x' character seems to be a nice trade off.

-aneesh






^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#6745: 24.0.50; vc-annotate should allow to configure the width of blame info
  2010-07-28 14:55 bug#6745: 24.0.50; vc-annotate should allow to configure the width of blame info Aneesh Kumar K.V
@ 2022-05-09 16:16 ` Lars Ingebrigtsen
  2022-05-09 18:35   ` Lars Ingebrigtsen
                     ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Lars Ingebrigtsen @ 2022-05-09 16:16 UTC (permalink / raw)
  To: Aneesh Kumar K.V; +Cc: 6745, Dmitry Gutov

aneesh.kumar@linux.vnet.ibm.com (Aneesh Kumar K.V) writes:

> This is with vc-git.el. With C-x v g it would be nice to be able to
> customize the width of blame info. That allows to see both the code
> and associate sha1 on the same window.

Yes, that would be great.  It has also been suggested that all the VC
backends should use the same format, and I think that could be done at
the same time.  (Even if they don't all have the same data available,
they generally have much in common.)

But to do that, I think we'd have to rework how vc-*-annotate-command
works.  I think they basically work by running the "blame" command for
the VC in a buffer, and then parsing/fontifying the output a bit?

To allow regularisation (and user customisation) of the output, I think
we'd have to redo that completely.  Instead the backends would dump the
output to a temp dir, we'd parse it completely, add it to some
structure, and then output the data into a buffer in the format we want.
(Something that looks a bit like tabulated-list-mode, but where the user
can, for instance, use commands to make columns disappear and appear as
they wish.)

I think that's more than doable, and worth doing.

I wonder whether anybody's had any concrete ideas in this direction
before (so I've added Dmitry to the CCs).

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#6745: 24.0.50; vc-annotate should allow to configure the width of blame info
  2022-05-09 16:16 ` Lars Ingebrigtsen
@ 2022-05-09 18:35   ` Lars Ingebrigtsen
  2022-05-11 16:53   ` Juri Linkov
  2022-06-04 18:46   ` Dmitry Gutov
  2 siblings, 0 replies; 6+ messages in thread
From: Lars Ingebrigtsen @ 2022-05-09 18:35 UTC (permalink / raw)
  To: Aneesh Kumar K.V; +Cc: 6745, Dmitry Gutov

Lars Ingebrigtsen <larsi@gnus.org> writes:

> To allow regularisation (and user customisation) of the output, I think
> we'd have to redo that completely.  Instead the backends would dump the
> output to a temp dir, we'd parse it completely, add it to some
> structure, and then output the data into a buffer in the format we want.

We wouldn't have to implement this for all the backends -- we could bind
`C-x v g' to a command that does new-style annotations if the backend
supports it, and fall back to the current functions if they don't.

Oh, and we could also implement annotations for just a narrowed-to
region while we're at it.  (This has also been requested a few times.)

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#6745: 24.0.50; vc-annotate should allow to configure the width of blame info
  2022-05-09 16:16 ` Lars Ingebrigtsen
  2022-05-09 18:35   ` Lars Ingebrigtsen
@ 2022-05-11 16:53   ` Juri Linkov
  2022-05-11 18:40     ` Lars Ingebrigtsen
  2022-06-04 18:46   ` Dmitry Gutov
  2 siblings, 1 reply; 6+ messages in thread
From: Juri Linkov @ 2022-05-11 16:53 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 6745, Aneesh Kumar K.V, Dmitry Gutov

> But to do that, I think we'd have to rework how vc-*-annotate-command
> works.  I think they basically work by running the "blame" command for
> the VC in a buffer, and then parsing/fontifying the output a bit?

There is no such problem in the vc-git backend because it shows
short hashes, and also it's possible to make other parts shorter
by customizing vc-git-annotate-switches.





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#6745: 24.0.50; vc-annotate should allow to configure the width of blame info
  2022-05-11 16:53   ` Juri Linkov
@ 2022-05-11 18:40     ` Lars Ingebrigtsen
  0 siblings, 0 replies; 6+ messages in thread
From: Lars Ingebrigtsen @ 2022-05-11 18:40 UTC (permalink / raw)
  To: Juri Linkov; +Cc: 6745, Aneesh Kumar K.V, Dmitry Gutov

Juri Linkov <juri@linkov.net> writes:

> There is no such problem in the vc-git backend because it shows
> short hashes, and also it's possible to make other parts shorter
> by customizing vc-git-annotate-switches.

If you want to make the "name" part 10 characters long (for instance), I
don't think there's any way to do that?  (At least I can't find the
relevant switch after skimming the manual.)

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#6745: 24.0.50; vc-annotate should allow to configure the width of blame info
  2022-05-09 16:16 ` Lars Ingebrigtsen
  2022-05-09 18:35   ` Lars Ingebrigtsen
  2022-05-11 16:53   ` Juri Linkov
@ 2022-06-04 18:46   ` Dmitry Gutov
  2 siblings, 0 replies; 6+ messages in thread
From: Dmitry Gutov @ 2022-06-04 18:46 UTC (permalink / raw)
  To: Lars Ingebrigtsen, Aneesh Kumar K.V; +Cc: 6745

On 09.05.2022 19:16, Lars Ingebrigtsen wrote:
> To allow regularisation (and user customisation) of the output, I think
> we'd have to redo that completely.  Instead the backends would dump the
> output to a temp dir,

               ^ temp buffer, probably

> we'd parse it completely, add it to some
> structure, and then output the data into a buffer in the format we want.
> (Something that looks a bit like tabulated-list-mode, but where the user
> can, for instance, use commands to make columns disappear and appear as
> they wish.)
> 
> I think that's more than doable, and worth doing.
> 
> I wonder whether anybody's had any concrete ideas in this direction
> before (so I've added Dmitry to the CCs).

IIRC there was a similar or related issue where Stefan M. suggested a 
similar course of action.

Nobody has taken up the work yet, though.





^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-06-04 18:46 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-28 14:55 bug#6745: 24.0.50; vc-annotate should allow to configure the width of blame info Aneesh Kumar K.V
2022-05-09 16:16 ` Lars Ingebrigtsen
2022-05-09 18:35   ` Lars Ingebrigtsen
2022-05-11 16:53   ` Juri Linkov
2022-05-11 18:40     ` Lars Ingebrigtsen
2022-06-04 18:46   ` Dmitry Gutov

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).