From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.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 4CH+GGYs4mO3owAAbAwnHQ (envelope-from ) for ; Tue, 07 Feb 2023 11:48:06 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id eBDhGGYs4mNt9wAAauVa8A (envelope-from ) for ; Tue, 07 Feb 2023 11:48:06 +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 AD066294FD for ; Tue, 7 Feb 2023 11:48:05 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pPLVK-0008MF-3d; Tue, 07 Feb 2023 05:47:14 -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 1pPLUv-0008G9-Ce for emacs-orgmode@gnu.org; Tue, 07 Feb 2023 05:47:08 -0500 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 1pPLUs-0001mJ-QJ for emacs-orgmode@gnu.org; Tue, 07 Feb 2023 05:46:48 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id CDA34240440 for ; Tue, 7 Feb 2023 11:46:42 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1675766804; bh=2t1fg9/oVD/IjzxJWovObgjWRixJ/6gpa+BCv10RTBw=; h=From:To:Cc:Subject:Date:From; b=et+dUgwMt/LeQsU8U3DHruvUP9IW72FIJjXh0uTnx62JoQ/2Wio7Cd3/VOqiAAzC1 DyPhgPu0l1xtS19J+EjfOdYx+5ea9iYFlCQ6uyjzx9aA7gmdEufpq4ucVAPDCs/HSn VUAUze+4IF8jY6ouzzd3pDUrtccvtNHPPCqBESGNjc4EHJLOgSkdojkQxeLTlRSMS5 lNgIHgMuRNHoCODJgXIpQbznY8664q+iJs1QbM84D4Dpwj29WAr++fBOBr+2YIDBgC FSzxWcB6mydjhOh7ub2pEgToutI0CjvO+l7/Jei8THzNsI+bGvhaYo0FjZXo8I3ecn h5pmPPB9cNa2Q== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4PB0Dd443Cz9rxF; Tue, 7 Feb 2023 11:46:41 +0100 (CET) From: Ihor Radchenko To: Max Nikulin Cc: emacs-orgmode@gnu.org Subject: Should we obsolete org-emphasis-alist? (was: [PATCH v5] org.el: Warning for unsupported markers in `org-set-emphasis-alist') In-Reply-To: References: <87o86mw86r.fsf@localhost> <87fsrxkahq.fsf@nicolasgoaziou.fr> <87fsrxa1j5.fsf@localhost> <878rxoa6lk.fsf@localhost> <87pmqtj09r.fsf@localhost> <87mt9743di.fsf@localhost> <871qqhlskf.fsf@localhost> <87r0v8pcdb.fsf@localhost> Date: Tue, 07 Feb 2023 10:47:16 +0000 Message-ID: <87cz6lah1n.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@posteo.net; helo=mout01.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, 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-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=et+dUgwM; 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=none) header.from=posteo.net ARC-Seal: i=1; s=key1; d=yhetil.org; t=1675766886; a=rsa-sha256; cv=none; b=c5w/Pp4WMSNirqm/KQlsdhMM/8suVkHP36Ob1QGqfhVHKHAp6PjYcs84giSPByrlCqGfM5 9mQFqvEHfTAmRI9IYPGdiWwZtcUCGb328UWqCQw+s/ozJxKKbRyaas7wGalwntQ5CdANzh 5FAkFKeSM6QLl0PsYHcpeCddopaLRrf54vHUaYWIsEMMmtARL5m7s06FcJblAhhZTxI8tt TxtikuasTHhNPQ0YzhzkFbKs3vf7rGvhyEGvNVYS5k4PyCfqHUA9BI+4KKDUOyL5bEQ6jR XjH/GOODX+guMij/EYPaJuopzpbjpLu3l2yLlatSlz83FySW42npMCEU1IQOHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1675766886; 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=mpJUCkTio9HfgexVPKCTl1pIF0yWA2O1w2927SoLPng=; b=d2UeeNs7HKXzMsYYj+1ZGljWIWnuaXZNO6ByD5WHm2dlDLzq/wx1s8wCj4B3WC+qIP9TmJ /yqR/02R1hNTXHMHsTdkEY8957RiLQ42ucSZ/zvOanzrodq/NLGmMKf7/gcfWTRn/iXHMH txajnkYuBI0emJnfl065/XhRVR08I3X4e+ylZcg6746zu0I5oyqjq3RvpzRSUiGmSFWP+r jBIuVJE2v2nKrfUldM7Onh+48gHIlH0W0qw6pjMS2+S+eeulYR2+GJuWqb6fe4v5Yh+8Th oc1Ec0sB/YQDVvzeA4oHFJagqT02Z92/MWaFL1FXfj98DkanacEnwmqARzi2bQ== X-Migadu-Queue-Id: AD066294FD X-Migadu-Scanner: scn0.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=et+dUgwM; 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=none) header.from=posteo.net X-Migadu-Spam-Score: -11.35 X-Spam-Score: -11.35 X-TUID: HUPCwWX3u+jp Max Nikulin writes: >> +(add-variable-watcher 'org-emphasis-alist #'org-emphasis-alist--check-value) > > Thinking more I have realized that I am in doubts if > `add-variable-watcher' is appropriate tool in this particular case. The > only way to get some effect from change of `org-emphasis-alist' is to > call `org-set-emph-re' (its :set function), so it should be enough to > call `org-emphasis-alist--check-value' from `org-set-emph-re'. Upon looking closer, `org-set-emph-re' is not affected by the value of `org-emphasis-alist' with a single exception when the value is nil. > I have no idea what should be considered as best practice: should > `set-default-toplevel-value' be combined with changes of `org-emph-re' > as it is done in current code or `org-set-emph-re' should be split into > the function that modifies `org-emph-re' (so it can be called > separately) and a tiny setter (that may be defined as lambda this case) > that calls the new function and `set-default-toplevel-value'. I now reviewed the usage of `org-emphasis-alist' and setting/changing the value has the following effects: 1. nil (and only nil) value makes `org-emph-re' and `org-verbatim-re' nil. Otherwise, these regexps are not affected. Also, `org-emph-re' only affects fontification. `org-verbarim-re' affects fontification and `org-in-verbatim-emphasis'. The latter should be fixed to use org-element API. 2. The value affects `org-mode-transpose-word-syntax-table'. Should be fixed - parser is not affected by `org-emphasis-alist'. 3. Fontification is affected in `org-do-emphasis-faces'. 4. Emphasis selection dialogue in `org-emphasize' is only using the emphasis from the alist. That's all. I think that we should simply obsolete `org-emphasis-alist' and introduce individual faces for emphasis. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at