From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Bug: code blocks with multiple word names create single word result-blocks leading to collisions [8.2.10 (8.2.10-elpaplus @ ~/.emacs.d/elpa/org-plus-contrib-20141013/)] Date: Wed, 18 Feb 2015 15:05:42 +0100 Message-ID: <87vbizpb61.fsf@nicolasgoaziou.fr> References: <87vbizidmz.fsf@snow.nl> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36913) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YO5F0-0004kj-46 for emacs-orgmode@gnu.org; Wed, 18 Feb 2015 09:04:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YO5Ew-00029Q-0f for emacs-orgmode@gnu.org; Wed, 18 Feb 2015 09:04:38 -0500 Received: from relay5-d.mail.gandi.net ([2001:4b98:c:538::197]:47919) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YO5Ev-000285-Og for emacs-orgmode@gnu.org; Wed, 18 Feb 2015 09:04:33 -0500 In-Reply-To: <87vbizidmz.fsf@snow.nl> (Joost Helberg's message of "Wed, 18 Feb 2015 13:54:12 +0100") 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: Joost Helberg Cc: emacs-orgmode@gnu.org Hello, Joost Helberg writes: > noweb-syntax allows blanks in names of code blocks. The result-blocks > of these code blocks are named as well, but have everything behind the > first word stripped. This leads to result-block collisions in case > there are two code blocks starting with the same word. > > Is this intentional? Why doesn't org-mode support sentences for code > block names? > > It boils down to the regexp /org-babel-src-name-w-name-regexp/. It > matches a name; the match-string function is used for retrieving this > name. The regexp should obviously match the rest of the text too. > > The original ob-core.el uses: > ="\\([^ ()\f\t\n\r\v]+\\)"= > to match the name. Check the ' ' behind the caret. > > The regexp I tested has the space removed. Hence, it will match the > full length name. > #+begin_src emacs-lisp > (setq org-babel-src-name-w-name-regexp > (concat org-babel-src-name-regexp > "\\(" > org-babel-multi-line-header-regexp > "\\)*" > "\\([^()\f\t\n\r\v]+\\)")) > #+end_src > > > Will this just fix or also break things? Was the blank deliberately > added? If all OK, can someone please commit/push it? Applied. Thank you. Regards, -- Nicolas Goaziou