From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.devel Subject: RE: Should mode commands be idempotent? Date: Mon, 25 Sep 2017 06:57:07 -0700 (PDT) Message-ID: <118feee3-5787-43b7-9c9b-06907a16a448@default> References: < <<9f11a3c6-b113-4bf6-9dab-f894b2ad77b5@default> < <55da155a-03b1-d3ed-4036-12e5a60fa26c@gmail.com> <950166e7-2766-8a3e-1bc2-a93a356f652c@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1506348082 25408 195.159.176.226 (25 Sep 2017 14:01:22 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 25 Sep 2017 14:01:22 +0000 (UTC) To: =?utf-8?B?Q2zDqW1lbnQgUGl0LUNsYXVkZWw=?= , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Sep 25 16:01:13 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dwTwP-0004uK-Ly for ged-emacs-devel@m.gmane.org; Mon, 25 Sep 2017 16:00:57 +0200 Original-Received: from localhost ([::1]:42561 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dwTsx-0005ni-Mh for ged-emacs-devel@m.gmane.org; Mon, 25 Sep 2017 09:57:23 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39161) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dwTsq-0005nZ-UJ for emacs-devel@gnu.org; Mon, 25 Sep 2017 09:57:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dwTsn-0006nL-2u for emacs-devel@gnu.org; Mon, 25 Sep 2017 09:57:17 -0400 Original-Received: from aserp1040.oracle.com ([141.146.126.69]:19587) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dwTsm-0006mv-Pg for emacs-devel@gnu.org; Mon, 25 Sep 2017 09:57:12 -0400 Original-Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v8PDv8C9017663 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 25 Sep 2017 13:57:09 GMT Original-Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id v8PDv84I029524 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 25 Sep 2017 13:57:08 GMT Original-Received: from abhmp0019.oracle.com (abhmp0019.oracle.com [141.146.116.25]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id v8PDv8hL001360; Mon, 25 Sep 2017 13:57:08 GMT In-Reply-To: <950166e7-2766-8a3e-1bc2-a93a356f652c@gmail.com> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 12.0.6776.5000 (x86)] X-Source-IP: aserv0021.oracle.com [141.146.126.233] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] [fuzzy] X-Received-From: 141.146.126.69 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:218772 Archived-At: > > That Emacs chooses to have its distributed modes be idempotent > > is one thing. That some 3rd-party code might also mistakenly > > (unintentionally) prove to be non-idempotent is another, but > > similar thing. Such cases represent things to fix. > > > > That is different from establishing a convention that > > modes should never, intentionally or unintentionally, > > be non-idempotent. >=20 > Yes, of course; you asked whether non-idempotence had > ever been an issue for anyone; I gave you one example :) Yes. Thanks. FWIW, I did notice it the first time you mentioned it. And I guessed that in the `visual-line-mode' case the non-idempotence is not intentional or necessary. And I agreed with RMS that Emacs can (obviously) fix such bugs. =20 My questions in this thread have to do with the usefulness of adding a rule/convention that affects _user_ code. (I've seen some users blindly quote some rules as catechism, without much nuance or understanding what's involved.) I'm in favor of good conventions that are explained well. I'm not yet convinced that what is being talked about here is a good user convention. If we do add a (user-targeted) rule for this, it should be made clear for users (1) what the motivation is and (2) just what we intend by "idempotence".