unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stephen Berman via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: "João Távora" <joaotavora@gmail.com>
Cc: Arash Esbati <arash@gnu.org>, 71337@debbugs.gnu.org
Subject: bug#71337: 30.0.50; `electric-pair-mode' and custom keybinding
Date: Tue, 04 Jun 2024 10:09:55 +0200	[thread overview]
Message-ID: <87y17l163w.fsf@gmx.net> (raw)
In-Reply-To: <CALDnm53s1B5o+OgQ+dMSDGNCDn9e3TMTeMBekueJMdeZCu9gHw@mail.gmail.com> ("João Távora"'s message of "Tue, 4 Jun 2024 08:37:48 +0100")

On Tue, 4 Jun 2024 08:37:48 +0100 João Távora <joaotavora@gmail.com> wrote:

> On Tue, Jun 4, 2024 at 8:30 AM Stephen Berman <stephen.berman@gmx.net> wrote:
>>
>> On Tue, 04 Jun 2024 07:53:16 +0200 Arash Esbati <arash@gnu.org> wrote:
>>
>> > Stephen Berman <stephen.berman@gmx.net> writes:
>> >
>> >> If the pairing in electric-pair-mode should only be triggered by
>> >> self-inserting characters (as the current code seems to require), then
>> >> the attached patch appears to avoid the above problem.
>> >
>> > Thanks for your response.  Yes, your patch fixes the issue.  Do you want
>> > to install it?
>>
>> I think it would be prudent to wait for someone familiar with the
>> electric-pair-mode implementation (e.g. its author João Távora, Cc'd),
>> or failing that, an Emacs maintainer, to ok the patch.
>
> I will have a look if I can.

Thanks.

>                               It would also be prudent to make sure
> the unit tests all pass, like they presumably do before the patch.

All tests passed with and without the patch in batch runs, but when
running ert manually on test/lisp/electric-tests.el, two tests failed,
but again both with and without the patch:

F electric-pair-autowrapping-7-at-point-1-in-tex-mode
    Electricity test in a ‘tex-mode’ buffer.
    (ert-test-failed
     ((should
       (equal (buffer-substring-no-properties (point-min) (point-max))
	      expected-string))
      :form (equal "foo''" "``foo''") :value nil :explanation
      (arrays-of-different-length 5 7 "foo''" "``foo''" first-mismatch-at 0)))

F electric-pair-autowrapping-7-at-point-2-in-tex-mode-in-strings
    Electricity test in a ‘tex-mode’ buffer.
    (ert-test-failed
     ((should
       (equal (buffer-substring-no-properties (point-min) (point-max))
	      expected-string))
      :form (equal "\"foo''\"" "\"``foo''\"") :value nil :explanation
      (arrays-of-different-length 7 9 "\"foo''\"" "\"``foo''\"" first-mismatch-at
				  1)))

Steve Berman





      parent reply	other threads:[~2024-06-04  8:09 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-03 12:40 bug#71337: 30.0.50; `electric-pair-mode' and custom keybinding Arash Esbati
2024-06-03 13:50 ` Stephen Berman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-04  5:53   ` Arash Esbati
2024-06-04  7:30     ` Stephen Berman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-04  7:37       ` João Távora
2024-06-04  8:08         ` João Távora
2024-06-04  8:18           ` Stephen Berman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-04 14:52             ` Eli Zaretskii
2024-06-04  9:24           ` Eli Zaretskii
2024-06-04 10:09             ` Stephen Berman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-04 10:49               ` João Távora
2024-06-04 11:04               ` Eli Zaretskii
2024-06-04 14:56               ` Eli Zaretskii
2024-06-04 15:43                 ` Stephen Berman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-04 12:33             ` Arash Esbati
2024-06-04 13:36               ` João Távora
2024-06-04 14:09                 ` Arash Esbati
2024-06-04 14:21             ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-15  8:10               ` Eli Zaretskii
2024-06-16 10:42                 ` Arash Esbati
2024-06-04  8:09         ` Stephen Berman via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y17l163w.fsf@gmx.net \
    --to=bug-gnu-emacs@gnu.org \
    --cc=71337@debbugs.gnu.org \
    --cc=arash@gnu.org \
    --cc=joaotavora@gmail.com \
    --cc=stephen.berman@gmx.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).