Re: [O] [RFC] Emphasis regexp

2014-02-03 Thread Michael Brand
Hi all

On Sat, Feb 1, 2014 at 4:02 PM, Florian Beck  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



Re: [O] [RFC] Emphasis regexp

2014-02-03 Thread Bastien
Hi Michael,

Michael Brand  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



Re: [O] [RFC] Emphasis regexp

2014-02-01 Thread Florian Beck

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



[O] [RFC] Emphasis regexp

2014-02-01 Thread Michael Brand
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