* [RFC] Emphasis regexp
@ 2014-02-01 8:27 Michael Brand
2014-02-01 15:02 ` Florian Beck
2014-02-03 8:55 ` Bastien
0 siblings, 2 replies; 4+ messages in thread
From: Michael Brand @ 2014-02-01 8:27 UTC (permalink / raw)
To: Org Mode
Hi all
I must be missing something since I think these are very common use
cases: How is one supposed to get code emphasis to recognize the
beginning and end "as expected" in the four examples ='the file.org'=
and ="$1"= and =a = 'x'= and =b = "y"=?
Can I change =org-emphasis-regexp-components= in the Org repository
accordingly to allow single and double quotes for "border" or would
that break too many use cases? To try out what would break in existing
Org files with what I suggest, use
#+NAME: change_border
#+BEGIN_SRC emacs-lisp
(setq org-emphasis-regexp-components
'(" \t('\"{" "- \t.,:!?;'\")}\\" " \t\r\n," "." 1))
#+END_SRC
and reload Org mode and reopen the Org buffers that were already
opened.
Additionally and at the cost of "giving up" (why would they be
needed?) '=foo bar=' and "=foo bar=", which possibly should anyway be
either just 'foo bar' and "foo bar" or =foo bar=, also the examples
=c='z'= and =d="t"= would work when using
#+NAME: change_pre_and_post_and_border
#+BEGIN_SRC emacs-lisp
(setq org-emphasis-regexp-components
'(" \t({" "- \t.,:!?;)}\\" " \t\r\n," "." 1))
#+END_SRC
As a reminder and to reset during trials, the current state is
#+BEGIN_SRC emacs-lisp
(setq org-emphasis-regexp-components
'(" \t('\"{" "- \t.,:!?;'\")}\\" " \t\r\n,\"'" "." 1))
#+END_SRC
Which one of the following is your preference for
=org-emphasis-regexp-components= and why?:
- as in named block "change_pre_and_post_and_border"
- as in named block "change_border"
- keep current state
- other
Below is the history of =org-emphasis-regexp-components= for further
argumentation. The git commits d45806cc and 8ddd57dc (repository
conversion (?) in 2008) have a commit message that does not tell why
single and double quotes were added to be possible for "pre" and
"post" and to be not allowed for "border". Is there a version control
Org repository prior to git with some more comment that has not been
converted to git?
#+BEGIN_VERSE
2ff8fc11 org.el (Carsten Dominik 2008-01-31 11:32:03 +0100
2327) '(" \t(" " \t.,?;:'\")" " \t\r\n,." "." 1 nil)
d45806cc org.el (Carsten Dominik 2008-01-31 11:32:41 +0100
2641) '(" \t(" " \t.,?;'\")" " \t\r\n," "." 1 nil)
bd2ceb1b org.el (Carsten Dominik 2008-01-31 11:33:26 +0100
2800) '(" \t('\"" " \t.,?;'\")" " \t\r\n," "." 1 nil)
8ddd57dc org.el (Carsten Dominik 2008-01-31 11:34:30 +0100
3421) '(" \t('\"" "- \t.,:?;'\")" " \t\r\n,\"'" "." 1 nil)
93570c03 org.el (Carsten Dominik 2008-01-31 11:37:51 +0100
3955) '(" \t('\"" "- \t.,:?;'\")" " \t\r\n,\"'" "." 1)
fe939ecb9 lisp/org.el (Carsten Dominik 2008-03-22 16:52:18 +0100
2631) '(" \t('\"" "- \t.,:?;'\")" " \t\r\n,\"'" "." 1)
19f700a60 lisp/org.el (Carsten Dominik 2009-03-23 11:14:29 +0100
2631) '(" \t('\"" "- \t.,:!?;'\")" " \t\r\n,\"'" "." 1)
49878b038 lisp/org.el (Carsten Dominik 2009-03-30 11:49:10 +0200
2762) '(" \t('\"{" "- \t.,:!?;'\")}" " \t\r\n,\"'" "." 1)
8d0acabf2 lisp/org.el (Carsten Dominik 2009-08-01 23:32:28 +0200
2782) '(" \t('\"{" "- \t.,:!?;'\")}\\" " \t\r\n,\"'" "." 1)
0ba7d3d2f lisp/org.el (Carsten Dominik 2009-08-18 07:45:35 +0100
2807) '(" \t('`\"{" "- \t.,:!?;'\")}\\" " \t\r\n,\"'" "." 1)
44bb3134d lisp/org.el (Carsten Dominik 2009-08-27 10:29:04 +0200
4244) '(" \t('\"{" "- \t.,:!?;'\")}\\" " \t\r\n,\"'" "." 1)
#+END_VERSE
Michael
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [RFC] Emphasis regexp
2014-02-01 8:27 [RFC] Emphasis regexp Michael Brand
@ 2014-02-01 15:02 ` Florian Beck
2014-02-03 10:15 ` Michael Brand
2014-02-03 8:55 ` Bastien
1 sibling, 1 reply; 4+ messages in thread
From: Florian Beck @ 2014-02-01 15:02 UTC (permalink / raw)
To: Org Mode
On 01.02.2014 09:27, Michael Brand wrote:
> Additionally and at the cost of "giving up" (why would they be
> needed?) '=foo bar=' and "=foo bar=", which possibly should anyway be
> either just 'foo bar' and "foo bar" or =foo bar=,
`org-emphasis-regexp-components' also controls, well, regular emphasis.
And "*this* kind of quote" is something I need from time to time.
--
Florian Beck
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [RFC] Emphasis regexp
2014-02-01 8:27 [RFC] Emphasis regexp Michael Brand
2014-02-01 15:02 ` Florian Beck
@ 2014-02-03 8:55 ` Bastien
1 sibling, 0 replies; 4+ messages in thread
From: Bastien @ 2014-02-03 8:55 UTC (permalink / raw)
To: Michael Brand; +Cc: Org Mode
Hi Michael,
Michael Brand <michael.ch.brand@gmail.com> writes:
> Can I change =org-emphasis-regexp-components= in the Org repository
> accordingly to allow single and double quotes for "border" or would
> that break too many use cases?
I'm not against it, but I won't take this decision myself, IMHO we
have to ping Carsten for this.
PS: Also remember that the multine fontification code needs to be
rewritten. Maybe the rewrite is the best time for discussing the
whole implementation and the detailed use-cases.
--
Bastien
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [RFC] Emphasis regexp
2014-02-01 15:02 ` Florian Beck
@ 2014-02-03 10:15 ` Michael Brand
0 siblings, 0 replies; 4+ messages in thread
From: Michael Brand @ 2014-02-03 10:15 UTC (permalink / raw)
To: Org Mode; +Cc: Florian Beck
Hi all
On Sat, Feb 1, 2014 at 4:02 PM, Florian Beck <fb@miszellen.de> wrote:
> And "*this* kind of quote" is something I need from time to time.
Yes, many thanks to Florian for pointing this out. It means that I
withdraw the variant "#+NAME: change_pre_and_post_and_border" as my
suggestion to make work my last two examples =c='z'= and =d="t"=. I
would change them to ~c='z'~ and ~d="t"~ to make them work in case the
milder variant "#+NAME: change_border" is acceptable before the works
mentioned in Bastien's message.
Michael
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-02-03 10:15 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-01 8:27 [RFC] Emphasis regexp Michael Brand
2014-02-01 15:02 ` Florian Beck
2014-02-03 10:15 ` Michael Brand
2014-02-03 8:55 ` Bastien
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.