I would like to be able to implement the following logic.
(if (developer-opened-file-with-emacs)
(do nothing, get on with working as fast as possible)
(load fancy splash screen that may take a while))
What would be a good way to detect this case so that I may use this to choose what kind of startup behavior to use?
Another way to say this is: Will emacs show *scratch* buffer once it's started.
Examples of opening emacs with a file include:
emacs somefile.txt
Or using elisp:
emacs --eval '(progn (find-file "test.txt"))'
Note that checking argv isn't a good option since elisp may be used in a command line argument to open files.
Finder.appon OSX and Emacs was built--with-ns? – lawlist Feb 13 '18 at 00:02(cl-remove-if-not #'buffer-file-name (buffer-list)). But maybe there is some history mechanism interfering which opens the last file buffers automagically... – Tobias Feb 13 '18 at 01:27buffer-file-nameworks as long as this isn't in the body of theinitfile (worth adding as an answer?) – ideasman42 Feb 14 '18 at 03:56