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

[PATCH resend] git-blame.el: Add (require 'format-spec)

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Oct 29, 2010, 03:38 UTC
Message-ID
<20101029033809.GA30353@burratino>
In-Reply-To
<87r5l0gkpc.fsf_-_@krank.kagedal.org>
Date: Tue, 25 May 2010 15:44:15 +0200
From: David Kågedal <davidk@lysator.liu.se>

c5022f57 (git-blame.el: Change how blame information is shown, 2009-09-29) taught the "M-x git-blame" mode to format its output in a more interesting way, making use of the format-spec function.

format-spec is included in Emacs 23 and is a useful function. Older emacsen can get it from Gnus. In all emacsen, we need to 'require it before use to avoid warnings:

 git-blame.el:483:1:Warning: the function `format-spec' is not known to be
     defined.
Reported-by: Sergei Organov <osv@javad.com>
Reported-by: Kevin Ryde <user42@zip.com.au>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
David Kågedal wrote:
Show 6 quoted lines
>> On Sun, Dec 6, 2009 at 8:43 PM, David Kågedal <davidk@lysator.liu.se> wrote:
>>> Sergei Organov <osv@javad.com> writes:
>>>> Then there should be (require 'format-spec) in git-blame.el, right? Due
>>>> to:
>>>
>>> Of course. I must have missed that since I already had it loaded.
[...]
>                     here is the patch.

Junio, I think something like this patch is needed for git-blame.el to work correctly. I am no emacs lisp expert, though...

Other observations from that thread are a bit more worrying --- it seems that c5022f57 dropped support for information about the selected commit in the editor buffer, without updating the documentation in contrib/emacs/README to match.

 contrib/emacs/git-blame.el |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/contrib/emacs/git-blame.el b/contrib/emacs/git-blame.el
index 7f4c792..d351cfb 100644
--- a/contrib/emacs/git-blame.el
+++ b/contrib/emacs/git-blame.el
@@ -79,6 +79,7 @@
 ;;; Code:
 
 (eval-when-compile (require 'cl))			      ; to use `push', `pop'
+(require 'format-spec)
 
 (defface git-blame-prefix-face
   '((((background dark)) (:foreground "gray"
-- 
1.7.0.4
Previous: David KågedalNext: Jonathan Nieder
Message 11 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.