From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id qD3oBBlRLGDCfQAA0tVLHw (envelope-from ) for ; Tue, 16 Feb 2021 23:11:21 +0000 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id kGmmABlRLGBkCAAAbx9fmQ (envelope-from ) for ; Tue, 16 Feb 2021 23:11:21 +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 94E7513B2C for ; Wed, 17 Feb 2021 00:11:20 +0100 (CET) Received: from localhost ([::1]:59540 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lC9V1-0008FK-7M for larch@yhetil.org; Tue, 16 Feb 2021 18:11:19 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:45348) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lC9UF-0008F1-Dw for emacs-orgmode@gnu.org; Tue, 16 Feb 2021 18:10:31 -0500 Received: from mail-pf1-x42c.google.com ([2607:f8b0:4864:20::42c]:38036) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lC9UD-0007mW-FS for emacs-orgmode@gnu.org; Tue, 16 Feb 2021 18:10:31 -0500 Received: by mail-pf1-x42c.google.com with SMTP id y25so3870749pfp.5 for ; Tue, 16 Feb 2021 15:10:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:subject:date:in-reply-to:message-id :mime-version; bh=Z0573ABYASqmZ6KfDeB2xzyBdxa/u6kxprSAvAH6t8g=; b=kt+9NqJP8qXwFc6xb56IWn5d19Jlwvf8W3CCgG5xB/XvjVgAfcGOLk9OUNBnnFf5E+ XTN7LpB8zbUfoNh0s6gIFeFzqNy++tC/yT5nSI1UM/WUyVRIFufgqlG8ThQ4qqc5xw5n H7eOsEYXIAgedtiHR3v2f01kkzNOEqj9D8ITNjgMCNezjgSPipYQ586St7+y2TubV4Kl JOJDLjW2n/tMtSyR1iuWfT2PEaFR2JO+ZOD2czohfCbZKSpouTh+j/ZNNrYULOkHpaOB T59zmwJ7JjuCjdfBW0+T8eaS/TovFCXlsrqdjJAkXarjWXARvAz6br9VM76DmpIKbJRt iaeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:subject:date :in-reply-to:message-id:mime-version; bh=Z0573ABYASqmZ6KfDeB2xzyBdxa/u6kxprSAvAH6t8g=; b=bzGza/V28MJYbUVMVy/Objug07HMvZ7p6VCOMQucKF/JeDsI8HIBvwkyVk888yyGL8 ma/CLACRwzP++QIK2ZEoK6HwaHobGuobMzHdoDuktSR2f6WbryaUVFYvIGGwn45wZDOG gcGS6sKhWh8l4Hce9s0jeQ38JDyWxN6sROH32Da6alMvD6tzhW147KotpiR+WhtFT7un GzubypwT488DBIoZp/tbAXdssZHqFvY1jN9qj9P8uooaYh97fqeKmFeI1vsDji7Bc8jc cQrM2JMhs+H4B/X5uJW14wdZmfMLVQZoy7mk2JwEJvvSvV7tBD1iewjRNkAkwz+w7sL3 Gz4w== X-Gm-Message-State: AOAM532mqGGn0DOCvsxKfEhRPtWa8wrAiX0hG/57YaPB+MncBi2U826H JEifdzZiy9ft12VY/JtTH9Row7y42wA= X-Google-Smtp-Source: ABdhPJwJwRgxk+kF82nBm2oVKkSwsSD7pGUq9rzYTLWqRJ5JdzHBFnrYsp/4Zw1nUN6VDDxJe8WFxQ== X-Received: by 2002:a65:5c44:: with SMTP id v4mr20660619pgr.362.1613517027249; Tue, 16 Feb 2021 15:10:27 -0800 (PST) Received: from tim-desktop (106-69-135-243.dyn.iinet.net.au. [106.69.135.243]) by smtp.gmail.com with ESMTPSA id j26sm39436pfa.35.2021.02.16.15.10.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Feb 2021 15:10:26 -0800 (PST) References: User-agent: mu4e 1.5.8; emacs 27.1.91 From: Tim Cross To: emacs-orgmode@gnu.org Subject: Re: [bug] org-do-emphasis-faces breaks with incomplete emphasis Date: Wed, 17 Feb 2021 09:59:20 +1100 In-reply-to: Message-ID: <87tuqbpq1s.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::42c; envelope-from=theophilusx@gmail.com; helo=mail-pf1-x42c.google.com 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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.23 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" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -3.06 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=kt+9NqJP; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: 94E7513B2C X-Spam-Score: -3.06 X-Migadu-Scanner: scn0.migadu.com X-TUID: /UtQgAcDaZUA Samuel Wales writes: > in fundamental mode [to eliminate any extra stuff]: > > === > hi > /hi/ > hi =test > hi > hi > hi > /hi/ > hi > *hi* > hi > hi > hi > === > > m-: (org-do-emphasis-faces nil) RET > > everything after =test does not get emphasized. > > there is code floating around that calls hte function directly instead > of via font lock. so even if font lock or org mode forgive this, that > code does not seem to. and idk whether it is forgiven or if there are > unintended consequences. > > e.g. to emphasize in agenda. which, not sure why it isn't? I'm not clear on what you are expecting/wanting here. If you have badly formed markup, syntax highlighting and other functions can be expected to fail. Are you expecting something more informative, like an error message saying you have an unterminated emphasis marker or similar? If so, while it might be possible, I suspect it would come at a high cost from a performance perspective, especially in large org files. For example, at what point do you decide the closing marker is missing rather than just a little further along? At what point do you begin doing the checking - after typing the first marker, after the first character, after the first space (noting that all this checking comes at a performance cost)? What does org-lint tell you when you have such malformed markup in your document? Would that be sufficient to track down issues when they occur? If org-lint is not picking it up or is not providing enough detail to help resolve the issue, perhaps tweaking it would be worthwhile. -- Tim Cross