reddit / emacs

Newbie here: temporary files and startup page

punkelbel · 2022-06-04 06:06
Hi everybody I'm fairly new to emacs and orgmode but I love them both. I've installed emacs on a Mac OS. Two questions: 1. Is there a way not to see the org\~ files? 2. Is there a way, when I open an org file not to see the \*GNU Emacs\* startup page?
MitchellMarquez42 · 2022-06-04 06:33
2. In your init.el put `(setq inhubit-startup-screen t)` There's way more you can do if you want to change behavior based on what kind of file you're opening, but I'll leave that for a future googling session. 1. Take a look at the variables `auto-save-directory`, `create-lockfiles`, and `backup-directory-alist`
abir_valg2718 · 2022-06-04 06:39
> I'm fairly new to emacs One of the best ways to learn is simply to browse through other people's configs. Even if you have limited programming skills (and/or unfamiliar with Lisp), you'll still be able to catch up on quite a lot of things. I also recommend installing Helm or some other completion plugin. The thing is, emacs is relatively self-documenting (it's not perfect though), and what you're looking for is a (find-variable) command. With Helm, which utilizes a narrowing approach based on fuzzy search, you'd be able to type "startup" and you'll immediately see lots of variables with that string in their names. Select one, and it'll open a help window (install helpful to get fancier help). In other words, often you don't need to scratch your head too much, simply searching for something you *suspect* might be there can give you the result, plus it'll have at least some documentation that will help you. As far as your questions, for the inital scratch message: (setq initial-scratch-message nil) also maybe (setq inhibit-startup-message t) For the backups (this is from my config, it might not suite you specifically) (setq backup-directory-alist `(("." . "~/.emacs.d/bak"))) (setq auto-save-file-name-transforms `((".*" "~/.emacs.d/bak/autosaves" t))) (setq delete-old-versions t kept-new-versions 6 kept-old-versions 2 version-control t) you might also want to (setq create-lockfiles nil) but make sure to read what lockfiles are before disabling it, because maybe you do want this feature.
punkelbel · 2022-06-04 06:53
Thank you! How do I edit the init.el? I read [this](https://stackoverflow.com/questions/22219131/customize-emacs-for-mac-osx-app) but I am not able to locate the file
mauguro_ · 2022-06-04 07:07
on you home directory you might find `.emacs.d/init.el`, it's ok if you don't find it, if it isn't created yet, you can create it so you can start configure your emacs
punkelbel · 2022-06-04 07:56
>(setq inhubit-startup-screen t) It worked! I think there's a spelling mistake (inh**i**bit right?) I don't see the startup page anymore! Thank you guys. Now I can google the temp files thing
AnugNef4 · 2022-06-04 14:59
I would suggest reading Help Menu --> Read the Emacs Manual --> Customization --> Init File In emacs you would tap `C-x C-f`, then enter `~/.emacs.d/init.el` to visit init.el in a buffer. You should consider getting familiar with that Help menu and its contents.
dpoggio · 2022-06-06 02:11
I think `make-backup-files` is more relevant. Lock files are a different thing. See https://www.gnu.org/software/emacs/manual/html_node/emacs/Backup.html
vecksagos · 2022-06-07 23:19
i use the package [no-littering](https://github.com/emacscollective/no-littering), it's change the default directory for temporary, backup and others files created by packages to two dir, `.emacs.d/etc/` and `.emacs.d/var/`, so the `.emacs.d/` and buffer directory keep clean from this kind of files