From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Newsgroups: gmane.emacs.bugs Subject: bug#71337: 30.0.50; `electric-pair-mode' and custom keybinding Date: Tue, 4 Jun 2024 11:49:58 +0100 Message-ID: References: <87frtu9lts.fsf@gmx.net> <877cf52mib.fsf@gmx.net> <81C90874-2077-4358-A611-BDC94B98287E@gnu.org> <87ikyp10l6.fsf@gmx.net> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18539"; mail-complaints-to="usenet@ciao.gmane.io" Cc: arash@gnu.org, eliz@gnu.org, 71337@debbugs.gnu.org, monnier@iro.umontreal.ca To: Stephen Berman Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jun 04 12:51:15 2024 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 1sERl4-0004hg-BK for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 04 Jun 2024 12:51:14 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sERkg-0001Oj-CZ; Tue, 04 Jun 2024 06:50:50 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sERkf-0001OW-EB for bug-gnu-emacs@gnu.org; Tue, 04 Jun 2024 06:50:49 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sERkf-0006q9-6O for bug-gnu-emacs@gnu.org; Tue, 04 Jun 2024 06:50:49 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sERks-0000OI-Fw for bug-gnu-emacs@gnu.org; Tue, 04 Jun 2024 06:51:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 04 Jun 2024 10:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71337 X-GNU-PR-Package: emacs X-Debbugs-Original-Cc: Arash Esbati , Eli Zaretskii , 71337@debbugs.gnu.org, bug-gnu-emacs@gnu.org, Stefan Monnier Original-Received: via spool by submit@debbugs.gnu.org id=B.17174982311406 (code B ref -1); Tue, 04 Jun 2024 10:51:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 4 Jun 2024 10:50:31 +0000 Original-Received: from localhost ([127.0.0.1]:38382 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sERkM-0000Mb-Uq for submit@debbugs.gnu.org; Tue, 04 Jun 2024 06:50:31 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:35490) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sERkK-0000MO-Vy for submit@debbugs.gnu.org; Tue, 04 Jun 2024 06:50:29 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sERk7-0001F1-7n for bug-gnu-emacs@gnu.org; Tue, 04 Jun 2024 06:50:15 -0400 Original-Received: from mail-lf1-x12f.google.com ([2a00:1450:4864:20::12f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sERk5-0006YR-C1; Tue, 04 Jun 2024 06:50:14 -0400 Original-Received: by mail-lf1-x12f.google.com with SMTP id 2adb3069b0e04-52b950aa47bso1150226e87.1; Tue, 04 Jun 2024 03:50:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717498210; x=1718103010; darn=gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=gb3QUI5yFNkVVTN//wvBWlmoXzcNeMw/9/ySK9drPcE=; b=IoNjS/lm7u6HM7HbMfdifaRXsb7EgyUG6yN8hHKHsKr5X/JbVPsCAwvmeJRhnThmyp HdshvgrKa/EVRbPETGII/0Su8S34T9FvOWQ+AcgishIyxEEDa8gNmKqd8fMHSsHRR8DL bzfYYRxBmZKHMZUmt31WddKd/MSgrsaLx3YDn66HHGQiIq8NNsNgRRbGY7zqeOZwM3yV W7KgexNftda0iVBbPYpJdXcQPYA+nFVcNziLUFjn8wD+MiYZiKC4WiyFIOfM6WOIBK/Q Va4c+bOhgnOLT0w3r7f3tFr8qrBIpIqXickyewc5awcCTlU/dr6xDjVM+jAhpCr/aJkj 0bMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717498210; x=1718103010; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=gb3QUI5yFNkVVTN//wvBWlmoXzcNeMw/9/ySK9drPcE=; b=LF1L8mFJ/WU/rMj5/3gWJDem6GEneppqlP3G+jh2sK29h8e93Jn3uyxJ6lnAIZwQIX DIUqheka40nlx6o1rqR9rTJsQ7EiH8qH9bUJRbyM6crWEIvv/aj51sefF7nvVZbGJDug Bkaayp0epLlo42wPOA3KwUlQ4ZflwgINANt6vQeXfsxvpOuhNYMsbb/vhwO3X2DD1ex4 rBvAAzgDYGz3uOD6mgLGxVS1eW95olcBRXwM1YbsLUQJ+d9M+EGZL3I9+CzfS3/TzJmk bjEmC49N7kJiM2Qgt1tn1k7DG1U+sSI8A7LgogQllr9PZu2UdP3Gmxx4DHEzwdOYrdGU souw== X-Forwarded-Encrypted: i=1; AJvYcCUXg2CoZvjC3AIycj0erNtFg8mpstDz1dRmMIiyEx4o94IgvuAHKkZlMgSrbaK8qJS2BPbSGf7e/XwADKZRSnsUN7n70Sc+EEhOppIh7kgVD6sx2Vg= X-Gm-Message-State: AOJu0Yzb+L1oATTCUzVjlhrWA+y9ZcgZDZoOTdohqWYj0nrJul7Hnjdr +hzB4zFKxxJyI7KQ+bYN5XkFa5xP/F5rkdp68BhWAekCWQmlccS9TtQ2g85ObKBGDENibD/lO0k IwKgYUBsCAmzpawsPxMqrde9ZI4Y= X-Google-Smtp-Source: AGHT+IHNNXSKBTohF4MIP3Oqcud4cEHa8wB5mA8oh0Rap1ZjqNsvgudEVxE2QE3LM1PBUAUXZzULIl2kG6US91i+rqE= X-Received: by 2002:a05:6512:521:b0:51f:6a38:be0c with SMTP id 2adb3069b0e04-52b896abcfcmr7580744e87.22.1717498210033; Tue, 04 Jun 2024 03:50:10 -0700 (PDT) In-Reply-To: <87ikyp10l6.fsf@gmx.net> Received-SPF: pass client-ip=2a00:1450:4864:20::12f; envelope-from=joaotavora@gmail.com; helo=mail-lf1-x12f.google.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, 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:286531 Archived-At: On Tue, Jun 4, 2024 at 11:09=E2=80=AFAM Stephen Berman wrote: > enabling electric-pair-mode, and what I see is that typing `C-#' inserts > a "\" while typing `\' insert "\\". Is this not the desired behavior? Seems so, but it looks very odd to check if last_command_event is a character when checked in post-self-insert-hook, because that hook explicitly says it must be one. The fact that it works at all also suggests the hook is being called twice. Anyway, if the workaround is needed for whatever reason, I'd put it in electric-pair-syntax-info with a prominent comment pointing to this bug.