The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [scratch-buffer]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
16 views

How to disable TIDE when using Indium scratch buffer

I'm learning Javascript and my setup is Indium + Tide, The setup works well and I can follow all the exercises in the book. But when I try to use the Indium scratch buffer M-x indium-scratch It opens ...
1
vote
2answers
66 views

Different color theme for scratch buffer

I'd like my *scratch* buffer to have it's own color theme, different to the one I use elsewhere, so that I know when I'm working there. How can I do this?
3
votes
3answers
397 views

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?
2
votes
1answer
229 views

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-...
1
vote
2answers
233 views

Emacs lisp format doesn't print to *scratch*?

I've got this function (defun mt () (dotimes (x 20) (dotimes (y 20) (format "%3d " (* (1+ x) (1+ y)))) (format "\n"))) in my *scratch*. a Ctr-= prints back mt. But then ...
0
votes
2answers
33 views

Trigger custom function when `*Scratch*` is recreated

I would like to run a custom function whenever a new *Scratch* buffer is created because the last uninteresting buffer was killed. I looked at both the C source code and window.el and it appears that ...
3
votes
1answer
111 views

Web-mode + Dust.js, no indentation?

If I go to scratch, M-x web-mode RET, type in this snippet: <script type="text/x-dust-template"> {#obj_to_iterate} {prop} <----- this should indent {/obj_to_iterate} </script&...
8
votes
3answers
875 views

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 ...
1
vote
1answer
662 views

Set a default scratch buffer

My emacs daemon for ocaml (I use more than one emacs daemon) starts in a tuareg scratch buffer. I am aware of initial-major-mode but this hasn't worked: the scratch is started before (setqinitial-...
13
votes
4answers
2k views

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-...
2
votes
1answer
768 views

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-...
2
votes
1answer
114 views

Function coloring in scratch buffer

When I am typing in the scratch buffer, I type certain functions such as defun and while and they are recognized by the buffer and appear in purple. However, with other Lisp functions such as set or +,...
0
votes
0answers
28 views

Emacs scratch buffer Lisp eval [duplicate]

So I'm entirely new to programming but I have been trying to familiarize myself with emacs for future scripting. When I am typing in the scratch buffer, I type certain functions such as defun and ...
0
votes
1answer
88 views

current-active-maps shortens map entries [duplicate]

I try to print all key bindings in the current buffer using (current-active-maps) In the message buffer, the entries are not fully printed & are replaced by .... after a level. Like this, ((...
7
votes
2answers
348 views

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" (...
3
votes
1answer
962 views

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 ...
3
votes
3answers
481 views

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 ...
24
votes
1answer
794 views

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* ...
24
votes
5answers
2k views

Re-open *scratch* buffer

If I accidentally closed the scratch buffer in Emacs, how do I create a new scratch buffer?