From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Robert Thorpe Newsgroups: gmane.emacs.help Subject: Re: How can I change the default loading buffer? Date: Thu, 30 Jul 2015 01:38:46 +0100 Message-ID: <87wpxixyw9.fsf@robertthorpeconsulting.com> References: <87oaiushyf.fsf@nl106-137-147.student.uu.se> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1438216756 10020 80.91.229.3 (30 Jul 2015 00:39:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 30 Jul 2015 00:39:16 +0000 (UTC) Cc: Emanuel Berg To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jul 30 02:39:05 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZKbsG-0004GY-5k for geh-help-gnu-emacs@m.gmane.org; Thu, 30 Jul 2015 02:39:04 +0200 Original-Received: from localhost ([::1]:37394 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZKbsF-00089L-BK for geh-help-gnu-emacs@m.gmane.org; Wed, 29 Jul 2015 20:39:03 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58488) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZKbs5-00085t-A8 for help-gnu-emacs@gnu.org; Wed, 29 Jul 2015 20:38:54 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZKbs2-00038O-2u for help-gnu-emacs@gnu.org; Wed, 29 Jul 2015 20:38:53 -0400 Original-Received: from outbound-smtp05.blacknight.com ([81.17.249.38]:42085) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZKbs1-00037z-Sy for help-gnu-emacs@gnu.org; Wed, 29 Jul 2015 20:38:50 -0400 Original-Received: from mail.blacknight.com (pemlinmail04.blacknight.ie [81.17.254.17]) by outbound-smtp05.blacknight.com (Postfix) with ESMTPS id 41BB898DA7 for ; Thu, 30 Jul 2015 00:38:48 +0000 (UTC) Original-Received: (qmail 3898 invoked from network); 30 Jul 2015 00:38:48 -0000 Original-Received: from unknown (HELO RTLaptop) (rt@robertthorpeconsulting.com@[109.76.151.238]) by 81.17.254.9 with ESMTPSA (DHE-RSA-AES128-SHA encrypted, authenticated); 30 Jul 2015 00:38:47 -0000 In-Reply-To: <87oaiushyf.fsf@nl106-137-147.student.uu.se> (message from Emanuel Berg on Thu, 30 Jul 2015 00:43:36 +0200) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 81.17.249.38 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:106133 Archived-At: Emanuel Berg writes: > Robert Thorpe writes: > >> See this node in the Emacs Lisp Manual and figure >> out where you want it to happen in relation to other >> things: (info "(elisp)Startup Summary") . >> >> If you want it in that hook do: >> >> (add-hook 'emacs-startup-hook (lambda () >> (switch-to-buffer (get-buffer-create (shell))))) > > You mean so not to interfere with batch mode Emacs and > other (?) stuff like that? Well, yeah, but just > putting Emacs in some mode and displaying some buffer > shouldn't disturb that, should it? Batch mode is one aspect of it. Another is packages. Package-initialize runs after the init file is loaded. Suppose a package is used that affects the operations of M-x shell (e.g. bash-completion.el). That package may need initializing prior to shell-mode starting to function correctly. If you run in a terminal then there can be terminal specific elisp libraries. That library is selected and loaded after the init file. So, if M-x shell depends on it being already loaded there will be problems. I don't know that it does, but it legitimately could. The colour set could be different in the shell started at init to elsewhere. > ;; starting point > (call-interactively 'w3m) > (cd "~/") The way I use Emacs that would work fine too, but it's not universal. BR, Robert Thorpe