Subject: 24.5; Daemon leaves Mac OSX App open after closing GUI frame
From: [email-masked]
To: [email-masked]
Date: Wed, 26 Aug 2015 19:35:50 -0400
List-Id: <debbugs-submit.debbugs.gnu.org>

If I have Emacs (OSX App) started in daemon mode, and then create a
GUI frame, e.g. emacsclient -c, an instance of Emacs.app starts,
which then does not go away when the frame is closed with C-x C-c.
Most menu items, even ones such as "New Frame (C-x 5 2)" that seem
like they should make sense without a frame, are unresponsive.

The app is also unable to respond to s-q, though it does respond to the
"Quit Emacs (Command-Q)" item in the App menu, which C-h k shows
as sending <ns-power-off> rather than a <menu-bar> sequence.

I'm not sure what behavior should be expected here. In order of my
personal preference:

1. Keep the app open, and most menu commands should open a new
   frame.

2. Somehow (is this possible?) close the app instance without shutting
   down the daemon process, when there are no frames.

3. Somehow create a separate app instance for each emacsclient -c
   process.

In GNU Emacs 24.5.1 (x86_64-apple-darwin13.4.0, NS apple-appkit-1265.21)
 of 2015-04-10 on builder10-9.porkrind.org
Windowing system distributor `Apple', version 10.3.1344
Configured using:
 `configure --with-ns '--enable-locallisppath=/Library/Application
 Support/Emacs/${version}/site-lisp:/Library/Application
 Support/Emacs/site-lisp''

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent messages:
Starting Emacs daemon.
When done with this frame, type C-x 5 0

Load-path shadows:
None found.

Features:
(shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml
easymenu mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums
mm-util help-fns mail-prsvr mail-utils server time-date tooltip electric
uniquify ediff-hook vc-hooks lisp-float-type mwheel ns-win tool-bar dnd
fontset image regexp-opt fringe tabulated-list newcomment lisp-mode
prog-mode register page menu-bar rfn-eshadow timer select scroll-bar
mouse jit-lock font-lock syntax facemenu font-core frame cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev
minibuffer nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote make-network-process
cocoa ns multi-tty emacs)

Memory information:
((conses 16 72471 4238)
 (symbols 48 17293 0)
 (miscs 40 43 140)
 (strings 32 10183 4263)
 (string-bytes 1 271546)
 (vectors 16 9219)
 (vector-slots 8 376271 16268)
 (floats 8 57 68)
 (intervals 56 173 0)
 (buffers 960 12))