From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: =?UTF-8?Q?Cl=c3=a9ment_Pit-Claudel?= Newsgroups: gmane.emacs.devel Subject: Re: Should mode commands be idempotent? Date: Mon, 25 Sep 2017 09:03:33 +0200 Message-ID: <950166e7-2766-8a3e-1bc2-a93a356f652c@gmail.com> References: < <<9f11a3c6-b113-4bf6-9dab-f894b2ad77b5@default> < <55da155a-03b1-d3ed-4036-12e5a60fa26c@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1506323065 29611 195.159.176.226 (25 Sep 2017 07:04:25 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 25 Sep 2017 07:04:25 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 To: Drew Adams , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Sep 25 09:04:15 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 1dwNR8-00075f-IH for ged-emacs-devel@m.gmane.org; Mon, 25 Sep 2017 09:04:15 +0200 Original-Received: from localhost ([::1]:40957 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dwNRG-0003gY-2C for ged-emacs-devel@m.gmane.org; Mon, 25 Sep 2017 03:04:22 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57319) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dwNQd-0003gI-6m for emacs-devel@gnu.org; Mon, 25 Sep 2017 03:03:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dwNQZ-0005Cy-9O for emacs-devel@gnu.org; Mon, 25 Sep 2017 03:03:43 -0400 Original-Received: from mail-wr0-x22b.google.com ([2a00:1450:400c:c0c::22b]:51205) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dwNQZ-0005Bs-2q for emacs-devel@gnu.org; Mon, 25 Sep 2017 03:03:39 -0400 Original-Received: by mail-wr0-x22b.google.com with SMTP id z39so5980026wrb.8 for ; Mon, 25 Sep 2017 00:03:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=N26iDtUdiZMPD+jVQu8hsHPqG7mVlrW8ylkU0pmKOvI=; b=C9rqf4fJ9WnUutLcMwfJRjpK2v/YfTETy+oxdTIR9EgYzOJ2AfBsDRSsABK5r6JTt+ Rn4w5VhLN1lWK5m2iGmyhWEgBuPK8JARt02Oyh+sGWH5ZE0PhvaS5UdXH01l2dJXDBip d6KLd2AFBfyTii30uaT1fgnphATy6QZOe6miwU7BOH+DKzuh8KEbK5JDIZHNujJyD9/f xQT17F8veVeKtYTcRlNNZKSmlzjPyYo8ppHe0vvmojU+bPtIVL9AP949JUQcU0YReYkE 76B5EOEubXokbFFNIVobg7GtJDSINmZPsQyIo/dZhxcdfMgzLmJN2dNt576ZrPI4jpSv 25Pg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=N26iDtUdiZMPD+jVQu8hsHPqG7mVlrW8ylkU0pmKOvI=; b=OJAwltEDv1SZiz/j7Qfl6aJ/gNNcF3cOEkSwwigchqNMcLFACLu8CmTBiUBPiK1sOs W4dB6dnkpPaq8tO3HnqkX8mfcKcoS4dBRcRUkZyBPDn0E+PMJvu8O6Ixs7ejqTWnnDSM +Br/lDDuj7eAjoyCHh2Quwttt6xrKhHCBkt6GMoOsCsH1rQb9XG3hwO6p+hKoal29ISd GC7++tVwO0X7G1Ag/1Y9h5+h4o6FVnqawmdQOtSvvXRfNuhViRCg405gus8vDjSWWGpA 6EHn1pwGJlKXr+g1rOTJ0Dp/qiIJHrpaje5fvdShF36NUe6GM84MRt2jxoeE+nyM8hF1 laPA== X-Gm-Message-State: AHPjjUhVg5YpyPR5c3k8O7kJogTygHieR9PKiE/bCnkm0g1b2MzYx9fW AMM2+0zwQ6ZtDoXNI2UniUqiMZSz X-Google-Smtp-Source: AOwi7QDNNYVll8ce4PWCJuMP4hvgUg6VLr5GFvNvYBwSTuTFAIXYLlKFEAiSovE52ytf6rU+1Cs9fA== X-Received: by 10.223.159.6 with SMTP id l6mr5714956wrf.156.1506323016404; Mon, 25 Sep 2017 00:03:36 -0700 (PDT) Original-Received: from [192.168.43.95] ([37.172.93.191]) by smtp.gmail.com with ESMTPSA id r21sm4084665wmd.26.2017.09.25.00.03.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Sep 2017 00:03:35 -0700 (PDT) In-Reply-To: Content-Language: en-GB X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::22b 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:218766 Archived-At: On 2017-09-24 19:26, Drew Adams wrote: >>> Has someone actually reported a problem that s?he ran into by >>> encountering an actual mode function that was not idempotent? >> >> I think I mentioned visual-line-mode; the fact that it's not >> idempotent is a concrete (though minor) problem for me. I enable >> it in a hook, and a major mode that I use enables it too. Due to >> the way visual-line-mode works, disabling it after this doesn't >> restore my original settings. > … > 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. Yes, of course; you asked whether non-idempotence had ever been an issue for anyone; I gave you one example :)