From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark Scala Subject: Re: bug in lisp code blocks Date: Wed, 30 Jul 2014 10:49:50 -0500 Message-ID: References: <87y4vde6r2.fsf@bzg.ath.cx> <87vbqgckya.fsf@bzg.ath.cx> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40756) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XCW8Y-0004ib-Fo for emacs-orgmode@gnu.org; Wed, 30 Jul 2014 11:49:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XCW8X-0006CC-3q for emacs-orgmode@gnu.org; Wed, 30 Jul 2014 11:49:54 -0400 In-Reply-To: <87vbqgckya.fsf@bzg.ath.cx> 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: Bastien Cc: "emacs-orgmode@gnu.org" Thanks, Bastien, for helping me report this bug more effectively. This email summarizes all the information I have about this bug and how to reproduce it. The problem is that a comment which appears as the _last_ line of a (common) lisp code block causes an error when that block is evaluated with C-c C-c. Here's how to reproduce it: 1. You will need to have SBCL and Slime installed. Your distribution of linux probably has a good enough SBCL (I'm using 1.2.0 in Arch linux). The easiest way to get the latest version of Slime is with Quicklisp, which you can find here (together with instructions to install): http://www.quicklisp.org/beta/. Once you have Quicklisp installed and loaded, installing Slime is a matter of calling (ql:quickload "swank") at the sbcl repl. Note: I am also able to reproduce the bug using clisp: - GNU CLISP 2.49 (2010-07-07) (built on var-lib-archbuild-extra-x86_64-barthalion) 2. Start emacs with the following as the entire init.el (of course, you'll probably have to modify the paths). #+BEGIN_SRC emacs-lisp (add-to-list 'load-path (expand-file-name "~/opt/org-mode/lisp")) (require 'org) (org-babel-do-load-languages 'org-babel-load-languages '((lisp . t))) (setq inferior-lisp-program "/usr/bin/sbcl") (add-to-list 'load-path "~/quicklisp/dists/quicklisp/software/slime-2.8") (require 'slime) #+END_SRC Note: I've also just reproduced the bug using the version of org-mode that ships with Emacs 24: - Org-mode version 7.9.3f (release_7.9.3f-17-g7524ef @ /usr/share/emacs/24.3/lisp/org/) 3. Finally, create a new org file and insert this block: #+BEGIN_SRC lisp :results output (format t "Hello world.") ;; comment after, causes crash when block is evaluated with C-c C-c #+END_SRC If you now evaluate the block with C-c C-c, you should get an EOF error. Here is a piece of the debugger report: #+BEGIN_QUOTE end of file on # [Condition of type END-OF-FILE] #+END_QUOTE It appears that the bug is caused by a comment string that is the last element of the block. Comments elsewhere do not cause this error. Here are the versions strings of the software I'm running: - GNU Emacs 24.3.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.12.2) of 2014-06-11 on var-lib-archbuild-staging-x86_64-jgc - Org-mode version 8.3beta (release_8.3beta-51-g02f2d5 @ /home/mark/opt/org-mode/lisp/) - SBCL 1.2.0 On Tue, Jul 29, 2014 at 9:13 AM, Bastien wrote: > Hi Mark, > > you forgot to CC the list -- please do so, so that anyone can help > fixing the problem. > > All this new information is important. A complete recipe would take > the user from a bare emacs -Q to an emacs with a sbcl connection and > slime, and explain the steps for launching sbcl, connecting via slime, > etc. > > Assume the ones who may fix the problem (like me and other maintainers) > are not 100% familiar with Emacs/slime/sbcl, even though they can follow > good recipes easily. > > Thanks for your efforts! > > PS: The hint about the last commented line triggered the bug is > important and will certainly lead to a quick fix. > > -- > Bastien