emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug] org-do-emphasis-faces breaks with incomplete emphasis


From: Samuel Wales
Subject: Re: [bug] org-do-emphasis-faces breaks with incomplete emphasis
Date: Tue, 16 Feb 2021 16:57:00 -0700

to answer your question: i expected it to just skip the non-emphasis.
not emphasizing the rest of the buffer seemed quite unusual.


On 2/16/21, Samuel Wales <samologist@gmail.com> wrote:
> 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 <theophilusx@gmail.com> wrote:
>>
>> Samuel Wales <samologist@gmail.com> 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
>


-- 
The Kafka Pandemic

Please learn what misopathy is.
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html



reply via email to

[Prev in Thread] Current Thread [Next in Thread]