all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: starback@stp.lingfil.uu.se (Per Starbäck)
To: 32356@debbugs.gnu.org
Subject: bug#32356: 26.1; --file visits file later than expected
Date: Fri, 03 Aug 2018 11:51:49 +0200	[thread overview]
Message-ID: <sa5y3dnlqve.fsf@haplologi.lingfil.uu.se> (raw)

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.





             reply	other threads:[~2018-08-03  9:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-03  9:51 Per Starbäck [this message]
2018-08-03 10:04 ` bug#32356: 26.1; --file visits file later than expected Noam Postavsky
2018-08-03 10:16   ` Per Starbäck
2018-08-03 11:06     ` Noam Postavsky

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=sa5y3dnlqve.fsf@haplologi.lingfil.uu.se \
    --to=starback@stp.lingfil.uu.se \
    --cc=32356@debbugs.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.