emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* bug in lisp code blocks
@ 2014-07-22 20:35 Mark Scala
  2014-07-27 12:18 ` Bastien
  0 siblings, 1 reply; 4+ messages in thread
From: Mark Scala @ 2014-07-22 20:35 UTC (permalink / raw)
  To: emacs-orgmode@gnu.org

Greetings.

This is probably a bug:

#+BEGIN_SRC lisp :results output
  (format t "Hello world.")
  ;; comment after, causes crash when block is evaluated with C-c C-c
#+END_SRC

Debugger message:
#+BEGIN_QUOTE
end of file on #<SB-IMPL::STRING-INPUT-STREAM {1003F862D3}>
   [Condition of type END-OF-FILE]
#+END_QUOTE

org-version: Org-mode version 8.3beta (release_8.3beta-51-g02f2d5 @
/home/mark/opt/org-mode/lisp)

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: bug in lisp code blocks
  2014-07-22 20:35 bug in lisp code blocks Mark Scala
@ 2014-07-27 12:18 ` Bastien
       [not found]   ` <CAFTGpA9CR8_H1uM5BFCw6EY+3cY8i6Z6X2Eo8ZBehd77AT_4_w@mail.gmail.com>
  0 siblings, 1 reply; 4+ messages in thread
From: Bastien @ 2014-07-27 12:18 UTC (permalink / raw)
  To: Mark Scala; +Cc: emacs-orgmode@gnu.org

Hi Mark,

Mark Scala <markscala@gmail.com> writes:

> This is probably a bug:

Can you provide a complete recipe?  What "lisp"?

Thanks,

> #+BEGIN_SRC lisp :results output
>   (format t "Hello world.")
>   ;; comment after, causes crash when block is evaluated with C-c C-c
> #+END_SRC
>
> Debugger message:
> #+BEGIN_QUOTE
> end of file on #<SB-IMPL::STRING-INPUT-STREAM {1003F862D3}>
>    [Condition of type END-OF-FILE]
> #+END_QUOTE
>
> org-version: Org-mode version 8.3beta (release_8.3beta-51-g02f2d5 @
> /home/mark/opt/org-mode/lisp)

-- 
 Bastien

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: bug in lisp code blocks
       [not found]         ` <87vbqgckya.fsf@bzg.ath.cx>
@ 2014-07-30 15:49           ` Mark Scala
  2014-08-04  1:34             ` Eric Schulte
  0 siblings, 1 reply; 4+ messages in thread
From: Mark Scala @ 2014-07-30 15:49 UTC (permalink / raw)
  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 #<SB-IMPL::STRING-INPUT-STREAM {1003F862D3}>
   [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 <bzg@gnu.org> 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: bug in lisp code blocks
  2014-07-30 15:49           ` Mark Scala
@ 2014-08-04  1:34             ` Eric Schulte
  0 siblings, 0 replies; 4+ messages in thread
From: Eric Schulte @ 2014-08-04  1:34 UTC (permalink / raw)
  To: Mark Scala; +Cc: Bastien, emacs-orgmode@gnu.org

Hi Mark,

Thanks for the example, I've just pushed up a fix.

Best,
Eric

Mark Scala <markscala@gmail.com> writes:

> 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 #<SB-IMPL::STRING-INPUT-STREAM {1003F862D3}>
>    [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 <bzg@gnu.org> 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
>

-- 
Eric Schulte
https://cs.unm.edu/~eschulte
PGP: 0x614CA05D (see https://u.fsf.org/yw)

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-08-04  1:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-22 20:35 bug in lisp code blocks Mark Scala
2014-07-27 12:18 ` Bastien
     [not found]   ` <CAFTGpA9CR8_H1uM5BFCw6EY+3cY8i6Z6X2Eo8ZBehd77AT_4_w@mail.gmail.com>
     [not found]     ` <CAFTGpA-v3NstZc6MnNBP+nF+QtQ4fEV4uF9XdpwpKmjy71aHSg@mail.gmail.com>
     [not found]       ` <CAFTGpA-2jyz7gB3=oAr8_bf1J3oW01tBpp_NYcmKcU8cLWpxAw@mail.gmail.com>
     [not found]         ` <87vbqgckya.fsf@bzg.ath.cx>
2014-07-30 15:49           ` Mark Scala
2014-08-04  1:34             ` Eric Schulte

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).