GNU bug report logs - #44245
27.1; electric-pair-mode may interfere with delete-selection-mode

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Dale Sedivec <dale@HIDDEN>; dated Mon, 26 Oct 2020 20:02:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 26 Oct 2020 20:01:46 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Oct 26 16:01:46 2020
Received: from localhost ([127.0.0.1]:41469 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kX8gb-0000G6-Sa
	for submit <at> debbugs.gnu.org; Mon, 26 Oct 2020 16:01:46 -0400
Received: from lists.gnu.org ([209.51.188.17]:34704)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dale@HIDDEN>) id 1kX8gZ-0000Fy-LN
 for submit <at> debbugs.gnu.org; Mon, 26 Oct 2020 16:01:44 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:37788)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <dale@HIDDEN>) id 1kX8gZ-00029r-8g
 for bug-gnu-emacs@HIDDEN; Mon, 26 Oct 2020 16:01:43 -0400
Received: from mail-oi1-x22a.google.com ([2607:f8b0:4864:20::22a]:38960)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <dale@HIDDEN>) id 1kX8gW-0005bm-Uo
 for bug-gnu-emacs@HIDDEN; Mon, 26 Oct 2020 16:01:42 -0400
Received: by mail-oi1-x22a.google.com with SMTP id u127so11726782oib.6
 for <bug-gnu-emacs@HIDDEN>; Mon, 26 Oct 2020 13:01:40 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=codefu-org.20150623.gappssmtp.com; s=20150623;
 h=from:content-transfer-encoding:mime-version:subject:message-id:date
 :to; bh=JULs8oL3cCNnmqoXpjxe8Tn7KWtrG2C+rlZSjo2srro=;
 b=opanhS+z5bJD90GVmSGE+zLtt9VQ1QLksV8UldVpbOuVunUm5BNyJIPUl3lwFhfg8g
 fV4v8PJCJWlmEbXRx9RPf+X6mMXf3kPuuYOrQCQ5ta/akRMg9+LyHhM3yOO62Ag02wzO
 QoDWuLRIrzw9ZVJz1tlZNB4XOHHzkDRRDw3lPdIHONAlwNuFHpQVQR5qdJVkLYIHuQNr
 cBeCJWCsEBX9NtAPS4vF6BcNaiMH+wfMV9f0uNSFIq76ZwJvwdWxM4GCN8OA4g/QKpk7
 lDI3ywMSoBrxSAxGtfbkTehOJc/SHfJLuJr61q72CYNEtksiVseiF24vnaFpLmhPfr+a
 SzUg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:content-transfer-encoding:mime-version
 :subject:message-id:date:to;
 bh=JULs8oL3cCNnmqoXpjxe8Tn7KWtrG2C+rlZSjo2srro=;
 b=OshL6Y3SOFD+Q5brToK/pCH9Fgh0+OwM2GY0c4AMDv6OkNVr99s3R+H01TlNr826Ca
 eTIw3jKkYrRLKuJ2AzAo/W7VhYhouTF6D8DpQQS7l1vp8+tAb5wGCW9iD8a1wv0u1B+K
 ToJnhzG9+IFMdWBR8z5TgPVJsncn5Uxb+7EIMT0N4c2Iku2cOuWZMnFAQvdB1g+XeZpf
 f1uM2RCxWitPeuujBRTFA5z6oFvPx6spcBMwlP+OrIKxR3kIXKj9PAplPVXRIrBHz0V1
 fOQPCzjkbyEgaCeC4ZD3R0bxiSnp7yaNhvt5WYv8I0IQ9dvcCSjvuREBqAs1cuOznwFu
 MK6A==
X-Gm-Message-State: AOAM532G+3gHNNScDfn69PoMBcWc032SJWTpdBzq7JoUyU1FHyytU4Wu
 Je2KuUmNBGRzeds4LeE7Lu4IhBx1VR1Ve3Jh
X-Google-Smtp-Source: ABdhPJzplDlEk/tSstVsAu0zn02MK5XW7+Xz3X6dwZkBxzgTIqNdaub8RRazVhoIyOaeKIQOaAoKLA==
X-Received: by 2002:aca:af8f:: with SMTP id y137mr9909148oie.170.1603742499027; 
 Mon, 26 Oct 2020 13:01:39 -0700 (PDT)
Received: from dale.caliginous.net (152.160.30.136.in-addr.arpa.
 [136.30.160.152])
 by smtp.gmail.com with ESMTPSA id l23sm4105761otk.68.2020.10.26.13.01.38
 for <bug-gnu-emacs@HIDDEN>
 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
 Mon, 26 Oct 2020 13:01:38 -0700 (PDT)
From: Dale Sedivec <dale@HIDDEN>
Content-Type: text/plain;
	charset=utf-8
Content-Transfer-Encoding: quoted-printable
Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.17\))
Subject: 27.1; electric-pair-mode may interfere with delete-selection-mode
Message-Id: <6EA183A7-44B8-4CA4-9BD8-A2E94FBD8E54@HIDDEN>
Date: Mon, 26 Oct 2020 15:01:36 -0500
To: bug-gnu-emacs@HIDDEN
X-Mailer: Apple Mail (2.3445.104.17)
Received-SPF: none client-ip=2607:f8b0:4864:20::22a;
 envelope-from=dale@HIDDEN; helo=mail-oi1-x22a.google.com
X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache.
 That's all we know.
X-Spam_score_int: -18
X-Spam_score: -1.9
X-Spam_bar: -
X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,
 SPF_NONE=0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Steps to reproduce:

1. emacs -Q

2. Enter *scratch*

3. Enable `delete-selection-mode': M-x delete-selection-mode RET

4. Enable `electric-pair-local-mode': M-x electric-pair-local-mode RET

5. Disable `electric-pair-local-mode': M-x electric-pair-local-mode RET

Note that this has left `electric-pair-will-use-region' in
`self-insert-uses-region-functions'.

6. Make some text and select it: foo C-SPC C-a

7. Type (

Expected behavior: "foo" is replaced by "("

Observed behavior: "(" is inserted, "foo" remains, region is deactivated

My ideas for fixing this are to either (1) make
`electric-pair-will-use-region' check the value of `electric-pair-mode';
or (2) add `electric-pair-will-use-region' to
`self-insert-uses-region-functions' as a buffer-local value, and then
remove it when elec-pair is turned off in the buffer.


In GNU Emacs 27.1 (build 1, x86_64-apple-darwin19.6.0, NS appkit-1894.60 =
Version 10.15.6 (Build 19G2021))
of 2020-09-14 built on catalina.internal.macports.net
Windowing system distributor 'Apple', version 10.3.1894
System Description:  Mac OS X 10.15.7

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Mark set
Delete-Selection mode enabled
Mark set
Electric-Pair-Local mode enabled in current buffer
execute-extended-command: =E2=80=98=E2=80=99 is not a valid command name
Electric-Pair-Local mode disabled in current buffer
Mark set

Configured using:
'configure --prefix=3D/opt/local --without-dbus --without-gconf
--without-libotf --without-m17n-flt --with-gmp --with-gnutls
--with-json --with-xml2 --with-modules --infodir
/opt/local/share/info/emacs --with-ns --with-lcms2 --without-harfbuzz
--without-imagemagick --without-xaw3d --with-rsvg 'CFLAGS=3D-pipe -Os
-isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -arch
x86_64' 'CPPFLAGS=3D-I/opt/local/include
-isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk'
'LDFLAGS=3D-L/opt/local/lib -Wl,-headerpad_max_install_names -Wl,-no_pie
-Wl,-syslibroot,/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk
-arch x86_64''

Configured features:
RSVG GLIB NOTIFY KQUEUE ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS XIM
NS MODULES THREADS JSON PDUMPER LCMS2 GMP

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

Major mode: Lisp Interaction

Minor modes in effect:
  delete-selection-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  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

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs
format-spec rfc822 mml mml-sec epa derived epg epg-config gnus-util
rmail rmail-loaddefs text-property-search time-date mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail
rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils elec-pair
cus-start cus-load delsel finder-inf package easymenu browse-url
url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs
eieio-loaddefs password-cache json subr-x map url-vars seq byte-opt gv
bytecomp byte-compile cconv cl-loaddefs cl-lib tooltip eldoc electric
uniquify ediff-hook vc-hooks lisp-float-type mwheel term/ns-win ns-win
ucs-normalize mule-util term/common-win tool-bar dnd fontset image
regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode
lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch
timer select scroll-bar mouse jit-lock font-lock syntax facemenu
font-core term/tty-colors frame minibuffer 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 composite charscript charprop
case-table epa-hook jka-cmpr-hook help simple abbrev obarray
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 threads kqueue cocoa ns
lcms2 multi-tty make-network-process emacs)

Memory information:
((conses 16 200100 10989)
(symbols 48 13283 1)
(strings 32 66300 2365)
(string-bytes 1 1661608)
(vectors 16 18294)
(vector-slots 8 250505 8722)
(floats 8 22 25)
(intervals 56 241 0)
(buffers 1000 12))


--=20
Dale Sedivec
dsedivec@HIDDEN





Acknowledgement sent to Dale Sedivec <dale@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#44245; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 26 Oct 2020 20:15:01 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.