From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id AAM+ACFbLGAHZwAA0tVLHw (envelope-from ) for ; Tue, 16 Feb 2021 23:54:09 +0000 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id CCqHNyBbLGCJewAAB5/wlQ (envelope-from ) for ; Tue, 16 Feb 2021 23:54:08 +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 615E214D4A for ; Wed, 17 Feb 2021 00:54:08 +0100 (CET) Received: from localhost ([::1]:41380 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lCAAR-0002Xj-Hm for larch@yhetil.org; Tue, 16 Feb 2021 18:54:07 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:52662) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lCA9c-0002RO-Ms for emacs-orgmode@gnu.org; Tue, 16 Feb 2021 18:53:16 -0500 Received: from mail-lj1-x22c.google.com ([2a00:1450:4864:20::22c]:46566) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lCA9b-0003mm-0s for emacs-orgmode@gnu.org; Tue, 16 Feb 2021 18:53:16 -0500 Received: by mail-lj1-x22c.google.com with SMTP id b16so13960589lji.13 for ; Tue, 16 Feb 2021 15:53:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=3kJYY3hgje/6C9Z+Ua6yx/eJTFuXzWZmoIOnIirOIy4=; b=nN9kscy0jxEq12uLfBqax0YR2E+FJR/3bO7Lmnt9TGe1PHr5A4DKIWo3+K21Zext8r EsB9+zuyI+0D3eNV+lC1+MyGMWbk5C1cMv3UKCY2qn3yA3fHcN7UB3Y5ALuOeHkOSpH7 8GWT52JQ08pVjGASj5iS0heAvsjalJdMZGWAGGk7CjOvBLu0BcbFOWWLQlpNJ6vh/ccl zxxC1H+FAQsqulU3E3NSDMd31tAhYbQDf4xTyczD18RF8VqBP8jr/HHo988bCnkpXkSy V5+zkAtOf1SpK71fsyeNGj/8ARkDYXrhrgx3tXf/ypWeNazJ+IbuYIIQ7cXbcB0+PhEc U6pA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=3kJYY3hgje/6C9Z+Ua6yx/eJTFuXzWZmoIOnIirOIy4=; b=KshiZqyS8gA8/YjqzTmtTe1fZYrZX0eVqcmIFZqjxCOuSmPro3Fuwz9c7x5SkJsQGI 7kZqrckR/GLHKMxXlEW1ssxv3Koi3U7dRsANXlPE9Ih15Pr4SL9fcejjeL5ICBcNygT2 oaZZNNNYcNQZ9F0GjCpuDSTaTCBaSRAgkUMplwO3c+mnIqH47xT9yRvJ6Wyqkybs22kR dTVnASjBHDWCYf9RLlXYkhsOwlj+i+euf8WikfCrzCOU8oNbzhkA+HDoGM2sVAwhZhOl VxRdVRPrXrLBze4xwZyb/aNVXg3tqrViQdre09r2n1TtGRccHR21k1VwrOYIo93ZNNH5 8GVw== X-Gm-Message-State: AOAM531DPVkAF+6EiggMb1/Yj57go1He42ZgfkU7hcQcBnMdrMbY/OXy OCWI3VULsu72Y/D8LnCg3+rhhIOPjgPkRVkilJ8= X-Google-Smtp-Source: ABdhPJyt3gqQHuQJcYnBa/5jeJQfbsiJgV7pZmoDnu0r+GWXBNEr/QwFDhS1wZ8dTOgMAPUTktQ/FZMQUKDHOcEwIMg= X-Received: by 2002:a05:651c:1393:: with SMTP id k19mr13896764ljb.448.1613519592583; Tue, 16 Feb 2021 15:53:12 -0800 (PST) MIME-Version: 1.0 Received: by 2002:a05:6504:40c8:0:0:0:0 with HTTP; Tue, 16 Feb 2021 15:53:12 -0800 (PST) In-Reply-To: <87tuqbpq1s.fsf@gmail.com> References: <87tuqbpq1s.fsf@gmail.com> From: Samuel Wales Date: Tue, 16 Feb 2021 16:53:12 -0700 Message-ID: Subject: Re: [bug] org-do-emphasis-faces breaks with incomplete emphasis To: Tim Cross Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2a00:1450:4864:20::22c; envelope-from=samologist@gmail.com; helo=mail-lj1-x22c.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: , 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-Spam-Score: -3.06 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=nN9kscy0; 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: 615E214D4A X-Spam-Score: -3.06 X-Migadu-Scanner: scn1.migadu.com X-TUID: 6p4FbUiwUtdX hi tim, it isn't malformed, so definitely not looking to be told it's malformed. it is just text that is not emphasis. if you think the function works as expected by skipping the rest of the buffer, then never mind. i was, in that case, just emphasizing that the code floating around that is used to fontify the agenda is going to break. so nm. On 2/16/21, Tim Cross wrote: > > 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 > > -- The Kafka Pandemic Please learn what misopathy is. https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html