From: Michael Brand <michael.ch.brand@gmail.com>
To: Org Mode <emacs-orgmode@gnu.org>
Cc: Jason Dunsmore <emacs-orgmode@dunsmor.com>,
Andrea Crotti <andrea.crotti.0@gmail.com>,
Carsten Dominik <carsten.dominik@gmail.com>
Subject: Re: git diff: hunk header config
Date: Sat, 20 Aug 2011 18:12:59 +0200 [thread overview]
Message-ID: <CALn3zogfG79RnnRiTfu5jTLaDyezYcyQj8OiibZagTUkAJifjQ@mail.gmail.com> (raw)
In-Reply-To: <CALn3zog7-H3O_1At_Dux2NCFOXq7iAupSbLE4KWge+jQNjT8dA@mail.gmail.com>
Hi all
1) Since there has been no feedback yet I'd like to bump my previous
post repeated below. I would like to have the config of the repo
orgmode.org/org-mode.git to be extended to support more useful diff
hunk headers containing e. g. the prototype of the current function
for *.el files. Like
"@@ -12991,7 +12991,7 @@ (defun org-align-tags-here (to-col)"
instead of the current
"@@ -12991,7 +12991,7 @@ If ONOFF is `on' or `off', don't toggle but set to thi"
Can this be done in the repo orgmode.org/org-mode.git at all?
Effective for everyone after only git pull?
2) Note: Also a config of git, but for diff of crypted Org files is
shown at the end of this recent post:
http://thread.gmane.org/gmane.emacs.orgmode/45781/focus=45938
Michael
On Sun, Jul 31, 2011 at 13:49, Michael Brand <michael.ch.brand@gmail.com> wrote:
> 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
next prev parent reply other threads:[~2011-08-20 16:13 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-31 11:49 git diff: hunk header config Michael Brand
2011-08-20 16:12 ` Michael Brand [this message]
2011-08-20 21:47 ` suvayu ali
2011-08-24 10:39 ` Bastien
2011-08-24 19:20 ` Michael Brand
2011-08-24 19:37 ` Achim Gratz
2011-08-27 9:15 ` Michael Brand
2011-08-27 9:44 ` Achim Gratz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CALn3zogfG79RnnRiTfu5jTLaDyezYcyQj8OiibZagTUkAJifjQ@mail.gmail.com \
--to=michael.ch.brand@gmail.com \
--cc=andrea.crotti.0@gmail.com \
--cc=carsten.dominik@gmail.com \
--cc=emacs-orgmode@dunsmor.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.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).