* Automatically performing simple tasks at startup
@ 2011-07-07 20:42 roosh1
2011-07-08 6:39 ` Pavel Sokolov
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: roosh1 @ 2011-07-07 20:42 UTC (permalink / raw)
To: Help-gnu-emacs
I can't find a way for Emacs to do some simple things automatically at every
start-up. Can anyone help me make Emacs do the following things at start-up:
1) Split the window into 2 (I have to do a "C-x 2")
2) Run scheme in the bottom buffer (I do a "alt-x run-scheme")
3) If I open a scheme file (ie double click it, which starts Emacs), could
Emacs automatically do (1) and (2) and also load my file into the top
buffer.
Thanks for any help.
--
View this message in context: http://old.nabble.com/Automatically-performing-simple-tasks-at-startup-tp32016720p32016720.html
Sent from the Emacs - Help mailing list archive at Nabble.com.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Automatically performing simple tasks at startup
2011-07-07 20:42 Automatically performing simple tasks at startup roosh1
@ 2011-07-08 6:39 ` Pavel Sokolov
2011-07-08 9:06 ` Tom Willemsen
2011-07-08 14:48 ` Wang Lei
2 siblings, 0 replies; 5+ messages in thread
From: Pavel Sokolov @ 2011-07-08 6:39 UTC (permalink / raw)
To: roosh1; +Cc: Help-gnu-emacs
Hi, roosh1,
You may use after-init-hook to do (1) and (2) at start-up. Sample code
is following:
(add-hook 'after-init-hook #'(lambda ()
(split-window-vertically)
(other-window 1)
(run-scheme "you-arg-here")))
Also you may add same code to the 'find-file-hook hook to do (3)
automatically.
Cheers
>
>
> I can't find a way for Emacs to do some simple things automatically at every
> start-up. Can anyone help me make Emacs do the following things at start-up:
>
> 1) Split the window into 2 (I have to do a "C-x 2")
>
> 2) Run scheme in the bottom buffer (I do a "alt-x run-scheme")
>
> 3) If I open a scheme file (ie double click it, which starts Emacs), could
> Emacs automatically do (1) and (2) and also load my file into the top
> buffer.
>
> Thanks for any help.
> --
> View this message in context: http://old.nabble.com/Automatically-performing-simple-tasks-at-startup-tp32016720p32016720.html
> Sent from the Emacs - Help mailing list archive at Nabble.com.
>
>
---------------------
Pavel Sokolov
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Automatically performing simple tasks at startup
2011-07-07 20:42 Automatically performing simple tasks at startup roosh1
2011-07-08 6:39 ` Pavel Sokolov
@ 2011-07-08 9:06 ` Tom Willemsen
2011-07-09 21:39 ` roosh1
2011-07-08 14:48 ` Wang Lei
2 siblings, 1 reply; 5+ messages in thread
From: Tom Willemsen @ 2011-07-08 9:06 UTC (permalink / raw)
To: roosh1; +Cc: Help-gnu-emacs
On 07 Jul 13:42, roosh1 wrote:
>
> I can't find a way for Emacs to do some simple things automatically at every
> start-up. Can anyone help me make Emacs do the following things at start-up:
>
> 1) Split the window into 2 (I have to do a "C-x 2")
>
> 2) Run scheme in the bottom buffer (I do a "alt-x run-scheme")
>
> 3) If I open a scheme file (ie double click it, which starts Emacs), could
> Emacs automatically do (1) and (2) and also load my file into the top
> buffer.
Would putting something like:
(split-window-above-each-other)
(other-window 1)
(run-scheme "scheme")
(other-window -1)
Somewhere (near the end?) of your ~/.emacs possibly do the trick?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Automatically performing simple tasks at startup
2011-07-07 20:42 Automatically performing simple tasks at startup roosh1
2011-07-08 6:39 ` Pavel Sokolov
2011-07-08 9:06 ` Tom Willemsen
@ 2011-07-08 14:48 ` Wang Lei
2 siblings, 0 replies; 5+ messages in thread
From: Wang Lei @ 2011-07-08 14:48 UTC (permalink / raw)
To: help-gnu-emacs
On 2011-07-08 04:42:21 +0800, roosh1 wrote:
> I can't find a way for Emacs to do some simple things automatically at every
> start-up. Can anyone help me make Emacs do the following things at start-up:
>
> 1) Split the window into 2 (I have to do a "C-x 2")
>
> 2) Run scheme in the bottom buffer (I do a "alt-x run-scheme")
>
> 3) If I open a scheme file (ie double click it, which starts Emacs), could
> Emacs automatically do (1) and (2) and also load my file into the top
> buffer.
>
> Thanks for any help.
Try this. Add the 3 lines to your .emacs.
(split-window-vertically)
(run-scheme)
(other-window 1)
--
Regards,
Lei
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Automatically performing simple tasks at startup
2011-07-08 9:06 ` Tom Willemsen
@ 2011-07-09 21:39 ` roosh1
0 siblings, 0 replies; 5+ messages in thread
From: roosh1 @ 2011-07-09 21:39 UTC (permalink / raw)
To: Help-gnu-emacs
Tom Willemsen wrote:
>
> Would putting something like:
>
> (split-window-above-each-other)
> (other-window 1)
> (run-scheme "scheme")
> (other-window -1)
>
> Somewhere (near the end?) of your ~/.emacs possibly do the trick?
>
Yes, it works! The only change I had to make was to put my scheme program
name: "stk" instead of "scheme" in line 3 of above.
Thanks so much.
--
View this message in context: http://old.nabble.com/Automatically-performing-simple-tasks-at-startup-tp32016720p32029328.html
Sent from the Emacs - Help mailing list archive at Nabble.com.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-07-09 21:39 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-07 20:42 Automatically performing simple tasks at startup roosh1
2011-07-08 6:39 ` Pavel Sokolov
2011-07-08 9:06 ` Tom Willemsen
2011-07-09 21:39 ` roosh1
2011-07-08 14:48 ` Wang Lei
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.