emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Tom Alexander" <tom@fizz.buzz>
To: emacs-orgmode@gnu.org
Subject: [PATCH] Add backslash to list of POST characters for text markup
Date: Thu, 21 Sep 2023 21:24:18 -0400	[thread overview]
Message-ID: <a42c150e-169d-4198-874c-41a10cb13cae@app.fastmail.com> (raw)

[-- 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


             reply	other threads:[~2023-09-22  1:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-22  1:24 Tom Alexander [this message]
2023-09-22  9:29 ` [PATCH] Add backslash to list of POST characters for text markup Ihor Radchenko
2023-09-29 16:10   ` Tom Alexander

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  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=a42c150e-169d-4198-874c-41a10cb13cae@app.fastmail.com \
    --to=tom@fizz.buzz \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* 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

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