Skip to main content

Questions tagged [scratch-buffer]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
16 votes
4 answers
4k 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-...
Brian Fitzpatrick's user avatar
7 votes
2 answers
652 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" (...
Kaushal Modi's user avatar
  • 25.7k
23 votes
1 answer
1k 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* ...
Kaushal Modi's user avatar
  • 25.7k
12 votes
3 answers
1k 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 ...
fommil's user avatar
  • 1,800
3 votes
4 answers
2k 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?
ideasman42's user avatar
  • 8,846
2 votes
1 answer
137 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 +,...
Ahmed Noor's user avatar
5 votes
1 answer
2k 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 ...
PythonNut's user avatar
  • 10.4k
4 votes
1 answer
1k 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-...
rumember's user avatar
1 vote
1 answer
200 views

Can I open emacs in nw mode with the scratch buffer?

When starting emacs from the shell command line, if you pass the "dot", it opened emacs with a 'dired' of the current directory. But can I do this? emacs '*scratch*' so emacs opens with the focus ...
american-ninja-warrior's user avatar