[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Change the default behaviour when 2 files are open
From: |
Thierry Volpiatto |
Subject: |
Re: Change the default behaviour when 2 files are open |
Date: |
Fri, 07 Mar 2008 10:57:43 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) |
"Francis Moreau" <francis.moro@gmail.com> writes:
> On Thu, Mar 6, 2008 at 10:42 PM, Nick Roberts <nickrob@snap.net.nz> wrote:
>> Francis Moreau writes:
>> > On Thu, Mar 6, 2008 at 8:24 PM, Peter Dyballa <Peter_Dyballa@web.de>
>> wrote:
>> > > If you can't find anything in the Emacs info node, then send a bug
>> > > report (from Help menu) in which you ask to add customisation to set
>> > > a preference for vertical or horizontal splitting.
>> > >
>> >
>> > I couldn't have found anything revelant.
>> >
>> > I'll send a bug report if nothing interesting can come up from this
>> thread.
>>
>> Bastien has already answered your question:
>>
>>
>> M-x customize-variable RET split-window-preferred-function RET
>>
>> and select the value "horizontally".
>
> Ah yes but I tried it and it fails because I'm using emacs 22.1 and
> I'm not able to upgrade emacs on this machine.
>
>>
>> I don't know where the docstring he quoted is from because this option
>> seems to
>> only be in Emacs 23.0.60 in the CVS repository and will not be part of the
>> next
>> release (22.2).
>>
>
> So I guess there's no way to do so in my case.
>
> thanks
You can, alternatively, write in your .emacs something like:
--8<---------------cut here---------------start------------->8---
(find-file file1)
(split-window-horizontally)
(find-file-other-window file2)
--8<---------------cut here---------------end--------------->8---
and you can save this config with:
(window-configuration-to-register 119 nil) ;;119 == w
But you can choose something else:
save your config with C-x r w ==> choose a letter ==> RET
Then hit C-x esc esc and copy the line in minibuffer in your .emacs
--
A + Thierry
Pub key: http://pgp.mit.edu