From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id MBNREQ4zH2QuuwAASxT56A (envelope-from ) for ; Sat, 25 Mar 2023 18:44:46 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id 2IIlEQ4zH2RlhQAAauVa8A (envelope-from ) for ; Sat, 25 Mar 2023 18:44:46 +0100 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 EE2B9DCA7 for ; Sat, 25 Mar 2023 18:44:45 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pg7w5-0003tk-85; Sat, 25 Mar 2023 13:44: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 1pg7w4-0003sg-03 for emacs-orgmode@gnu.org; Sat, 25 Mar 2023 13:44:12 -0400 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pg7w1-0004YF-On for emacs-orgmode@gnu.org; Sat, 25 Mar 2023 13:44:11 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 47ECB2401DA for ; Sat, 25 Mar 2023 18:44:04 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1679766244; bh=AII0sRmxYdHcrKgoEg/59VmkpBBK2BlS+jCfXsLbQEM=; h=From:To:Cc:Subject:Date:From; b=UYHOO+Yjppogok5gQzoX2FM9jbHqudfGG8ccdLLq5XZYje2vtVOMcypkw1PDorYDk 3ZPzdF8WDHsYmtz+D9THzwJgljOIniJtE969NGxgR5SWsgRZmYeT5MaZb7KPhgEat/ apZ2Qyj24pFsL8tAdwifZi0h0x/2OgTMEsu7nzF8u+DSwLihR6jD86M0xIimFuS7gD M/uw/hjJ6d+efjzLjGUmvr6bW1+BLj9bA6YViNgf1iy053TY8/vilVBo3rbPXRkqtP z2rxTW3XJdGmNT1Qm+iFpmuzT01u+aOpvsQj3iEMIRjgQlHKNB2TQqaQuuvg+qX8rA Z9EAMQ2dMVjQw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4PkRJz3YhBz6trx; Sat, 25 Mar 2023 18:44:03 +0100 (CET) From: Ihor Radchenko To: Max Nikulin , Bastien Cc: emacs-orgmode@gnu.org Subject: [POLL] Should we accept breaking changes to get rid of Org libraries that perform side effects when loading? (was: org-ctags land grab) In-Reply-To: References: <87o7omg4ie.fsf@alphaville.usersys.redhat.com> <87pm91ngb8.fsf@localhost> <87jzz8f3re.fsf@alphaville.usersys.redhat.com> <87mt43agk6.fsf@localhost> Date: Sat, 25 Mar 2023 17:45:44 +0000 Message-ID: <874jq8ohbr.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=185.67.36.66; envelope-from=yantar92@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1679766286; a=rsa-sha256; cv=none; b=JG+UCVjT0nKFMmo9FZytQ+59X50VdPOHKjgpejGRM21RqAeQPIJCLRjIZ/TPJ4Gltr6fJ0 hsq96qVTimGyBLrjlyF6o+qKY7v1oi1ZuWwNRYF0CDo+kBiu40MRT0TOJNkWUvSYPtIuxm G771YnZmiO4KorR9FfN2EsVpVW0foNLLhS+0WRE3qantKT2OsdpyJBuT/J3+pofLt7iTLy JnrTdyzm05Of41Sc6eoN+6NJ4OvG0hjr+qz3nM3b5tEiBGUeFdheDcVUq+Fhg5lhNmTeJ9 bh//HRgsL6LeHgpvUOPk0PsXDU85CHM6oLv4kF1ASyKbre0wMmjxuLduyrGIwg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=UYHOO+Yj; dmarc=pass (policy=none) header.from=posteo.net; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1679766286; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=65i2c2FJ1LJimVe6uXbMlzVcq5dP1Pm1g6WD7eVliUo=; b=R7Am/gLfknOwVmMThOoHC/gWzZBUlqhQNoFUmGG1mxKG6nZg0O4y1E/lL9Rh6bPxHf/9CM pIR15AAe60z2AqNAtL/OhsPmMwfiR72Kfh8EvGdQfKnsBbyEG/+cJnH+m9Tv4kHsvKEKV2 eHkiJTaO2IzAjIeW6GoHGd5SqgD5Cg14S8lkB4CcbkgKR+Q0bN0p1TxxrgjCGR25Vn7n/e +tWJpGSPJUEQnr78I/tq3B/nNs2BoXRQbTztFbmr0NmWaNmdn9ReEMMuIKQcST7RqdSf2S rk7uMyxmbNiiwR7wxKrzGv1vQM7SUfZCvP/YQj/TbkXkhrQQnkCN9bSq7cTL1Q== Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=UYHOO+Yj; dmarc=pass (policy=none) header.from=posteo.net; 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" X-Migadu-Scanner: scn1.migadu.com X-Migadu-Spam-Score: -6.25 X-Spam-Score: -6.25 X-Migadu-Queue-Id: EE2B9DCA7 X-TUID: TjcOlO+1/F5C Max Nikulin writes: >> Sure. This is not by itself a big deal. A number of Elisp libraries, >> including built-in Emacs libraries are loaded with side effects. > > It is still violation of conventions: > > (info "(elisp) Coding Conventions") > https://www.gnu.org/software/emacs/manual/html_node/elisp/Coding-Conventi= ons.html >> D.1 Emacs Lisp Coding Conventions >>=20 >> Simply loading a package should not change Emacs=E2=80=99s editing behav= ior. >> Include a command or commands to enable and disable the feature, or to >> invoke it. >>=20 >> This convention is mandatory for any file that includes custom >> definitions. If fixing such a file to follow this convention requires an >> incompatible change, go ahead and make the incompatible change; don=E2= =80=99t >> postpone it. This is convincing. I am then CCing Bastien, as, despite the Elisp convention, following it will break https://bzg.fr/en/the-software-maintainers-pledge/ >> Note that we discussed loading side effects in >> https://list.orgmode.org/orgmode/tn4ql0$bu2$1@ciao.gmane.io/ > > I have not responded to that thread. My opinion is that besides=20 > functions that just loads files and packages there should be=20 > counterparts that loads and activates libraries. A proof of concept may=20 > be implemented for Org and in the case of success it may be proposed for= =20 > inclusion into Emacs core. Maybe. We can do something similar to `unload-feature'. However, it will still require users to adapt. Tentative implementation: (defun enable-feature (feature &optional filename noerror) "Load and enable FEATURE. FILENAME and NOERROR arguments are the same as in `require'." (when (require feature filename noerror) (let ((enabler-cmd (intern (format "%s-enable-function" feature)))) (and (fboundp enabler-cmd) (funcall enabler-cmd))))) (defun disable-feature (feature) "Disable FEATURE." (let ((disabler-cmd (intern (format "%s-disable-function" feature)))) (and (fboundp disabler-cmd) (funcall disabler-cmd)))) --=20 Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at