From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Joel James Adamson Newsgroups: gmane.emacs.help Subject: Re: how to make emacs start in a given mode ? Date: Wed, 9 Jun 2010 09:39:51 -0400 Message-ID: <20100609133951.GA15413@chondestes.bio.unc.edu> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ReaqsoxgOBHFXBhH" X-Trace: dough.gmane.org 1276090835 31556 80.91.229.12 (9 Jun 2010 13:40:35 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 9 Jun 2010 13:40:35 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: hkm Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jun 09 15:40:31 2010 connect(): No such file or directory Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OMLWA-0006D6-W4 for geh-help-gnu-emacs@m.gmane.org; Wed, 09 Jun 2010 15:40:31 +0200 Original-Received: from localhost ([127.0.0.1]:33231 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OMLWA-0006e1-H0 for geh-help-gnu-emacs@m.gmane.org; Wed, 09 Jun 2010 09:40:30 -0400 Original-Received: from [140.186.70.92] (port=37307 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OMLVg-0006dO-Ey for help-gnu-emacs@gnu.org; Wed, 09 Jun 2010 09:40:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OMLVf-0002yp-1N for help-gnu-emacs@gnu.org; Wed, 09 Jun 2010 09:40:00 -0400 Original-Received: from chondestes.bio.unc.edu ([152.2.67.61]:48491) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OMLVe-0002yW-UH for help-gnu-emacs@gnu.org; Wed, 09 Jun 2010 09:39:59 -0400 Original-Received: from chondestes.bio.unc.edu (chondestes.bio.unc.edu [127.0.0.1]) by chondestes.bio.unc.edu (8.14.4/8.14.3) with ESMTP id o59Ddpmb015972; Wed, 9 Jun 2010 09:39:52 -0400 Original-Received: (from joel@localhost) by chondestes.bio.unc.edu (8.14.4/8.14.4/Submit) id o59DdpfF015971; Wed, 9 Jun 2010 09:39:51 -0400 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-12-10) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:73865 Archived-At: --ReaqsoxgOBHFXBhH Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jun 09, 2010 at 08:48:01AM +0800, hkm wrote: > Does anyone know how to start emacs in a given mode? >=20 > Actually I use matlab-shell in emacs. Everytime I have to start > emacs first, and then I can enter matlab-shell mode. What do you mean *every time*? Why not leave Emacs running and open files or your shell from within Emacs? > Is there a way to make emacs enter matlab-shell mode automatically > when type some command in the terminal? M-x customize-variable RET major-mode RET Then put in your favorite major-mode (mine is org-mode) and save the setting. You can accomplish the same with (setq-default major-mode 'my-favorite-major-mode)[1] Joel Footnotes:=20 [1] Evaluate this: (info "(emacs) Choosing Modes") --=20 Joel J. Adamson Servedio Lab University of North Carolina at Chapel Hill FSF Member #8164 http://www.unc.edu/~adamsonj --ReaqsoxgOBHFXBhH Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (GNU/Linux) iEYEARECAAYFAkwPmacACgkQdjuynxXap4SqIwCeIfxwWburUk9fRsTMiKpbRCnO NJQAn1a45No2alps0aQuqW3lTgQJPZfI =rVCD -----END PGP SIGNATURE----- --ReaqsoxgOBHFXBhH--