From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id YMttB6t6kmFkmgAAgWs5BA (envelope-from ) for ; Mon, 15 Nov 2021 16:20:11 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id 6K0lA6t6kmE+ZQAAB5/wlQ (envelope-from ) for ; Mon, 15 Nov 2021 15:20:11 +0000 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 A0BDB2D154 for ; Mon, 15 Nov 2021 16:20:10 +0100 (CET) Received: from localhost ([::1]:32994 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mmdmD-0000ya-8W for larch@yhetil.org; Mon, 15 Nov 2021 10:20:09 -0500 Received: from eggs.gnu.org ([209.51.188.92]:33446) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mmdlG-0000wo-Od for emacs-orgmode@gnu.org; Mon, 15 Nov 2021 10:19:12 -0500 Received: from [2607:f8b0:4864:20::1032] (port=41516 helo=mail-pj1-x1032.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mmdlD-0002oz-Ok for emacs-orgmode@gnu.org; Mon, 15 Nov 2021 10:19:10 -0500 Received: by mail-pj1-x1032.google.com with SMTP id gx15-20020a17090b124f00b001a695f3734aso117289pjb.0 for ; Mon, 15 Nov 2021 07:19:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-transfer-encoding; bh=7vUqgBOv+eKbfpx6tXjABZAlYY/LzH+lqyNMNGuyXdc=; b=V1EMO9vFwXmwg61Csamh7A9cV9bMXLaDYvGUVe8GpPACA7WBVCnCyC2Vuv2xS0VS/T DpUeGPJCMDprkSREsdWPpq8PMiPm0ObJCYuymIvI8nMLOXZANylkHKlYeXB0jkUnXX6B tcAirB3I2A/fdE6z7OqtTTzUHte6yzSd22ul6uIsKYh1+tXf9+RU+bgPjWNbC0UbVLwS emN7qh3emEXetSO9bLHLTp6tNtkPZShCptv5mVWTtIajBlfXH+vSBi7HG7t4E6D8D+Y6 s484FiVDk2VmRn/bUPkKJtLZWT1FWYz8B8e0xmij+0HZb2aTxzK6aFQT3nUOmxDFosl1 UnTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version:content-transfer-encoding; bh=7vUqgBOv+eKbfpx6tXjABZAlYY/LzH+lqyNMNGuyXdc=; b=lbE0p11nbMX1N0M968uDMD2olX8bxOhKgmmHdb61WdOmnPxB6iYEqnsGBzL7lU688c izeMCpUuPbdTBu7pLmwLDaRUsbH/S9rduWwBzvfOLWQJkeK+YxTcqN9h0+QwIxwYvzsV XfTwhP4gQJpQ1rSca45EwlhatszuPDY/qBJ8jgB4bl2/e+lgueKql2wTTgYdw/RXAdok GJZVCyVGvp7wVsArRsL5fq8w0OmJoIgPAteF3fSq175G+5NAGDKrM4TZatH9DK5hpM3o DTfDp7ZeDgeFmyEd8K9XJZvzQoiKxj5xvqvYsZiMQfK5FCDz96aTFIUDSja9+W4bPeuS Rmog== X-Gm-Message-State: AOAM532gBTghcMTREhLIfe0jo3nS38cFfbe3pfUrQSlCTDDz/BGuZ13C w6Jqlo+bAjn+/QxQCoS2BMk= X-Google-Smtp-Source: ABdhPJx8ZRCebJOkUADRdoI51J+gsluZfyA7AFHVgh6P/bF/p87qlILwic/10bpMF8SI4NGuJlF06A== X-Received: by 2002:a17:90b:4a0a:: with SMTP id kk10mr66641492pjb.198.1636989544614; Mon, 15 Nov 2021 07:19:04 -0800 (PST) Received: from localhost ([103.125.234.210]) by smtp.gmail.com with ESMTPSA id g1sm15317887pfm.25.2021.11.15.07.19.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Nov 2021 07:19:03 -0800 (PST) From: Ihor Radchenko To: Nicolas Goaziou Subject: Re: c47b535bb origin/main org-element: Remove dependency on =?utf-8?Q?=E2=80=98org-emphasis-regexp-components=E2=80=99?= In-Reply-To: <87fsrxkahq.fsf@nicolasgoaziou.fr> References: <87o86mw86r.fsf@localhost> <87fsrxkahq.fsf@nicolasgoaziou.fr> Date: Mon, 15 Nov 2021 23:20:30 +0800 Message-ID: <87fsrxa1j5.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::1032 (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::1032; envelope-from=yantar92@gmail.com; helo=mail-pj1-x1032.google.com X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.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, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, 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: , Cc: emacs-orgmode@gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" 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=1636989610; 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=7vUqgBOv+eKbfpx6tXjABZAlYY/LzH+lqyNMNGuyXdc=; b=foL0PsM/dJrmqfm64yBvc0tRmvkxAuBh5rRT+TmvbBrI+Xpqm2eKD6nqW0SHgXKfjhG9Tf TvwCcwJjuW965SOgNxjR3MaaVbsfUXUnYnCD6ij6CXK5dOPaRc7pRVo4tukgaTknieUG1h qncavVRtJqrdNxZq5/drMcpuMRFU4T9jDmVzNcsfv7zCUyInXor/a9R1iwbOM+QHZxi4aU 5YLjX05W25Rd4nr6CuHn5Gkn+E6cOM5GHd9yPSyR2bgjFgHgo2Jjn+28NIkj/t49nNPxkC ty3KuTjUD1q7zyE+L14NeEa6ZGXLYhlkfj6dwdmT5q9qve10gKp1yh76Gm3Ckg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1636989610; a=rsa-sha256; cv=none; b=YnJVNzJsYPackQRF5DBkxoylIJao0tKCoMJQwKnGYsmENjJmPtOMcCPeXQCyqshdAd0deh 2XFFDx94g/P6vnacRjqZClV+wZWDRc1kR6vmJPy4yauLxs7CSMR7r0kaxA9V1GSr1sv0sb JUZlv04ZrcMgXJbtG57+rEeTnqloR/zJSZRoQgRs1rOJVO4UFdv8U/Sh1Lrg33ZS14DV1y htBza4bvlAtJdppQB8IwIXt3EfSN7zSJ8GcCwiKREvs7eMJBBEkUEhBvUpXbqMo8g3jubK UmHsU5bAF+mA+3PT6Dh7CVUQ2GraGEGeLCKIUpUwqeF1jKwY/8vNy8a4GMBYiw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=V1EMO9vF; 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: -3.04 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=V1EMO9vF; 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: A0BDB2D154 X-Spam-Score: -3.04 X-Migadu-Scanner: scn0.migadu.com X-TUID: bp7opJa5Y0pq Nicolas Goaziou writes: > Ihor Radchenko writes: > >> This commit may cause random failures when >> org-emphasis-regexp-components is changed by user. > > This is not supported anyway. Yeah. Though I have seen people changing this variable. Maybe we should change defvar to defconst? >> org-emph-re is calculated according to org-emphasis-regexp-components. >> Changing org-emphasis-regexp-components can make "(when (looking-at >> org-emph-re)" in parsers return nil. The emphasised text will still be >> fontified, but not available in the parsed buffer. > > That=E2=80=99s exactly my point. The syntax is not meant to be configurab= le. > I wrote a patch also removing =E2=80=98org-emph-re=E2=80=99 depedency from > "org-element.el", but I was delayed. I just applied it. Thanks! >> Maybe we need to move the logic for org-emph-re from org.el to >> org-element.el? > > =E2=80=98org-emph-re=E2=80=99 has some limitations which do not belong to= syntax > definition. There=E2=80=99s no point in adding it in "org-element.el". > > The grand scheme is to remove most "org.el" dependencies from > "org-element.el", and move the others. That would be great. I was thinking about unifying the grammar better. Things like org-set-regexps-and-options define part of the grammar non-transparently outside org-element. As a result, the new org-persist library can be potentially broken if the user changes grammar between Emacs session (e.g. org-off-levels-only, org-todo-keywords, etc). Keeping all the variables that change the grammar in one place would be helpful. Maybe we could save the complete grammar state right inside output of org-element-parse-buffer. In the updated element cache code, I introduced properties into org-data element. Maybe we can keep all the important variables for the buffer grammar in org-data? That way, the job of org-set-regexps-and-options will be done by org-element-org-data-parser. Moreover, users exporting using ox-org will be able to create self-sufficient Org files that can be shared without relying on the same configuration in init.el. >> Also, there is org-emphasis-alist. It is even defcustom, but ignored by >> org-element.el. > > This variable is a defcustom for the faces, not the markers. I.e., it is > not meant to add, remove, or change emphasis markup, but rather alter > how they appear. IMO, this should be removed altogether: it=E2=80=99s up = to > a theme to set such a thing. Unless I miss something, org-emphasis-alist is used in org-emphasise. Though it just another reason to remove it. Best, Ihor