From: Peter BARABAS <peter.barabas+orgmode@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: Keeping your history for org files
Date: Sat, 15 Nov 2008 16:51:45 +0000 (UTC) [thread overview]
Message-ID: <loom.20081115T164658-61@post.gmane.org> (raw)
In-Reply-To: 47F37096.3080705@diplan.de
Rainer Stengele <rainer.stengele <at> diplan.de> writes:
Hello,
> >
> > ------------------------------------------------------------------------
> > * Creating commits automatically
> > ------------------------------------------------------------------------
> >
> > Then I added a cron job on my workstation which commits changes to the
> > repository automagically. I decided commits once per hour is enough for
> > me so I added the following crontab entry:
> >
> > $ crontab -e
> >
> > ,----[ My crontab entry ]
> > | 0 * * * * cd ~/git/org && git add . && git commit -m "$(date)" >/dev/null
> > `----
> >
> > and I'm done. This picks up all my .org and .org_archive files and
> > tracks changes hourly.
> >
> > If I change a file a new commit gets created on the next hour. If
> > nothing changes no commit is created since there is nothing to add.
> >
I'm using a similar setup, but with a hook:
(defun git-commit ()
(when (eq major-mode 'org-mode)
(shell-command "git commit -a -m 'Auto commit.'")))
(add-hook 'after-save-hook 'git-commit)
This way, after I save the file it gets commited.
Regards,
Peter BARABAS.
next prev parent reply other threads:[~2008-11-15 16:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-01 16:26 Keeping your history for org files Bernt Hansen
2008-04-02 11:40 ` Rainer Stengele
2008-11-15 16:51 ` Peter BARABAS [this message]
2008-11-15 18:32 ` Bernt Hansen
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=loom.20081115T164658-61@post.gmane.org \
--to=peter.barabas+orgmode@gmail.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).