Re: [O] [GSoC] Org Merge Driver Update

2012-08-25 Thread Simon Thum

Hi Andrew,

I finally got to code a bit and tried clang on the merge driver. BTW you 
should probably mention prerequisites like gcc 4.7.


clang suggests your syntax is C11/requires a c++-style ODR. Also there 
is one error and numerous warnings you might want to fix.


HTH,

Simon

clang -DHAVE_CONFIG_H -I. -I..-O0 -I../gnulib/lib -g -O2 -MT oo 
`test -f 'org_heading.c' || echo './'`org_heading.c

In file included from org_heading.c:34:
In file included from ./doc_elt.h:28:
In file included from ./doc_elt_ops.h:29:
./doc_ref.h:54:3: warning: redefinition of typedef 'doc_ref' is a
} doc_ref;
  ^
./doc_ref.h:31:24: note: previous definition is here 


typedef struct doc_ref doc_ref;
   ^
./doc_ref.h:203:37: warning: format specifies type 'int' but the 
argument has type 'doc_elt *' (aka 'st

  printf (checking parent par=%d, ref=%d\n,
   ~^
./doc_ref.h:203:45: warning: format specifies type 'int' but the 
argument has type 'doc_elt *' (aka 'st

  printf (checking parent par=%d, ref=%d\n,
   ~^
In file included from org_heading.c:34: 


In file included from ./doc_elt.h:28:
./doc_elt_ops.h:32:24: warning: redefinition of typedef 'doc_elt' is a 
C11 feature [-Wtypedef-redefinit

typedef struct doc_elt doc_elt;
   ^
./doc_ref.h:29:24: note: previous definition is here 


typedef struct doc_elt doc_elt;
   ^
In file included from org_heading.c:34: 


In file included from ./doc_elt.h:28:
./doc_elt_ops.h:34:27: warning: redefinition of typedef 'print_ctxt' is 
a C11 feature [-Wtypedef-redefinitio

typedef struct print_ctxt print_ctxt;
  ^
./print_ctxt.h:69:3: note: previous definition is here 


} print_ctxt;
  ^
In file included from org_heading.c:34: 


In file included from ./doc_elt.h:28:
./doc_elt_ops.h:38:27: warning: redefinition of typedef 'merge_ctxt' is 
a C11 feature [-Wtypedef-redefinitio

typedef struct merge_ctxt merge_ctxt;
  ^
./doc_ref.h:30:27: note: previous definition is here 


typedef struct merge_ctxt merge_ctxt;
  ^
In file included from org_heading.c:34: 


In file included from ./doc_elt.h:28:
./doc_elt_ops.h:40:24: warning: redefinition of typedef 'doc_ref' is a 
C11 feature [-Wtypedef-redefinit

typedef struct doc_ref doc_ref;
   ^
./doc_ref.h:54:3: note: previous definition is here 


} doc_ref;
  ^
In file included from org_heading.c:34: 


In file included from ./doc_elt.h:31:
./merge_ctxt.h:35:31: warning: redefinition of typedef 'gl_list_t' is a 
C11 feature [-Wtypedef-redefinition]

typedef struct gl_list_impl * gl_list_t;
  ^
../gnulib/lib/gl_list.h:111:31: note: previous definition is here 


typedef struct gl_list_impl * gl_list_t;
  ^
In file included from org_heading.c:34: 


In file included from ./doc_elt.h:31:
./merge_ctxt.h:45:3: warning: redefinition of typedef 'merge_ctxt' is a 
C11 feature [-Wtypedef-redefinition]

} merge_ctxt;
  ^
./doc_elt_ops.h:38:27: note: previous definition is here 


typedef struct merge_ctxt merge_ctxt;
  ^
In file included from org_heading.c:34: 


In file included from ./doc_elt.h:33:
./parse_ctxt.h:30:31: warning: redefinition of typedef 'gl_list_t' is a 
C11 feature [-Wtypedef-redefinition]

typedef struct gl_list_impl * gl_list_t;
  ^
./merge_ctxt.h:35:31: note: previous definition is here 


typedef struct gl_list_impl * gl_list_t;
  ^
In file included from org_heading.c:34: 

./doc_elt.h:36:24: warning: redefinition of typedef 'smerger' is a C11 
feature [-Wtypedef-redefinition]

typedef struct smerger smerger;
   ^
./merge_ctxt.h:38:24: note: previous definition is here 


typedef struct smerger smerger;
   ^
In file included from org_heading.c:34: 


./doc_elt.h:51:3: warning: redefinition of typedef 'doc_elt' is a
} doc_elt;
  ^
./doc_elt_ops.h:32:24: note: previous definition is here 


typedef struct doc_elt doc_elt;
   ^
In file included from org_heading.c:34: 


./doc_elt.h:57:3: warning: redefinition of typedef 'doc_key' is a
} doc_key;
  ^
./doc_elt_ops.h:36:24: note: previous definition is here 


typedef struct doc_key doc_key;
   ^
In file included from org_heading.c:34: 


./doc_elt.h:153:1: warning: control reaches end of non-void functi
}
^
In file included from org_heading.c:36: 

./doc_elt_util.h:85:3: warning: redefinition of typedef 'substr' is a 
C11 feature [-Wtypedef-redefinitio

} substr;
  ^
./doc_elt_util.h:72:23: note: previous definition is here 


typedef struct substr substr;
  ^
./doc_elt_util.h:109:37: warning: format specifies type 'int' but the 
argument has type 'size_t' (aka 'unsigned

  debug_msg (DOC_ELT, 5, a.length=%d b.length=%d  

Re: [O] [GSoC] Org Merge Driver Update

2012-08-18 Thread Andrew Young
Hello Simon,

On Fri, Aug 17, 2012 at 10:09 PM, Simon Thum simon.t...@gmx.de wrote:
 Hi Andrew,

 sorry to report less exciting things. I could not compile - the repo
 contains two invalid links into my system:

 lrwxrwxrwx 1 simon users38 Aug 18 04:01 tap-driver.sh -
 /usr/share/automake-1.12/tap-driver.sh
 lrwxrwxrwx 1 simon users36 Aug 18 04:01 test-driver -
 /usr/share/automake-1.12/test-driver

 I'm on gentoo and do not have automake 1.12. Using a link not the right
 thing IMO.


I believe I've fixed the issue, I hadn't realized they were links.
They should be updated with the actual files now. Thanks for reporting
it.

 II removed those from being referenced in source files and came farther,
 only for gcc to balk on

 doc_ref.h:54:3: error: redefinition of typedef ‘doc_ref’
 doc_ref.h:31:24: note: previous declaration of ‘doc_ref’ was here
 doc_ref.h: In function ‘doc_ref_check_for_circular_conflict’:

 and other such occurrences.

 I'm not sure about the cause, but maybe typedefs conflict with struct names?


It seems that a lot of my typedefs may not be valid c, but are
accepted by newer versions of gcc and some other compilers. I only get
a warning if I enable -pedantic using gcc version 4.7.1 20120721
(prerelease) (GCC).

I'm in the process of cleaning up my headers and should have something
for you soon. In the meantime, I believe upgrading gcc should make the
issue disappear. Let me know if I'm completely wrong :-)

 HTH,

 Simon

Thanks for trying out the merge driver. it's much appreciated.

Sincerely,
Andrew



Re: [O] [GSoC] Org Merge Driver Update

2012-08-17 Thread Simon Thum

Hi Andrew,

sorry to report less exciting things. I could not compile - the repo 
contains two invalid links into my system:


lrwxrwxrwx 1 simon users38 Aug 18 04:01 tap-driver.sh - 
/usr/share/automake-1.12/tap-driver.sh
lrwxrwxrwx 1 simon users36 Aug 18 04:01 test-driver - 
/usr/share/automake-1.12/test-driver


I'm on gentoo and do not have automake 1.12. Using a link not the right 
thing IMO.


II removed those from being referenced in source files and came farther, 
only for gcc to balk on


doc_ref.h:54:3: error: redefinition of typedef ‘doc_ref’
doc_ref.h:31:24: note: previous declaration of ‘doc_ref’ was here
doc_ref.h: In function ‘doc_ref_check_for_circular_conflict’:

and other such occurrences.

I'm not sure about the cause, but maybe typedefs conflict with struct names?

HTH,

Simon

On 08/14/2012 01:15 AM, Andrew Young wrote:

Hello Everyone,

I've been working on a merge driver for org-mode documents over the
summer as a Google Summer of Code project. I just wanted to show
everyone some progress on the merge driver.

There are some new examples you can see at the project page [1][2], and
instructions on how to build and use it.

the source is available here: git clone git://orgmode.org/org-merge-driver.git

I'd really appreciate if anyone could take the merge driver out for a
test spin, and come back with any kind of feedback, such as:

- file output
- customization
- the user interface
- the merging rules
- new features and element specific support
- testing
- neat ideas, etc.

There is only about a week left in GSoC, but I'm planning to continue to
develop the merge driver past the end of GSoC.

Please take a look, and thanks,

Andrew Young

[1] project page:
http://orgmode.org/worg/org-contrib/gsoc2012/student-projects/git-merge-tool/
[2] examples:
http://orgmode.org/worg/org-contrib/gsoc2012/student-projects/git-merge-tool/examples.html







Re: [O] [GSoC] Org Merge Driver Update

2012-08-16 Thread Andrew Young
Hi,
On Wed, Aug 15, 2012 at 1:04 PM, Eric Schulte eric.schu...@gmx.com wrote:
 I'm very excited to start using this merge driver.  I've put together an
 Arch Linux User Repository (aur) package, which can be used by Arch
 Linux users to install the org-merge-driver with pacman.  It is
 available at [1],

Thank you so much for doing this! I'm also an Arch Linux user, and am
now using your package as well!

 if others find it useful and if Andrew doesn't object
 I'd be happy to push it into the official aur database.  It is very
 simple and installs directly from git.


Yes, of course I don't mind.  This would be _awesome_.

I just installed OMD through your package. Pretty exciting for
me! It took me a little bit to realize the linked file was not
corrupted ;), but HTML to the new package.

Regarding the gnulib dependency:

I have included the Gnulib sources which my project depends on
directly into the git repository. Because of this, gnulib shouldn't be
nessecary to build. I've done this for two main reasons:

1. I thought that would make the dependencies easier on everyone else
   to build and install.

2. I believe I've uncovered a bug in one of the sources I'm using, and
   so for the time being I'm using a slightly edited version.

I'm really not sure what the standard is for using GnuLib in a
project. I think that distributing Gnulib dependencies directly with a
project may be typical, given that it is used at the source level. (If
anyone has any opinion on this, please share)

For the time being, it may be best to leave Gnulib out as dependency,
until I find out what to do. Re-importing Gnulib modules may
reintroduce the problem I was having.

 I spent some time testing this locally and I've run into what appears to
 be an error.  Namely when merging a tree with multiple new sub-headings
 the merge completes successfully, but the subheadings from the OTHER
 branch are deleted by the merge.  Here [2] is a tarball of the entire
 git directory after the failed merge.  Please let me know if there is
 any other debug information I can provide.


Thank you for letting me know, and your detailed example.  This should
be fixed now, along with some other issues.

 Thanks,

 Footnotes:
 [1]  http://cs.unm.edu/~eschulte/data/org-merge-driver-20120815-1.src.tar.gz

 [2]  http://cs.unm.edu/~eschulte/data/fruit-test.tar.bz2

 --
 Eric Schulte
 http://cs.unm.edu/~eschulte

Thanks again for doing all this, it's really appreciated!

Sincerely,
Andrew Young



Re: [O] [GSoC] Org Merge Driver Update

2012-08-16 Thread Eric Schulte
Andrew Young younga...@gmail.com writes:

 Hi,
 On Wed, Aug 15, 2012 at 1:04 PM, Eric Schulte eric.schu...@gmx.com wrote:
 I'm very excited to start using this merge driver.  I've put together an
 Arch Linux User Repository (aur) package, which can be used by Arch
 Linux users to install the org-merge-driver with pacman.  It is
 available at [1],

 Thank you so much for doing this! I'm also an Arch Linux user, and am
 now using your package as well!

 if others find it useful and if Andrew doesn't object
 I'd be happy to push it into the official aur database.  It is very
 simple and installs directly from git.


 Yes, of course I don't mind.  This would be _awesome_.

 I just installed OMD through your package. Pretty exciting for
 me! It took me a little bit to realize the linked file was not
 corrupted ;), but HTML to the new package.

 Regarding the gnulib dependency:

 I have included the Gnulib sources which my project depends on
 directly into the git repository. Because of this, gnulib shouldn't be
 nessecary to build. I've done this for two main reasons:

 1. I thought that would make the dependencies easier on everyone else
to build and install.

 2. I believe I've uncovered a bug in one of the sources I'm using, and
so for the time being I'm using a slightly edited version.

 I'm really not sure what the standard is for using GnuLib in a
 project. I think that distributing Gnulib dependencies directly with a
 project may be typical, given that it is used at the source level. (If
 anyone has any opinion on this, please share)


I don't know about this personally, but from the gnulib site [1], this
sounds like the intended method of use.


 For the time being, it may be best to leave Gnulib out as dependency,
 until I find out what to do. Re-importing Gnulib modules may
 reintroduce the problem I was having.


I'll remove 'gnulib' from the dependencies and remove the libtool
portion of the build sequence.


 I spent some time testing this locally and I've run into what appears to
 be an error.  Namely when merging a tree with multiple new sub-headings
 the merge completes successfully, but the subheadings from the OTHER
 branch are deleted by the merge.  Here [2] is a tarball of the entire
 git directory after the failed merge.  Please let me know if there is
 any other debug information I can provide.


 Thank you for letting me know, and your detailed example.  This should
 be fixed now, along with some other issues.


Yes, I can confirm that this now works for me.


 Thanks,

 Footnotes:
 [1]  http://cs.unm.edu/~eschulte/data/org-merge-driver-20120815-1.src.tar.gz

 [2]  http://cs.unm.edu/~eschulte/data/fruit-test.tar.bz2

 --
 Eric Schulte
 http://cs.unm.edu/~eschulte

 Thanks again for doing all this, it's really appreciated!


My pleasure, I've now submitted this package to the AUR database [2].

Cheers,


 Sincerely,
 Andrew Young



Footnotes: 
[1]  http://www.gnu.org/software/gnulib/ (end of third paragraph)

[2]  https://aur.archlinux.org/packages.php?ID=62052

-- 
Eric Schulte
http://cs.unm.edu/~eschulte



Re: [O] [GSoC] Org Merge Driver Update

2012-08-15 Thread Eric Schulte
Andrew Young younga...@gmail.com writes:

 Hello Everyone,

 I've been working on a merge driver for org-mode documents over the
 summer as a Google Summer of Code project. I just wanted to show
 everyone some progress on the merge driver.

 There are some new examples you can see at the project page [1][2], and
 instructions on how to build and use it.

 the source is available here: git clone git://orgmode.org/org-merge-driver.git

 I'd really appreciate if anyone could take the merge driver out for a
 test spin, and come back with any kind of feedback, such as:

 - file output
 - customization
 - the user interface
 - the merging rules
 - new features and element specific support
 - testing
 - neat ideas, etc.

 There is only about a week left in GSoC, but I'm planning to continue to
 develop the merge driver past the end of GSoC.

 Please take a look, and thanks,

 Andrew Young

 [1] project page:
 http://orgmode.org/worg/org-contrib/gsoc2012/student-projects/git-merge-tool/
 [2] examples:
 http://orgmode.org/worg/org-contrib/gsoc2012/student-projects/git-merge-tool/examples.html


I'm very excited to start using this merge driver.  I've put together an
Arch Linux User Repository (aur) package, which can be used by Arch
Linux users to install the org-merge-driver with pacman.  It is
available at [1], if others find it useful and if Andrew doesn't object
I'd be happy to push it into the official aur database.  It is very
simple and installs directly from git.

I spent some time testing this locally and I've run into what appears to
be an error.  Namely when merging a tree with multiple new sub-headings
the merge completes successfully, but the subheadings from the OTHER
branch are deleted by the merge.  Here [2] is a tarball of the entire
git directory after the failed merge.  Please let me know if there is
any other debug information I can provide.

Thanks,

Footnotes: 
[1]  http://cs.unm.edu/~eschulte/data/org-merge-driver-20120815-1.src.tar.gz

[2]  http://cs.unm.edu/~eschulte/data/fruit-test.tar.bz2

-- 
Eric Schulte
http://cs.unm.edu/~eschulte



Re: [O] [GSoC] Org Merge Driver Update

2012-08-15 Thread Bastien
Eric Schulte eric.schu...@gmx.com writes:

 I'm very excited to start using this merge driver.  I've put together an
 Arch Linux User Repository (aur) package, which can be used by Arch
 Linux users to install the org-merge-driver with pacman.  It is
 available at [1], if others find it useful and if Andrew doesn't object
 I'd be happy to push it into the official aur database.  It is very
 simple and installs directly from git.

Hey!  That's nice -- ArchLinux user here.  I installed the package
correctly.  +1 for adding it to AUR.

Thanks!

-- 
 Bastien



Re: [O] [GSoC] Org Merge Driver Update

2012-08-15 Thread Rasmus
Eric Schulte eric.schu...@gmx.com writes:

 I'm very excited to start using this merge driver.  I've put together an
 Arch Linux User Repository (aur) package, which can be used by Arch
 Linux users to install the org-merge-driver with pacman.  It is
 available at [1], if others find it useful and if Andrew doesn't object
 I'd be happy to push it into the official aur database.  It is very
 simple and installs directly from git.

you should add gnulib, it would seem (as a makedepends?).  At least
gnulib-tool isn't on my system. 

makedepends=('git' 'autoconf' 'gnulib')

Also, installing local is kind of non-default (IMO). . . 

$ pacman -Ql org-merge-driver 
  org-merge-driver /usr/
  org-merge-driver /usr/local/
  org-merge-driver /usr/local/bin/
  org-merge-driver /usr/local/bin/org-merge-driver
  org-merge-driver /usr/local/share/
  org-merge-driver /usr/local/share/doc/
  org-merge-driver /usr/local/share/doc/org-merge-driver/
  org-merge-driver /usr/local/share/doc/org-merge-driver/README

Thus, conditional on my taste I'd build like:

  ## Build
  msg Building...
  cd $_gitname
  gnulib-tool --add-import
  autoreconf -i
  ./configure --prefix=/usr ## added prefix
  make

It's also encouraged to use -git in the name, but I don't always
follow it. . .

I have a couple of local org `addons' that I never managed to push to
the AUR, but I encourage you to push the merge drive.

BTW: I would have never seen that I can use this for my hg had you not
published the package here!

–Rasmus

-- 
Don't panic!!!




[O] [GSoC] Org Merge Driver Update

2012-08-13 Thread Andrew Young
Hello Everyone,

I've been working on a merge driver for org-mode documents over the
summer as a Google Summer of Code project. I just wanted to show
everyone some progress on the merge driver.

There are some new examples you can see at the project page [1][2], and
instructions on how to build and use it.

the source is available here: git clone git://orgmode.org/org-merge-driver.git

I'd really appreciate if anyone could take the merge driver out for a
test spin, and come back with any kind of feedback, such as:

- file output
- customization
- the user interface
- the merging rules
- new features and element specific support
- testing
- neat ideas, etc.

There is only about a week left in GSoC, but I'm planning to continue to
develop the merge driver past the end of GSoC.

Please take a look, and thanks,

Andrew Young

[1] project page:
http://orgmode.org/worg/org-contrib/gsoc2012/student-projects/git-merge-tool/
[2] examples:
http://orgmode.org/worg/org-contrib/gsoc2012/student-projects/git-merge-tool/examples.html