From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id 2EL5J84/1WQJHgEASxT56A (envelope-from ) for ; Thu, 10 Aug 2023 21:51:42 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id CBEGJ84/1WSxqAAAG6o9tA (envelope-from ) for ; Thu, 10 Aug 2023 21:51:42 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 178225D7E6 for ; Thu, 10 Aug 2023 21:51:42 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmail.com (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1691697102; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=tzR2lA1WdAY7xxGsszN7stR9WQ0CJeXQD5IwsH1132M=; b=Gxj+JLpKckIp9bLlfMzXwd/Ba65J60+2AED9ml1QsFzrkQTPj4iSbv4xc7Wcva/bZ0qhIj pUl/d9ihtV9w1/m9nYsVuybX7Ksa83Pkp3369pYTxBBYd5m/oeJk3ABw1Nr7uvgNs7ByO6 cbgwbuEMHhZnwg2EWIsdMTOOLYz+qAEg5WksEX9tg4GYMK8ELcu0VvL67uwtW+oFQpRR7I OCoPSK5YtHV0yT9JvSqcPwPaAk0dDqQv6xKPGUvl9o2fP86m1d+2zh6VHXH+hj3HQk4hMN coAD/5NX66H+71OBFstJRVkkuO1JTYhYpiOangnQJHNCZunHpeYBLoE2i9Qg5A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1691697102; a=rsa-sha256; cv=none; b=brMQO2jA3ZyobPrGd0rtjy2tOc91POQREOPkmwJzU1YnmUsqnXba2/NClFXIDXyIIMdbZ7 YFcgRe0t2elFy/w5rn/zPVKhsQTEbfZn+9YGbwoch8jrkhRpcuoFdIf1XcRz/PxwfCPiln BX+b92tWmgBLiwU2mtW+SondoFB3ml7XGToO15liPs6N8DavjhsPhYuLKt2ArKAgAvJpj0 5eCckv9rVdd0WLuEQPmsM7WU836tude/13/qJazocFb3PwGg8FCXAxXsqZd0DYD6Yi3tq9 P5hUvBjY+veQ/SUQ7EemLBYNpTbKXxwSKkBCrbHBm1a+enOZJdrZmpaJzkUm/Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmail.com (policy=none) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qUBfh-0004uI-Oz; Thu, 10 Aug 2023 15:50:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qUBfg-0004mw-FO for emacs-orgmode@gnu.org; Thu, 10 Aug 2023 15:50:12 -0400 Received: from ciao.gmane.io ([116.202.254.214]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qUBfe-0005ZX-An for emacs-orgmode@gnu.org; Thu, 10 Aug 2023 15:50:12 -0400 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1qUBfc-0009N6-M9 for emacs-orgmode@gnu.org; Thu, 10 Aug 2023 21:50:08 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: emacs-orgmode@gnu.org From: Nick Dokos Subject: Re: [POLL] Should we accept breaking changes to get rid of Org libraries that perform side effects when loading? Date: Thu, 10 Aug 2023 15:50:02 -0400 Message-ID: <87leeiy8wl.fsf@alphaville.usersys.redhat.com> References: <87o7omg4ie.fsf@alphaville.usersys.redhat.com> <87pm91ngb8.fsf@localhost> <87jzz8f3re.fsf@alphaville.usersys.redhat.com> <87mt43agk6.fsf@localhost> <874jq8ohbr.fsf@localhost> <87bkfip3mo.fsf@gnu.org> <87r0odrkbp.fsf@localhost> <875y5pvf04.fsf@bzg.fr> <10c18bbd-eff5-5421-71c8-29b078556384@gmail.com> Mime-Version: 1.0 Content-Type: text/plain User-Agent: Gnus/5.13 (Gnus v5.13) Cancel-Lock: sha1:ApBRVgUsolcksSV6DWfxf1E2ba8= Received-SPF: pass client-ip=116.202.254.214; envelope-from=geo-emacs-orgmode@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: 5 X-Spam_score: 0.5 X-Spam_bar: / X-Spam_report: (0.5 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, NML_ADSP_CUSTOM_MED=0.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Queue-Id: 178225D7E6 X-Migadu-Scanner: mx0.migadu.com X-Migadu-Spam-Score: -4.58 X-Spam-Score: -4.58 X-TUID: 0VSBECcbkM4R Max Nikulin writes: > On 08/08/2023 20:29, Bastien Guerry wrote: >> The definition of a new function is not a side-effect >> that affects Emacs editing behavior, so Babel and export libs are >> OK. > > Function definition is not side effect when load library is > requested. However it is a side effect of hitting TAB in Emacs help > prompt. Completion of a variable or a function should not modify Org > behavior. Loading of a file is not explicitly requested by the user in > this case. > > I would disregard however function definitions, however changes in key > bindings and recognized plain text links may be surprising to users > who just tries to read help. > > A big +1 from me: that's exactly what I was trying to say a few months ago wrt org-ctags, although I said it badly. Defining functions that are not used is not much of a problem IMO, but changing behavior behind the user's back is most definitely a problem. IOW, it's not about side-effects in general, it's about *specific kinds* of side-effects: ones that are immediately visible (and confusing) to the user - things behaving differently from a minute ago even though the only thing the user did in-between is something as innocuous as asking for help. One small step forward is to require libraries to have explicit enable/disable functions[fn:1]. Even if I somehow enable a library by mistake or misadventure, I should be able to disable it (at least in the sense described above) without having to restart. Not every library will need that and it's not even close to a complete solution, but there is at least the possibility of building something better (though more complicated) on top of it. If the library could be organized as a minor mode, it most definitely should be so organized: enabling/disabling would then be an automatic "requirement satisfied". I would also recommend that the library *not* call its enable function in general and leave it to the user to do so explicitly, but that may be more controversial for "backward compatibility" reasons (with which I disagree in these particular cases: I view them as bugs that need to be fixed). And the library should document what changes it unleashes on the environment (again in the restricted sense discussed above): changes to "foreign" keymaps/menus/syntax tables/hooks probably qualify for this kind of documentation, function definitions and internal-to-the-library changes do not, plus there is probably a swath of stuff in-between with more ambiguous requirements - all I can say is start with the obvious things and add as necessary. [fn:1] E.g. `org-ctags' has `org-ctags-enable' but no `org-ctags-disable', so my "solution" is to do something like this in my init file: ;;; undo org-ctags obnoxiousness (with-eval-after-load 'org-ctags (setq org-open-link-functions nil)) It doesn't undo everything but it gets the obnoxious bits out of my way (at least until *I* decide to call `org-ctags-enable'). My 2-cents/pence/centimes... -- Nick