From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id eLEVOQNVl2OS2gAAbAwnHQ (envelope-from ) for ; Mon, 12 Dec 2022 17:21:24 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id SPsKOQNVl2PGgQAA9RJhRA (envelope-from ) for ; Mon, 12 Dec 2022 17:21:23 +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 C30ED3E1A6 for ; Mon, 12 Dec 2022 17:21:23 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p4lXh-0006Kx-VS; Mon, 12 Dec 2022 11:20:38 -0500 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 1p4lXf-0006Jz-KY for emacs-orgmode@gnu.org; Mon, 12 Dec 2022 11:20:35 -0500 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 1p4lXe-00015u-5J for emacs-orgmode@gnu.org; Mon, 12 Dec 2022 11:20:35 -0500 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1p4lXZ-0007Vj-CY for emacs-orgmode@gnu.org; Mon, 12 Dec 2022 17:20:29 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: emacs-orgmode@gnu.org From: Max Nikulin Subject: Re: Autoloading side effects (was: Re: [BUG] org-mouse is activated without explicit require) Date: Mon, 12 Dec 2022 23:20:19 +0700 Message-ID: References: <87r0x6sju1.fsf@fastmail.fm> <87iliie0j1.fsf@localhost> <871qp4j4vn.fsf@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Content-Language: en-US In-Reply-To: <871qp4j4vn.fsf@localhost> 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: 26 X-Spam_score: 2.6 X-Spam_bar: ++ X-Spam_report: (2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FORGED_MUA_MOZILLA=2.309, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, NICE_REPLY_A=-0.001, 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-Country: US X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1670862083; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=tY4mjdBkEwywkC2pJ7qV7HFU8gOkWnKGIeh+sEXWiRA=; b=lxTfSemZRS5hc6gFi7UPOz/324ANQQ90cPOJoSOQUcjKDmOGD7Bgu53eGmg+42RrTT7anY rShq1OW2PYFDPR5zBnTZujkFydWEGHSsmSXuZ5dmQ3w1j4EUdgGNsZ6v3Hwa1jtLkS1ZL2 OR+NfW+sqI7xdskdmSzKygls1zoeQBgY1j5MDmoq3nrWCC1hIKdBKwfgYflz9QEIIY49ql wZWkyKZs/Z0x7NYpsX96n0j22Q1HO1MEhNGKwPUaBT4eekRCToKmRAX7CxrQtHxI4Vo+cS tEen1J6czwYTDEylh6RzTyD1oN322QdjeaEyxtVW/dILi6o3fW7vwAv2r4PP2Q== 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) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1670862083; a=rsa-sha256; cv=none; b=fSDD4Z/COeEHo56a8MeZ7hX7ee6D7lVzYk2xjCKQm9c1a7QP2bhN9sem7PGNrdsbMApgm4 j8Ib3t8p5UCE/Lb2ow77A2RlKhN5SV4OREXryBoebYhRevWB/Pk7CvveKwV1bJa9oLN+nN A5vKAti0Ntuej+XJLOySHghCyWerxSujeEmDPYV1xCGJk+PEjewfKzGHHPrdQRwqHHxYO6 Ci/u1Rfu5EK2meySZGLIoE2mTFTna7BTv8g5KZloQJL9ilo2i8brllDgstKn3J6YDF7CZo PUITIuhZA+I+dHKFhOvUhfU/tBftO4Cmhi9Q5hamz/xFES+uPX2KuFx6BEUcdw== X-Migadu-Spam-Score: -2.16 X-Spam-Score: -2.16 X-Migadu-Queue-Id: C30ED3E1A6 X-Migadu-Scanner: scn1.migadu.com 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) X-TUID: u5c1EQeHqA38 On 12/12/2022 17:25, Ihor Radchenko wrote: > Max Nikulin writes: >> >> I am afraid, requirement that loading should not cause side effects is >> too strict and it will make usage inconvenient. Examples: >> - ol-info calls `org-link-set-parameters'. > > We have `org-modules' that can handle calling `org-link-set-parameters'. Sorry, but I have not got your idea. Currently `org-modules' is just a list of packages that should be loaded with org.el. It is possible to introduce some convention either in Org or in Emacs to add default action for a package. Then in addition to just loading a package (with no side effects) a set of functions should be implemented that loads and *activates* the package. >> - org-protocol installs an advice for `server-visit-files'. (It should >> not be necessary, but currently Emacs does not provide a better option.) > > Can we ask Emacs devs to help us with this problem? org-protocol may use approach similar to emacsclient-mail.desktop without advice: Exec=sh -c "exec emacsclient --alternate-editor= --display=\\"\\$DISPLAY\\" --eval \\\\(message-mailto\\\\ \\\\\\"%u\\\\\\"\\\\)" By adding another bunch of backslashes and a bit more complex shell command it is possible to avoid at least obvious issues with the command above. Actually I have created https://debbugs.gnu.org/cgi/bugreport.cgi?bug=59743 Implement `command-line-args-left' for emacsclient --eval expressions but I was too late to the party. The discussion in https://debbugs.gnu.org/cgi/bugreport.cgi?bug=57752 28.1.91; emacsclient-mail.desktop doesn't work for me was stalled with no outcome.