emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Max Nikulin <manikulin@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: c47b535bb origin/main org-element: Remove dependency on ‘org-emphasis-regexp-components’
Date: Sun, 21 Nov 2021 23:36:44 +0700	[thread overview]
Message-ID: <sndsiu$reb$1@ciao.gmane.io> (raw)
In-Reply-To: <87pmqtj09r.fsf@localhost>

On 21/11/2021 17:01, Ihor Radchenko wrote:
> Max Nikulin writes:
> 
>> My draft version is attached. Ihor, thank you for inspiration. Feel free
>> to improve it. I hope, it makes problem more apparent to user who tries
>> to customize markers. Have I missed some undesired side effects?
> 
>> Unfortunately with "set" type in defcustom "catch inappropriate" item is
>> not hidden for valid configuration.
 >
> I am not very familiar with :set customisation. Could you elaborate what
> you mean? I do not understand what "catch inappropriate" refers to.

I am afraid of confusion of ":set" defcustom parameter and "set" type in 
":type" parameter.

I mean "set" instead of "repeat" (or "list" in your patch). It is 
collection of *unique* items. Other variants allow to add several 
entries for the same marker, e.g. "*". Set does not allow users to add 
duplicated entries. I started from your description of allowed entries
and changed rigid "list" type to "set" and added (approximately)

           (list :tag "Unsupported ignored"
	   (string :tag "Marker")
	   (choice :tag "Font"
	    (face :tag "Face")
	    (plist :tag "Property list"))
	   (option (const verbatim))

to notify user that some part of configuration does not work, it is 
always shown in `customize-variable' interface, even as a disabled 
option for default configuration.

With repeat, "Unsupported" options are not present in customization 
buffer, unless user has something like

(custom-set-variables
   '(org-emphasis-alist
      (quote
        (
	("*" bold)
	("_" underline)
	("=" org-verbatim verbatim)
	("/" italic)
	("~" org-code verbatim)
	("!" org-todo) ;; does not work
	("+" (:strike-through t)))))
   )

It is possible to add "seq" entry to catch list entries having 
completely invalid structure, but I decided that it is redundant.

So with "repeat" type user may notice "Unsupported ignored" option in 
customization interface. I think, it is not enough, so I added ":set" 
function that issues a warning during load time. Invalid configuration 
may still remain hidden in the case of `setq' instead of 
`custom-set-variables' in the init file or `eval-after-load' hook. I am 
afraid, nothing could be done to reliably detect the last case.

>> + ... It is possible to customize
>> +~org-emphasis-alist~ variable, but it will be deprecated.
> 
> We probably do not need to mention to-be-deprecated variables in manual.
> It will only confuse users.

I do not insist. My intention is to inform users that wide spread 
recipes should be avoided.

> Maybe we should also take a chance and deprecate org-emphasis-alist now?
> We can introduce org-bold/italics/... faces and use them in
> org-emphasis-alist default value.

I do not mind. I have never experimented with themes, so I would leave 
this part of work to someone else.



  reply	other threads:[~2021-11-21 16:37 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
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 [this message]
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='sndsiu$reb$1@ciao.gmane.io' \
    --to=manikulin@gmail.com \
    --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).