emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] git and orgmode: teaching git a bit of orgmode syntax


From: Karl Voit
Subject: [O] git and orgmode: teaching git a bit of orgmode syntax
Date: Tue, 24 Jan 2017 16:17:55 +0100
User-agent: slrn/pre1.0.0-18 (Linux)

Hi!

I am using gitwatch[1] to auto-commit any changes to my org-mode
files in a git repository.

Unfortunately, git does not handle diffs in a meaningful way. For
example, when there are sub-hierarchies added or removed, it ends up
with many diff-lines like the following:

-***** NEXT test with DAVdroid
+* Lesestoff [1/26]                                        :2read:
 :PROPERTIES:
-:CREATED:  [2016-05-08 Sun 12:51]
+:CREATED: [2012-04-17 Tue 10:39]
+:ARCHIVE:  %s_archive::* Lesestoff
+:CATEGORY: reading
 :END:

The two headings being compared by git are totally unrelated. Git
did find a match for the :PROPERTIES: and :END: lines and therefore
assumed that I modified the level five heading "NEXT test with
DAVdroid" into the first level heading "Lesestoff", not recognizing
that in fact, there were many org-mode lines moved to the archive
file, resulting in many deleted lines instead of modified ones.

The underlying issue is, to my understanding, that git does not know
about Org-mode syntax elements. Git does not know that :PROPERTIES:
and :END: lines should not be used to match similar lines. It does
not know about headings, identifying CREATED time-stamps, and other
things.

I am not familiar with git other than from an end user point of
view. But I do think that git can be taught here via some kind of
extension so that meaningful changes are recognized and displayed.

Is there somebody with the same issue and/or somebody with a better
understanding how this issue can be addressed?

Thanks!

[1] https://github.com/nevik/gitwatch


-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
       > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]