unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Pavel Sokolov <sokolov.p.a@gmail.com>
To: roosh1 <ro0sh@aol.com>
Cc: Help-gnu-emacs@gnu.org
Subject: Re: Automatically performing simple tasks at startup
Date: Fri, 08 Jul 2011 10:39:26 +0400	[thread overview]
Message-ID: <86fwmh6ztt.wl@fc5697d5365100a6a82bc87acbda> (raw)
In-Reply-To: <32016720.post@talk.nabble.com>

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



  reply	other threads:[~2011-07-08  6:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-07 20:42 Automatically performing simple tasks at startup roosh1
2011-07-08  6:39 ` Pavel Sokolov [this message]
2011-07-08  9:06 ` Tom Willemsen
2011-07-09 21:39   ` roosh1
2011-07-08 14:48 ` Wang Lei

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86fwmh6ztt.wl@fc5697d5365100a6a82bc87acbda \
    --to=sokolov.p.a@gmail.com \
    --cc=Help-gnu-emacs@gnu.org \
    --cc=ro0sh@aol.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).