logoalt Hacker News

k_bxtoday at 5:45 AM10 repliesview on HN

> — Sensible file handling: backups and auto-saves in a cache/ directory, recentf for recent files, clean buffer naming with uniquify

It's crazy to me how out of the box when you edit nginx file at /etc/nginx/sites-enabled/foo it creates another file foo~ there and nginx tries to load that too

When I tried to ask emacs reddit community they started attacking me for changing the default that only I need and fits everyone perfectly.

Still can't believe I'm the only one finding that default amazingly bad.


Replies

praptaktoday at 9:11 AM

I also set create-lockfiles to nil. I think you can theoretically keep the lockfiles and the clean directory by using lock-file-name-transforms to place the lockfiles somewhere sensible but I didn't bother.

Without this I had to be careful not to acciddentally commit stuff like ".#filename.txt".

babytoday at 5:58 AM

I raise you my .DS_store

AJRFtoday at 9:28 AM

Surprised to hear people told you not to change that - one of the earliest bits of advice I got on using emacs is to set the location of those files to a hidden directory in your home folder.

show 1 reply
parastitoday at 8:42 AM

I would fault nginx here instead. Tilde-suffixed backups is an old convention used by vim and emacs among others. Definitely older than nginx.

show 1 reply
e40today at 6:38 AM

Been using gnu emacs since the 80s and it’s one of the first things I changed. Did you figure it out? If not I can dig up the answer tomorrow.

show 1 reply
bandramitoday at 7:24 AM

(setq backup-directory-alist '(("." . "~/.emacs.d/backups/")))

First thing I do any time I install emacs.

Note that tramp will kvetch if you do this, but it still works fine.

draxiltoday at 8:36 AM

emacs users who are hostile to you configuring things, aren't really getting the point IMO :)

show 1 reply
globular-toasttoday at 6:39 AM

This was one of the very first things I added to my config over a decade ago:

    (setq backup-directory-alist '(("." . ".~")))
shevy-javatoday at 6:50 AM

I always disable those auto-backup-files features in any editor I use. Never understood why that was the default-on for so many editors.

show 3 replies