I have the following in
export ALTERNATE_EDITOR="" export EDITOR="emacsclient -t"
When I run, for example
emacsclient something.tex &
when running X, in a Konsole terminal (Konsole is the KDE X term client), the file opens up inside the Konsole terminal displaying the file (as though I had called
-nw), when it should start up an emacs X frame. Also, the file is not normally editable. I cannot type, and when enter it behaves like I am still in the terminal, except the cursor jumps around on the screen when I try to type, and
echo $TERM still gives
xterm. Also, I'm seeing stuff like
Auto-saving...done at the bottom of the terminal. Checking the processes gives
$ ps aux | grep emacs faheem 31260 0.0 0.0 12516 800 pts/2 S 17:40 0:00 emacsclient something.tex faheem 31269 0.2 0.1 230896 27408 ? Ss 17:40 0:01 emacs --daemon
After further investigation, it seems the backgrouding
&. Is causing the problem. Leaving it out causes emacs to open in
-nw mode. But I want a full X emacs frame. Why is it not doing that?
I see the
-c option says
-c, --create-frame create a new frame instead of trying to use the current Emacs frame
and this does create a emacs X frame, but if there is no existing frame, why doesn't it create one instead of opening in the terminal?