emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* The syntax class of ", /, =, ~
@ 2018-07-26 20:28 Omar Antolín
  2018-08-19  8:33 ` Nicolas Goaziou
  0 siblings, 1 reply; 2+ messages in thread
From: Omar Antolín @ 2018-07-26 20:28 UTC (permalink / raw)
  To: emacs-orgmode

In a nutshell, I propose that ", /, = and ~ be assigned to the syntax class "paired delimiter", which is $. (This would allow electric-pair-mode to work with them.)

The definition of org-mode as a derived mode contains the following lines:

  (modify-syntax-entry ?@ "w")
  (modify-syntax-entry ?\" "\"")
  (modify-syntax-entry ?\\ "_")
  (modify-syntax-entry ?~ "_")

What is the rationale behind the choices for ~ and "? It feels to me like both should be assigned class "paired delimiters" (i.e., class $). I would also expect / and = to be paired delimiters, but maybe I'm missing some subtlety.

(I guess * is a paired delimter in a sense, too (because it is used for bold), but since it is used for headings it would probably be too confusing to modify its syntax class.)


--
Omar

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

* Re: The syntax class of ", /, =, ~
  2018-07-26 20:28 The syntax class of ", /, =, ~ Omar Antolín
@ 2018-08-19  8:33 ` Nicolas Goaziou
  0 siblings, 0 replies; 2+ messages in thread
From: Nicolas Goaziou @ 2018-08-19  8:33 UTC (permalink / raw)
  To: Omar Antolín; +Cc: emacs-orgmode

Hello,

omar.antolin@gmail.com (Omar Antolín) writes:

> In a nutshell, I propose that ", /, = and ~ be assigned to the syntax class "paired delimiter", which is $. (This would allow electric-pair-mode to work with them.)
>
> The definition of org-mode as a derived mode contains the following lines:
>
>   (modify-syntax-entry ?@ "w")
>   (modify-syntax-entry ?\" "\"")
>   (modify-syntax-entry ?\\ "_")
>   (modify-syntax-entry ?~ "_")
>
> What is the rationale behind the choices for ~ and "? It feels to me
> like both should be assigned class "paired delimiters" (i.e., class
> $). I would also expect / and = to be paired delimiters, but maybe I'm
> missing some subtlety.

What about file:~/todo.org and \(a=b\)? I don't think we can assure ~,
/, and = are always paired. Also, what is wrong with " belonging to string
quote class?

Regards,

-- 
Nicolas Goaziou

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

end of thread, other threads:[~2018-08-19  8:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-26 20:28 The syntax class of ", /, =, ~ Omar Antolín
2018-08-19  8:33 ` Nicolas Goaziou

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