all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stephen Berman <stephen.berman@gmx.net>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: eval, load and -l
Date: Tue, 05 Jul 2016 17:37:01 +0200	[thread overview]
Message-ID: <87oa6cyu3m.fsf@gmx.net> (raw)
In-Reply-To: <83wpl0nnmg.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 05 Jul 2016 17:52:23 +0300")

On Tue, 05 Jul 2016 17:52:23 +0300 Eli Zaretskii <eliz@gnu.org> wrote:

>> From: Stephen Berman <stephen.berman@gmx.net>
>> Date: Tue, 05 Jul 2016 13:42:13 +0200
>> 
>> If I understand the Emacs and Lisp reference manuals correctly, I expect
>> that, when I have a file foo.el containing Lisp code, the following
>> procedures should produce the same results:
>> 
>> 1. emacs -Q
>>    C-x C-f foo.el RET
>>    M-x eval-buffer RET
>> 
>> 2. emacs -Q
>>    M-x load-file RET foo.el RET
>> 
>> 3. emacs -Q -l foo.el
>
> No, item 3 will always be different from the other two.
>
>> But I have code where the result of doing 1 or 2 differs from the result
>> of doing 3.
[...]
>> http://lists.gnu.org/archive/html/emacs-devel/2016-07/msg00154.html
>> 
>> As I noted there, when I evaluate the code in a running Emacs session,
>> i.e. as in 1 or 2, I see frame-widening; but when I load the code by
>> doing 3, there is no frame-widening.  Is this difference expected
>
> Yes, at least in principle.
>
>> and if so could someone point me to the relevant documentation or
>> part of the code that makes the difference?
>
> The order of things done during startup is documented in "Startup
> Summary" in the ELisp manual.  The --load command-line argument is
> processed in item 21, and then item 26 we recompute frame and window
> parameters and other related settings.

After Martin's reply to the above-referenced post made it clear that the
issue is related to the Gtk+ menu bar, it occurred to me that the
difference between 1/2 and 3 may be that with -l, the file is loaded
before the menu bar is created, which would account for why there is no
frame-widening in that case.  However, according to the Info node you
cite, the menu bar is created at step 9, well before -l is processed.
Can the recomputing in step 26 (or 27?) change the menu bar?  Yet step
26 only refers to modifications specified in the init files, which
doesn't seem relevant to this case.  Hmm.

Steve Berman



  reply	other threads:[~2016-07-05 15:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-05 11:42 eval, load and -l Stephen Berman
2016-07-05 14:00 ` Clément Pit--Claudel
2016-07-05 14:52 ` Eli Zaretskii
2016-07-05 15:37   ` Stephen Berman [this message]
2016-07-05 16:40     ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87oa6cyu3m.fsf@gmx.net \
    --to=stephen.berman@gmx.net \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.