emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Bug: Inconsistent behaviour about inline markup
@ 2023-01-14 20:12 c.buhtz
  2023-01-15  6:22 ` Timothy
  0 siblings, 1 reply; 4+ messages in thread
From: c.buhtz @ 2023-01-14 20:12 UTC (permalink / raw)
  To: Emacs orgmode

Hello,

I'm not sure if this is a bug or intended by design. Please point to the 
correct documentation if there is one.
I'm also not sure if Orgmode is the related component here or if there 
is any other?

What I describe is in the context of auto-formating markup in orgmode. 
When you type "=verb=" or "~code~" the first and last character 
disappears but the text gets another color. In GUI mode also "/" and "*" 
will disapear and make the word italic or bold.

What characters are allowed in front of the beginning inline marker 
("=", "~", "/", "*", etc) and after the ending marker.
Allowed may not be the correct word. With which characters is Orgmode 
still able to recognize the markup right.

Examples (the " are not part of the data)

  - "=verb=" -> OK, because line beginning and ending are allowed
  - "(=verb=)" -> OK
  - " =verb=}" -> OK. Space/blank and curly bracket allowed

- "=verb=\" -> OK. Backslash at the end.
- "\=verb=" -> BAD. Backslash in the beginning not allowed. No 
formatting happens.
- ")=verb=(" -> BAD. "inverted" brackets not allowed.
- "=verb=." ->OK. Dot at the end.
- ".=verb=" -> BAD. Dot at the beginning.

IMHO there shouldn't be a difference in the allowed characters in front 
of the beginning inline marker (the "=" here in the example) and the one 
after the ending inline marker.

First of all it would help me if this is documented somewhere.

Second it would improve my (regex) code (which have to parse such 
org-markup) and its maintainability if allowed characters would be 
uniform/consistent.

Kind
Christian


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

* Re: Bug: Inconsistent behaviour about inline markup
  2023-01-14 20:12 Bug: Inconsistent behaviour about inline markup c.buhtz
@ 2023-01-15  6:22 ` Timothy
  2023-01-15 10:16   ` c.buhtz
  0 siblings, 1 reply; 4+ messages in thread
From: Timothy @ 2023-01-15  6:22 UTC (permalink / raw)
  To: c.buhtz; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 407 bytes --]

Hi Christian,

> Please point to the correct documentation if there is one.

See <https://orgmode.org/worg/org-syntax.html#Emphasis_Markers>.

All the best,
Timothy

-- 
Timothy (‘tecosaur’/‘TEC’), Org mode contributor.
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/tec>.

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

* Re: Bug: Inconsistent behaviour about inline markup
  2023-01-15  6:22 ` Timothy
@ 2023-01-15 10:16   ` c.buhtz
  2023-01-15 10:31     ` Ihor Radchenko
  0 siblings, 1 reply; 4+ messages in thread
From: c.buhtz @ 2023-01-15 10:16 UTC (permalink / raw)
  To: emacs-orgmode

Dear Timothy,

On 2023-01-15 14:22 Timothy <orgmode@tec.tecosaur.net> wrote:
> See <https://orgmode.org/worg/org-syntax.html#Emphasis_Markers>.

Thanks a lot. That help to make my code consistent.

But please take this also as a BugReport (because there seems to be no
regular bug tracker for orgmode). I see no need to restrict the allowed
characters that way they are. PRE and POST should be the same.
The only one exception is [ for POST because I suspect this isn't
implementable via RegEx or would interfere with parsing of links.


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

* Re: Bug: Inconsistent behaviour about inline markup
  2023-01-15 10:16   ` c.buhtz
@ 2023-01-15 10:31     ` Ihor Radchenko
  0 siblings, 0 replies; 4+ messages in thread
From: Ihor Radchenko @ 2023-01-15 10:31 UTC (permalink / raw)
  To: c.buhtz; +Cc: emacs-orgmode

<c.buhtz@posteo.jp> writes:

> But please take this also as a BugReport (because there seems to be no
> regular bug tracker for orgmode). I see no need to restrict the allowed
> characters that way they are. PRE and POST should be the same.
> The only one exception is [ for POST because I suspect this isn't
> implementable via RegEx or would interfere with parsing of links.

The aim of limited PRE and POST is allowing dwim literal "*" in ordinary
text where users do not really intend to use emphasis.

The current approach is probably not ideal, but making changes to regexp
raises the risk of breaking existing Org documents that worked in the
past but may not because emphasis will be incorrectly recognized after
changing the syntax.

Any changes in this area should be done with caution.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


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

end of thread, other threads:[~2023-01-15 10:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-14 20:12 Bug: Inconsistent behaviour about inline markup c.buhtz
2023-01-15  6:22 ` Timothy
2023-01-15 10:16   ` c.buhtz
2023-01-15 10:31     ` Ihor Radchenko

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