* how to make emacs start in a given mode ?
@ 2010-06-09 0:48 hkm
2010-06-09 7:18 ` Deniz Dogan
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: hkm @ 2010-06-09 0:48 UTC (permalink / raw)
To: help-gnu-emacs
[-- Attachment #1: Type: text/plain, Size: 301 bytes --]
Does anyone know how to start emacs in a given mode?
Actually I use matlab-shell in emacs. Everytime I have to start emacs
first,
and then I can enter matlab-shell mode.
Is there a way to make emacs enter matlab-shell mode automatically when
type some command in the terminal?
Thank you.
Keming
[-- Attachment #2: Type: text/html, Size: 490 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: how to make emacs start in a given mode ?
2010-06-09 0:48 how to make emacs start in a given mode ? hkm
@ 2010-06-09 7:18 ` Deniz Dogan
[not found] ` <20100609072526.GA18088@hkm>
2010-06-09 8:45 ` Bastien
` (2 subsequent siblings)
3 siblings, 1 reply; 7+ messages in thread
From: Deniz Dogan @ 2010-06-09 7:18 UTC (permalink / raw)
To: hkm; +Cc: help-gnu-emacs
2010/6/9 hkm <hkmsama@gmail.com>:
> Does anyone know how to start emacs in a given mode?
> Actually I use matlab-shell in emacs. Everytime I have to start emacs
> first,
> and then I can enter matlab-shell mode.
> Is there a way to make emacs enter matlab-shell mode automatically when
> type some command in the terminal?
>
> Thank you.
>
>
> Keming
Sure, just modify initial-major-mode, e.g.:
(setq initial-major-mode 'python-mode)
--
Deniz Dogan
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: how to make emacs start in a given mode ?
2010-06-09 0:48 how to make emacs start in a given mode ? hkm
2010-06-09 7:18 ` Deniz Dogan
@ 2010-06-09 8:45 ` Bastien
2010-06-09 12:07 ` Tim Landscheidt
2010-06-09 13:39 ` Joel James Adamson
3 siblings, 0 replies; 7+ messages in thread
From: Bastien @ 2010-06-09 8:45 UTC (permalink / raw)
To: hkm; +Cc: help-gnu-emacs
hkm <hkmsama@gmail.com> writes:
> Does anyone know how to start emacs in a given mode?
(setq initial-major-mode 'matlab-shell)
HTH,
--
Bastien
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: how to make emacs start in a given mode ?
2010-06-09 0:48 how to make emacs start in a given mode ? hkm
2010-06-09 7:18 ` Deniz Dogan
2010-06-09 8:45 ` Bastien
@ 2010-06-09 12:07 ` Tim Landscheidt
2010-06-09 13:39 ` Joel James Adamson
3 siblings, 0 replies; 7+ messages in thread
From: Tim Landscheidt @ 2010-06-09 12:07 UTC (permalink / raw)
To: help-gnu-emacs
(anonymous) wrote:
> Does anyone know how to start emacs in a given mode?
> Actually I use matlab-shell in emacs. Everytime I have to start emacs
> first,
> and then I can enter matlab-shell mode.
> Is there a way to make emacs enter matlab-shell mode automatically when
> type some command in the terminal?
You could try "emacs -f matlab-shell".
Tim
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: how to make emacs start in a given mode ?
2010-06-09 0:48 how to make emacs start in a given mode ? hkm
` (2 preceding siblings ...)
2010-06-09 12:07 ` Tim Landscheidt
@ 2010-06-09 13:39 ` Joel James Adamson
3 siblings, 0 replies; 7+ messages in thread
From: Joel James Adamson @ 2010-06-09 13:39 UTC (permalink / raw)
To: hkm; +Cc: help-gnu-emacs
[-- Attachment #1: Type: text/plain, Size: 892 bytes --]
On Wed, Jun 09, 2010 at 08:48:01AM +0800, hkm wrote:
> Does anyone know how to start emacs in a given mode?
>
> 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:
[1] Evaluate this: (info "(emacs) Choosing Modes")
--
Joel J. Adamson
Servedio Lab
University of North Carolina at Chapel Hill
FSF Member #8164
http://www.unc.edu/~adamsonj
[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <mailman.2.1276061596.11236.help-gnu-emacs@gnu.org>]
* Re: how to make emacs start in a given mode ?
[not found] <mailman.2.1276061596.11236.help-gnu-emacs@gnu.org>
@ 2010-06-09 6:22 ` mandar.mitra
0 siblings, 0 replies; 7+ messages in thread
From: mandar.mitra @ 2010-06-09 6:22 UTC (permalink / raw)
To: help-gnu-emacs
On Jun 9, 5:48 am, hkm <hkms...@gmail.com> wrote:
> Does anyone know how to start emacs in a given mode?
>
> Actually I use matlab-shell in emacs. Everytime I have to start emacs
> first,
> and then I can enter matlab-shell mode.
> Is there a way to make emacs enter matlab-shell mode automatically when
> type some command in the terminal?
I have this in my .emacs.el:
(setq default-major-mode 'text-mode)
because I like scratch / new buffers to be text mode by default
(rather than Fundamental). You could try something similar with matlab-
shell mode.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2010-06-09 13:39 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-09 0:48 how to make emacs start in a given mode ? hkm
2010-06-09 7:18 ` Deniz Dogan
[not found] ` <20100609072526.GA18088@hkm>
2010-06-09 7:31 ` Deniz Dogan
2010-06-09 8:45 ` Bastien
2010-06-09 12:07 ` Tim Landscheidt
2010-06-09 13:39 ` Joel James Adamson
[not found] <mailman.2.1276061596.11236.help-gnu-emacs@gnu.org>
2010-06-09 6:22 ` mandar.mitra
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).