emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] Add backslash to list of POST characters for text markup
@ 2023-09-22  1:24 Tom Alexander
  2023-09-22  9:29 ` Ihor Radchenko
  0 siblings, 1 reply; 3+ messages in thread
From: Tom Alexander @ 2023-09-22  1:24 UTC (permalink / raw)
  To: emacs-orgmode

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

Backslash appears to be supported. To test I used the following test document:
```
foo ~bar~\& baz
```

This happens in a document in worg: https://git.sr.ht/~bzg/worg/tree/ae64e1a54185232d4ebdcab174d8d4319ffd564d/org-release-notes.org#L6666

The ampersand was chosen for the test document since that is not a supported POST character, to make sure backslash was not simply escaping the next character.

In the documentation I wrote out the word "backslash" in parenthesis to disambiguate between backslash and escaping the following comma.

Patch is attached.

--
Tom Alexander
pgp: https://fizz.buzz/pgp.asc

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Add-backslash-to-list-of-POST-characters-for-text-ma.patch --]
[-- Type: text/x-patch; name="0001-Add-backslash-to-list-of-POST-characters-for-text-ma.patch", Size: 1506 bytes --]

From 098434680b5e3942acc00684a47389f2cdab6208 Mon Sep 17 00:00:00 2001
From: Tom Alexander <tom@fizz.buzz>
Date: Thu, 21 Sep 2023 21:14:33 -0400
Subject: [PATCH] Add backslash to list of POST characters for text markup.

Backslash appears to be supported. To test I used the following test document:
```
foo ~bar~\& baz
```
The ampersand was chosen since that is not a supported POST character, to make sure backslash was not simply escaping the next character.

In the documentation I wrote out the word "backslash" in parenthesis to disambiguate between backslash and escaping the following comma.
---
 org-syntax.org | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/org-syntax.org b/org-syntax.org
index c5299741..8f0f9b0c 100644
--- a/org-syntax.org
+++ b/org-syntax.org
@@ -249,9 +249,9 @@ discarded.  This also applies to single-line elements.
 
 :    This paragraph will not contain
 :    a long sequence of spaces before "a".
-: 
+:
 :    This paragraph does not have leading spaces according to the parser.
-: 
+:
 :    #+begin_src emacs-lisp
 :      (+ 1 2)
 :    #+end_src
@@ -1742,7 +1742,7 @@ whitespace characters.
   verbatim) or a series of objects from the standard set. In both
   cases, CONTENTS may not begin or end with whitespace.
 + [[#Special_Tokens][POST]] :: Either a whitespace character, =-=, =.=, =,=, =;=, =:=, =!=, =?=, ='=, =)=, =}=,
-  =[=, ="=, or the end of a line.
+  =[=, ="=, =\= (backslash), or the end of a line.
 
 *Examples*
 
-- 
2.42.0


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

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

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-22  1:24 [PATCH] Add backslash to list of POST characters for text markup Tom Alexander
2023-09-22  9:29 ` Ihor Radchenko
2023-09-29 16:10   ` Tom Alexander

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