I'm on MS Windows, if that makes a difference.
My desired behavior:
- There is only one frame visible at any time.
- Visiting a file should use an existing window in that frame.
(This is the default behavior for Notepad++ as well as most browsers, though with tabs instead of buffers.)
To accomplish this using Emacs' client-server mode, I have this in my .emacs
:
(require 'server)
(unless (server-running-p) (server-start))
And I have an Edit with Emacs context menu item that uses a registry key with this value:
"C:\Users\FriendOfFred\emacs-26.2-x86_64\bin\emacsclientw.exe" "%1"
That worked fine yesterday. Today, after a system restart, emacsclientw
opens a new frame whenever I open a file from Windows Explorer or the command line, along with a message about the desktop file already being in use.
Last time I had an issue like this, as I recall, it was because the desktop file was too old, and restarting Emacs refreshed it. That doesn't seem to be the issue now.
What are some other possible causes of this issue? How can I figure out what's going on?