Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Switching to a buffer in .emacs does not work

5 views
Skip to first unread message

Cecil Westerhof

unread,
May 21, 2013, 4:04:55 AM5/21/13
to
In my .emacs I have:
(gnus)
(switch-to-buffer "*Group*")

But when starting emacs Gnus is started, but the switch to the *Group*
buffer does not happen. (That is why I initially thought Gnus was not
started.)

But when I give after the switch-to-buffer:
M-x M-e

I switch to the buffer. So the command is correct. Why does it not
work then?

I am using:
GNU Emacs 24.2.1 (i586-suse-linux-gnu, GTK+ Version 3.6.4) of 2013-02-21 on build02

--
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof

Kevin Rodgers

unread,
May 22, 2013, 10:13:59 AM5/22/13
to help-gn...@gnu.org
On 5/21/13 2:04 AM, Cecil Westerhof wrote:
> In my .emacs I have:
> (gnus)
> (switch-to-buffer "*Group*")
>
> But when starting emacs Gnus is started, but the switch to the *Group*
> buffer does not happen. (That is why I initially thought Gnus was not
> started.)

What does it display? My guess is the splash screen.

> But when I give after the switch-to-buffer:
> M-x M-e

Do you mean C-x C-e (which is bound to eval-last-sexp in Emacs-Lisp buffers
like .emacs)?

> I switch to the buffer. So the command is correct. Why does it not
> work then?

See the "Entering Emacs" node of the Emacs manual, and the command-line-1
function in startup.el

You could try adding this to your .emacs:

(setq inhibit-startup-screen t)

Or start Emacs like this (via an alias or script, for convenience):

emacs -f gnus --eval '(switch-to-buffer "*Group*")'

--
Kevin Rodgers
Denver, Colorado, USA


0 new messages