News for hackers. Stuff that matters.
Re:Blamer.el: A Git blame plugin for Emacs inspired by VS Co... by TeMPOraL on Monday October 25, 2021 @02:56PM (#28991664)
The way I see it, contextual UIs are nice when they surface useful information; otherwise, they're just noise. Showing blame lines in "prime real estate" for contextual info? I'd personally call this noise. Usually, when I want to see which commits touched what, I want this info over a larger block of code.

I also found that commit header line is near-useless information[0] - it's too short to convey anything interesting. In my experience, almost all commits tend to belong to one of two categories:

1. The whole commit message is in the header line. Meaning the whole commit message is worthless anyway, and I'll have to skim the diff to learn anything.

2. There is a proper, multi-line commit message. That still means the header line alone is of limited utility.

Myself, I use Magit's blame functionality, which pops up a buffer annotating the whole file with blame information, grouping lines belonging to the same commit. That said, I still have fond memories for IntelliJ's blame, which put that data in a fixed-width column on the margin, showing author and date. It also colored the sidebar by commit age[1], which provides something much more useful in terms of contextual data: a qualitative indicator of age of pieces of code in the file. This kind of data is what contextual UIs are best for - data you mostly want to keep in corner of your eye, to get a feel about things.

--

[0] - I still like it displayed, though: it's easier to use as "visual hash" than date, author or commit hash.

[1] - I'm 90% sure this coloring was in IntelliJ, but I might have seen this in a different IDE.

Re:Blamer.el: A Git blame plugin for Emacs inspired by VS Co... by morelisp on Monday October 25, 2021 @03:52PM (#28992284)
> put that data in a fixed-width column on the margin, showing author and date

`magit-blame-cycle-style` (`c` when in blame mode).

> easier to use as "visual hash" than date, author or commit hash.

Seems like it should be possible to color the margin based on the hash to get exactly this rather than a poor approximation, but looking over the blame code you'd need to do it by hacking the overlay after application, it would be nicer if it supported something like `:eval` in the format a la `mode-line-format`.

Re:Blamer.el: A Git blame plugin for Emacs inspired by VS Co... by TeMPOraL on Tuesday October 26, 2021 @05:38AM (#28998269)
> `magit-blame-cycle-style` (`c` when in blame mode).

Thanks for that! This made me check the help for magit-blame and magit-blame-read-only modes, and I discovered various keybindings and features I was unaware of, like removal and reverse-blaming.

But the most important think I just learned is that the styles are customizable, via `magit-blame-styles`. Skimming the docs, it should be trivial to reproduce the kind of visualization I'm looking for.