Questions tagged [scratch-buffer]
33 questions
44
votes
5 answers
Re-open *scratch* buffer
If I accidentally closed the scratch buffer in Emacs, how do I create a new scratch buffer?

programking
- 7,064
- 9
- 41
- 62
23
votes
1 answer
How can I quickly toggle between a file and a *scratch* buffer having the same major mode?
At times while working on a code, it's useful to quickly open a *scratch* buffer to paste a snippet from that code file.
If I am working on a Perl script, I would like to quickly open a *scratch* buffer with in cperl-mode. It would also be nice to…

Kaushal Modi
- 25,203
- 3
- 74
- 179
16
votes
4 answers
Is it possible to create an org-mode *scratch* buffer?
While working on a document in emacs I often find myself opening a new buffer, doing something in org-mode, copying the org-mode content, and pasting it into my document. I used to create a new org-mode document every time I needed to do this. Now I…

Brian Fitzpatrick
- 2,265
- 1
- 17
- 40
12
votes
3 answers
never close scratch
If I ever close the *scratch* buffer it is always an accident.
I have persistent-scratch so it's as easy as a persistent-scratch-reload but it'd be nice if the scratch couldn't be killed. How can I do that?

fommil
- 1,750
- 11
- 24
8
votes
2 answers
How to disable lisp-interaction when starting Emacs?
When I open Emacs, the *scratch* buffer is in Lisp Interaction mode, but I don't want that. How can I make the buffer have a text mode instead of Lisp Interaction?

new Q Open Wid
- 185
- 1
- 12
7
votes
2 answers
How can I view the full `package-alist` value (without the truncation characters "...")?
When I do C-h v package-alist, I see something like
((PACKAGE-NAME1 [cl-struct-package-desc
PACKAGE-NAME1
(VERSION1)
"DESCRIPTION1"
(DEPENDENCIES-ALIST1)
nil
…

Kaushal Modi
- 25,203
- 3
- 74
- 179
5
votes
1 answer
Autosave *scratch* to a directory
When typing ls in my home directory, I amm greeted by a lot of this:
#%2Ascratch%2A#1399_po# #%2Ascratch%2A#14484YsZ# [...]
I also have the following in my init.el
(defvar autosave-location (concat user-emacs-directory "data/autosave"))
(setq…

PythonNut
- 10,243
- 2
- 29
- 75
4
votes
1 answer
I've modified "initial-scratch-message" -- what else must I do to see it effected?
Using the menu Options-Customize Emacs-Browse Customization Themes, I've modified initial-scratch-message. I saved my customizations; and exited Emacs.
When I re-start Emacs, the initial-scratch-message displays as before; but, if I open my init.el…

TheGeeko61
- 145
- 7
4
votes
1 answer
Scratch always starts in fundamental mode
I don't know what change in my configuration caused this, but scratch buffer always starts in fundamental-mode. I would like to have emacs-lisp-mode in the scratch buffer. I tried to do
(setq initial-major-mode 'emacs-lisp-mode)
But it didn't…

rumember
- 53
- 5
3
votes
2 answers
Multiple scratch buffers
Would like to use two scratch buffers on two side-by-side windows. How can I do this thing? Can only also ask for more than two scratch buffers that can be named?

Dilna
- 1,173
- 3
- 10
3
votes
0 answers
Why is file buffer replaced by scratch buffer on startup?
When I open an R file in ESS-mode, I'd like emacs to setup my panes in a certain format.
To this end, I've added the following to my init.el.
(add-hook 'ess-mode-hook
(lambda()
(split-window-horizontally)
…

Dan
- 191
- 5
3
votes
3 answers
Rename scratch buffer and ask confirmation to kill non-file buffers created by user
I tend to use often non-file buffers kinda like post-it-notes and it is way too easy to kill them inadvertently, as there is no confirmation to kill. Even if you enforce the habit of writing only in file buffers (subject to confirmation), you might…

antonio
- 1,762
- 12
- 24
3
votes
1 answer
Is there a version of lisp-interaction, à la *scratch* buffer, with asynchronous processing of evaluation?
While I develop some Emacs-Lisp code, I often test it in the *scratch* buffer, just to make sure that what I just wrote behaves like I believe it does.
But sometimes evaluating an expression takes several minutes and it is too bad that Emacs is…

phs
- 1,095
- 6
- 13
3
votes
4 answers
How to replace the default contents of the scratch buffer with the contents of a file (if it exists)?
I would like emacs to check for a ~/emacs.d/scratch.txt and use it's contents instead of the default message when emacs starts.
How can this be done?

ideasman42
- 8,375
- 1
- 28
- 105
3
votes
1 answer
Web-mode + Dust.js, no indentation?
If I go to scratch, M-x web-mode RET, type in this snippet:
What am I doing wrong here? I see bugs with Dust.js have…

user12968
- 31
- 2