From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Allen Li Newsgroups: gmane.emacs.bugs Subject: bug#49629: 27.2; electric-pair-mode doesn't work for angle brackets in HTML file Date: Sun, 25 Jul 2021 10:08:09 +0000 Message-ID: References: <801r7vgoxm.fsf@felesatra.moe> <87im11gbxf.fsf_-_@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34384"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 49629@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jul 25 12:09:09 2021 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 1m7b4G-0008kw-Vl for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 25 Jul 2021 12:09:09 +0200 Original-Received: from localhost ([::1]:37790 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m7b4G-0007Oz-1c for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 25 Jul 2021 06:09:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36766) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m7b4A-0007OW-4F for bug-gnu-emacs@gnu.org; Sun, 25 Jul 2021 06:09:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36093) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m7b49-0006s3-TF for bug-gnu-emacs@gnu.org; Sun, 25 Jul 2021 06:09:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m7b49-00055M-P4 for bug-gnu-emacs@gnu.org; Sun, 25 Jul 2021 06:09:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Allen Li Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 25 Jul 2021 10:09:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49629 X-GNU-PR-Package: emacs Original-Received: via spool by 49629-submit@debbugs.gnu.org id=B49629.162720770919507 (code B ref 49629); Sun, 25 Jul 2021 10:09:01 +0000 Original-Received: (at 49629) by debbugs.gnu.org; 25 Jul 2021 10:08:29 +0000 Original-Received: from localhost ([127.0.0.1]:47639 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m7b3c-00054Z-Mo for submit@debbugs.gnu.org; Sun, 25 Jul 2021 06:08:28 -0400 Original-Received: from mail-ot1-f44.google.com ([209.85.210.44]:44974) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m7b3Z-00054H-Fm for 49629@debbugs.gnu.org; Sun, 25 Jul 2021 06:08:27 -0400 Original-Received: by mail-ot1-f44.google.com with SMTP id o2-20020a9d22020000b0290462f0ab0800so2159361ota.11 for <49629@debbugs.gnu.org>; Sun, 25 Jul 2021 03:08:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=felesatra-moe.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=1LJLU5kxCTHDGfSORNTbWtpGoGtpIryybTG1IyL3uwc=; b=O0jIFdLzyXoUwrYT1btfZ8RFw6qR3ZqAcIMpOKqtgL9bsPU9uD6K6T/8EcOw4u8GHm eeun1zMoZiDdPjZX9Uhz1ESFvY7AaVGddTRASUaFq17M4L729AbmavtV85iMMUUTkKLX LGjyXZsXQTVq1N5dvaEXXkL/J5EeLX42Dh98cv0c2zSPs+DQfK1utarEZg3Zgh00Irfh G5LaJjsaNl07FLVrTrgHyeHhH2KsmS3szuvkdvExKbaxdMTySmE4oYMgPDGm8469RL9F TAggbp5UJTy2oTkxO0n5IyOaAvIbvzRTB5Bf6Ug16s5nKARaE2umTffJdhNsdOGHkXtu gDkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=1LJLU5kxCTHDGfSORNTbWtpGoGtpIryybTG1IyL3uwc=; b=Rq0ap6LugM9akAcjppWc/GOjAI2v7XMA/slnM+SEj063kwtaOVGhXyIAI2jl1eCW5X 5tdyIx+/hj46Fo5MCVh2KzbGzNeXL4MbB2bWajGODTISag2Q+AU0/jSzS60GpgEHyY2+ jnIiaVRsdzgokXDXiHrHPciC10CtQFi6vpd7wmSoth8JG5owMfX/dLUty5FnW1vz6RMP neQL1Eb7HjkDQyEAOE4rDFWhNehRjCTvP8KnvkDJPxZqS26pAq90fxfznlHDqzyyXqUc qziQ0RAO88+WqAnXhOl0ZQtjAnM4N0I2zc6Xhw4tX6LIL6m9qgPuPN+7VIRa+qlV9Nay sRHA== X-Gm-Message-State: AOAM531aDldm2LDbyEW90ffFdniTpr3EWWxfDyNBU3fmcPCgTDrxR0pX 5M3/g769ljP6bSd+YTKHbZ6nlORhAeGABZeTUBTsxg== X-Google-Smtp-Source: ABdhPJzbVje6RKA/nOfL+EH42mdozkyJOZ3PXsmpczPVTXI7oZlOTLAqB77ZByDJA8SmuP5vYhoTiyQNYGWusXoh8Qk= X-Received: by 2002:a05:6830:2385:: with SMTP id l5mr8535203ots.227.1627207699848; Sun, 25 Jul 2021 03:08:19 -0700 (PDT) In-Reply-To: <87im11gbxf.fsf_-_@gnus.org> 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:210701 Archived-At: On Thu, Jul 22, 2021 at 11:34 PM Lars Ingebrigtsen wrote: > > Allen Li writes: > > > What I've found so far is that using Edebug to step through > > electric-pair-skip-if-helps-balance, if I manually step past > > (delete-char -1) and then press g (edebug-go-mode) then the bug > > disappears. Pressing g before stepping past (delete-char -1) causes > > the bug. > > If I remember correctly, electric-pair-mode works by doing a lot of > magic in `post-self-insert-hook'? In my experience, trying to edebug > through code when that hook is running often leads to peculiar results. > > That is, you have to debug via other means when trying to see what's > actually happening here, I think. (I.e., adding `message's all over the > place and other tedious things...) Thanks for the advice, kind of. I tried some printf debugging and I noticed that the bug goes away when I add (message "%S" (buffer-substring-no-properties (point-min) (point-max))) to the top of electric-pair--balance-info. Maybe I'm being dense, but I think that expression should not have this kind of side effect.