From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id uMQAKHsuHGS8awAASxT56A (envelope-from ) for ; Thu, 23 Mar 2023 11:48:27 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id oMCuJ3suHGSa+wAAauVa8A (envelope-from ) for ; Thu, 23 Mar 2023 11:48:27 +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 05E913596E for ; Thu, 23 Mar 2023 11:48:26 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pfITg-0002OS-9j; Thu, 23 Mar 2023 06:47:28 -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 1pfITd-0002Mc-He for emacs-orgmode@gnu.org; Thu, 23 Mar 2023 06:47:25 -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 1pfITY-0004XU-Qc for emacs-orgmode@gnu.org; Thu, 23 Mar 2023 06:47:25 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 39B282408E8 for ; Thu, 23 Mar 2023 11:47:17 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1679568438; bh=q5cjvyEyt1VhMhgGJ114lxoctP4jDznI8fOXrno6G9o=; h=From:To:Cc:Subject:Date:From; b=ggi0FaAW/Sa6lpdalMvWbN982EW0G4v7juJQOfdks4rFCnJIRBdWFM3UAmnIa5iQg vE2JqZaTcDd/dsKnGH6YbCdsOQAJc9JqwNb3Wnot4cf0qk8WKNRULKEVF+HCNJXSz0 bWOLN7V5KY5inqMRG3arY3L0KFeZKh1izxUa2kg9GSFdi6BYaZFv07vImPV2TYRd+V ubODZcM701997LU07biPYR+sTG5+612OA9dKXrZZHXK8NDFA1E9wZVrkOFBBSMnFIc q2xYoKYURAPdMDOhpCxWN0v8wZprwckaqqaqPOiluNvGETmz7z2BKWNyhStAE1KZTy r2k/BlxHceJkA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Pj2912Kdwz9rxP; Thu, 23 Mar 2023 11:47:17 +0100 (CET) From: Ihor Radchenko To: Nick Dokos Cc: emacs-orgmode@gnu.org Subject: Re: org-ctags land grab In-Reply-To: <87jzz8f3re.fsf@alphaville.usersys.redhat.com> References: <87o7omg4ie.fsf@alphaville.usersys.redhat.com> <87pm91ngb8.fsf@localhost> <87jzz8f3re.fsf@alphaville.usersys.redhat.com> Date: Thu, 23 Mar 2023 10:49:13 +0000 Message-ID: <87mt43agk6.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain 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=ham 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=1679568507; a=rsa-sha256; cv=none; b=VHmn1LGOBAKX9mhR7rJfwy8prnhoWMgJCL4wT1FYJ4Dcw8rBwt/mXNpKixC3oAKZmMbcno lNyvaKCSyjTv7zw3Sz9uAjXgKLDLz41e5/a/9DuQb35hY4IcpI+lRMug0s7tVwUonYHjo6 eQKz/zvkqUxuGU0X6E3ET0/cPitzjEraIAKJOxAHY1AsJc74wOoQOoDhQL0x6nAd2Pll3q VinvI0S+otkD910Sr0uH9w4/m/HVOqYQK2l2XE6KgKbylq2b0ReNEgCgyByGfXGef1Iagf 1EGu5V/2z9hBV3jJkMys74MBR8/IDjsYvgXJn6+Eiv94Bb6ipXVBwNjK90ySoA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=ggi0FaAW; 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=1679568507; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=pLBQAGnSrYftTLd+76yd3Urc8o6h46rC9D3eN4kCyjw=; b=eaxK9pB4X80zzPYSvCxNPcYtHpgYap3fellxOYoB9DEmAs76UU6Q7QY6bVFPXYtgLXz0Pi iSLz18MQMu990ILN0DpIXBDE1exrOROyuwzjUFdqGnc2L7+dzZlzkBY5tafkb0prWTppeI Unv8k3Vm3ikHYOH9sAAv18TB+h2T1fq7ClftNUjNkUZzLtssjexRAPg8k0fTDZk/guuXjA W674AT0JyR2wvGKIzYNqh4SM1C9DA3en8smzjUs5OoIpdU882eUWqYaLtFoEQ4X0CVgn3b BjGxv739O3dnRGnVK19VRsejCSvsYcbQWxKpGT267LWbHbgHcE8IyBAPEQF82Q== Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=ggi0FaAW; 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: -4.76 X-Spam-Score: -4.76 X-Migadu-Queue-Id: 05E913596E X-TUID: f6ZyGIrjhpbf Nick Dokos writes: >> It is off by default. > > It is off until org-ctags is loaded. *When* it is loaded, it runs > `(org-ctags-enable)' and the behavior changes. Sure. This is not by itself a big deal. A number of Elisp libraries, including built-in Emacs libraries are loaded with side effects. > Now I'm not loading it explicitly, but nevertheless, *somebody* does > because it goes ahead and mucks with my `org-open-link-functions'. If somebody is loading org-ctags explicitly, it is their choice to use this library. Instructions how to modify its behaviour are in the top comment, including instructions how to deal with modified link opening. > Debugger entered--setting org-open-link-functions to (org-ctags-find-tag): > debug--implement-debug-watch(org-open-link-functions (org-ctags-find-tag) set nil) > set-default(org-open-link-functions (org-ctags-find-tag)) > add-hook(org-open-link-functions org-ctags-find-tag t) > org-ctags-enable() > byte-code("\300 \210\301\302!\207" [org-ctags-enable provide org-ctags] 2) > load("org-ctags" noerror nomessage) > help--load-prefixes((("org-" "ox-latex" "ox" "org-src" "org-refile" "org-protocol" "org-plot" "org-pcomplete" "org-mouse" "org-macs" "org-list" "org-keys" "org-habit" "org-faces" "org-ctags" ... > ... > As you see, `help--load-prefixes' loads `org-ctags'. If you look at > the `help-definition-prefixes' radix tree, `org-ctags' is subsumed > under the `org-' prefix, so any lookup with that prefix will end up > loading it (and therefore enabling it). The reason it does not happen > in 28.2 is that it is only under the `org-ctags` prefix. This sounds like Emacs bug. Note that you can disable this behaviour by setting `help-enable-completion-autoload' and/or `help-enable-autoload'. > It seems to me that `org-ctags' should be registered under the > `org-ctags' prefix only, just like in 28.2 (the registration is in > `org-loaddefs.el' but I don't know how it ends up there. I guess > `org-fixup.el' is doing it, but I didn't chase it any further). We did nothing to change how autoloads are being generated. However, newer Emacs uses a different autoloading system. > I also think that loading `org-ctags' should not automatically enable > it: it should require the user to explicitly run `org-ctags-enable' to > do that. That way, if there is a mechanism that loads it > surreptitiously, it wouldn't cause the confusion that it causes > now. That would require documentation changes, but it would avoid > unpleasant surprises, and preserve some toes even if users load it > accidentally. Eventually, it might be nice to provide a disabling > function as well, although the workaround in the SE post works well > enough for now. Maybe the thing to do is to turn it into a proper > minor mode. Yes and no. It will indeed avoid this unpleasant surprise, but it will create an unpleasant surprise for users who do use org-ctags, which is the problem. Note that we discussed loading side effects in https://list.orgmode.org/orgmode/tn4ql0$bu2$1@ciao.gmane.io/ -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at