From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Schulte Subject: Re: [babel] Specified colnames Date: Sat, 27 Apr 2013 10:47:04 -0600 Message-ID: <87obcz3oqf.fsf@gmail.com> References: <86y5cuxfro.fsf@somewhere.org> <87obdp0ybb.fsf@gmail.com> <86ip3w957l.fsf@somewhere.org> <87fvz0zslt.fsf@gmail.com> <86a9p8928u.fsf@somewhere.org> <871uaffk5g.fsf@gmail.com> <86sj2nv8de.fsf@somewhere.org> <878v4c7pwp.fsf@gmail.com> <86wqrq4u3r.fsf@somewhere.org> <87txms2f0f.fsf@gmail.com> <86li84vtyc.fsf@somewhere.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:39715) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UW8H6-0005aN-9T for emacs-orgmode@gnu.org; Sat, 27 Apr 2013 12:47:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UW8H5-000372-3c for emacs-orgmode@gnu.org; Sat, 27 Apr 2013 12:47:00 -0400 Received: from mail-ie0-x230.google.com ([2607:f8b0:4001:c03::230]:48887) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UW8H4-00036k-VE for emacs-orgmode@gnu.org; Sat, 27 Apr 2013 12:46:59 -0400 Received: by mail-ie0-f176.google.com with SMTP id x14so5978761ief.35 for ; Sat, 27 Apr 2013 09:46:58 -0700 (PDT) In-Reply-To: <86li84vtyc.fsf@somewhere.org> (Sebastien Vauban's message of "Sat, 27 Apr 2013 18:06:51 +0200") 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: Sebastien Vauban Cc: emacs-orgmode@gnu.org > > OK. That's true I've set: > > --8<---------------cut here---------------start------------->8--- > ;; keep lower-case > (setq org-babel-results-keyword "results") > --8<---------------cut here---------------end--------------->8--- > If you like you could let-bind this around any future tests. > > since we've got nice keyword fontification -- as Carsten once said, he only > choose uppercase keywords, a while ago, when it was much more difficult to > clearly view the distinction between text, code and results (before the nice > fontification we now have). Otherwise, he'd have chosen lower-case keywords. > > Because of that feature, which I completely had out of my mind, I'm thinking > at another thing that could help reduce the size of the tests. Currently, we > copy once the code block, and once the code block + its results. > > Maybe we could have a function to locate (via a regexp for > #+results/#+RESULTS) the results, and only check (for strict or loose > equality [1]) on the results. > > So, something along those lines: > > --8<---------------cut here---------------start------------->8--- > (should > (equal (results-part (org-babel-execute-src-block "code block only")) > "results only")) > --8<---------------cut here---------------end--------------->8--- > > No duplication of the input... > > Does this make sense? > Yes, that would be an improvement, see the other tests in that file for examples of similar functionality. > >> In the future more flexible tests (such as regular expression searches) >> rather than strict equality should be preferable. >> >> Thanks for contributing this test! > > My pleasure. > > Best regards, > Seb > Cheers, > > [1] Regexp match -- Eric Schulte http://cs.unm.edu/~eschulte