git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git-blame.el: does not show one-line summary in echo area

From
David Kågedal <davidk@lysator.liu.se>
Date
Feb 4, 2011, 09:53 UTC
Message-ID
<87tygkm8h7.fsf@krank.kagedal.org>
In-Reply-To
<20110204014315.GB28525@elie>
Jonathan Nieder <jrnieder@gmail.com> writes:
Show 38 quoted lines
> Hi David et al,
>
> David Kågedal wrote:
>> Sergei Organov <osv@javad.com> writes:
>
>>> Now, I've evaluated (require 'format-spec) in my Emacs 22 (yes, 22, not
>>> 23), and now git-blame almost works there. The problem I see is that it
>>> doesn't output anything in the echo area. It color-codes the buffer, it
>>> does show correct pop-up when mouse is over a region, but it doesn't
>>> print anything in the echo area when I move cursor through the regions.
>>> Any idea how to debug/fix this?
>>
>> Well, it appears I removed the output to the echo area. I didn't think
>> it worked very well, and the new output format mostly replaces it by
>> showing the hash.
>>
>> There are also technical reasons for removing it (it couldn't be
>> implemented very cleanly).
>
> I don't use git-blame.el ("git blame", "git gui blame", and "git log
> -S/-G" take care of my needs already) but it seems to me that this
> change was a regression.  The emacs support before v1.6.6-rc0~120^2
> had a simple way to find out the purpose of each line of code, while
> after that there is no simple way.  And it is what the README
> promises:
>
>  * git-blame.el:
>
>    Emacs implementation of incremental git-blame.  When you turn it on
>    while viewing a file, the editor buffer will be updated by setting
>    the background of individual lines to a color that reflects which
>    commit it comes from.  And when you move around the buffer, a
>    one-line summary will be shown in the echo area.
>
> Any advice for people who want to fix that?  Is anyone interested in
> doing so?  (It is quite likely I am guessing incorrectly about what is
> useful, but I would imagine that at least the documentation could use
> updating.)

Let's try to figure out how we would like it to work. I agree that the mouseover information is not good enough. There are several things we can do:

1) Use some command to request information about the current line.
   When the command is invoked (bound to some convenient key?), it pops
   up a buffer with the result of "git show <commit>" or similar.
2) Have a separate buffer always showing information about the line
   under the cursor. This should at least be the info in the commit
   object, but going to the diff should be accessible.
3) Showing when you move to a different blame chunk, by showing a
   one-line summary in the echo area.

There are variations and combinations. I think that 1+3 or 2 are the best options.

-- 
David Kågedal
Previous: Jonathan NiederNext: Jakub Narebski
Message 13 of 24 in “git-blame.el: what is format-spec?”
  1. Sergei OrganovDec 4, 2009
  2. Andreas SchwabDec 4, 2009
  3. Sergei OrganovDec 4, 2009
  4. David KågedalDec 4, 2009
  5. Sergei OrganovDec 4, 2009
  6. David KågedalDec 6, 2009
  7. Sergei OrganovDec 7, 2009
  8. David KågedalDec 7, 2009
  9. Alex UnleashedMay 14, 2010
  10. git-blame.el: Add (require 'format-spec)David Kågedal, May 25, 2010
  11. git-blame.el: Add (require 'format-spec)Jonathan Nieder, Oct 29, 2010
  12. git-blame.el: does not show one-line summary in echo areaJonathan Nieder, Feb 4, 2011
  13. David KågedalFeb 4, 2011
  14. Jakub NarebskiFeb 4, 2011
  15. David KågedalFeb 4, 2011
  16. David KågedalFeb 4, 2011
  17. Jonathan NiederFeb 11, 2011
  18. git-blame.el: format of date stringsJonathan Nieder, Feb 11, 2011
  19. Martin NordholtsFeb 11, 2011
  20. git-blame.el: truncate author to avoid jagged left edge of codeJonathan Nieder, Jun 10, 2012
  21. David KågedalJan 29, 2013
  22. Kevin RydeFeb 4, 2011
  23. Andreas SchwabDec 4, 2009
  24. Matthieu MoyDec 4, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.