From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Brand Subject: [RFC] Emphasis regexp Date: Sat, 1 Feb 2014 09:27:07 +0100 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51396) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W9Vuw-00005F-4E for emacs-orgmode@gnu.org; Sat, 01 Feb 2014 03:27:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W9Vuv-0006j9-3Q for emacs-orgmode@gnu.org; Sat, 01 Feb 2014 03:27:10 -0500 Received: from mail-lb0-x233.google.com ([2a00:1450:4010:c04::233]:40005) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W9Vuu-0006im-RK for emacs-orgmode@gnu.org; Sat, 01 Feb 2014 03:27:09 -0500 Received: by mail-lb0-f179.google.com with SMTP id l4so4012638lbv.24 for ; Sat, 01 Feb 2014 00:27:07 -0800 (PST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org 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