I have a RHEL 7 box, and I've installed emacs onto it (v24.3.1). This version of Emacs seems to be broken. You used to be able to edit by entering a command like this:

emacs -- somefilename.txt

and the Emacs editor would open up with somefilename.txt ready for editing. Now it's just showing the *GNU Emacs* screen and then open the file within Emacs for editing.

Normally, I don't use -- (dash dash) before the filename, but unfortunately when using visudo, it execs the command emacs -- /etc/sudoers.tmp leads to the problem mentioned above. Does anyone know how to fix this?

1 Answer 1


From the Emacs manual, node Emacs Invocation:

Arguments starting with - are "options", and so is +LINENUM. All other arguments specify files to visit. Emacs visits the specified files while it starts up. The last file specified on the command line becomes the current buffer; the other files are also visited in other buffers. As with most programs, the special argument -- says that all subsequent arguments are file names, not options, even if they start with -.

This part of what you wrote is unclear to me:

Now it's just showing the GNU Emacs screen and then open the file within emacs for editing.

Do you mean that it does in fact open the file (in addition to showing the startup screen)? Or do you mean that it does not open the file (it just shows the startup screen), and so you must open the file manually?

If you mean the former then just what is the problem/question?

A guess, if you mean the former, is that you don't want to see the startup screen at all. In that case, just set or customize option inhibit-startup-screen to t.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.