emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Tim Cross <theophilusx@gmail.com>
To: Samuel Wales <samologist@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: [bug] org-do-emphasis-faces breaks with incomplete emphasis
Date: Wed, 17 Feb 2021 12:06:20 +1100	[thread overview]
Message-ID: <877dn7pjlc.fsf@gmail.com> (raw)
In-Reply-To: <CAJcAo8ts9D0B1fhNX8ALBX_amxX5-dC0+fs+kEM8x8cWw7prbw@mail.gmail.com>

Samuel Wales <samologist@gmail.com> writes:

> hi tim,
> tanks for your replies.
> 1.  the same problem occurs without any * in the buffer.

It will occur with any of the markup special characters e.g. *, =, _, +, /

> 2.  the emphasis regexps are supposed to be limited to a few lines.

Are they? What is 'a few'? This also won't work if you use
visual-line-mode and don't use auto-fill (as your paragraphs are then
just one long line).

> 3.  they are also supposed to not try to match dissimilar delimiiters.

Not quite sure what you mean here.

> the problem is that
> hi =something
> stops all emphasis of all types in the entire rest of hte bguffer even
> if the buyffer contains many lines.  this sems unusual to me.
> it does not break anything befofre it.
> so i think your hypothesis of what i am talking about might possibly
> not match what i am talking about at all.

I'm not disagreeing with what your saying. I think the reason the rest
of the file doesn't get parsed correctly is because the single markup
character has made the syntax inconsistent and broken.

The problem is I don't think there is a good fix for this which doesn't
introduce other problems. If the regexp which does the matching is
supposed to limit its search to just a specific number of lines, then
perhaps it is broken. However, I'm not sure what 'a few lines' really
means (2?, 5?, 10?). I also know from past experience that trying to
define font-lock matches which work in such a way is complex, error
prone and often results in a considerable performance hit.

Bottom line, if you want to use the characters reserved for markup
purposes as just plain characters, you have to somehow quote them or
mark them as being 'verbatim' characters. I do think it would be useful
to have something in the manual on this under the markup section.

Tim Cross

  parent reply	other threads:[~2021-02-17  1:33 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
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 [this message]
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:

  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=877dn7pjlc.fsf@gmail.com \
    --to=theophilusx@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=samologist@gmail.com \


* 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


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).