Search code examples
emacselispdot-emacs

What do I pass to the switch-to-buffer argument in my .emacs file?


I am getting an error in my .emacs file at the following line:

(switch-to-buffer *Completions*)

error: symbols value as variable is void

I did a describe-function on switch-to-buffer and found I CAN pass it a BUFFER (and another optional argument which I do not currently need). What am I doing wrong?

Just a few notes:
a. I also need two similar lines (switch-to-buffer *grep*) and (switch-to-buffer *compilation*) so the simple solution of using (switch-to-completions) won't solve all of my problems.
b. All of the buffers I require are already open, so I don't think that is the problem.


Solution

  • Try

    (switch-to-buffer "*Completions*")