emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Bug: Org Emphasis Issues (Trunk)
@ 2016-12-14  2:32 Ian Dunn
  2016-12-14  4:02 ` Matt Lundin
  0 siblings, 1 reply; 4+ messages in thread
From: Ian Dunn @ 2016-12-14  2:32 UTC (permalink / raw)
  To: emacs-orgmode



    I encountered these issues this morning when I updated Org from trunk (and reloaded it with C-c C-x !).  I believe it's following commit "Split `org-emph-re' and `org-verbatim-re'".  I've got 2 issues:

    1. Nothing longer than one character has emphasis.  I find changing the 4th element of org-emphasis-regexp-components ("body-regexp") to ".*?" fixes this.

    2. Headings of level >= 3 are fontified as if they were emphasized.  I'm guessing org-do-emphasis-face is considering "***" as an acceptable emphasis string.

    If it helps, this is my setting for org-emphasis-regexp-components:

(defconst org-emphasis-regexp-components
  '(" \t('\"{<“‘–"
    "- \t.,:!?;'\")}\\[>”’–…"
    " \t\r\n"
    ".*?"
    0))

--
Ian Dunn

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Bug: Org Emphasis Issues (Trunk)
  2016-12-14  2:32 Bug: Org Emphasis Issues (Trunk) Ian Dunn
@ 2016-12-14  4:02 ` Matt Lundin
  2016-12-14 10:16   ` Nicolas Goaziou
  0 siblings, 1 reply; 4+ messages in thread
From: Matt Lundin @ 2016-12-14  4:02 UTC (permalink / raw)
  To: Ian Dunn; +Cc: emacs-orgmode

Ian Dunn <dunni@gnu.org> writes:

>     I encountered these issues this morning when I updated Org from
>     trunk (and reloaded it with C-c C-x !). I believe it's following
>     commit "Split `org-emph-re' and `org-verbatim-re'". I've got 2
>     issues:

>     1. Nothing longer than one character has emphasis. I find changing
>     the 4th element of org-emphasis-regexp-components ("body-regexp")
>     to ".*?" fixes this.

I cannot replicate this particular issue. Could you provide a minimal
recipe for replicating?

>     2. Headings of level >= 3 are fontified as if they were
>emphasized. I'm guessing org-do-emphasis-face is considering "***" as
>an acceptable emphasis string.

I can confirm the problems with headlines, though I can only replicate
it with level 2 headings. (Are you perhaps using org-indent-mode?)

With emacs -Q and the latest org from git, if I open the following file,
"Subheading 1" appears in bold. If I delete "Subheading 2," the emphasis
disappears.

* First headline
** Subheading 1
** Subheading 2

Matt

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Bug: Org Emphasis Issues (Trunk)
  2016-12-14  4:02 ` Matt Lundin
@ 2016-12-14 10:16   ` Nicolas Goaziou
  2016-12-16  2:29     ` Ian Dunn
  0 siblings, 1 reply; 4+ messages in thread
From: Nicolas Goaziou @ 2016-12-14 10:16 UTC (permalink / raw)
  To: Ian Dunn; +Cc: emacs-orgmode

Hello,

Matt Lundin <mdl@imapmail.org> writes:

> Ian Dunn <dunni@gnu.org> writes:
>
>>     I encountered these issues this morning when I updated Org from
>>     trunk (and reloaded it with C-c C-x !). I believe it's following
>>     commit "Split `org-emph-re' and `org-verbatim-re'". I've got 2
>>     issues:
>
>>     1. Nothing longer than one character has emphasis. I find changing
>>     the 4th element of org-emphasis-regexp-components ("body-regexp")
>>     to ".*?" fixes this.
>
> I cannot replicate this particular issue. Could you provide a minimal
> recipe for replicating?

I cannot either.

>>     2. Headings of level >= 3 are fontified as if they were
>>emphasized. I'm guessing org-do-emphasis-face is considering "***" as
>>an acceptable emphasis string.
>
> I can confirm the problems with headlines, though I can only replicate
> it with level 2 headings. (Are you perhaps using org-indent-mode?)
>
> With emacs -Q and the latest org from git, if I open the following file,
> "Subheading 1" appears in bold. If I delete "Subheading 2," the emphasis
> disappears.
>
> * First headline
> ** Subheading 1
> ** Subheading 2

Fixed. Thank you.

Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Bug: Org Emphasis Issues (Trunk)
  2016-12-14 10:16   ` Nicolas Goaziou
@ 2016-12-16  2:29     ` Ian Dunn
  0 siblings, 0 replies; 4+ messages in thread
From: Ian Dunn @ 2016-12-16  2:29 UTC (permalink / raw)
  To: emacs-orgmode

Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

> Hello,
>
> Matt Lundin <mdl@imapmail.org> writes:
>
>> Ian Dunn <dunni@gnu.org> writes:
>>
>>>     I encountered these issues this morning when I updated Org from
>>>     trunk (and reloaded it with C-c C-x !). I believe it's following
>>>     commit "Split `org-emph-re' and `org-verbatim-re'". I've got 2
>>>     issues:
>>
>>>     1. Nothing longer than one character has emphasis. I find changing
>>>     the 4th element of org-emphasis-regexp-components ("body-regexp")
>>>     to ".*?" fixes this.
>>
>> I cannot replicate this particular issue. Could you provide a minimal
>> recipe for replicating?
>
> I cannot either.
>

    Set the last element of org-emphasis-regexp-components ("newline") to zero, reload org, then try:

emacs -Q
;; load trunk org mode
M-: (setf (seq-elt org-emphasis-regexp-components 4) 0)
C-c C-x !

*abcd*

    On mine, that string isn't bold.

    It looks like there's some regex magic that goes on in org-set-emph-re that doesn't happen if the last component is zero.  Part of that magic is adding that *?.

-- 
Ian Dunn

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-12-16  2:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-14  2:32 Bug: Org Emphasis Issues (Trunk) Ian Dunn
2016-12-14  4:02 ` Matt Lundin
2016-12-14 10:16   ` Nicolas Goaziou
2016-12-16  2:29     ` Ian Dunn

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