From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Pavel Sokolov Newsgroups: gmane.emacs.help Subject: Re: Automatically performing simple tasks at startup Date: Fri, 08 Jul 2011 10:39:26 +0400 Message-ID: <86fwmh6ztt.wl@fc5697d5365100a6a82bc87acbda> References: <32016720.post@talk.nabble.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Trace: dough.gmane.org 1310143539 6379 80.91.229.12 (8 Jul 2011 16:45:39 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 8 Jul 2011 16:45:39 +0000 (UTC) Cc: Help-gnu-emacs@gnu.org To: roosh1 Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jul 08 18:45:33 2011 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QfEBI-0005NK-0L for geh-help-gnu-emacs@m.gmane.org; Fri, 08 Jul 2011 18:45:32 +0200 Original-Received: from localhost ([::1]:36586 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QfEBG-0004eR-Px for geh-help-gnu-emacs@m.gmane.org; Fri, 08 Jul 2011 12:45:30 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:57865) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qf4oU-0000EQ-Ns for Help-gnu-emacs@gnu.org; Fri, 08 Jul 2011 02:45:27 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qf4oP-0001m4-Ku for Help-gnu-emacs@gnu.org; Fri, 08 Jul 2011 02:45:22 -0400 Original-Received: from mail-bw0-f41.google.com ([209.85.214.41]:47598) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qf4oO-0001jy-Tk for Help-gnu-emacs@gnu.org; Fri, 08 Jul 2011 02:45:17 -0400 Original-Received: by bwd14 with SMTP id 14so1872358bwd.0 for ; Thu, 07 Jul 2011 23:45:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=date:message-id:from:to:cc:subject:in-reply-to:references :user-agent:mime-version:content-type; bh=6drxTepGj7yCxH+iD6222GVMBySAIih1kmSujc28eqE=; b=KibwzSnbGcEhqvDrMH96e/gaLo/NwtR6nJEpBo8iOPNLFpZjIjKETwIMNLFccdvamd gOeunE9WrhOsW/XqU3zwKRjOQR0xdd9nhArgD0iZkrMWNBAtLrhDccFuhMQYn0BfoBPl RWvWTTIGWOkxiBfDISMSr/gbbv769R45SAgq4= Original-Received: by 10.204.33.73 with SMTP id g9mr1246637bkd.171.1310107511779; Thu, 07 Jul 2011 23:45:11 -0700 (PDT) Original-Received: from pavels-desktop.homenet ([109.172.10.35]) by mx.google.com with ESMTPS id f24sm115046bka.65.2011.07.07.23.45.10 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 07 Jul 2011 23:45:11 -0700 (PDT) In-Reply-To: <32016720.post@talk.nabble.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) Emacs/23.2 Mule/6.0 (HANACHIRUSATO) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.214.41 X-Mailman-Approved-At: Fri, 08 Jul 2011 12:34:33 -0400 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:81526 Archived-At: 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