ok, thanks 😃
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 ?
@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...
That is one of Steve Yegge's 10 tips for emacs users https://sites.google.com/site/steveyegge2/effective-emacs "use temp buffers"
> pasting weird stuff into Emacs Perfect ! :) Thank you.
Just find this article by Bozhidar Batsov https://emacsredux.com/blog/2014/07/25/configure-the-scratch-buffers-mode/
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
I also bind F5 key to switch to scratch. When ever I need to write some stuffs, I just press F5 for refresh air.
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.)
Thank you for your tricks.
Forgot that you could C-x b
to non-existing buffer !