From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thorsten Jolitz Newsgroups: gmane.emacs.help Subject: Re: Org Minor Mode (was Re: Low level trickery for changing character syntax?) Date: Wed, 09 Apr 2014 15:43:42 +0200 Message-ID: <87lhvehb3l.fsf@gmail.com> References: <87lhvfzrgt.fsf@gmail.com> <87eh173roe.fsf@gnu.org> <877g6yj355.fsf_-_@gmail.com> <87ppkq3bdy.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1397050994 7763 80.91.229.3 (9 Apr 2014 13:43:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 9 Apr 2014 13:43:14 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Apr 09 15:43:08 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WXsmQ-00052W-Q0 for geh-help-gnu-emacs@m.gmane.org; Wed, 09 Apr 2014 15:43:07 +0200 Original-Received: from localhost ([::1]:46203 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WXsmQ-0006q9-GC for geh-help-gnu-emacs@m.gmane.org; Wed, 09 Apr 2014 09:43:06 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44301) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WXsm4-0006oW-2c for help-gnu-emacs@gnu.org; Wed, 09 Apr 2014 09:42:50 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WXsly-0002Ab-3T for help-gnu-emacs@gnu.org; Wed, 09 Apr 2014 09:42:44 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:55023) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WXslx-0002AX-LO for help-gnu-emacs@gnu.org; Wed, 09 Apr 2014 09:42:38 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1WXsls-0004i9-Ts for help-gnu-emacs@gnu.org; Wed, 09 Apr 2014 15:42:32 +0200 Original-Received: from g231106174.adsl.alicedsl.de ([92.231.106.174]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 09 Apr 2014 15:42:32 +0200 Original-Received: from tjolitz by g231106174.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 09 Apr 2014 15:42:32 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 703 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: g231106174.adsl.alicedsl.de User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:7oom32U+WkJbjUU7MGTXGFAylfQ= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:97067 Archived-At: Tassilo Horn writes: Hi Tassilo, > Thorsten Jolitz writes: > > Hi Thorsten, > >> The major "flaw" of Org-mode that inhibits its use as minor-mode is >> the wide-spread use of hard-coded regexps, i.e. regexps of this form >> >> ,-------------- >> | "^\\*+ ... $" >> `-------------- >> >> in many many variants all over the place. Those three elements "^" >> (bol), "$" (eol) and "*" (star) are not portable, > > Yeah, I've quickly looked into org.el, and that's indeed very much > hard-coded. > > You could add around-advices to the basic regexp functions like > `looking-at' and `re-search-forward' that modify the given regex. > Changing "^something" to "^;; something" is easy, but if you also want > to change the outlining character from * to something else, it will > become quite hard. > > Changing org.el is also quite hard. I mean, you could define > > org-prefix-rx: "" > org-bullet-rx: "\\*" > org-heading-start-rx: (concat org-prefix-rx "\\(" org-bullet-rx "\\)+") > > somehow systematically so that in theory, lisp modes could set > org-prefix-rx to ";; " and be done. However, it's quite unlikely that > in the future, every quick regex in some org function will be composed > of all those predefined parts in the correct way. outshine manages this major-mode specific calculation of outline-regexp and outline-level quite well already, and fixing/converting regexp constants or even regexps set to buffer-local vars is doable too, in fact I have already functions for this in omm.el. The real problem are the hundreds of hardcoded regexp snippets in countless functions, that are written in so many different styles ... And its not only giant file org.el, its orgtbl.el, org-agenda, and many others too. Achieving what I want with advising functions seems quite difficult, but maybe its the only viable alternative. > Maybe a better approach was to have some `org-rx' macro that's like `rx' > except that `bol' and `line-start' would mean (concat "^" org-prefix-rx) > instead of just "^", and there was some additional `*' element that > would mean org-bullet-rx. Then the org-heading-start-rx could be > defined as (org-rx bol (group (+ *))) which is a bit less of a pain. Exactly what I thought, and why I implemented drx.el, which is almost finished. Here is the long docstring of the main function `drx' and as an attachment the more than 70 ERT test that describe the possibilities and syntax better than any documentation could: ,--------------------------------------------------------------------- | (defun drx (rgxp &optional bolp stars eolp enclosing &rest rgxps) | "Make regexp combining RGXP and optional RGXPS. | | With BOLP non-nil, add 'drx-BOL' at beginning of regexp, with EOLP | non-nil add 'drx-EOL' at end of regexp. | | STARS, when non-nil, uses 'drx-STAR' and encloses and repeats it. | | ENCLOSING, when non-nil, takes RGXP and optional RGXPS and combines, | encloses and repeats them. | | While BOLP and EOLP are switches that don't do nothing when nil and | insert whatever value 'drx-BOL' and 'drx-EOL' are set to when | non-nil, both arguments STARS and ENCLOSING take either symbols, | numbers, strings or (nested) lists as values and act conditional on | the type. | | All the following 'atomic' argument values are valid for both STARS | and ENCLOSING but with a slightly different meaning: | | STARS: repeat 'drx-STAR' (without enclosing) conditional on argument | value | | ENCLOSING: repeat enclosed combination of RGXP and RGXPS conditional | on argument value | | - nil :: do nothing (no repeater, no enclosing) | | - t :: (and any other symbol w/o special meaning) repeat once | | - n :: (number) repeat n times {n} | | - \"n\" :: (number-as-string) repeat n times {n} | | - \"n,\" :: (string) repeat >= n times {n,} | | - \",m\" :: (string) repeat <= m times {,m} | | - \"n,m\" :: (string) repeat n to m times {n,m} | | - \"?\" :: (string) repeat with ? | | - \"*\" :: (string) repeat with * | | - \"+\" :: (string) repeat with + | | - \"??\" :: (string) repeat with ?? | | - \"*?\" :: (string) repeat with *? | | - \"+?\" :: (string) repeat with +? | | - \"xyz\" :: (any other string) repeat once | | Note that atomic values t, 1 and \"1\" should give the same | results ('repeat once' or 'enclose and repeat once', depending on | the context) and thus be interchangeable. | | These atomic values can be wrapped in a list and change their | meaning then. In a list of length 1 they specify 'enclose element | first, apply repeater then'. In a list of lenght > 1 the specifier | in the car applies to the combination of all elements, while each of | the specifiers in the cdr applies to one element only. In the case | of argument STAR, an element is always 'drx-STAR'. In the case of | argument ENCLOSING, a non-nil optional argument RGXPS represents the | list of elements, each of them being a regexp string. | | Here are two calls of 'drx' with interchanged list arguments to | STARS and ENCLOSING and their return values, demonstrating the | above: | | ,------------------------------------------------------ | | (drx \"foo\" t '(nil t (2)) t '(t nil (2)) | | \"bar\" \"loo\") | | \"^\\(\\*\\)\\(\\*\\)\\{2\\}\\(foobar\\(loo\\)\\{2\\}\\)$\" | `------------------------------------------------------ | | ,------------------------------------------------------ | | (drx \"foo\" t '(t nil (2)) t '(nil t (2)) | | \"bar\" \"loo\") | | \"^\\(\\*\\(\\*\\)\\{2\\}\\)foo\\(bar\\)\\(loo\\)\\{2\\}$\" | `------------------------------------------------------ | | Many more usage examples with their expected outcome can be found as | ERT tests in the test-section of drx.el and should be consulted in | doubt. | | There are a few symbols with special meaning as values of the | ENCLOSING argument (when used as atomic argument or as car of a list | argument), namely: | | - alt :: Concat and enclose RGXP and RGXPS as regexp alternatives. | Eventually add drx-BOL/STARS and drx-EOL before | first/after last alternative. | | - grp :: Concat and enclose RGXP and RGXPS. Eventually add | drx-BOL, STARS and drx-EOL as first/second/last group. | | - shy :: Concat and enclose RGXP and RGXPS as shy regexp | groups. Eventually add drx-BOL, STARS and drx-EOL as | first/second/last group. | | - app :: like 'grp', but rather append RGXP and RGXPS instead | of enclosing them if they are already regexp groups | themselves. | | They create regexp groups but don't apply repeaters to them." `--------------------------------------------------------------------- ,------------------------------------------------------------------------------- | ;;;; ERT Tests | | ;; return identity | (ert-deftest drx-test-1 () | "Test return values of function `drx'. | Assumes the following variable definitions: | | (defvar drx-BOL \"^\" | \"Special character that signals BOL in regexps.\") | | (defvar drx-EOL \"$\" | \"Special character that signals EOL in regexps.\") | | (defvar drx-STAR (regexp-quote \"*\") | \"Special character that signals headline(-level) in regexps.\")" | (should (equal | (drx "foo") | "foo"))) | | ;; add drx-BOL | (ert-deftest drx-test-2 () | "See docstring of `drx-test-1'." | (should (equal | (drx "foo" t) | "^foo"))) | | ;; append drx-EOL | (ert-deftest drx-test-3 () | "See docstring of `drx-test-1'." | (should (equal | (drx "foo" nil nil t) | "foo$"))) | | ;; add drx-BOL and append drx-EOL | (ert-deftest drx-test-4 () | "See docstring of `drx-test-1'." | (should (equal | (drx "foo" t nil t) | "^foo$"))) | | ;; add drx-BOL and append drx-EOL | ;; and add drx-STAR with default quantifier | (ert-deftest drx-test-5 () | "See docstring of `drx-test-1'." | (should (equal | (drx "foo" t t t) | "^\\*foo$"))) | | (ert-deftest drx-test-6 () | "See docstring of `drx-test-1'." | (should (equal | (drx "foo" t 'bar t) | "^\\*foo$"))) | | (ert-deftest drx-test-7 () | "See docstring of `drx-test-1'." | (should (equal | (drx "foo" t "bar" t) | "^\\*foo$"))) | | ;; add drx-BOL and append drx-EOL | ;; and add drx-STAR with specified quantifiers | (ert-deftest drx-test-8 () | "See docstring of `drx-test-1'." | (should (equal | (drx "foo" t "0," t) | "^\\*\\{0,\\}foo$"))) | | (ert-deftest drx-test-9 () | "See docstring of `drx-test-1'." | (should (equal | (drx "foo" t ",8" t) | "^\\*\\{,8\\}foo$"))) | | (ert-deftest drx-test-10 () | "See docstring of `drx-test-1'." | (should (equal | (drx "foo" t "1,8" t) | "^\\*\\{1,8\\}foo$"))) | | (ert-deftest drx-test-11 () | "See docstring of `drx-test-1'." | (should (equal | (drx "foo" t "*" t) | "^\\**foo$"))) | | (ert-deftest drx-test-12 () | "See docstring of `drx-test-1'." | (should (equal | (drx "foo" t "+" t) | "^\\*+foo$"))) | | (ert-deftest drx-test-13 () | "See docstring of `drx-test-1'." | (should (equal | (drx "foo" t "?" t) | "^\\*?foo$"))) | | (ert-deftest drx-test-14 () | "See docstring of `drx-test-1'." | (should (equal | (drx "foo" t "*?" t) | "^\\**?foo$"))) | | (ert-deftest drx-test-15 () | "See docstring of `drx-test-1'." | (should (equal | (drx "foo" t "+?" t) | "^\\*+?foo$"))) | | ;; add drx-STAR with specified quantifier list | (ert-deftest drx-test-16 () | "See docstring of `drx-test-1'." | (should (equal | (drx "foo" t "??" t) | "^\\*??foo$"))) | | (ert-deftest drx-test-17 () | "See docstring of `drx-test-1'." | (should (equal | (drx "foo" nil '(nil) nil) | "foo"))) | | (ert-deftest drx-test-18 () | "See docstring of `drx-test-1'." | (should (equal | (drx "foo" nil '(t) nil) | "\\(\\)foo"))) | | (ert-deftest drx-test-19 () | "See docstring of `drx-test-1'." | (should (equal | (drx "foo" nil '(t nil) nil) | "\\(\\*\\)foo"))) | | (ert-deftest drx-test-20 () | "See docstring of `drx-test-1'." | (should (equal | (drx "foo" nil '(t 1) nil) | "\\(\\*\\)foo"))) | | (ert-deftest drx-test-21 () | "See docstring of `drx-test-1'." | (should (equal | (drx "foo" nil '(t t) nil) | "\\(\\(\\*\\)\\)foo"))) | | (ert-deftest drx-test-22 () | "See docstring of `drx-test-1'." | (should (equal | (drx "foo" nil '(nil "+") nil) | "\\*+foo"))) | | (ert-deftest drx-test-23 () | "See docstring of `drx-test-1'." | (should (equal | (drx "foo" nil '(nil "*") nil) | "\\**foo"))) | | (ert-deftest drx-test-24 () | "See docstring of `drx-test-1'." | (should (equal | (drx "foo" nil '(nil "?") nil) | "\\*?foo"))) | | (ert-deftest drx-test-25 () | "See docstring of `drx-test-1'." | (should (equal | (drx "foo" nil '(nil "+?") nil) | "\\*+?foo"))) | | (ert-deftest drx-test-26 () | "See docstring of `drx-test-1'." | (should (equal | (drx "foo" nil '(nil "*?") nil) | "\\**?foo"))) | | (ert-deftest drx-test-27 () | "See docstring of `drx-test-1'." | (should (equal | (drx "foo" nil '(nil "??") nil) | "\\*??foo"))) | | (ert-deftest drx-test-28 () | "See docstring of `drx-test-1'." | (should (equal | (drx "foo" nil '(nil "1,") nil) | "\\*\\{1,\\}foo"))) | | (ert-deftest drx-test-29 () | "See docstring of `drx-test-1'." | (should (equal | (drx "foo" nil '(nil ("1,")) nil) | "\\(\\*\\)\\{1,\\}foo"))) | | (ert-deftest drx-test-30 () | "See docstring of `drx-test-1'." | (should (equal | (drx "foo" nil '(nil ",2") nil) | "\\*\\{,2\\}foo"))) | | (ert-deftest drx-test-31 () | "See docstring of `drx-test-1'." | (should (equal | (drx "foo" nil '(nil (",2")) nil) | "\\(\\*\\)\\{,2\\}foo"))) | | (ert-deftest drx-test-32 () | "See docstring of `drx-test-1'." | (should (equal | (drx "foo" nil '(nil "1,2") nil) | "\\*\\{1,2\\}foo"))) | | (ert-deftest drx-test-33 () | "See docstring of `drx-test-1'." | (should (equal | (drx "foo" nil '(nil ("1,2")) nil) | "\\(\\*\\)\\{1,2\\}foo"))) | | (ert-deftest drx-test-34 () | "See docstring of `drx-test-1'." | (should (equal | (drx "foo" nil '(nil (2)) nil) | "\\(\\*\\)\\{2\\}foo"))) | | (ert-deftest drx-test-35 () | "See docstring of `drx-test-1'." | (should (equal | (drx "foo" nil '(nil 2) nil) | "\\*\\{2\\}foo"))) | | (ert-deftest drx-test-36 () | "See docstring of `drx-test-1'." | (should (equal | (drx "foo" nil '(nil (1)) nil) | "\\(\\*\\)foo"))) | | (ert-deftest drx-test-37 () | "See docstring of `drx-test-1'." | (should (equal | (drx "foo" nil '(nil 1) nil) | "\\*foo"))) | | (ert-deftest drx-test-38 () | "See docstring of `drx-test-1'." | (should (equal | (drx "foo" nil '(nil 2 ("2,3") "3") nil) | "\\*\\{2\\}\\(\\*\\)\\{2,3\\}\\*\\{3\\}foo"))) | | (ert-deftest drx-test-39 () | "See docstring of `drx-test-1'." | (should (equal | (drx "foo" nil '(",3" (2) ("2,3") 3) nil) | "\\(\\(\\*\\)\\{2\\}\\(\\*\\)\\{2,3\\}\\*\\{3\\}\\\)\\{,3\\}foo"))) | | ;; temporarily change BOL and EOL e.g. using CSS comment syntax | (ert-deftest drx-test-40 () | "See docstring of `drx-test-1'." | (should (equal | (let ((drx-BOL (concat "^" (regexp-quote "/* "))) | (drx-EOL (concat (regexp-quote "*/") "$"))) | (drx "foo" t nil t)) | "^/\\* foo\\*/$"))) | | ;; temporarily change STAR using Elisp syntax | (ert-deftest drx-test-41 () | "See docstring of `drx-test-1'." | (should (equal | (let ((drx-STAR ";")) | (drx " foo" nil 2)) | ";\\{2\\} foo"))) | | (ert-deftest drx-test-42 () | "See docstring of `drx-test-1'." | (should (equal | (let ((drx-BOL "^;;") | (drx-STAR ";")) | (drx " foo" t '(2 2) nil)) | "^;;\\(;\\{2\\}\\)\\{2\\} foo"))) | | ;; temporarily change STAR to whitespace syntax | (ert-deftest drx-test-43 () | "See docstring of `drx-test-1'." | (should (equal | (let ((drx-STAR "[ \t]")) | (drx " foo" t "*")) | "^[ ]* foo"))) | | ;; enclose rgxp | (ert-deftest drx-test-44 () | "See docstring of `drx-test-1'." | (should (equal | (drx "foo" nil nil nil t) | "\\(foo\\)"))) | | (ert-deftest drx-test-45 () | "See docstring of `drx-test-1'." | (should (equal | (drx "foo" t t t t) | "^\\*\\(foo\\)$"))) | | (ert-deftest drx-test-46 () | "See docstring of `drx-test-1'." | (should (equal | (drx "foo" nil nil nil 'alt "bar") | "\\(foo\\|bar\\)"))) | | (ert-deftest drx-test-47 () | "See docstring of `drx-test-1'." | (should (equal | (drx "foo" nil nil nil 'grp "bar") | "\\(foo\\)\\(bar\\)"))) | | (ert-deftest drx-test-48 () | "See docstring of `drx-test-1'." | (should (equal | (drx "foo" nil nil nil 'shy "bar") | "\\(?:foo\\)\\(?:bar\\)"))) | | (ert-deftest drx-test-49 () | "See docstring of `drx-test-1'." | (should (equal | (drx "foo" nil nil nil 'app "bar") | "\\(foo\\)\\(bar\\)"))) | | (ert-deftest drx-test-50 () | "See docstring of `drx-test-1'." | (should (equal | (drx "foo" nil nil nil 'app "\\(bar\\)") | "\\(foo\\)\\(bar\\)"))) | | (ert-deftest drx-test-51 () | "See docstring of `drx-test-1'." | (should (equal | (drx "foo" nil nil nil 'grp "\\(bar\\)") | "\\(foo\\)\\(\\(bar\\)\\)"))) | | (ert-deftest drx-test-52 () | "See docstring of `drx-test-1'." | (should (equal | (drx "foo" nil nil nil 'alt "bar") | "\\(foo\\|bar\\)"))) | | (ert-deftest drx-test-53 () | "See docstring of `drx-test-1'." | (should (equal | (drx "foo" nil nil nil t) | "\\(foo\\)"))) | | (ert-deftest drx-test-54 () | "See docstring of `drx-test-1'." | (should (equal | (drx "foo" nil nil nil 2) | "\\(foo\\)\\{2\\}"))) | | (ert-deftest drx-test-55 () | "See docstring of `drx-test-1'." | (should (equal | (drx "foo" nil nil nil "2") | "\\(foo\\)\\{2\\}"))) | | (ert-deftest drx-test-56 () | "See docstring of `drx-test-1'." | (should (equal | (drx "foo" nil nil nil 1) | "\\(foo\\)"))) | | (ert-deftest drx-test-57 () | "See docstring of `drx-test-1'." | (should (equal | (drx "foo" nil nil nil "1") | "\\(foo\\)"))) | | (ert-deftest drx-test-58 () | "See docstring of `drx-test-1'." | (should (equal | (drx "foo" nil nil nil "1,") | "\\(foo\\)\\{1,\\}"))) | | (ert-deftest drx-test-59 () | "See docstring of `drx-test-1'." | (should (equal | (drx "foo" nil nil nil ",1") | "\\(foo\\)\\{,1\\}"))) | | (ert-deftest drx-test-60 () | "See docstring of `drx-test-1'." | (should (equal | (drx "foo" nil nil nil "1,3") | "\\(foo\\)\\{1,3\\}"))) | | (ert-deftest drx-test-61 () | "See docstring of `drx-test-1'." | (should (equal | (drx "foo" nil nil nil "bar") | "\\(foo\\)"))) | | (ert-deftest drx-test-62 () | "See docstring of `drx-test-1'." | (should (equal | (drx "foo" nil nil nil nil "bar" "loo") | "foobarloo"))) | | (ert-deftest drx-test-63 () | "See docstring of `drx-test-1'." | (should (equal | (drx "foo" nil nil nil t "bar" "loo") | "\\(foobarloo\\)"))) | | (ert-deftest drx-test-64 () | "See docstring of `drx-test-1'." | (should (equal | (drx "foo" nil nil nil 'grp "bar" "loo") | "\\(foo\\)\\(bar\\)\\(loo\\)"))) | | (ert-deftest drx-test-65 () | "See docstring of `drx-test-1'." | (should (equal | (drx "foo" nil nil nil 'alt "bar" "loo") | "\\(foo\\|bar\\|loo\\)"))) | | (ert-deftest drx-test-66 () | "See docstring of `drx-test-1'." | (should (equal | (drx "foo" t nil t 'shy "bar" "loo") | "^\\(?:foo\\)\\(?:bar\\)\\(?:loo\\)$"))) | | (ert-deftest drx-test-67 () | "See docstring of `drx-test-1'." | (should (equal | (drx "foo" t t t 'app "\\(bar\\)" "loo") | "^\\*\\(foo\\)\\(bar\\)\\(loo\\)$"))) | | (ert-deftest drx-test-68 () | "See docstring of `drx-test-1'." | (should (equal | (drx "foo" t 1 t 'grp "\\(bar\\)" "loo") | "^\\*\\(foo\\)\\(\\(bar\\)\\)\\(loo\\)$"))) | | (ert-deftest drx-test-69 () | "See docstring of `drx-test-1'." | (should (equal | (drx "foo" t 2 t 'app "\\(bar\\)" "loo") | "^\\*\\{2\\}\\(foo\\)\\(bar\\)\\(loo\\)$"))) | | (ert-deftest drx-test-70 () | "See docstring of `drx-test-1'." | (should (equal | (drx "foo" nil nil nil '(nil) "bar" "loo") | "foobarloo"))) | | (ert-deftest drx-test-71 () | "See docstring of `drx-test-1'." | (should (equal | (drx "foo" nil nil nil '(nil nil) "bar" "loo") | "foobarloo"))) | | (ert-deftest drx-test-72 () | "See docstring of `drx-test-1'." | (should (equal | (drx "foo" nil nil nil '(t) "bar" "loo") | "\\(foobarloo\\)"))) | | (ert-deftest drx-test-73 () | "See docstring of `drx-test-1'." | (should (equal | (drx "foo" nil nil nil '(t t) "bar" "loo") | "\\(foo\\(bar\\)loo\\)"))) | | (ert-deftest drx-test-74 () | "See docstring of `drx-test-1'." | (should (equal | (drx "foo" nil nil nil '(t nil t) "bar" "loo") | "\\(foobar\\(loo\\)\\)"))) | | (ert-deftest drx-test-75 () | "See docstring of `drx-test-1'." | (should (equal | (drx "foo" nil nil nil '(t t t) "bar" "loo") | "\\(foo\\(bar\\)\\(loo\\)\\)"))) | ;; | | (ert-deftest drx-test-76 () | "See docstring of `drx-test-1'." | (should (equal | (drx "foo" nil nil nil '(1 1 1) "bar" "loo") | "\\(foo\\(bar\\)\\(loo\\)\\)"))) | | (ert-deftest drx-test-77 () | "See docstring of `drx-test-1'." | (should (equal | (drx "foo" t '(t t t) t '(t t t) "bar" "loo") | "\\(foo\\(bar\\)\\(loo\\)\\)"))) | | (ert-deftest drx-test-78 () | "See docstring of `drx-test-1'." | (should (equal | (drx "foo" 1 '(1 1 1) 1 '(1 1 1) "bar" "loo") | "\\(foo\\(bar\\)\\(loo\\)\\)"))) | | (ert-deftest drx-test-79 () | "See docstring of `drx-test-1'." | (should (equal | (drx "foo" "1" '("1" "1" "1") "1" '("1" "1" "1") | "bar" "loo") | "\\(foo\\(bar\\)\\(loo\\)\\)"))) `------------------------------------------------------------------------------- I'm not yet done, but pretty close: Selector: t Passed: 75 Failed: 4 (4 unexpected) Total: 79/79 Started at: 2014-04-09 15:41:04+0200 Finished. Finished at: 2014-04-09 15:41:05+0200 .........................................................................FFFF.. -- cheers, Thorsten