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 YESFJinrXWNa4QAAbAwnHQ (envelope-from ) for ; Sun, 30 Oct 2022 04:10:33 +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 CMSAJinrXWMNggAA9RJhRA (envelope-from ) for ; Sun, 30 Oct 2022 04:10:33 +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 6CD06845C for ; Sun, 30 Oct 2022 04:10:33 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ooyhb-00067d-KS; Sat, 29 Oct 2022 23:09:35 -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 1ooyha-00067V-GG for emacs-orgmode@gnu.org; Sat, 29 Oct 2022 23:09:34 -0400 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ooyhY-0007nn-8F for emacs-orgmode@gnu.org; Sat, 29 Oct 2022 23:09:34 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 40FA4240026 for ; Sun, 30 Oct 2022 04:09:30 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1667099370; bh=oyPGgRp9Vz8sF+a0fjl3hLc6mkAQvjGt0t8VjJA/nn4=; h=From:To:Cc:Subject:Date:From; b=JSilJWSAmfBcfCpjPOyPDACXSwpPOuDTHGCojj5Q1/9iXdVxbuqvBhk/Vzfm3H61R nrYki8EOUI5ZEfftapQaBWXHnwlZACHfrm74AqL3mAucwBFqK+YSpfCDC7s4HIcfRK AmXDMIJz/w+Uy4yOniRS6QeTNr0Q8ner5dAFsW/2zAUHca+fUTfxU1I7COru6Ho7/F Sg2pwh50N93cdWUKqJAns8xCyQFXnWMmFtgEDEGf/dIyP1Yvy+3CzU801Gx40+56R9 CWeZGOhql8R8pnTdjmvCKG7145OijcdePWeuGBGFoqj6hTkdt9kjeeRwPu1gCP12pC yn8SpkelGnc/g== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4N0LqD6PQ6z9rxD; Sun, 30 Oct 2022 04:09:25 +0100 (CET) From: Ihor Radchenko To: Bastien Cc: =?utf-8?Q?K=C3=A9vin?= Le Gouguec , emacs-orgmode@gnu.org Subject: Re: Setting org-todo-keywords through directory-local variables In-Reply-To: <87v9gsdyhk.fsf@gnu.org> References: <87mu62gvjk.fsf@gmail.com> <87eercsx1b.fsf@gmail.com> <87lflkdmxx.fsf@nicolasgoaziou.fr> <87eeraaju7.fsf@gmail.com> <87a70stkmv.fsf@gmail.com> <87v9gsdyhk.fsf@gnu.org> Date: Sun, 30 Oct 2022 03:10:09 +0000 Message-ID: <87leoyatwu.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.65; envelope-from=yantar92@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, 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: , Sender: "Emacs-orgmode" Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1667099433; 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=PT/yuee11EXvKvNDJSX6NIB7OQeOFn/GglUSCI3Ly/M=; b=iTEQ8chXBJkhfT9e42YycLtpi+BJ5ON8kTiXc56rajuGZC8gkfYYO7MfgRvaVa8Fwsfeau hTNBoImsXNTrMuuIPfR+Y1V1sgFE11a7HBs20lpLKMQ7LBMFPd9jrl7HdCrvNYmCWoQUuK /3I+nYkqYHE383jflxigkHnoT93xSrXXKt9rXvLHx9tsQgpU2voKczVdGIu+EIQtCtnZPI k7xs89lSTefneorfmbsF5yp65DfDlB63tMG4nMFbuY60sUxjfVTFWtybcC9lMFElvdeeEi f7Iqgv1K/kPwCY2mtXqMDpLOHch6rsuiRD5CILS6GU+w94HMr7Pmdzp3j+qJow== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1667099433; a=rsa-sha256; cv=none; b=Rt0pyXyhmwHWOD0u3FdWZ5VCmVDOKrVOZuXRj1xOMATv0lkfOwnYWH1yjzAEUk6rBsSyFi rl8YNunbLj/dYLxNco0C/HOZ/GtoAvSGHXGdfHBxierxnii9fhzDHW7wQ6sVxIbO2a2ccD ZroJoOvOeOEA5I1TmeqBEloaKlxRFhwSISSXgRkFzpJuw+rniUEukHSJ4gSJKNqVignCSs fCkC3FWhwh9bw5mQYjPENzWuwZIi9n+8a5ivEWJtjinjR31QJFTixYyNZyvIr01ZPnDwBf RnLkKO0yf3A6+lFomD64uzTlcnOuQwvhNYiX1Y1yGEIc5QtHKwXPt1Pt0uF6Ew== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=JSilJWSA; 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-Spam-Score: -8.94 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=JSilJWSA; 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-Queue-Id: 6CD06845C X-Spam-Score: -8.94 X-Migadu-Scanner: scn0.migadu.com X-TUID: K1VQp3O3wPS0 [sending to Org ML in-reply to the relevant thread] K=C3=A9vin Le Gouguec writes: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D57003 28.1.90; Can local variables be loaded before loading major mode? > =E2=80=A6 reminded me of a patch I submitted to the Org ML=E2=80=A6 some = time ago =F0=9F=98=A3 > (sorry for not following up) to set TODO keywords via .dir-locals.el: > > https://list.orgmode.org/87a70stkmv.fsf@gmail.com/ Your patch is not listed on https://updates.orgmode.org/ It is also not in my records (I am only following patches closely since the beginning of this year). So, it slipped through the cracks. I am bumping it herein. At least, the :safe marking is something we can merge right away. > My rationale with this patch was that AUCTeX and markdown-mode both use > hack-local-variables-hook successfully to (re)compute stuff from > dir/file-locals; I figured Org=E2=80=A6 > > * should bite the bullet, at some point: it'd just be really neat for > Emacs users used to this feature, Maybe. That's why this emacs-devel thread. > * could do so piecemeal, adding support for variables one at a time as > people chime in the ML to express a need. > E.g. my patch only added support for org-todo-keywords and > org-todo-keyword-faces, but it laid the foundation for adding support > for other variables later. I'd prefer to solve it once and for all. I tried early loading of file-local variables in the past, but had to revert the commit because of major issues. See https://list.orgmode.org/87r11wkmew.fsf@ucl.ac.uk/T/#mab6359ed2107d5515c6bb= 6b266551f0c5049ceca Maybe the hook approach can work better. But I'd prefer to discuss all the possible caveats first. > Also to try to reduce the risk of breakage, it went for "compute Org > settings normally; then selectively recompute some if relevant variables > are found in dir/file-locals". That way "regular" Org users who rely > rather on SETUPFILEs wouldn't be impacted, only "early adopters" of > dir/file-locals might shoot themselves in the foot. I am not sure what is the problem with SETUPFILE. We can simply load it in the hook. Though the priority of SETUPFILE vs. local variables should be discussed. Probably, local variables should take precedence to keep things consistent with the rest of Emacs. > (Also it had tests =F0=9F=98=8A) Tests are always welcome :) > Anyhoo. Not even sure the patch applies after two years, but the > general approach might be worth looking into? Sure. --=20 Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at