emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* auto-backing up your .emacs
@ 2013-12-21 14:23 Sharon Kimble
  2013-12-21 14:50 ` Nathan DeGruchy
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Sharon Kimble @ 2013-12-21 14:23 UTC (permalink / raw)
  To: emacs-orgmode@gnu.org

[-- Attachment #1: Type: text/plain, Size: 904 bytes --]


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.
-- 
A taste of linux = http://www.sharons.org.uk
efever = http://www.efever.blogspot.com/
efever = http://sharon04.livejournal.com/
my git repo = https://bitbucket.org/boudiccas/dots
Debian testing, Fluxbox 1.3.5, LibreOffice 4.1.3.2
Registered Linux user 561944

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: auto-backing up your .emacs
  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
  2 siblings, 0 replies; 5+ messages in thread
From: Nathan DeGruchy @ 2013-12-21 14:50 UTC (permalink / raw)
  To: Sharon Kimble; +Cc: emacs-orgmode@gnu.org

[-- Attachment #1: Type: text/plain, Size: 1195 bytes --]

You should look into version control, like Git. It makes this process easy and integrates with Emacs with the Magit package. 

Nathan DeGruchy
nathan@degruchy.org

> On Dec 21, 2013, at 9:23 AM, Sharon Kimble <boudiccas@talktalk.net> wrote:
> 
> 
> 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.
> -- 
> A taste of linux = http://www.sharons.org.uk
> efever = http://www.efever.blogspot.com/
> efever = http://sharon04.livejournal.com/
> my git repo = https://bitbucket.org/boudiccas/dots
> Debian testing, Fluxbox 1.3.5, LibreOffice 4.1.3.2
> Registered Linux user 561944

[-- Attachment #2: Type: text/html, Size: 1942 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: auto-backing up your .emacs
  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
  2 siblings, 0 replies; 5+ messages in thread
From: Alexander Baier @ 2013-12-21 16:12 UTC (permalink / raw)
  To: Sharon Kimble; +Cc: emacs-orgmode@gnu.org

You could look into the backup utilities that emacs provides out of the
box.  See the manual for further explanation: (info "(Emacs) Backup").

On 2013-12-21 15:23 Sharon Kimble wrote:
> 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.

HTH,
--
 Alexander Baier

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: auto-backing up your .emacs
  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
  2013-12-21 17:07   ` Sharon Kimble
  2 siblings, 1 reply; 5+ messages in thread
From: Thierry Banel @ 2013-12-21 16:16 UTC (permalink / raw)
  To: emacs-orgmode

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: auto-backing up your .emacs
  2013-12-21 16:16 ` Thierry Banel
@ 2013-12-21 17:07   ` Sharon Kimble
  0 siblings, 0 replies; 5+ messages in thread
From: Sharon Kimble @ 2013-12-21 17:07 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1966 bytes --]

On Sat, 21 Dec 2013 16:16:20 +0000 (UTC)
Thierry Banel <tbanelwebmin@free.fr> wrote:

> 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 
> 
Thanks for this. I called up the package menu and found
'backup-each-save' so I've installed that to try out. Hopefully it will
work okay, but time will tell :)

Sharon.
-- 
A taste of linux = http://www.sharons.org.uk
efever = http://www.efever.blogspot.com/
efever = http://sharon04.livejournal.com/
my git repo = https://bitbucket.org/boudiccas/dots
Debian testing, Fluxbox 1.3.5, LibreOffice 4.1.3.2
Registered Linux user 561944

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-12-21 17:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2013-12-21 17:07   ` Sharon Kimble

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).