Subject: bug#31155: 26.1; electric-pair-mode sometimes inserts extra ) in process buffers

From: Alex Branham <[email-masked]>
Date: Sat, 14 Apr 2018 16:06:30 -0500

In buffers running processes (e.g. M-x run-python or M-x R if you have
ESS), electric-pair-mode sometimes (but not always) inserts ) instead of
closing the paren pairing. So typing exit() occasionally results in
exit())

I can't figure out how to reliably reproduce this.

In GNU Emacs 26.1 (build 1, x86_64-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2018-04-11 built on mars
Windowing system distributor 'The X.Org Foundation', version 11.0.11906000

Configured using:
 'configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib
 --localstatedir=/var --mandir=/usr/share/man --with-gameuser=:games
 --with-sound=alsa --with-modules --without-gconf --without-gsettings
 --with-mailutils --with-xml2 --with-x-toolkit=lucid --with-xft
 --with-xaw3d --with-imagemagick 'CFLAGS=-march=x86-64 -mtune=generic
 -O2 -pipe -fstack-protector-strong -fno-plt'
 CPPFLAGS=-D_FORTIFY_SOURCE=2
 LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now'

Configured features:
XAW3D XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS NOTIFY ACL
GNUTLS LIBXML2 FREETYPE LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS LUCID X11
MODULES THREADS LIBSYSTEMD LCMS2

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

Major mode: Python

Minor modes in effect:
  anaconda-eldoc-mode: t
  anaconda-mode: t
  electric-operator-mode: t
  magit-auto-revert-mode: t
  global-git-commit-mode: t
  shell-command-with-editor-mode: t
  company-mode: t
  ws-butler-mode: t
  global-diff-hl-mode: t
  diff-hl-mode: t
  diff-auto-refine-mode: t
  global-aggressive-indent-mode: t
  pdf-occur-global-minor-mode: t
  which-key-mode: t
  helm-mode: t
  flyspell-mode: t
  minions-mode: t
  yas-global-mode: t
  yas-minor-mode: t
  winum-mode: t
  save-place-mode: t
  projectile-mode: t
  show-paren-mode: t
  async-bytecomp-package-mode: t
  dired-async-mode: t
  flymake-mode: t
  shell-dirtrack-mode: t
  electric-pair-mode: t
  delete-selection-mode: t
  global-auto-revert-mode: t
  auto-revert-mode: t
  auto-insert-mode: t
  auto-compile-on-load-mode: t
  auto-compile-on-save-mode: t
  override-global-mode: t
  cl-old-struct-compat-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  global-prettify-symbols-mode: t
  prettify-symbols-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
  column-number-mode: t
  line-number-mode: t
  global-visual-line-mode: t
  visual-line-mode: t
  transient-mark-mode: t