From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: JT Fleming <jeff.fleming@halliburton.com> Newsgroups: gmane.emacs.help Subject: Re: open files on startup Date: Thu, 19 Nov 2009 13:42:12 -0800 (PST) Organization: http://groups.google.com Message-ID: <91deba46-374f-487c-bdfd-c7081a9989ea@k4g2000yqb.googlegroups.com> References: <2f0772e5-7fc4-4a6a-b3a5-782033418e9c@e23g2000yqd.googlegroups.com> <87tywqgvls.fsf@galatea.local> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1258816249 16994 80.91.229.12 (21 Nov 2009 15:10:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 21 Nov 2009 15:10:49 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Nov 21 16:10:42 2009 Return-path: <help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org> 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.50) id 1NBrbm-0001mP-25 for geh-help-gnu-emacs@m.gmane.org; Sat, 21 Nov 2009 16:10:42 +0100 Original-Received: from localhost ([127.0.0.1]:46443 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NBrbl-000841-8f for geh-help-gnu-emacs@m.gmane.org; Sat, 21 Nov 2009 10:10:41 -0500 Original-Path: news.stanford.edu!usenet.stanford.edu!postnews.google.com!k4g2000yqb.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 47 Original-NNTP-Posting-Host: 34.254.247.222 Original-X-Trace: posting.google.com 1258666932 28728 127.0.0.1 (19 Nov 2009 21:42:12 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Thu, 19 Nov 2009 21:42:12 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: k4g2000yqb.googlegroups.com; posting-host=34.254.247.222; posting-account=MRjdQAoAAAB-5fcgQd_I0MhLwZbc8y_k User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; InfoPath.1; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729),gzip(gfe),gzip(gfe) Original-Xref: news.stanford.edu gnu.emacs.help:174877 X-Mailman-Approved-At: Sat, 21 Nov 2009 10:04:05 -0500 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 <help-gnu-emacs.gnu.org> List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/help-gnu-emacs>, <mailto:help-gnu-emacs-request@gnu.org?subject=unsubscribe> List-Archive: <http://lists.gnu.org/pipermail/help-gnu-emacs> List-Post: <mailto:help-gnu-emacs@gnu.org> List-Help: <mailto:help-gnu-emacs-request@gnu.org?subject=help> List-Subscribe: <http://lists.gnu.org/mailman/listinfo/help-gnu-emacs>, <mailto:help-gnu-emacs-request@gnu.org?subject=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:69996 Archived-At: <http://permalink.gmane.org/gmane.emacs.help/69996> On Nov 19, 1:31=A0pm, p...@informatimago.com (Pascal J. Bourguignon) wrote: > JT Fleming <jeff.flem...@halliburton.com> writes: > > I am trying to open 2 files and the programmable calculator on > > startup. > > I can open 1 file but can't figure out how to get the other and the > > calculator. > > Any help would be appreciated. > > Here is what is currently used to open a file > > (custom-set-variables > > =A0 ;; custom-set-variables was added by Custom. > > =A0 ;; If you edit it by hand, you could mess it up, so be careful. > > =A0 ;; Your init file should contain only one such instance. > > =A0 ;; If there is more than one, they won't work right. > > =A0'(initial-buffer-choice "~/diary")) > > You could just put: > > =A0 =A0 (dolist (file '("~/diary" "~/some-other-file")) > =A0 =A0 =A0 =A0(find-file file)) > > at the end of your ~/.emacs file. > > You can also use split-window-vertically, other-window and > balance-windows to have them spread over several windows. > > (defun open-files (files) > =A0 =A0(delete-other-windows) > =A0 =A0(loop repeat (1- (length files)) > =A0 =A0 =A0 =A0 =A0do (split-window-vertically) > =A0 =A0 =A0 =A0 =A0 =A0 (balance-windows)) > =A0 =A0(loop for file in files > =A0 =A0 =A0 =A0 =A0do (find-file file) > =A0 =A0 =A0 =A0 =A0 =A0 (other-window 1))) > > (open-files '("/tmp/a" "/tmp/b" "/tmp/c")) > > -- > __Pascal Bourguignon__ Thanks for the suggestions Pascal Your first suggestion opened the files but they are not visible. The second suggestion caused an error that defun was not recognized. but it did create two windows I forgot to mention that I'm running emacs in Windows xp. What would be the command to have it open the programmable calculator.