Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

One of my favorites is creating a separate backup dir where all backup "~" files are created and versioned and rotated in and out etc at specific intervals, so I no longer get the random files in the dir I'm working in but can still go find backups if I mess something up.

  (setq
   backup-by-copying t      
   backup-directory-alist
    '((".*" . "~/.emacs.d/bu/"))
   delete-old-versions t
   kept-new-versions 6
   kept-old-versions 2
   version-control t)


I already use this in my shrc files:

    alias ls='ls --hide="lost+found" --hide="#*" --hide="*~" --hide="*.pyc" --hide="*.egg-info" --hide="__pycache__" --color=auto'
But I'll be adding your item into my config for the rotated versioning, I wasn't aware that emacs does that but I assume it'll save me anything from few hours to a few weeks yearly. Thanks!


If you like it check out this and see if you like anything else: https://sanemacs.com/sanemacs

or https://www.sandeepnambiar.com/my-minimal-emacs-setup/




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: