From: Thierry Banel <tbanelwebmin@free.fr>
To: emacs-orgmode@gnu.org
Subject: Re: auto-backing up your .emacs
Date: Sat, 21 Dec 2013 16:16:20 +0000 (UTC) [thread overview]
Message-ID: <loom.20131221T171137-240@post.gmane.org> (raw)
In-Reply-To: 20131221142330.4927760a@london
Sharon Kimble <boudiccas <at> talktalk.net> writes:
>
> Can somebody help me please, I want to put this line into my .emacs -
> 'cp ~/.emacs ~/.emacs.d/.emacs-$(date +%Y%m%d-%R)' but it works as part
> of a bash script, but I don’t know elisp to get it working in my .emacs.
> What it does is save a dated and timed copy of your .emacs in your
> ~/.emacs.d so that when you're trying things out and learning how to
> use .emacs you'll always have a backup copy. A case in point, last
> night I had org2blog working, today, after fiddling its stopped
> working, but if I'd had this operational I could just revert to a known
> and working .emacs. So, can you help please?
>
> Thanks
> Sharon.
Hi Sharon
Emacs already have a builtin file version control.
If you use Emacs itself to edit your .emacs,
it will most likely create a .emacs~, which is a backup.
This is controlled by the variable make-backup-files.
Add this line to your .emacs:
(setq make-backup-files t)
You may want to have several backup files.
They will be numbered with names like .emacs.~7~
Then add this line to your .emacs:
(setq version-control t)
Of course this works for all files visited by Emacs, not only .emacs.
Look at the documentation:
within Emacs, type C-h i
then navigate to
Emacs > Files > Saving > Backup
Have fun
next prev parent reply other threads:[~2013-12-21 16:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-21 14:23 auto-backing up your .emacs Sharon Kimble
2013-12-21 14:50 ` Nathan DeGruchy
2013-12-21 16:12 ` Alexander Baier
2013-12-21 16:16 ` Thierry Banel [this message]
2013-12-21 17:07 ` Sharon Kimble
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.20131221T171137-240@post.gmane.org \
--to=tbanelwebmin@free.fr \
--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).