From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= Newsgroups: gmane.emacs.devel Subject: Re: Fixing post-self-insert-hook. Date: Fri, 17 Sep 2021 22:45:19 +0100 Message-ID: <874kaiev0w.fsf@gmail.com> References: 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="7276"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Stefan Monnier , emacs-devel@gnu.org To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Sep 17 23:47:13 2021 Return-path: Envelope-to: ged-emacs-devel@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 1mRLhQ-0001dc-N7 for ged-emacs-devel@m.gmane-mx.org; Fri, 17 Sep 2021 23:47:12 +0200 Original-Received: from localhost ([::1]:50502 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mRLhO-0002qz-EC for ged-emacs-devel@m.gmane-mx.org; Fri, 17 Sep 2021 17:47:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46934) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mRLfg-0001rv-Hf for emacs-devel@gnu.org; Fri, 17 Sep 2021 17:45:27 -0400 Original-Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]:41694) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mRLfe-0005MO-Do for emacs-devel@gnu.org; Fri, 17 Sep 2021 17:45:24 -0400 Original-Received: by mail-wm1-x32d.google.com with SMTP id g19-20020a1c9d13000000b003075062d4daso7808260wme.0 for ; Fri, 17 Sep 2021 14:45:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=JhqtbYXPUwRseCHOnikwVYWRWK9eHU/PGgmXo4P/Qi8=; b=YA5WrQYaD5294nXFpVNRsKf9zVC1uyBVwjfcCrixj6SEFEFP2DbQH8gYGwY7L4sdL5 py9wGgejL9PrEv8zEwEyGuCm27Qvk0Z4wpoM+TDiNQea4wyuYS9fMCS4f0di+bDkOAcq ZxK/kS1kQalxlYny2wfbuTD3ls2nMd8uIJ4INmJHKI1mYniqIEngE9K5uOeve9LXn59w 0B+QY62CMFB8uGPiTvqIXUl0JQsw0XPzfuDsE0C1SEw/JVyXgiXNk+XCo2lLPaUcAUPD Y46wth5J/pzGNLg8ZjzgDvqRAEk8+3zCIqFtYI2aZH7+akUHlyWThBtwkeFM8fCRFptg X1og== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=JhqtbYXPUwRseCHOnikwVYWRWK9eHU/PGgmXo4P/Qi8=; b=qOc/JetSawgRtJGxgRFk02JstZexRtpxf4EitUloUilBWfHj60OkF2sUnY3BCo5kaN /BR/8f2YPbZeAIPpTfe72bxOtz4uKETUWmmN29sswYz4lg4Z2wePT5puxkARdplZHErF s8I0sdRsBmDWEs1kuDBVKszLGWQCmYBK9xv9TyQ2argPRtonrkzOMgE/bLXvgLJ1qroX h+iyY7p0WM4mOEvxAX3q2Efwf6I0b4NmpK0sdizNuSlOLsVHx+pCrL3bHwRo37BwOpIv H5RsMKGSVIU4DkwzI+Rgoa1+geWNf9PeGpcJU8DW1a+G+iqo0azr1QsMS9kZ+0IG8Kyf k0XA== X-Gm-Message-State: AOAM530RaIvOTCZICx4B5n//DUEnhpx0mUlqjcQ/z9ykAnupS4/+7Lyf t+6ap2ol7AYpfWZjajkHvD6jV5T5f2A= X-Google-Smtp-Source: ABdhPJyLQc2V9dNEhgp7nrK2K5MCd+qhkCcLLNl85gwnkJhft0HyG8O5YVXQ8hdWawnTGRhwGzPfFw== X-Received: by 2002:a1c:f00a:: with SMTP id a10mr12233568wmb.112.1631915120758; Fri, 17 Sep 2021 14:45:20 -0700 (PDT) Original-Received: from krug (a83-132-177-247.cpe.netcabo.pt. [83.132.177.247]) by smtp.gmail.com with ESMTPSA id y9sm13890372wmj.36.2021.09.17.14.45.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Sep 2021 14:45:19 -0700 (PDT) In-Reply-To: (Alan Mackenzie's message of "Fri, 17 Sep 2021 20:53:42 +0000") Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=joaotavora@gmail.com; helo=mail-wm1-x32d.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 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:274943 Archived-At: Alan Mackenzie writes: > Actually, it was just 111, not 293. Sorry. Are you familiar with the GitHub platform? It's averse to the FSF and software freedom in some ways, but it also hosts much source code and has a moderately useful search tool for code "in the wild". Here's a pertinent search "self-insert-command": https://github.com/search?p=3D6&q=3Dself-insert-command&type=3DCode It lists almost 83 thousand hits in emacs lisp, many in forks of Emacs, and many more in user configurations or packages we don't know about. I found it curious that it doesn't take much page turning to find users undoing problematic bindings in c-mode-base-map back to self-insert-command. I do this myself but seem to be joined by others. I find also interesting how, given such pervasive usage of self-insert-command and reasonable popularity of electric-pair-mode (8k hits in the same search), the on-default of electric-indent-mode, etc, our bug tracker isn't overflowing with bug reports about electric modes, post-self-insert-hook or their "undefined behaviour" or "race condition" (as you describe them). The only ones I know about are about cc-mode.el Best regards, Jo=C3=A3o PS: If people know of electric-pair-mode related bugs for other major modes (_not cc-mode_), please forward them to me for analysis. Thanks in advance.