Subject: bug#32356: 26.1; --file visits file later than expected

From: [email-masked] (Per Starbäck)
Date: Fri, 03 Aug 2018 12:16:39 +0200

Noam Postavsky <[email-masked]> writes:

> The buffer is set by then, e.g., try
>
>     emacs -Q --file=test.txt --eval '(princ (cons (current-buffer)
> (frame-selected-window)))'
>
> and you get (test.txt . #<window 3 on *scratch*>).  So it's just that
> window selection doesn't happen immediately.

Thanks! I should have tried that as well when making my test case
smaller.

For what I was actually trying to do I needed that window, and I also
tried (redisplay t) and other stuff in between to make it display before
my code continued, to no avail. Visiting the file explicitly with
find-file instead works for me. I just thought I found something strange
on the way, but evidently not, so this can be closed.