[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#32356: 26.1; --file visits file later than expected
From: |
Per Starbäck |
Subject: |
bug#32356: 26.1; --file visits file later than expected |
Date: |
Fri, 03 Aug 2018 11:51:49 +0200 |
In GNU Emacs 26.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.26)
Windowing system distributor 'The X.Org Foundation', version 11.0.11905000
System Description: CentOS Linux release 7.5.1804 (Core)
I'm not sure if this is a bug or just other unexpected (by me) behavior:
$ emacs -Q --file=test.txt --eval '(princ (frame-selected-window))'
This starts an emacs and prints "#<window 3 on *scratch*>"
I expected it to already have selected a window with test.txt instead.
Only by opening the file with something like
$ emacs -Q --eval '(progn (find-file "test.txt") (princ
(frame-selected-window)))'
instead do I get the result "#<window 3 on test.txt>"
that I expected.
If this behavior is intended, I think something could be added to
"(emacs) Action Arguments" about it. I think this text about "--insert" there
gives the impression that action arguments are processed in the order
they are given:
> Usually, this is the
> ‘*scratch*’ buffer (*note Lisp Interaction::), but if arguments
> earlier on the command line visit files or switch buffers, that
> might be a different buffer.
- bug#32356: 26.1; --file visits file later than expected,
Per Starbäck <=