From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Brand Subject: git diff: hunk header config Date: Sun, 31 Jul 2011 13:49:09 +0200 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Return-path: Received: from eggs.gnu.org ([140.186.70.92]:57822) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QnUW8-0006Jw-I3 for emacs-orgmode@gnu.org; Sun, 31 Jul 2011 07:49:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QnUW7-0000HT-L2 for emacs-orgmode@gnu.org; Sun, 31 Jul 2011 07:49:12 -0400 Received: from mail-wy0-f169.google.com ([74.125.82.169]:44936) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QnUW7-0000HK-Bj for emacs-orgmode@gnu.org; Sun, 31 Jul 2011 07:49:11 -0400 Received: by wyg36 with SMTP id 36so1207172wyg.0 for ; Sun, 31 Jul 2011 04:49:09 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Org Mode Hi all I suggest to change the config of git diff in the org-mode.git repo to the more helpful hunk header (the @@...@@ line) style: #+begin_src diff @@ -12991,7 +12991,7 @@ (defun org-align-tags-here (to-col) (goto-char (match-beginning 1)) (insert " ") (delete-region (point) (1+ (match-beginning 2))) - (setq ncol (max (1+ (current-column)) + (setq ncol (max (current-column) (1+ col) (if (> to-col 0) to-col #+end_src which is similar to GNU diff -p/--show-c-function. The current, not configured default "style" is: #+begin_src diff @@ -12991,7 +12991,7 @@ If ONOFF is `on' or `off', don't toggle but set to thi (goto-char (match-beginning 1)) (insert " ") (delete-region (point) (1+ (match-beginning 2))) - (setq ncol (max (1+ (current-column)) + (setq ncol (max (current-column) (1+ col) (if (> to-col 0) to-col #+end_src Would that be commonly welcome for at least firstly Emacs Lisp and texinfo? If yes, the following is to be added to the org-mode.git repo: 1) new file .gitattributes: #+begin_src *.el diff=el *.texi diff=texinfo #+end_src 2) append to .git/config: #+begin_src [diff "el"] xfuncname = "^(\\(def[a-z]+ .+)$" [diff "texinfo"] xfuncname="^(@(sub)*section.*)$" #+end_src I hope that somebody can do this in the repo in such a way that it will be effective after git pull and git clone automatically, so that nobody has to care about later. Michael