GNU bug report logs - #32356
26.1; --file visits file later than expected

Previous Next

Package: emacs;

Reported by: starback <at> stp.lingfil.uu.se (Per Starbäck)

Date: Fri, 3 Aug 2018 09:53:02 UTC

Severity: normal

Tags: notabug

Found in version 26.1

Done: Noam Postavsky <npostavs <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: starback <at> stp.lingfil.uu.se (Per Starbäck)
To: 32356 <at> debbugs.gnu.org
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.




This bug report was last modified 6 years and 352 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.