From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Fixing post-self-insert-hook. Date: Sun, 19 Sep 2021 08:59:59 -0400 Message-ID: References: <874kahcx4h.fsf_-_@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23163"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: =?windows-1252?B?Sm/jbyBU4XZvcmE=?= , emacs-devel@gnu.org To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Sep 19 15:01:18 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 1mRwRZ-0005qF-D3 for ged-emacs-devel@m.gmane-mx.org; Sun, 19 Sep 2021 15:01:17 +0200 Original-Received: from localhost ([::1]:54872 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mRwRX-0004Iy-OG for ged-emacs-devel@m.gmane-mx.org; Sun, 19 Sep 2021 09:01:15 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45148) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mRwQQ-0003Nu-KN for emacs-devel@gnu.org; Sun, 19 Sep 2021 09:00:06 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:28374) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mRwQN-0005Ep-OV for emacs-devel@gnu.org; Sun, 19 Sep 2021 09:00:05 -0400 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id A5C77100178; Sun, 19 Sep 2021 09:00:01 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 4A030100008; Sun, 19 Sep 2021 09:00:00 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1632056400; bh=CLmuNLsrfB9TqKLbiqIylC5Q7bu4f3+yg2AH+Ue4e24=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=pHlg3duaHA7IG0PM69d17bPE+TfxhPMOju09zE8rj26l9AZBrV4y2BpsCLJNdZKul jszjhFp+O6UT962HJ+B+hF4qJ4oEmt5bW073hjbm2CKo8kFYPLzCxzideeoPoDmobP 4vb+92b4JMGBenteOZMqpKH7TV1IGWipkFfXl/d2e87RnL9aFcLOqxniUsT2cVNVAh 8v5tC+FaeLwbTf/xCXMKGCf/E3b9INjFsmA/HXzAeOgWlggPT7Sk5FReYA1DEBbPqm +pTj4sbHGgwjpsPnx/WWwXv4kWc/BrMd5d58IubU6ZqNCIZAuHOeqzTnjyl9vWjVYQ 36HnXTkWmAahA== Original-Received: from pastel (unknown [45.72.241.23]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 0EAFE120328; Sun, 19 Sep 2021 09:00:00 -0400 (EDT) In-Reply-To: (Alan Mackenzie's message of "Sun, 19 Sep 2021 12:14:18 +0000") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, 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:275052 Archived-At: >> My alternative suggestion, which I've offered now and then, over the >> years, is for you to study how cc-mode behaves when you bind the >> delimiter keys simply to 'self-insert-command' .... > > You know full well that this is problematic. I can't speak for Jo=E3o, but no I don't. >> and refrain from re-inventing 'electric-pair-mode' inside cc-mode. > I sometimes wonder if such a reimplementation inside CC Mode might have I don't understand the "might". You do have such a "reimplementation" (and you even implemented it before `electric-*-mode`). The difficulty you're facing is due to the face that contrary to all other major modes which used to have such features, you decided to keep your implementation and try to make it interact correctly with `electric-*-mode`s. There's no doubt that this is hard. I do doubt whether it's useful, OTOH. I understand your desire to preserve exactly the featureset you designed for CC-mode, rather than rely on the `electric-*-mode`s features which aren't exactly equivalent and aren't configured in the same way. So you gave more importance to preserving compatibility with older Emacs/CC-mode, whereas I give more importance to harmonization of configuration and behavior across major modes. > been less work than all the email exchange with you trying to get you to > fix things. There is a simpler solution at hand. You say it's "problematic", but all solutions have their downsides. >> I must be honest. I don't really expect you arrive at that conclusion >> or even try that experiment. > No. I have a user base to consider. Some of your user base would appreciate not having to do things differently in CC-modes than in other modes. Stefan