Re: [O] [PATCH] ob-scheme.el: Fix scheme code blocks execution error in batch mode

2014-05-22 Thread KDr2
Hi, all This patch is finally merged into the master branch, we can export results of scheme code block under batch mode now. Thanks to Eric, Bastien and Oleh. On Sat, Apr 12, 2014 at 10:12 PM, Eric Schulte schulte.e...@gmail.comwrote: KDr2 killy.d...@gmail.com writes: HI, Eric You

Re: [O] [PATCH] ob-scheme.el: Fix scheme code blocks execution error in batch mode

2014-04-12 Thread KDr2
HI, Eric You are right, I remove the usage of advice now, and use the method you (nearly) gave, only 1 little change: I found the code: (defun t1 () (message abc)) ;;(symbol-function 't1) (let ((hold #'t1)) (defun t1 () (message def)) (setq t1 hold)) ;;(symbol-function 't1) did

Re: [O] [PATCH] ob-scheme.el: Fix scheme code blocks execution error in batch mode

2014-04-12 Thread Eric Schulte
KDr2 killy.d...@gmail.com writes: HI, Eric You are right, I remove the usage of advice now, and use the method you (nearly) gave, only 1 little change: I found the code: (defun t1 () (message abc)) ;;(symbol-function 't1) (let ((hold #'t1)) (defun t1 () (message def)) (setq

Re: [O] [PATCH] ob-scheme.el: Fix scheme code blocks execution error in batch mode

2014-04-11 Thread Eric Schulte
Hmmm, Not to be overly nitpicky here, but I see two issues. 1. You should use unwind-protect, to ensure that (ad-unadvise #'message) is run even if @body throws an error, and 2. This will remove any advise which the user has placed on #'message. How about something shaped like the

Re: [O] [PATCH] ob-scheme.el: Fix scheme code blocks execution error in batch mode

2014-04-10 Thread Oleh
Hi, I tried to have a look at your patch, but ob-scheme has stopped working for me. Can you send me the minimal init.el to make your scheme-test.org work in interactive mode? regards, Oleh On Tue, Apr 8, 2014 at 3:56 PM, KDr2 killy.d...@gmail.com wrote: Hi, folks Has anyone reviewed this

Re: [O] [PATCH] ob-scheme.el: Fix scheme code blocks execution error in batch mode

2014-04-10 Thread KDr2
Hi, Oleh Thanks for you reply. Here is my config steps: 0. I use Debian(sid) and Emacs 24 1. install guile (using apt): http://www.gnu.org/software/guile/ 2. install geiser(http://www.nongnu.org/geiser/) with elpa and setting for geiser: (setq geiser-active-implementations '(guile))

Re: [O] [PATCH] ob-scheme.el: Fix scheme code blocks execution error in batch mode

2014-04-10 Thread Oleh
0. I use Debian(sid) and Emacs 24 1. install guile (using apt): http://www.gnu.org/software/guile/ 2. install geiser(http://www.nongnu.org/geiser/) with elpa and setting for geiser: (setq geiser-active-implementations '(guile)) (setq geiser-default-implementation 'guile) I've

Re: [O] [PATCH] ob-scheme.el: Fix scheme code blocks execution error in batch mode

2014-04-10 Thread KDr2
Does your M-x run-geiser work? It will lead you to a scheme REPL like this: GNU Guile 2.0.9-deb+1-1 Copyright (C) 1995-2013 Free Software Foundation, Inc. Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'. This program is free software, and you are welcome to redistribute it

Re: [O] [PATCH] ob-scheme.el: Fix scheme code blocks execution error in batch mode

2014-04-10 Thread Oleh
Of course it works, that's the first thing I tried. The issue probably is that the implementation of geiser functions that ob-scheme uses has been changed. Oleh On Thu, Apr 10, 2014 at 11:02 AM, KDr2 killy.d...@gmail.com wrote: Does your M-x run-geiser work? It will lead you to a scheme REPL

Re: [O] [PATCH] ob-scheme.el: Fix scheme code blocks execution error in batch mode

2014-04-10 Thread KDr2
Version of geiser I installed: geiser-20140326.951, If it has been changed, it must be changed in the past 2 weeks ... On Thu, Apr 10, 2014 at 6:54 PM, Oleh ohwoeo...@gmail.com wrote: Of course it works, that's the first thing I tried. The issue probably is that the implementation of geiser

Re: [O] [PATCH] ob-scheme.el: Fix scheme code blocks execution error in batch mode

2014-04-10 Thread Oleh
Version of geiser I installed: geiser-20140326.951, If it has been changed, it must be changed in the past 2 weeks ... That's exactly the version that I have. Which org-mode are you using?

Re: [O] [PATCH] ob-scheme.el: Fix scheme code blocks execution error in batch mode

2014-04-10 Thread KDr2
org-plus-contrib-20140407 And the file lisp/ob-scheme.el is the same as it in the master branch: And the error message before patched: Loading /home/kdr2/.emacs.d/init.el (source)... Loading /home/kdr2/.emacs.d/src/elisp/common.el (source)... Loading pde-load... Loading pde-loaddefs...

Re: [O] [PATCH] ob-scheme.el: Fix scheme code blocks execution error in batch mode

2014-04-10 Thread Eric Schulte
We can no longer use `flet' in the Org-mode code base, please re-work this patch w/o flet. Also, I don't see your name in the list of contributors, and (I believe) this patch is too large to apply w/o FSF assignment. See the following page on how to contribute to Org-mode.

Re: [O] [PATCH] ob-scheme.el: Fix scheme code blocks execution error in batch mode

2014-04-10 Thread KDr2
Hi, Eric I'm sorry for that I used `flet' in the patch, It's a easy way to let function `current-message' work in batch mode, so I used it even I saw that emacs says `flet' is obsolete, I'm sorry for that. And I made a new patch(attachment) using `defadvice' for `message' to capture the message

Re: [O] [PATCH] ob-scheme.el: Fix scheme code blocks execution error in batch mode

2014-04-08 Thread KDr2
Hi, folks Has anyone reviewed this patch? Or is there a better way to fix the bug? Thanks. On Wed, Apr 2, 2014 at 11:48 AM, KDr2 killy.d...@gmail.com wrote: The bug: write file ~/scheme-test.org with the content below: ---8-- #+BEGIN_SRC scheme :exports results :results

[O] [PATCH] ob-scheme.el: Fix scheme code blocks execution error in batch mode

2014-04-01 Thread KDr2
The bug: write file ~/scheme-test.org with the content below: ---8-- #+BEGIN_SRC scheme :exports results :results output raw (display Hello Scheme in OrgMode) #+END_SRC ---8-- and run: emacs --batch --eval='(load ~/.emacs.d/init.el)' ~/scheme-test.org -f