Fork me on GitHub
#emacs
<
2020-12-04
>
Charles Fourdrignier10:12:24

An "everyday" Emacs question. What do you use as "empty buffer" when you want to put some writings (long Slack message, ...) in Emacs, but not in a file ? Until now, I tend to use *scratch* disabling elisp-mode (or just ignoring red lines). Is there "better" solutions ?

practicalli-johnny10:12:55

@charles.fourdrignier scratch buffer in fundamental-mode for pasting weird stuff into Emacs... this will prevent Emacs font locking and so shouldn't hurt Emacs or slow it down... or give you red lines:) In Spacemacs you can set the default mode the scratch buffer uses, so I assume there is some variable that can be set to do this globally...

Charles Fourdrignier10:12:54

> pasting weird stuff into Emacs Perfect ! :) Thank you.

practicalli-johnny10:12:10

Yes, its the same in Spacemacs, it sets initial-major-mode to text mode (which also speeds up loading). Although I configure it to use org-mode as I use that for organising content into sections

kimim10:12:03

I also bind F5 key to switch to scratch. When ever I need to write some stuffs, I just press F5 for refresh air.

Eamonn Sullivan11:12:17

I often use buffers in Emacs that aren't connected to a file, just to take advantage of the major modes and anything else I've set up for particular modes. For example, when examining a big blob of JSON from a REST API, I'll copy it, switch to a buffer called "whatever.json" and paste it into there. That way I can navigate, reformat, etc., but don't save to a file. I'll do the same with temporary message editing sometimes (a .txt extension turns on spell-checking, etc.)

👍 6
Charles Fourdrignier12:12:29

Thank you for your tricks. Forgot that you could C-x b to non-existing buffer !