[Top][All Lists]

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

Re: open files on startup

From: Pascal J. Bourguignon
Subject: Re: open files on startup
Date: Fri, 20 Nov 2009 02:09:32 +0100
User-agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/22.3 (darwin)

JT Fleming <address@hidden> writes:

> On Nov 19, 1:31 pm, address@hidden (Pascal J. Bourguignon)
> wrote:
>> JT Fleming <address@hidden> 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.

Perhaps it was loop that wasn't defined?  You must prefix all the code
I give with a (require 'cl), if I forget to mention it.

> 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.

You can know what command is called when you type some keys with C-h k
followed by the keypresses you use to call it.

__Pascal Bourguignon__

reply via email to

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