* Setting initial frame's parameters before its creation
@ 2013-03-01 2:26 Leo Liu
2013-03-01 3:47 ` Stefan Monnier
0 siblings, 1 reply; 11+ messages in thread
From: Leo Liu @ 2013-03-01 2:26 UTC (permalink / raw)
To: emacs-devel
Hi there,
I am now working with a setup with two screens of different resolutions.
I would like a way in elisp to change the initial frame's parameters
before its creation.
Setting them using x resources seems to be the only way but it could
only provide good defaults for a fixed resolution and thus breaks down
with two resolutions as in my case.
Any suggestions?
Thanks,
Leo
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Setting initial frame's parameters before its creation
2013-03-01 2:26 Setting initial frame's parameters before its creation Leo Liu
@ 2013-03-01 3:47 ` Stefan Monnier
2013-03-01 5:14 ` Leo Liu
0 siblings, 1 reply; 11+ messages in thread
From: Stefan Monnier @ 2013-03-01 3:47 UTC (permalink / raw)
To: Leo Liu; +Cc: emacs-devel
> I am now working with a setup with two screens of different resolutions.
> I would like a way in elisp to change the initial frame's parameters
> before its creation.
> Setting them using x resources seems to be the only way but it could
> only provide good defaults for a fixed resolution and thus breaks down
> with two resolutions as in my case.
> Any suggestions?
I have a local patch which causes Emacs (in GUI sessions) to read the
.emacs because creating the "initial" frame. You could use something
like that, but it requires recompiling Emacs.
Another option might be to use an emacs daemon, since in this case as
well the .emacs file is read before setting up any GUI frame.
Stefan
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Setting initial frame's parameters before its creation
2013-03-01 3:47 ` Stefan Monnier
@ 2013-03-01 5:14 ` Leo Liu
2013-03-01 14:24 ` Stefan Monnier
0 siblings, 1 reply; 11+ messages in thread
From: Leo Liu @ 2013-03-01 5:14 UTC (permalink / raw)
To: emacs-devel
On 2013-03-01 11:47 +0800, Stefan Monnier wrote:
> I have a local patch which causes Emacs (in GUI sessions) to read the
> .emacs because creating the "initial" frame. You could use something
> like that, but it requires recompiling Emacs.
Yes I am interested. BTW, do you plan to add it to trunk at some point?
> Another option might be to use an emacs daemon, since in this case as
> well the .emacs file is read before setting up any GUI frame.
OK, I'll think about this as well. Thank you.
Leo
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Setting initial frame's parameters before its creation
2013-03-01 5:14 ` Leo Liu
@ 2013-03-01 14:24 ` Stefan Monnier
2013-03-01 16:34 ` Stefan Monnier
0 siblings, 1 reply; 11+ messages in thread
From: Stefan Monnier @ 2013-03-01 14:24 UTC (permalink / raw)
To: Leo Liu; +Cc: emacs-devel
>> I have a local patch which causes Emacs (in GUI sessions) to read the
>> .emacs because creating the "initial" frame. You could use something
>> like that, but it requires recompiling Emacs.
> Yes I am interested. BTW, do you plan to add it to trunk at some point?
I wrote it more as an experiment than anything else. If there's enough
demand I can try and clean it up, but the main problem is that to use
it, you'd need to provide a command-line argument (since just flat out
changing the Emacs behavior would break many users's .emacs).
>> Another option might be to use an emacs daemon, since in this case as
>> well the .emacs file is read before setting up any GUI frame.
> OK, I'll think about this as well. Thank you.
Stefan
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Setting initial frame's parameters before its creation
2013-03-01 14:24 ` Stefan Monnier
@ 2013-03-01 16:34 ` Stefan Monnier
2013-03-01 22:14 ` Xue Fuqiao
` (2 more replies)
0 siblings, 3 replies; 11+ messages in thread
From: Stefan Monnier @ 2013-03-01 16:34 UTC (permalink / raw)
To: Leo Liu; +Cc: emacs-devel
> I wrote it more as an experiment than anything else. If there's enough
> demand I can try and clean it up, but the main problem is that to use
> it, you'd need to provide a command-line argument (since just flat out
> changing the Emacs behavior would break many users's .emacs).
Tho I guess we could introduce a new startup file ~/.emacs.d/early-init.el
Stefan
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Setting initial frame's parameters before its creation
2013-03-01 16:34 ` Stefan Monnier
@ 2013-03-01 22:14 ` Xue Fuqiao
2013-03-02 2:55 ` Leo Liu
2013-03-02 12:55 ` Tomasz Gajewski
2 siblings, 0 replies; 11+ messages in thread
From: Xue Fuqiao @ 2013-03-01 22:14 UTC (permalink / raw)
To: Stefan Monnier; +Cc: Leo Liu, emacs-devel
On Fri, 01 Mar 2013 11:34:42 -0500
Stefan Monnier <monnier@iro.umontreal.ca> wrote:
> > I wrote it more as an experiment than anything else. If there's enough
> > demand I can try and clean it up, but the main problem is that to use
> > it, you'd need to provide a command-line argument (since just flat out
> > changing the Emacs behavior would break many users's .emacs).
>
> Tho I guess we could introduce a new startup file ~/.emacs.d/early-init.el
Looks good.
> Stefan
--
Best regards, Xue Fuqiao.
http://www.emacswiki.org/emacs/XueFuqiao
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Setting initial frame's parameters before its creation
2013-03-01 16:34 ` Stefan Monnier
2013-03-01 22:14 ` Xue Fuqiao
@ 2013-03-02 2:55 ` Leo Liu
2013-03-02 12:55 ` Tomasz Gajewski
2 siblings, 0 replies; 11+ messages in thread
From: Leo Liu @ 2013-03-02 2:55 UTC (permalink / raw)
To: emacs-devel
On 2013-03-02 00:34 +0800, Stefan Monnier wrote:
> Tho I guess we could introduce a new startup file ~/.emacs.d/early-init.el
>
>
> Stefan
That would be nice. A few people are annoyed that we cannot program
initial-frame nicely in elisp and before-init-hook is beyond useless for
users.
How about naming the file before-init or before-init-hook?
Thanks,
Leo
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Setting initial frame's parameters before its creation
2013-03-01 16:34 ` Stefan Monnier
2013-03-01 22:14 ` Xue Fuqiao
2013-03-02 2:55 ` Leo Liu
@ 2013-03-02 12:55 ` Tomasz Gajewski
2013-03-03 10:39 ` Didier Verna
2 siblings, 1 reply; 11+ messages in thread
From: Tomasz Gajewski @ 2013-03-02 12:55 UTC (permalink / raw)
To: Stefan Monnier; +Cc: Leo Liu, emacs-devel
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> I wrote it more as an experiment than anything else. If there's
>> enough demand I can try and clean it up, but the main problem is that
>> to use it, you'd need to provide a command-line argument (since just
>> flat out changing the Emacs behavior would break many users's
>> .emacs).
>
> Tho I guess we could introduce a new startup file
> ~/.emacs.d/early-init.el
It would be nice if it could also solve (maybe not so common) problem of
loading custom user code before executing site init files. I had to
uninstall doxymacs on debian to be able to load development version of
cedet because doxymacs loaded wrong version of eieio before evaluating
my .emacs. I couldn't find any other clean way of doing it.
Or maybe there is some other solution to this that I'm not aware of?
Regards
Tomasz Gajewski
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2013-03-03 19:47 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-01 2:26 Setting initial frame's parameters before its creation Leo Liu
2013-03-01 3:47 ` Stefan Monnier
2013-03-01 5:14 ` Leo Liu
2013-03-01 14:24 ` Stefan Monnier
2013-03-01 16:34 ` Stefan Monnier
2013-03-01 22:14 ` Xue Fuqiao
2013-03-02 2:55 ` Leo Liu
2013-03-02 12:55 ` Tomasz Gajewski
2013-03-03 10:39 ` Didier Verna
2013-03-03 18:49 ` Tomasz Gajewski
2013-03-03 19:47 ` Didier Verna
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).