Re: [O] Store org-files in a git repository?

2012-09-14 Thread Bernt Hansen
Moritz Ulrich mor...@tarn-vedra.de writes:

 A simple cron job for committing doesn't sound that bad anymore ;-)

Hi Moritz,

I use an hourly cron/windows schedule job to make commits when changes
occur in my org files.  My script details are here in case you find it
useful:

http://doc.norang.ca/org-mode.html#GitSync

Regards,
Bernt



Re: [O] Store org-files in a git repository?

2012-09-13 Thread Marcelo de Moraes Serpa

 This calls for a good logging system.
 Something that stores any action you take on a .org file (editing an
 entry, marking it as DONE, clocking it, refiling it, etc.) and that you
 can easily *query*.
 For now the logs are somewhat hackish, more a casual convenience,
 and the actual system is not good for stable parsing.
 That's something I considered working on at some point, but starting
 this before org-element.el was complete was not a good idea.
 Ok, now org-element.el is complete...  :)


This sounds promising, Bastien!

Let us know how it goes.

On Wed, Sep 12, 2012 at 11:52 AM, Samuel Wales samolog...@gmail.com wrote:

 On 9/12/12, Bastien b...@altern.org wrote:
  This calls for a good logging system.

 Of possible tangential relevance for the display part of it: FR:
 inactive timestamps in log mode (and a sorting FR)




Re: [O] Store org-files in a git repository?

2012-09-12 Thread Bastien
Moritz Ulrich mor...@tarn-vedra.de writes:

 My dream setup would be a range of functions hooking into all sorts of
 org-mode hooks, automatically committing changes done via the agenda or
 other org functions together with a context dependent commit message.

This calls for a good logging system.

Something that stores any action you take on a .org file (editing an
entry, marking it as DONE, clocking it, refiling it, etc.) and that you
can easily *query*.

For now the logs are somewhat hackish, more a casual convenience, 
and the actual system is not good for stable parsing.

That's something I considered working on at some point, but starting
this before org-element.el was complete was not a good idea.

Ok, now org-element.el is complete...  :)

-- 
 Bastien



Re: [O] Store org-files in a git repository?

2012-09-12 Thread Samuel Wales
On 9/12/12, Bastien b...@altern.org wrote:
 This calls for a good logging system.

Of possible tangential relevance for the display part of it: FR:
inactive timestamps in log mode (and a sorting FR)



Re: [O] Store org-files in a git repository?

2012-09-11 Thread Achim Gratz
Marcelo de Moraes Serpa writes:
 It'd be nice to see how Google Docs does its versioning and try to
 model something like that for org. I think it's a version per data
 saved. I currently use a cron, but I see some value in versioning
 after each save.

That doesn't solve the problem.  A commit is named commit for a reason:
one assumption is that the change it effects is complete and (in the
case of software) it compiles and runs.  There is good reason not to
infer anything like that from the simple fact that I've saved the file.
In fact, stashes in Git are just recognition that sometimes you simply
don't want to make that commitment, but need to store something away
that is not quite complete.

If you want to see saving is versioning in action, try (open)VMS.  Or
customize Emacs so that it does versioned backup files.  It is
occasionally useful to do that, but just like with RCS, versioning of
single files only gets you so far before things break.


Regards,
Achim.
-- 
+[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]+

Factory and User Sound Singles for Waldorf Q+, Q and microQ:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds




Re: [O] Store org-files in a git repository?

2012-09-10 Thread Moritz Ulrich

Achim Gratz writes:

 Moritz Ulrich writes:
 I plan to put my org directory (where I keep among other my agenda
 files) under version control and would like to have some sort of
 specialized function for that.

 My dream setup would be a range of functions hooking into all sorts of
 org-mode hooks, automatically committing changes done via the agenda or
 other org functions together with a context dependent commit message.

 »The road to hell is paved with good intentions.« — proverb

 What you're proposing (if I understand it correctly) would introduce
 transactions to Org and with it the non-trivial problem of determining
 when a transaction is finished (and started, but that's really another
 one).  Git would merely be the mechanism to record the transactions and
 probably not a good one at that even with the merge driver.

 THat aside, even if it worked I'm sure it would annoy me so much I'd
 switch it off entirely.


 Regards,
 Achim.

I rarely thought about the problem of transactional operations in
org-mode. From the standpoint you mentioned, my dream doesn't look that
nice anymore.

A simple cron job for committing doesn't sound that bad anymore ;-)

Thanks for saving me much work.


Cheers,
Moritz Ulrich

--
Moritz Ulrich


pgpWEUPcO8v7Y.pgp
Description: PGP signature


Re: [O] Store org-files in a git repository?

2012-09-10 Thread Marcelo de Moraes Serpa
It'd be nice to see how Google Docs does its versioning and try to model
something like that for org. I think it's a version per data saved. I
currently use a cron, but I see some value in versioning after each save.

On Mon, Sep 10, 2012 at 5:23 PM, Moritz Ulrich mor...@tarn-vedra.de wrote:


 Achim Gratz writes:

  Moritz Ulrich writes:
  I plan to put my org directory (where I keep among other my agenda
  files) under version control and would like to have some sort of
  specialized function for that.
 
  My dream setup would be a range of functions hooking into all sorts of
  org-mode hooks, automatically committing changes done via the agenda or
  other org functions together with a context dependent commit message.
 
  »The road to hell is paved with good intentions.« — proverb
 
  What you're proposing (if I understand it correctly) would introduce
  transactions to Org and with it the non-trivial problem of determining
  when a transaction is finished (and started, but that's really another
  one).  Git would merely be the mechanism to record the transactions and
  probably not a good one at that even with the merge driver.
 
  THat aside, even if it worked I'm sure it would annoy me so much I'd
  switch it off entirely.
 
 
  Regards,
  Achim.

 I rarely thought about the problem of transactional operations in
 org-mode. From the standpoint you mentioned, my dream doesn't look that
 nice anymore.

 A simple cron job for committing doesn't sound that bad anymore ;-)

 Thanks for saving me much work.


 Cheers,
 Moritz Ulrich

 --
 Moritz Ulrich



Re: [O] Store org-files in a git repository?

2012-09-08 Thread Achim Gratz
Moritz Ulrich writes:
 I plan to put my org directory (where I keep among other my agenda
 files) under version control and would like to have some sort of
 specialized function for that.

 My dream setup would be a range of functions hooking into all sorts of
 org-mode hooks, automatically committing changes done via the agenda or
 other org functions together with a context dependent commit message.

»The road to hell is paved with good intentions.« — proverb

What you're proposing (if I understand it correctly) would introduce
transactions to Org and with it the non-trivial problem of determining
when a transaction is finished (and started, but that's really another
one).  Git would merely be the mechanism to record the transactions and
probably not a good one at that even with the merge driver.

THat aside, even if it worked I'm sure it would annoy me so much I'd
switch it off entirely.


Regards,
Achim.
-- 
+[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]+

Wavetables for the Terratec KOMPLEXER:
http://Synth.Stromeko.net/Downloads.html#KomplexerWaves




[O] Store org-files in a git repository?

2012-09-07 Thread Moritz Ulrich

Hello,

I plan to put my org directory (where I keep among other my agenda
files) under version control and would like to have some sort of
specialized function for that.

My dream setup would be a range of functions hooking into all sorts of
org-mode hooks, automatically committing changes done via the agenda or
other org functions together with a context dependent commit message.

For example, changing a TODO item to DONE would commit this change to
git with the following message:

* Headline title: State changed to 'DONE'

Archiving, refiling, etc. would do similar things.

A use case is automatic, safe synchronization between different machines
and generally having recoverable backups of my org setup.

This setup should work pretty good with org-merge-driver.


Has someone built something comparable to this? I'd like to give it a
try but don't want to reinvent the wheel.


Cheers,
Moritz Ulrich

--
Moritz Ulrich



Re: [O] Store org-files in a git repository?

2012-09-07 Thread Marcelo de Moraes Serpa
I have not done yet, but I do use git for my org repo; however, I commit
every 6 hours via cron (and the commit message is a timestamp). I'm
planning to do something similar to what you described, but I haven't used
org-merged-driver yet. I'll play with it and post my findings, if you do,
let us know how it goes as well!

- Marcelo.

On Fri, Sep 7, 2012 at 6:28 PM, Moritz Ulrich mor...@tarn-vedra.de wrote:


 Hello,

 I plan to put my org directory (where I keep among other my agenda
 files) under version control and would like to have some sort of
 specialized function for that.

 My dream setup would be a range of functions hooking into all sorts of
 org-mode hooks, automatically committing changes done via the agenda or
 other org functions together with a context dependent commit message.

 For example, changing a TODO item to DONE would commit this change to
 git with the following message:

 * Headline title: State changed to 'DONE'

 Archiving, refiling, etc. would do similar things.

 A use case is automatic, safe synchronization between different machines
 and generally having recoverable backups of my org setup.

 This setup should work pretty good with org-merge-driver.


 Has someone built something comparable to this? I'd like to give it a
 try but don't want to reinvent the wheel.


 Cheers,
 Moritz Ulrich

 --
 Moritz Ulrich




Re: [O] Store org-files in a git repository?

2012-09-07 Thread Charles Philip Chan
Marcelo de Moraes Serpa celose...@gmail.com writes:

Hello Marcelo and Moritz:

 I have not done yet, but I do use git for my org repo; however, I
 commit every 6 hours via cron (and the commit message is a timestamp).

I have my org repo under git too. However, instead of a cron job, I use
an after-save-hook:

#+BEGIN_SRC emacs-lisp
;;Git integration
(defun git-commit ()
  (when (eq major-mode 'org-mode)
  (shell-command git commit -a -m 'Auto commit.')))

  (add-hook 'after-save-hook 'git-commit)
#+END_SRC

Also, I am not too sure how practical Moritz's idea is. In order to get
that fine level of commit, org-mode will have to save the file after
each operation.

Cheers,
Charles

-- 
There are no threads in a.b.p.erotica,  so there's no  gain in using a
threaded news reader.
(Unknown source)


pgpeyhmsGPGVM.pgp
Description: PGP signature