emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Tim Cross <theophilusx@gmail.com>
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	[thread overview]
Message-ID: <87tuqbpq1s.fsf@gmail.com> (raw)
In-Reply-To: <CAJcAo8uU+oghdRh1mOLJ=WS0N_Z+Ob7Pwh0BfV3NLBm7OjgqUQ@mail.gmail.com>


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


  reply	other threads:[~2021-02-16 23:11 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-16 22:47 [bug] org-do-emphasis-faces breaks with incomplete emphasis Samuel Wales
2021-02-16 22:59 ` Tim Cross [this message]
2021-02-16 23:53   ` Samuel Wales
2021-02-16 23:57     ` Samuel Wales
2021-02-17  0:09       ` Tim Cross
2021-02-17  0:59         ` Samuel Wales
2021-02-17  1:01           ` Samuel Wales
2021-02-17  1:06           ` Tim Cross
2021-02-17  2:42             ` Samuel Wales
2021-02-16 23:57     ` Tim Cross

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87tuqbpq1s.fsf@gmail.com \
    --to=theophilusx@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).