4

I'm trying to set my desktop environment to use emacsclient to open text files.

I would like only one emacs x-window to be opened. Yet I don't know which command can be used to have an x-window created if and only if no emacs x-window already exists.

  • The command emacsclient %F doesn't work when no x-window exists.

  • The command emacsclient -c %F always creates a new x-window.

  • I don't know how to check for the existence of an emacs x-window.

Which command / script should I use ?


By x-window I mean 'what a window is for the window-manager'

loxaxs
  • 141
  • 3

1 Answers1

0
emacsclient -a /usr/bin/emacs %F

If you also want to use daemon mode, see Make emacsclient create a frame only if there isn't one already

Croad Langshan
  • 3,192
  • 14
  • 42