emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@gmail.com>
To: Max Nikulin <manikulin@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: c47b535bb origin/main org-element: Remove dependency on ‘org-emphasis-regexp-components’
Date: Tue, 16 Nov 2021 15:43:19 +0800	[thread overview]
Message-ID: <878rxoa6lk.fsf@localhost> (raw)
In-Reply-To: <smu1md$1345$1@ciao.gmane.io>

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

Max Nikulin <manikulin@gmail.com> writes:

> Better docs and some restriction on defcustom values were discussed earlier:
> https://list.orgmode.org/87k0oyd3pw.fsf@nicolasgoaziou.fr/
> Nicolas Goaziou. Re: Using backticks for the inline code delimeter? Mon, 
> 19 Apr 2021 11:27:07 +0200
>
> Sorry, I have not prepared a patch. I am not confident with defcustom 
> fine tuning and have not experimented with it since that time.

Maybe something like the attached?

Best,
Ihor


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-org-emphasis-alist-Update-defcustom-making-emphasis-.patch --]
[-- Type: text/x-diff, Size: 2397 bytes --]

From 8057cdb57f6600443b3605c1e7f00a30bea2a9ea Mon Sep 17 00:00:00 2001
Message-Id: <8057cdb57f6600443b3605c1e7f00a30bea2a9ea.1637048505.git.yantar92@gmail.com>
From: Ihor Radchenko <yantar92@gmail.com>
Date: Tue, 16 Nov 2021 15:40:35 +0800
Subject: [PATCH] org-emphasis-alist: Update defcustom making emphasis
 characters constant

* lisp/org.el (org-emphasis-alist): Mention that emphasis characters
should not be changed by user.  Update the defcustom type accordingly.
---
 lisp/org.el | 39 ++++++++++++++++++++++++++++++++++-----
 1 file changed, 34 insertions(+), 5 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index 603b57279..7af5e26c6 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -3833,18 +3833,47 @@ (defcustom org-emphasis-alist
 marker characters and the face to be used by font-lock for highlighting
 in Org buffers.
 
+The characters in the alist must not be changed.  They do not affect
+the actual Org syntax, just fontification.
+
 You need to reload Org or to restart Emacs after customizing this."
   :group 'org-appearance
   :set 'org-set-emph-re
   :version "24.4"
   :package-version '(Org . "8.0")
-  :type '(repeat
+  :type '(list
 	  (list
-	   (string :tag "Marker character")
+	   (const "*")
+	   (choice
+	    (face :tag "Bold emphasis face")
+	    (plist :tag "Bold emphasis face property list")))
+          (list
+	   (const "/")
+	   (choice
+	    (face :tag "Italic emphasis face")
+	    (plist :tag "Italic emphasis face property list")))
+          (list
+	   (const "_")
+	   (choice
+	    (face :tag "Underline emphasis face")
+	    (plist :tag "Underline emphasis face property list")))
+          (list
+	   (const "=")
+	   (choice
+	    (face :tag "Verbatim emphasis face")
+	    (plist :tag "Verbatim emphasis face property list"))
+	   (const verbatim))
+          (list
+	   (const "~")
+	   (choice
+	    (face :tag "Code emphasis face")
+	    (plist :tag "Code emphasis face property list"))
+	   (const verbatim))
+          (list
+	   (const "+")
 	   (choice
-	    (face :tag "Font-lock-face")
-	    (plist :tag "Face property list"))
-	   (option (const verbatim)))))
+	    (face :tag "Strike-through emphasis face")
+	    (plist :tag "Strike-through emphasis face property list")))))
 
 (defvar org-protecting-blocks '("src" "example" "export")
   "Blocks that contain text that is quoted, i.e. not processed as Org syntax.
-- 
2.32.0


  reply	other threads:[~2021-11-16  7:48 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-15  0:53 c47b535bb origin/main org-element: Remove dependency on ‘org-emphasis-regexp-components’ Ihor Radchenko
2021-11-15  9:56 ` Nicolas Goaziou
2021-11-15 15:20   ` Ihor Radchenko
2021-11-15 16:25     ` Max Nikulin
2021-11-16  7:43       ` Ihor Radchenko [this message]
2021-11-16 21:56         ` Samuel Wales
2021-11-16 22:16           ` Samuel Wales
2021-11-17 16:44         ` Max Nikulin
2021-11-17 22:44           ` Samuel Wales
2021-11-18 12:25           ` Ihor Radchenko
2021-11-18 12:35             ` Nicolas Goaziou
2021-11-18 12:55               ` Ihor Radchenko
2021-11-19  8:18                 ` Nicolas Goaziou
2021-11-19 11:38                   ` [PATCH] " Ihor Radchenko
2021-11-19 12:37                     ` Nicolas Goaziou
2021-11-19 13:53                       ` Ihor Radchenko
2021-11-20 18:25                         ` Nicolas Goaziou
2021-11-21  9:28                           ` Ihor Radchenko
2021-11-22 18:44                             ` Nicolas Goaziou
2021-11-23 14:28                               ` Ihor Radchenko
2021-11-27 12:16                             ` org parser and priorities of inline elements Max Nikulin
2021-11-27 19:02                               ` Nicolas Goaziou
2023-07-17 11:51                               ` Org markup and non-ASCII punctuation (was: org parser and priorities of inline elements) Ihor Radchenko
2023-07-18  0:03                                 ` Tom Gillespie
2023-07-18  5:07                                   ` Ihor Radchenko
2023-07-18  5:40                                     ` Tom Gillespie
2023-07-18  9:45                                       ` Ihor Radchenko
2021-11-19 16:34             ` c47b535bb origin/main org-element: Remove dependency on ‘org-emphasis-regexp-components’ Max Nikulin
2021-11-20 12:02         ` Max Nikulin
2021-11-21 10:01           ` Ihor Radchenko
2021-11-21 16:36             ` Max Nikulin
2021-11-23 17:05             ` [PATCH] org.el: Warning for unsupported markers in `org-set-emphasis-alist' Max Nikulin
2022-11-04  6:53               ` Ihor Radchenko
2022-11-04 12:31                 ` Max Nikulin
2022-11-05  8:21                   ` Ihor Radchenko
2023-02-02 10:53                     ` [PATCH v5] " Ihor Radchenko
2023-02-06 15:11                       ` Max Nikulin
2023-02-06 16:49                       ` Max Nikulin
2023-02-07 10:47                         ` Should we obsolete org-emphasis-alist? (was: [PATCH v5] org.el: Warning for unsupported markers in `org-set-emphasis-alist') Ihor Radchenko
2023-02-07 12:22                           ` Timothy
2023-02-09 12:11                           ` Max Nikulin

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=878rxoa6lk.fsf@localhost \
    --to=yantar92@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=manikulin@gmail.com \
    /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).