Subject: bug#21131: minibuffer repl delay

From: Chris Stacy <[email-masked]>
Date: Fri, 24 Jul 2015 21:40:23 -0400

In Aquamacs 3.2 GNU Emacs 24.4.51.2
(x86_64-apple-darwin14.0.0, NS apple-appkit-1343.14)
 of 2014-11-07 (Aquamacs-3.2) on watson.local
Operating System: OS X Version 10.10.4 (Build 14E46)
Configured using:
 `configure --with-ns --without-x 'CFLAGS=-arch x86_64 -O3 -g
 -mtune=corei7 -mmacosx-version-min=10.6' 'LDFLAGS=-arch x86_64 -O3 -g
 -mtune=corei7 -mmacosx-version-min=10.6''

Important settings:
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  savehist-mode: t
  smart-frame-positioning-mode: t
  aquamacs-autoface-mode: t
  recentf-mode: t
  show-paren-mode: t
  tooltip-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
  column-number-mode: t
  line-number-mode: t

I think this still happens in vanilla 24.5 and doesn't have anything to do with Aquamacs.
Can’t remember when it first appeared but it’s not a very new bug.

When I eval something in the scratch buffer, I get the answer immediately:

(+ 1997 120 400)
2517

But doing the same thing in the minibuffer (eval-expression)
incurs a huge delay after I hit ENTER and before seeing the answer.
For example, the above expression took over 7 seconds before I saw:

2117 (#o4105, #x845)

I can't tell if it is just arithmetic because the delays seem to random.

Sometimes there doesn't seem to be a delay.
This always comes back right away:

(length '(a b c d e))
5 (#o5, #x5, ?\C-e)

Sometimes this has a 2 second delay and sometimes not:
(cons 'a 'b)
(a . b)

Sometimes the delay goes away for a while in some cases.
Although never for any addition where one of the operands
is more than 4 digits.   This always has a 7 second delay:

(+ 1299 120)

Mysterious!

Makes it impossible to use the minibuffer as the always-available
quick desk calculator on the system, which I (used to) do constantly.