Skip to main content
added 716 characters in body
Source Link
Drew
  • 80.9k
  • 10
  • 125
  • 265

If you just want to put *scratch* in its own frame and use special frame parameters for it (e.g. give it its own background color, font, or whatever) then you can do this just by doing these two things:

  • Customize special-display-alist to have the frame parameters you want.
  • Customize special-display-buffer-names, adding *scratch* to it.

In a comment you asked for code. No, the right way is to use Customize: M-x customize-option special-display-alist, choosing what you want, then saving persistently. Likewise, M-x customize-option special-display-buffer-names.

If the Customize UI is too complex for someone then they shouldn't be asking for code instead. ;-) That's my motto.

But since I'm an easy touch, here's a hint:

(add-to-list 'special-display-buffer-names "*scratch*")
(setq special-display-frame-alist  (append '((foreground-color . "Brown")
                                             (background-color . "LightBlue")) 
                                           special-display-frame-alist))

If you just want to put *scratch* in its own frame and use special frame parameters for it (e.g. give it its own background color, font, or whatever) then you can do this just by doing these two things:

  • Customize special-display-alist to have the frame parameters you want.
  • Customize special-display-buffer-names, adding *scratch* to it.

If you just want to put *scratch* in its own frame and use special frame parameters for it (e.g. give it its own background color, font, or whatever) then you can do this just by doing these two things:

  • Customize special-display-alist to have the frame parameters you want.
  • Customize special-display-buffer-names, adding *scratch* to it.

In a comment you asked for code. No, the right way is to use Customize: M-x customize-option special-display-alist, choosing what you want, then saving persistently. Likewise, M-x customize-option special-display-buffer-names.

If the Customize UI is too complex for someone then they shouldn't be asking for code instead. ;-) That's my motto.

But since I'm an easy touch, here's a hint:

(add-to-list 'special-display-buffer-names "*scratch*")
(setq special-display-frame-alist  (append '((foreground-color . "Brown")
                                             (background-color . "LightBlue")) 
                                           special-display-frame-alist))
Source Link
Drew
  • 80.9k
  • 10
  • 125
  • 265

If you just want to put *scratch* in its own frame and use special frame parameters for it (e.g. give it its own background color, font, or whatever) then you can do this just by doing these two things:

  • Customize special-display-alist to have the frame parameters you want.
  • Customize special-display-buffer-names, adding *scratch* to it.