* Syntax question: What is BORDER in 4.17. Text Markup?
@ 2022-12-06 18:28 Jens Lechtenboerger
2022-12-06 18:54 ` tomas
2022-12-07 3:35 ` Max Nikulin
0 siblings, 2 replies; 10+ messages in thread
From: Jens Lechtenboerger @ 2022-12-06 18:28 UTC (permalink / raw)
To: emacs-orgmode
Hi there,
the syntax for Text Markup such as *bold* at [1] specifies
PRE MARKER CONTENTS MARKER POST with
CONTENTS as BORDER BODY BORDER and
BORDER as “Any non-whitespace character.”
What is the role of BORDER here? Does it really exist?
What is BORDER if CONTENTS should be a single character, e.g., in
the two strings “*x*” and “~*~”? Are single characters forbidden?
Best wishes
Jens
[1] https://orgmode.org/worg/org-syntax.html#Emphasis_Markers
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Syntax question: What is BORDER in 4.17. Text Markup?
2022-12-06 18:28 Syntax question: What is BORDER in 4.17. Text Markup? Jens Lechtenboerger
@ 2022-12-06 18:54 ` tomas
2022-12-07 3:35 ` Max Nikulin
1 sibling, 0 replies; 10+ messages in thread
From: tomas @ 2022-12-06 18:54 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 865 bytes --]
On Tue, Dec 06, 2022 at 07:28:20PM +0100, Jens Lechtenboerger wrote:
> Hi there,
>
> the syntax for Text Markup such as *bold* at [1] specifies
> PRE MARKER CONTENTS MARKER POST with
> CONTENTS as BORDER BODY BORDER and
> BORDER as “Any non-whitespace character.”
>
> What is the role of BORDER here? Does it really exist?
>
> What is BORDER if CONTENTS should be a single character, e.g., in
> the two strings “*x*” and “~*~”? Are single characters forbidden?
Yes, this seems a bit unfortunate. The BORDER char may be identical
to the BODY. So *f* and *ff* are both valid markups.
Perhaps it'd be clearer to forget about the BORDER, only talk about
BODY and say that BODY is not empty and doesn't start or end with
a whitespace character.
Cheers
> [1] https://orgmode.org/worg/org-syntax.html#Emphasis_Markers
--
t
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Syntax question: What is BORDER in 4.17. Text Markup?
2022-12-06 18:28 Syntax question: What is BORDER in 4.17. Text Markup? Jens Lechtenboerger
2022-12-06 18:54 ` tomas
@ 2022-12-07 3:35 ` Max Nikulin
2022-12-07 7:16 ` Jens Lechtenboerger
1 sibling, 1 reply; 10+ messages in thread
From: Max Nikulin @ 2022-12-07 3:35 UTC (permalink / raw)
To: emacs-orgmode
On 07/12/2022 01:28, Jens Lechtenboerger wrote:
> Hi there,
>
> the syntax for Text Markup such as *bold* at [1] specifies
> PRE MARKER CONTENTS MARKER POST with
> CONTENTS as BORDER BODY BORDER and
> BORDER as “Any non-whitespace character.”
>
> What is the role of BORDER here? Does it really exist?
I think, the idea is to stress that
/ / or * word *
must not be considered as emphasis.
> What is BORDER if CONTENTS should be a single character, e.g., in
> the two strings “*x*” and “~*~”? Are single characters forbidden?
The spec is not precise here. It is close to the code that actually
allows single character contents, see
`org-element--parse-generic-emphasis' and the docstring of
`org-emphasis-regexp-components'.
Perhaps it should be stated as (in regexp notation)
BORDER (BODY? BORDER)?
or as alternatives
BORDER or BORDER BORDER or BORDER BODY BORDER.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Syntax question: What is BORDER in 4.17. Text Markup?
2022-12-07 3:35 ` Max Nikulin
@ 2022-12-07 7:16 ` Jens Lechtenboerger
2022-12-07 7:54 ` Jens Lechtenboerger
0 siblings, 1 reply; 10+ messages in thread
From: Jens Lechtenboerger @ 2022-12-07 7:16 UTC (permalink / raw)
To: Max Nikulin; +Cc: emacs-orgmode
On 2022-12-07, Max Nikulin wrote:
> On 07/12/2022 01:28, Jens Lechtenboerger wrote:
>> Hi there,
>> the syntax for Text Markup such as *bold* at [1] specifies
>> PRE MARKER CONTENTS MARKER POST with
>> CONTENTS as BORDER BODY BORDER and
>> BORDER as “Any non-whitespace character.”
>> What is the role of BORDER here? Does it really exist?
>
> I think, the idea is to stress that
>
> / / or * word *
>
> must not be considered as emphasis.
I see, thanks.
>> What is BORDER if CONTENTS should be a single character, e.g., in
>> the two strings “*x*” and “~*~”? Are single characters forbidden?
>
> The spec is not precise here. It is close to the code that actually
> allows single character contents, see
> `org-element--parse-generic-emphasis' and the docstring of
> `org-emphasis-regexp-components'.
>
> Perhaps it should be stated as (in regexp notation)
>
> BORDER (BODY? BORDER)?
>
> or as alternatives
>
> BORDER or BORDER BORDER or BORDER BODY BORDER.
If find this confusing. What is BODY (semantically) if two of its
characters are assigned to BORDERs?
What about getting rid of BORDER in the spec and replacing
“Where BORDER and BODY are not separated by whitespace.”
with
“Where BODY does neither begin nor end with whitespace”?
(If that is correct...)
The implementation with regexps is a different issue.
Best wishes
Jens
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Syntax question: What is BORDER in 4.17. Text Markup?
2022-12-07 7:16 ` Jens Lechtenboerger
@ 2022-12-07 7:54 ` Jens Lechtenboerger
2022-12-07 9:36 ` Timothy
2022-12-07 15:43 ` Nick Dokos
0 siblings, 2 replies; 10+ messages in thread
From: Jens Lechtenboerger @ 2022-12-07 7:54 UTC (permalink / raw)
To: Max Nikulin; +Cc: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 1830 bytes --]
On 2022-12-07, Jens Lechtenboerger wrote:
> On 2022-12-07, Max Nikulin wrote:
>
>> On 07/12/2022 01:28, Jens Lechtenboerger wrote:
>>> Hi there,
>>> the syntax for Text Markup such as *bold* at [1] specifies
>>> PRE MARKER CONTENTS MARKER POST with
>>> CONTENTS as BORDER BODY BORDER and
>>> BORDER as “Any non-whitespace character.”
>>> What is the role of BORDER here? Does it really exist?
>>
>> I think, the idea is to stress that
>>
>> / / or * word *
>>
>> must not be considered as emphasis.
>
> I see, thanks.
>
>>> What is BORDER if CONTENTS should be a single character, e.g., in
>>> the two strings “*x*” and “~*~”? Are single characters forbidden?
>>
>> The spec is not precise here. It is close to the code that actually
>> allows single character contents, see
>> `org-element--parse-generic-emphasis' and the docstring of
>> `org-emphasis-regexp-components'.
>>
>> Perhaps it should be stated as (in regexp notation)
>>
>> BORDER (BODY? BORDER)?
>>
>> or as alternatives
>>
>> BORDER or BORDER BORDER or BORDER BODY BORDER.
>
> If find this confusing. What is BODY (semantically) if two of its
> characters are assigned to BORDERs?
>
> What about getting rid of BORDER in the spec and replacing
> “Where BORDER and BODY are not separated by whitespace.”
> with
> “Where BODY does neither begin nor end with whitespace”?
> (If that is correct...)
>
> The implementation with regexps is a different issue.
Actually, what about this? Get rid of both, BORDER and BODY, and
specify CONTENTS as follows:
“Either a string (when MARKER represents code or verbatim) or a
series of objects from the standard set, not spanning more than
three lines. In any case, CONTENTS must neither begin nor end with
whitespace.”
Best wishes
Jens
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 6187 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Syntax question: What is BORDER in 4.17. Text Markup?
2022-12-07 7:54 ` Jens Lechtenboerger
@ 2022-12-07 9:36 ` Timothy
2022-12-07 10:29 ` Jens Lechtenboerger
2022-12-07 15:43 ` Nick Dokos
1 sibling, 1 reply; 10+ messages in thread
From: Timothy @ 2022-12-07 9:36 UTC (permalink / raw)
To: Jens Lechtenboerger; +Cc: Max Nikulin, emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 669 bytes --]
Hi Jens,
> Actually, what about this? Get rid of both, BORDER and BODY, and
> specify CONTENTS as follows:
> “Either a string (when MARKER represents code or verbatim) or a
> series of objects from the standard set, not spanning more than
> three lines. In any case, CONTENTS must neither begin nor end with
> whitespace.”
This seems like an improvement to me, implemented in 56338725e61 :)
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] 10+ messages in thread
* Re: Syntax question: What is BORDER in 4.17. Text Markup?
2022-12-07 9:36 ` Timothy
@ 2022-12-07 10:29 ` Jens Lechtenboerger
2022-12-07 10:38 ` tomas
0 siblings, 1 reply; 10+ messages in thread
From: Jens Lechtenboerger @ 2022-12-07 10:29 UTC (permalink / raw)
To: Timothy; +Cc: Max Nikulin, emacs-orgmode
On 2022-12-07, Timothy wrote:
> Hi Jens,
>
>> Actually, what about this? Get rid of both, BORDER and BODY, and
>> specify CONTENTS as follows:
>> “Either a string (when MARKER represents code or verbatim) or a
>> series of objects from the standard set, not spanning more than
>> three lines. In any case, CONTENTS must neither begin nor end with
>> whitespace.”
>
> This seems like an improvement to me, implemented in 56338725e61 :)
Many thanks, Timothy!
Best wishes
Jens
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Syntax question: What is BORDER in 4.17. Text Markup?
2022-12-07 10:29 ` Jens Lechtenboerger
@ 2022-12-07 10:38 ` tomas
0 siblings, 0 replies; 10+ messages in thread
From: tomas @ 2022-12-07 10:38 UTC (permalink / raw)
To: Timothy, Max Nikulin, emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 239 bytes --]
On Wed, Dec 07, 2022 at 11:29:29AM +0100, Jens Lechtenboerger wrote:
> On 2022-12-07, Timothy wrote:
[...]
> > This seems like an improvement to me, implemented in 56338725e61 :)
>
> Many thanks, Timothy!
Seconded :)
--
t
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Syntax question: What is BORDER in 4.17. Text Markup?
2022-12-07 7:54 ` Jens Lechtenboerger
2022-12-07 9:36 ` Timothy
@ 2022-12-07 15:43 ` Nick Dokos
2022-12-07 15:52 ` Ihor Radchenko
1 sibling, 1 reply; 10+ messages in thread
From: Nick Dokos @ 2022-12-07 15:43 UTC (permalink / raw)
To: emacs-orgmode
Jens Lechtenboerger <lechten@wi.uni-muenster.de> writes:
> Actually, what about this? Get rid of both, BORDER and BODY, and
> specify CONTENTS as follows:
> “Either a string (when MARKER represents code or verbatim) or a
> series of objects from the standard set, not spanning more than
> three lines. In any case, CONTENTS must neither begin nor end with
> whitespace.”
>
The problem is that these things are configurable, so the above is onlyu
true by default. But you can redefine `org-emphasis-regexp-components` in
ways that would make the above untrue: hence the more abstract description.
--
Nick
"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2022-12-07 16:07 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-06 18:28 Syntax question: What is BORDER in 4.17. Text Markup? Jens Lechtenboerger
2022-12-06 18:54 ` tomas
2022-12-07 3:35 ` Max Nikulin
2022-12-07 7:16 ` Jens Lechtenboerger
2022-12-07 7:54 ` Jens Lechtenboerger
2022-12-07 9:36 ` Timothy
2022-12-07 10:29 ` Jens Lechtenboerger
2022-12-07 10:38 ` tomas
2022-12-07 15:43 ` Nick Dokos
2022-12-07 15:52 ` Ihor Radchenko
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.