From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ergus via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#53661: 29.0.50; electric-pair-mode not respecting electric-pair-inhibit-predicate. Date: Mon, 31 Jan 2022 16:06:39 +0100 Message-ID: <87fsp4eygw.fsf@aol.com> References: <87fsp4eygw.fsf.ref@aol.com> Reply-To: Ergus Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36126"; mail-complaints-to="usenet@ciao.gmane.io" To: 53661@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jan 31 16:09:03 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nEYIh-0009Ht-5W for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 31 Jan 2022 16:09:03 +0100 Original-Received: from localhost ([::1]:37098 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nEYIf-00032k-JC for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 31 Jan 2022 10:09:01 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:38624) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nEYIM-0002S3-Ru for bug-gnu-emacs@gnu.org; Mon, 31 Jan 2022 10:08:42 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:47329) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nEYHi-0002PL-CX for bug-gnu-emacs@gnu.org; Mon, 31 Jan 2022 10:08:31 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nEYHh-0006FQ-UD for bug-gnu-emacs@gnu.org; Mon, 31 Jan 2022 10:08:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Ergus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 31 Jan 2022 15:08:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 53661 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.164364166423990 (code B ref -1); Mon, 31 Jan 2022 15:08:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 31 Jan 2022 15:07:44 +0000 Original-Received: from localhost ([127.0.0.1]:40232 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nEYHQ-0006Er-4w for submit@debbugs.gnu.org; Mon, 31 Jan 2022 10:07:44 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:37998) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nEYHO-0006Ek-K5 for submit@debbugs.gnu.org; Mon, 31 Jan 2022 10:07:43 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:38516) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nEYHH-0002C5-K4 for bug-gnu-emacs@gnu.org; Mon, 31 Jan 2022 10:07:40 -0500 Original-Received: from sonic311-14.consmr.mail.bf2.yahoo.com ([74.6.131.124]:37042) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nEYHD-0002La-7O for bug-gnu-emacs@gnu.org; Mon, 31 Jan 2022 10:07:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048; t=1643641645; bh=1y6nZVLQSQi6+9a14PCqR9YRvhcG2LzL62jpZ4mZNf4=; h=From:To:Cc:Subject:Date:References:From:Subject:Reply-To; b=EsgTOYLOEjyfgLgEPL1g1LhAf3wJqCMzVpepZBgjhqFiKr3VxZsfMJMWi+gdQRH2L9jbQ+AubQsY1160jev1Qf1Z3gC2EkroWJzwlOiagwqCPqTM0F0L5MvDRcGgE2FoodysLC0shNhqILLTH1LFNZH79wavVjNbkNq97fKBmZiqYJ3D57zl2V6PCpRMZknb8ZHOhWjM1XejiL8obpT+8AAHKh07exwC3HZz4KyIDhI1zdxirqE7aUPKjzYg4422E+ZIZ4rXZtJ/G3NMb1zzPHF0LV0Vzxrk0pjjk7rijKBj2INtHVk/QsQE3w4tm4kXs78zj1g1oPfhfX0DsC0fpg== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1643641645; bh=2a27nCwK5DeVSDCOKv38NfUgKcxAVPPFup9JmGM5NA4=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=gK65rFxyyqO3nsnfIAuSvQLwgpL1Og/z42NB8CZ/M5qs0+iRukIJJO+OepWEEGVem/ioi2zP9opPboWiqSUxXTiZQC9ScYJOJCX8q+EY7RoG4DjA4Oxel4GRp3XiETa/KNZTaShRPUr3sbMr7wO+eeGpNKw9xoPAPfHPJceQXBdfxRO/KMpJy/9rLX7zNbYVs9rPDHy/wBYIkRRtyHt4vCl2Catam+C93Na3jHBJE9564sBb5dzwT1ImT61+VLr9lWTOWsvNglL1uRckxpKmxkyPFXF9n8GDwOf0q5Fxlmm1iGmruBQt0L/lifQhdc6m/+Map53MsBeSL3bDzewL9w== X-YMail-OSG: fzyJh5kVM1lSE6r7VGXl.8VdYceO.V3aOo9xVc4_J.XFyKgTzsW21R9IaTTZA_o x7hKV3_sM48t9loqaS7iNsbTgSyBSC7oTT.PRtTd23SauinSe4mk3WHzd6D.ZF9jx.q1xBtdse3R IC8mxH4mQa4OLVn_.JdnMeFX9pNaPw.hO6pC4qd6ES1wffw5oBZElA_vEyB7yUhhLDaGeP7c77A_ 3ywYn_wKqKjCrsrX5i_mebuuo4LgzHV2Vtwmayl8vuGa.pjcucobrrBDlu7YIUYu30zfQINEjfEC Y8W2nB8B0WqEPQp339fipcmui53S12EnxMa38bz6siQPtxpvpy5XCI59aO0y.BCnACC3aHzlcJjq 4PFmikirPGWR7_dOCkgTZUQPspYz0bUXRoR8buXk.hSKA2PxPOlKaymTYkXPpBwQ6o04R9ehLL4J vsXJRhW7sN2emliNuEF0DdH3VndBucYLNPawj4m1swRZKT3uYfsnDX0XTAU.IomcOU3VZJ65ryyU 80DMicguMyufduoQM.YB9kQKeXK41q4zlxZVC_lZslrWx00tOd794hxOhBNC5D0usMubEr1AGyFK bU822ojUx6.VUlJw6lFJUlytuTqempVmex6aRy5.aU6ei9BqqlXBXc8OQKn1IfiR62VJVT8n1.Xb Firff3kDBu2T1CaZV_b99YqIvF08eMyS_XJkH8E_6OvEkQKZBzMP5Zo5ICWvvTMMYfbNJNAd5pRx FvoPLmkUA8Eg9yDa8JgTwKbmBudEx4Ga937WBLi8DK4K802X4fQh7tVWATz_3lBX_rFh1cNJ1Sdu Qslb_SfpmUgPaRi7CEoYdrSZwy91jRmrIQ8kai.Yqm X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic311.consmr.mail.bf2.yahoo.com with HTTP; Mon, 31 Jan 2022 15:07:25 +0000 Original-Received: by kubenode503.mail-prod1.omega.ir2.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID 556449a525c3bc450d495e3508e8aea9; Mon, 31 Jan 2022 15:07:22 +0000 (UTC) X-Mailer: WebService/1.1.19615 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.aol Received-SPF: pass client-ip=74.6.131.124; envelope-from=spacibba@aol.com; helo=sonic311-14.consmr.mail.bf2.yahoo.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:225669 Archived-At: Hi: When adding new pairs to `electric-pair-pairs' the `electric-pair-inhibit-predicate' variable is not respected. Looking at the elect-pair file it seems to be related with: `electric-pair-post-self-insert-function' that hard-coded the condition to call `electric-pair-inhibit-predicate' with: (memq syntax '(?\( ?\" ?\$)) So, for other pairs, the function electric-pair-inhibit-predicate is never called. The fix only for this seems trivial, but there are hard-coded conditions like this in many places, so maybe a more "complete" fix may be desirable. Best I faced this issue trying to implement a workaround to add some pairs that are only electrically inserted when `use-region-p' (Ex: <> or ''). In GNU Emacs 29.0.50 (build 50, x86_64-pc-linux-gnu, GTK+ Version 3.24.31, cairo version 1.17.4) of 2022-01-31 built on Ergus Repository revision: 9a56b4e6864c4e0815bb67805cfa67910ab3eeb5 Repository branch: master System Description: Arch Linux Configured using: 'configure --prefix=/home/ergo/.local/ --with-mailutils --with-json --with-x-toolkit=gtk3 --with-xft --with-wide-int --with-modules --with-cairo --with-harfbuzz --with-native-compilation --with-pgtk' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG JSON LCMS2 LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PGTK PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS WEBP XIM GTK3 ZLIB Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: ELisp/d Minor modes in effect: windmove-mode: t global-auto-revert-mode: t xclip-mode: t yas-global-mode: t yas-minor-mode: t flyspell-mode: t company-mode: t flycheck-mode: t diff-hl-margin-local-mode: t diff-hl-margin-mode: t diff-hl-mode: t counsel-mode: t ivy-mode: t composable-mark-mode: t composable-mode: t repeat-mode: t xterm-mouse-mode: t minibuffer-depth-indicate-mode: t winner-mode: t show-smartparens-global-mode: t show-smartparens-mode: t smartparens-strict-mode: t smartparens-mode: t save-place-mode: t which-key-mode: t override-global-mode: t delete-selection-mode: t savehist-mode: t global-display-fill-column-indicator-mode: t display-fill-column-indicator-mode: t global-display-line-numbers-mode: t display-line-numbers-mode: t eldoc-mode: t mouse-wheel-mode: t file-name-shadow-mode: t context-menu-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 size-indication-mode: t column-number-mode: t line-number-mode: t indent-tabs-mode: t transient-mark-mode: t Load-path shadows: ~/gits/emacs_clones/composable/composable-mark hides /home/ergo/.config/emacs/elpa/composable-20201024.1458/composable-mark ~/gits/emacs_clones/composable/composable hides /home/ergo/.config/emacs/elpa/composable-20201024.1458/composable /home/ergo/.config/emacs/elpa/transient-20220130.1941/transient hides /home/ergo/.local/share/emacs/29.0.50/lisp/transient /home/ergo/.config/emacs/elpa/notmuch-20220126.1122/notmuch-jump hides /usr/share/emacs/site-lisp/notmuch-jump /home/ergo/.config/emacs/elpa/notmuch-20220126.1122/notmuch-hello hides /usr/share/emacs/site-lisp/notmuch-hello /home/ergo/.config/emacs/elpa/notmuch-20220126.1122/notmuch-query hides /usr/share/emacs/site-lisp/notmuch-query /home/ergo/.config/emacs/elpa/notmuch-20220126.1122/notmuch-show hides /usr/share/emacs/site-lisp/notmuch-show /home/ergo/.config/emacs/elpa/notmuch-20220126.1122/notmuch-parser hides /usr/share/emacs/site-lisp/notmuch-parser /home/ergo/.config/emacs/elpa/cmake-mode-20210104.1831/cmake-mode hides /usr/share/emacs/site-lisp/cmake-mode /home/ergo/.config/emacs/elpa/notmuch-20220126.1122/notmuch-wash hides /usr/share/emacs/site-lisp/notmuch-wash /home/ergo/.config/emacs/elpa/protobuf-mode-20211013.1726/protobuf-mode hides /usr/share/emacs/site-lisp/protobuf-mode /home/ergo/.config/emacs/elpa/notmuch-20220126.1122/notmuch-crypto hides /usr/share/emacs/site-lisp/notmuch-crypto /home/ergo/.config/emacs/elpa/notmuch-20220126.1122/notmuch-tree hides /usr/share/emacs/site-lisp/notmuch-tree /home/ergo/.config/emacs/elpa/notmuch-20220126.1122/coolj hides /usr/share/emacs/site-lisp/coolj /home/ergo/.config/emacs/elpa/notmuch-20220126.1122/notmuch-lib hides /usr/share/emacs/site-lisp/notmuch-lib /home/ergo/.config/emacs/elpa/notmuch-20220126.1122/notmuch-compat hides /usr/share/emacs/site-lisp/notmuch-compat /home/ergo/.config/emacs/elpa/notmuch-20220126.1122/notmuch-company hides /usr/share/emacs/site-lisp/notmuch-company /home/ergo/.config/emacs/elpa/notmuch-20220126.1122/notmuch-draft hides /usr/share/emacs/site-lisp/notmuch-draft /home/ergo/.config/emacs/elpa/notmuch-20220126.1122/notmuch-tag hides /usr/share/emacs/site-lisp/notmuch-tag /home/ergo/.config/emacs/elpa/notmuch-20220126.1122/notmuch-message hides /usr/share/emacs/site-lisp/notmuch-message /home/ergo/.config/emacs/elpa/notmuch-20220126.1122/notmuch-mua hides /usr/share/emacs/site-lisp/notmuch-mua /home/ergo/.config/emacs/elpa/notmuch-20220126.1122/notmuch-address hides /usr/share/emacs/site-lisp/notmuch-address /home/ergo/.config/emacs/elpa/notmuch-20220126.1122/notmuch-print hides /usr/share/emacs/site-lisp/notmuch-print /home/ergo/.config/emacs/elpa/notmuch-20220126.1122/notmuch hides /usr/share/emacs/site-lisp/notmuch /home/ergo/.config/emacs/elpa/notmuch-20220126.1122/notmuch-maildir-fcc hides /usr/share/emacs/site-lisp/notmuch-maildir-fcc Features: (shadow sort mail-extr emacsbug message yank-media rmc puny rfc822 mml mml-sec epa derived epg rfc6068 epg-config gnus-util mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils windmove time-date amx s autorevert filenotify xclip yasnippet-snippets yasnippet help-fns radix-tree cl-print debug backtrace flyspell-correct-ivy flyspell-correct flyspell ispell company-semantic company-template company-capf company-elisp company flycheck find-func pcase diff-hl-margin diff-hl-dired diff-hl log-view pcvs-util vc-dir ewoc vc cape counsel xdg xref project dired dired-loaddefs compile text-property-search comint ansi-color swiper ivy-avy avy ivy flx ivy-faces ivy-overlay colir vc-git diff-mode vc-dispatcher term/tmux term/xterm xterm init composable composable-mark powerline comp comp-cstr warnings powerline-separators color powerline-themes repeat xt-mouse edmacro kmacro mb-depth simple-16-theme winner ring elec-pair smartparens-config smartparens-text smartparens advice thingatpt dash saveplace diminish which-key cl-extra help-mode use-package use-package-ensure use-package-delight use-package-diminish use-package-bind-key bind-key use-package-core disp-table delsel savehist easy-mmode display-fill-column-indicator display-line-numbers ede/auto eieio-base tex-site slime-autoloads rx info package browse-url url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf url-util mailcap url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache json map url-vars seq gv subr-x byte-opt bytecomp byte-compile cconv early-init profiler cl-loaddefs cl-lib iso-transl tooltip eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/pgtk-win pgtk-win term/common-win tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax 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 emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice button loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget keymap hashtable-print-readable backquote threads dbusbind inotify dynamic-setting system-font-setting font-render-setting cairo move-toolbar gtk x-toolkit pgtk lcms2 multi-tty make-network-process native-compile emacs) Memory information: ((conses 16 410033 140294) (symbols 48 23414 1) (strings 32 87030 22121) (string-bytes 1 3013452) (vectors 16 59969) (vector-slots 8 1599695 599854) (floats 8 212 1163) (intervals 56 7255 3355) (buffers 992 17))