Subject: bug#30291: 25.2; "ubuntu mono font" and "query-replace" (twice) hangs emacs

From: Bill Evans <[email-masked]>
Date: Mon, 29 Jan 2018 17:58:38 -0800

Reproducible steps with "emacs -Q":

1. Set the font with (set-face-attribute 'default nil :font "Ubuntu Mono").
2. In any buffer (including *scratch* of a freshly-started emacs).
3. Do a query-replace, it does not matter if anything is found or replaced.
4. Do another query-replace. This time, emacs should provide the 
previous search/replace as default, something ala:
         Query replace (foo --> bar): _
     where the --> is actually a fancy arrow, not dash-dash-greaterthan. 
Emacs always slows down a little in this part.
5. Interrupt (C-g) before completing the act. Emacs hangs (for me). 
(Occasionally it requires doing this twice, never more than that.)

If I do not set the font (fresh emacs) or set it to another font (e.g., 
"Consolas"), no such slow-down or hang occurs with the same steps.

Versions: win10_64, emacs-25.2.1 (vgoulet's 25.2mod3), ubuntu mono 0.80 
(dtd 2011; non-mono fonts are 0.83 from 2015)

In GNU Emacs 25.2.1 (x86_64-w64-mingw32)
  of 2017-04-24 built on KAEL
Repository revision: 784602b10506c50075aa9463891a47380ebea55f
Windowing system distributor 'Microsoft Corp.', version 10.0.16299
Configured using:
  'configure --prefix=/tmp/emacs --without-imagemagick --without-dbus
  --with-modules 'CFLAGS=-O2 -fomit-frame-pointer -g0''

Configured features:
XPM JPEG TIFF GIF PNG RSVG SOUND NOTIFY ACL GNUTLS LIBXML2 ZLIB
TOOLKIT_SCROLL_BARS MODULES

Important settings:
   value of $LANG: ENU
   locale-coding-system: cp1252

Major mode: Lisp Interaction

Minor modes in effect:
   tooltip-mode: t
   global-eldoc-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
   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:
For information about GNU Emacs and the GNU system, type C-h C-a.

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message dired format-spec rfc822 mml
mml-sec password-cache epg epg-config gnus-util mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail
rfc2047 rfc2045 ietf-drums mm-util help-fns help-mode easymenu
cl-loaddefs pcase cl-lib mail-prsvr mail-utils time-date mule-util
tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type
mwheel dos-w32 ls-lisp disp-table w32-win w32-vars term/common-win
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 w32notify w32 multi-tty
make-network-process emacs)

Memory information:
((conses 16 90268 10268)
  (symbols 56 20082 0)
  (miscs 48 51 126)
  (strings 32 16583 4807)
  (string-bytes 1 439616)
  (vectors 16 11784)
  (vector-slots 8 427318 4744)
  (floats 8 160 33)
  (intervals 56 237 21)
  (buffers 976 20))