From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daimrod Subject: org-babel-execute-src-block deletes its src block. Date: Sat, 03 Mar 2012 10:19:39 +0100 Message-ID: <87linif3dg.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:54084) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S3lDB-0004x9-R6 for emacs-orgmode@gnu.org; Sat, 03 Mar 2012 04:25:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S3lDA-0000bi-36 for emacs-orgmode@gnu.org; Sat, 03 Mar 2012 04:25:09 -0500 Received: from plane.gmane.org ([80.91.229.3]:33047) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S3lD9-0000bD-Te for emacs-orgmode@gnu.org; Sat, 03 Mar 2012 04:25:08 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1S3lD5-00040P-IK for emacs-orgmode@gnu.org; Sat, 03 Mar 2012 10:25:03 +0100 Received: from anantes-556-1-258-128.w2-1.abo.wanadoo.fr ([2.1.154.128]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 03 Mar 2012 10:25:03 +0100 Received: from daimrod by anantes-556-1-258-128.w2-1.abo.wanadoo.fr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 03 Mar 2012 10:25:03 +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: emacs-orgmode@gnu.org Hi, I've recently switched from Org 7.4 to the master branch on the git repository, and I've encountered this weird situation. #+name: foo #+begin_src emacs-lisp (defun foo () 42) (foo) #+end_src emacs-lisp If I evaluate this block I get: #+name: foo =42 =emacs-lisp Though it works as expected if I remove the name: #+begin_src emacs-lisp (defun foo () 42) (foo) #+end_src emacs-lisp => #+begin_src emacs-lisp (defun foo () 42) (foo) #+end_src emacs-lisp #+RESULTS: : 42 I've tried to figure out what was the problem and it lies in the regexp org-babel-src-name-w-name-regexp. So far I've found those workarounds: No spaces after the ':' #+name:foo #+begin_src emacs-lisp (defun foo () 42) (foo) #+end_src emacs-lisp => #+name:foo #+begin_src emacs-lisp (defun foo () 42) (foo) #+end_src emacs-lisp #+RESULTS: foo : 42 Add parentheses after the name. #+name: foo() #+begin_src emacs-lisp (defun foo () 42) (foo) #+end_src emacs-lisp => #+name: foo() #+begin_src emacs-lisp (defun foo () 42) (foo) #+end_src emacs-lisp #+RESULTS: foo : 42 No spaces before the src block #+name: foo #+begin_src emacs-lisp (defun foo () 42) (foo) #+end_src emacs-lisp => #+name: foo #+begin_src emacs-lisp (defun foo () 42) (foo) #+end_src emacs-lisp #+RESULTS: foo : 42