Subject: 25.0.50; exiting ediff can leave Emacs unresponsive to keyboard input

From: Sean McAfee <[email-masked]>
Date: Fri, 30 Oct 2015 17:02:24 -0700

Recipe:

1. Start graphical Emacs with emacs -Q.
2. Create a buffer named "foo" with C-x b foo RET; insert the text "foo\n" there.
3. Create a second buffer named "bar" with C-x 4 b bar RET; insert the
text "bar\n" there.
4. M-x ediff-buffers foo RET bar RET
5. Either exit Ediff immediately with q, or move around and past the
single difference region with n's and p's, then exit.

With an appreciable frequency, after these steps Emacs is left in a
state in which it ignores any further keyboard input.  Mouse
interactions are unaffected, but not particularly useful with no more
keyboard input registering.  I have to close Emacs and restart, but if
Emacs asks me any questions before closing (eg. if I want to save any
modified files, or exit despite some processes still running), I'm
stuck; I cannot respond, so I have to open a terminal and kill the Emacs
process.

The same thing can happen if I use ediff-files instead of ediff-buffers.

The issue does not seem to arise if Emacs is run in non-graphical mode,
ie. by "emacs -Q -nw".

In GNU Emacs 25.0.50.2 (x86_64-unknown-linux-gnu, GTK+ Version 3.10.8)
 of 2015-10-26
Repository revision: 3f828dc76be74e3587af74b5b3e3458f67f2b7ba
Windowing system distributor 'The X.Org Foundation', version 11.0.11600000
System Description:	Ubuntu 14.04.3 LTS

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GCONF GSETTINGS
NOTIFY LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11

Important settings:
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix

Major mode: Emacs-Lisp

Minor modes in effect:
  global-anzu-mode: t
  anzu-mode: t
  dtrt-indent-mode: t
  projectile-global-mode: t
  projectile-mode: t
  elisp-slime-nav-mode: t
  diff-auto-refine-mode: t
  global-git-commit-mode: t
  async-bytecomp-package-mode: t
  shell-dirtrack-mode: t
  google-this-mode: t
  global-flycheck-mode: t
  flycheck-mode: t
  minibuffer-depth-indicate-mode: t
  ido-everywhere: t
  global-undo-tree-mode: t
  undo-tree-mode: t
  paredit-mode: t
  override-global-mode: t
  show-paren-mode: t
  electric-pair-mode: t
  savehist-mode: t
  desktop-save-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent messages:
Note: standard-indent adjusted to 2
Note: sgml-basic-offset adjusted to 4
Note: sgml-basic-offset adjusted to 8
Note: indent-tabs-mode adjusted to t
Note: sgml-basic-offset adjusted to 4
Note: standard-indent adjusted to 5
Note: standard-indent adjusted to 2
Wrote /home/smcafee1/.emacs.d/.emacs.desktop.lock
Desktop: 94 buffers restored.
For information about GNU Emacs and the GNU system, type C-h C-a.

Load-path shadows:
~/emacs/japanese hides /usr/local/share/emacs/25.0.50/lisp/language/japanese

Features:
(shadow sort mail-extr emacsbug markdown-mode php-mode speedbar sb-image
ezimage dframe sh-script executable conf-mode org-element org-rmail
org-mhe org-irc org-info org-gnus org-docview doc-view jka-compr
image-mode org-bibtex bibtex org-bbdb org-w3m the-org-mode-expansions
org org-macro org-footnote org-pcomplete org-list org-faces org-entities
noutline outline org-version ob-emacs-lisp ob ob-tangle ob-ref ob-lob
ob-table ob-exp org-src ob-keys ob-comint ob-core ob-eval org-compat
org-macs org-loaddefs cal-menu calendar cal-loaddefs cap-words superword
subword ensime-company yasnippet company scala-mode2 scala-mode2-imenu
scala-mode2-sbt scala-mode2-map scala-mode2-fontlock scala-mode2-indent
scala-mode2-paragraph scala-mode2-lib gnus-dired restclient
css-mode-expansions css-mode smie tagedit html-mode-expansions sgml-mode
js-mode-expansions js imenu cc-mode-expansions cc-mode cc-fonts cc-guess
cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs anzu vc
vc-dispatcher vc-git smtpmail-multi smtpmail ensime ensime-sbt sbt-mode
sbt-mode-rgrep sbt-mode-comint sbt-mode-buffer sbt-mode-project
ensime-http ensime-ui ensime-semantic-highlight ensime-doc ensime-search
ensime-undo ensime-startup ensime-refactor ensime-popup ensime-notes
ensime-model ensime-mode ensime-inspector ensime-goto-testfile
ensime-editor popup ensime-debug gdb-mi bindat gud ensime-stacktrace
ensime-inf ensime-completion-util scala-mode2-syntax ensime-config
ensime-util ensime-client ensime-vars s ucs-normalize flymake hideshow
pp arc-mode archive-mode url-gw ensime-macros zenburn-theme
dash-functional json hydra lv dtrt-indent projectile grep ibuf-ext
ibuffer elisp-slime-nav etags xref project magit-blame magit-stash
magit-bisect magit-remote magit-commit magit-sequence magit magit-apply
magit-wip magit-log magit-diff smerge-mode diff-mode magit-core
magit-process magit-popup magit-mode magit-git crm magit-section
magit-utils git-commit log-edit message sendmail rfc822 mml mml-sec
mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045
ietf-drums mailabbrev gmm-utils mailheader pcvs-util add-log with-editor
async-bytecomp async tramp-sh tramp tramp-compat tramp-loaddefs trampver
shell pcomplete format-spec google-this url url-proxy url-privacy
url-expand url-methods url-history url-cookie url-domsuf url-util
url-parse auth-source password-cache url-vars mailcap flycheck find-func
rx subr-x dash gnus gnus-ems nnheader gnus-util mail-utils mm-util
help-fns mail-prsvr wid-edit mb-depth ido seq dired-details+ dired
dired-details change-inner expand-region text-mode-expansions
er-basic-expansions expand-region-core advice expand-region-custom
org-bullets undo-tree diff ack compile paredit edmacro kmacro
use-package diminish bind-key easy-mmode finder-inf eieio byte-opt
bytecomp byte-compile cl-extra help-mode cconv eieio-core info package
easymenu epg-config paren elec-pair savehist desktop frameset server
hippie-exp comint ansi-color ring thingatpt cl-seq perl-mode cl-macs cl
gv cl-loaddefs pcase cl-lib time-date mule-util tooltip eldoc electric
uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win
term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list newcomment elisp-mode lisp-mode prog-mode register page
menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core frame cl-generic cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms
cp51932 hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese charscript case-table epa-hook jka-cmpr-hook help
simple abbrev minibuffer cl-preloaded 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
dbusbind inotify dynamic-setting system-font-setting font-render-setting
move-toolbar gtk x-toolkit x multi-tty make-network-process emacs)

Memory information:
((conses 16 595672 42244)
 (symbols 48 53276 0)
 (miscs 40 2272 1109)
 (strings 32 138273 21222)
 (string-bytes 1 4507571)
 (vectors 16 79906)
 (vector-slots 8 1961599 117490)
 (floats 8 467 515)
 (intervals 56 5532 117)
 (buffers 976 105)
 (heap 1024 86573 2200))