From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id MG9HHn2r1mSRnQAASxT56A (envelope-from ) for ; Fri, 11 Aug 2023 23:43:25 +0200 Received: from aspmx1.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id UKplHX2r1mQTQAEAG6o9tA (envelope-from ) for ; Fri, 11 Aug 2023 23:43:25 +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 B9325412A2 for ; Fri, 11 Aug 2023 23:43:24 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=vodafonemail.de header.s=vfde-mb-mr2-21dec header.b=cCx7X6+C; 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=pass (policy=quarantine) header.from=vodafonemail.de ARC-Seal: i=1; s=key1; d=yhetil.org; t=1691790205; a=rsa-sha256; cv=none; b=RdSDHY3XqIc90k9ZgeDFtDU6Ewqhj2iPeAPaTkLKiZOlZAI15r1mBL2923vtHoCgSbci5i w0ZRpbwjAlpO65t2zoEbylJjuQvgFxmZVIKmc9lPq0LPTTQwvGEWFR4FCcGqfsMOt7fD2I iOa8SkLS0AL7L65TccJlUbIZ4j/pKfrosb4nDOQKahjW9AVqbWx5WTEYXj5ln6JInPrgsR BjUA7/Q1QtMEmTVDZEdJeZ2Gnm0NjJBYBHSY+/rUJ8YLpkbeNlIu4Ns6a2gWSsggJ1qXIM aAN2FoP5dZAsdKakFGw3tmlUOwHfTmssge0pxllnfgxhDPhtBB5AxQpElaqDQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1691790205; 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=HRStZwXjnuUQU7CD9sectEQG9Z5Oa4JbXX6o9lqkK5c=; b=a5M8KFI3UBF2AJNe8x7JfasTRiC4Dvq7nTmuDhpulWxTv1Sc/8h2s1I+8IS+33NZgxl8wc gD4H6F64DA9FArQt/8JLkNCMnVKKpx0azCl9Cf/Iyi0Q7/lFKoKrw0ySGxwJjwvVrLgBws 8O2ZiqnBkPs2PnW3Z0TMknhCk/IIteGf5td/YUUnN3pOZKLc0BjrzMnuhUdLlYGCe9NrMG R3STXkHqno4CBfoXxslVmcmPeghfuQ6Wr7dEWz2M/9gF6f0tsjhdXRt2FmC/fn8vE8XHM7 aLc3QkV1LNyPr8sZtFnMo3hmA7uDbPA4aUSL/guZ1v3U8yOcwQU050eA26Z+Xg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=vodafonemail.de header.s=vfde-mb-mr2-21dec header.b=cCx7X6+C; 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=pass (policy=quarantine) header.from=vodafonemail.de Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qUZsQ-0003IO-N3; Fri, 11 Aug 2023 17:40:58 -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 1qUZsO-0003HO-Ul for emacs-orgmode@gnu.org; Fri, 11 Aug 2023 17:40:56 -0400 Received: from mr3.vodafonemail.de ([145.253.228.163]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qUZsM-0002Bt-D6 for emacs-orgmode@gnu.org; Fri, 11 Aug 2023 17:40:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vodafonemail.de; s=vfde-mb-mr2-21dec; t=1691790051; bh=HRStZwXjnuUQU7CD9sectEQG9Z5Oa4JbXX6o9lqkK5c=; h=Message-ID:Date:User-Agent:Subject:Content-Language:To:References: From:In-Reply-To:Content-Type:From; b=cCx7X6+C4qHLjx4GekyRCWmJVxQZZPLbTxn0J5PTjbZx4wfVOboRl6SEWxwy9fnmy 4JFFTgV0c+/ag/43VgCCD2/15PfAYAvVSu+InxE2SoEOFfdIy/D3VvsHX7IiguLMSm 7SZIOGViRwox/PJLfcUrDMbyOonm2wq6kbmYkxiY= Received: from smtp.vodafone.de (unknown [10.0.0.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by mr3.vodafonemail.de (Postfix) with ESMTPS id 4RMy033Rz7z1yZh; Fri, 11 Aug 2023 21:40:51 +0000 (UTC) Received: from [192.168.178.41] (port-92-194-133-69.dynamic.as20676.net [92.194.133.69]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp.vodafone.de (Postfix) with ESMTPSA id 4RMxzr6xcYzMkrx; Fri, 11 Aug 2023 21:40:37 +0000 (UTC) Message-ID: <59ca80b4-1b38-2d1e-4cc7-ce6209dc993d@vodafonemail.de> Date: Fri, 11 Aug 2023 23:40:37 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.14.0 Subject: Re: Or probably just fix the org-ctags hook functions? Content-Language: de-DE-frami, en-US To: Nick Dokos , Ihor Radchenko 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> <528a8a8c-14a4-4d16-6aa0-1a9d76d45d15@vodafonemail.de> <87h6p6y8ma.fsf@alphaville.usersys.redhat.com> <87sf8qt4fn.fsf@localhost> <87zg2xwm16.fsf@alphaville.usersys.redhat.com> From: Jens Schmidt Cc: emacs-orgmode@gnu.org In-Reply-To: <87zg2xwm16.fsf@alphaville.usersys.redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-purgate-type: clean X-purgate: clean X-purgate-size: 3670 X-purgate-ID: 155817::1691790047-B3FF7A5E-F37402DE/0/0 Received-SPF: pass client-ip=145.253.228.163; envelope-from=jschmidt4gnu@vodafonemail.de; helo=mr3.vodafonemail.de X-Spam_score_int: -37 X-Spam_score: -3.8 X-Spam_bar: --- X-Spam_report: (-3.8 / 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, NICE_REPLY_A=-0.972, RCVD_IN_DNSWL_LOW=-0.7, 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-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -8.76 X-Migadu-Scanner: mx2.migadu.com X-Migadu-Queue-Id: B9325412A2 X-Spam-Score: -8.76 X-TUID: O4BYjnNqfDk1 On 2023-08-11 19:01, Nick Dokos wrote: >> Sure, but we should not reject Jens' proposal just because of this >> argument. We can use the suggestions to improve org-ctags itself, after >> it is explicitly loaded. > > Absolutely. > > My disagreement was only with the part that I quoted, in particular > the "Probably the problem is not the side-effects done by loading > =org-ctags= ..." part: from my POV, that is *exactly* the problem > which I would like to see addressed. I was trying to provide some facts that could help deciding on this. And to find some compromise here that would fit all users and sizes. More notes and another compromise: - The general discussion in that other branch about all Org libraries, ever, is IMO of general interest but doesn't help users that run into this issue in short term. I'd focus on this single library instead to get a fix soon, and not only in main. - I understand both "no-breaking-changes" and "no-side-effects" positions. Personally, I'd even tend to the "no-side-effects" position. - If you run into this issue, the real pain is to understand what's going on, since org-ctags might get loaded in surprising ways. So probably we should make that easier. How about *not* using the current functions `org-ctags-find-tag' `org-ctags-ask-rebuild-tags-file-then-find-tag' `org-ctags-ask-append-topic' as default value for `org-ctags-open-link-functions', but rather only function `org-ctags-warn-about-enabling-ctags' defined as follows: (defun org-ctags-warn-about-enabling-ctags (&rest _) (warn "You enabled (on purpose or by accident) org-ctags. If that was not your intention, or if you really only want to open links as you always have been used to, use customize to disable function `org-ctags-warn-about-enabling-ctags' in variable `org-ctags-open-link-functions'. Otherwise, you might want to use customize to disable function `org-ctags-warn-about-enabling-ctags' in `org-ctags-open-link-functions' and instead enable the previous default functions `org-ctags-find-tag', `org-ctags-ask-rebuild-tags-file-then-find-tag', and `org-ctags-ask-append-topic'. Note that in a future Org version automatic enabling of org-ctags might be obsoleted, so consider explicitly enabling it by adding (require 'org-ctags) (org-ctags-enable) to your Emacs initialization file if you actually want to use it.") (remove-hook 'org-open-link-functions #'org-ctags-warn-about-enabling-ctags)) The last line would take care about getting this warning at most once per Emacs session. In addition redefine function `org-ctags-enable' to add a test on `org-ctags-open-link-functions' as follows: (defun org-ctags-enable () (when org-ctags-open-link-functions (put 'org-mode 'find-tag-default-function 'org-ctags-find-tag-at-point) (setq org-ctags-enabled-p t) (dolist (fn org-ctags-open-link-functions) (add-hook 'org-open-link-functions fn t)))) which makes library loading free of side-effect if variable org-ctags-open-link-functions equals nil. That way: - Users who previously have customized the variable are not affected at all by the change. - All others understand better what's going on and can decide either way. If they decide against org-ctags, and customize the variable accordingly, they will have no side-effects from org-ctags in the future. - Any future general solution could resolve this in a more beautiful and, um, general way.