help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: open files on startup


From: JT Fleming
Subject: Re: open files on startup
Date: Thu, 19 Nov 2009 13:42:12 -0800 (PST)
User-agent: G2/1.0

On Nov 19, 1:31 pm, 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
> >   ;; custom-set-variables was added by Custom.
> >   ;; If you edit it by hand, you could mess it up, so be careful.
> >   ;; Your init file should contain only one such instance.
> >   ;; If there is more than one, they won't work right.
> >  '(initial-buffer-choice "~/diary"))
>
> You could just put:
>
>     (dolist (file '("~/diary" "~/some-other-file"))
>        (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)
>    (delete-other-windows)
>    (loop repeat (1- (length files))
>          do (split-window-vertically)
>             (balance-windows))
>    (loop for file in files
>          do (find-file file)
>             (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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]