Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 101186 - problem when setting imaxima-use-maxima-mode-flag to t and start imaxima process
Summary: problem when setting imaxima-use-maxima-mode-flag to t and start imaxima process
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Emacs project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-03 04:13 UTC by Xiao-Yong JIN
Modified: 2006-10-31 05:57 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
New imaxima ebuild (imaxima-0.93.ebuild,791 bytes, text/plain)
2006-03-06 07:13 UTC, PL Hayes
Details
imaxima-0.94.ebuild (imaxima-0.94.ebuild,882 bytes, text/plain)
2006-04-08 10:53 UTC, Sébastien Fabbro (RETIRED)
Details
imaxima-0.94b.ebuild (imaxima-0.94b.ebuild,904 bytes, text/plain)
2006-06-09 16:26 UTC, Sebastian Schubert
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Xiao-Yong JIN 2005-08-03 04:13:06 UTC
When setting imaxima-use-maxima-mode-flag to t with
(setq imaxima-use-maxima-mode-flag t)
and start imaxima session in GNU/Emacs with
M-x imaxima
It oops with
save-current-buffer: Wrong number of arguments: (lambda (string) "Send
a string to the Maxima process." (setq string (maxima-strip-string
string)) (maxima-start) (save-current-buffer (set-buffer
(process-buffer inferior-maxima-process)) (goto-char (point-max))
(insert string) (inferior-maxima-comint-send-input) (goto-char
(point-max)))), 2

Reproducible: Always
Steps to Reproduce:
1. Set imaxima-use-maxima-mode-flag to non-nil in GNU/Emacs.
2. Start imaxima in the same GNU/Emacs
3. 

Actual Results:  
Imaxima session doesn't start but an error message prints out saying
save-current-buffer: Wrong number of arguments: (lambda (string) "Send
a string to the Maxima process." (setq string (maxima-strip-string
string)) (maxima-start) (save-current-buffer (set-buffer
(process-buffer inferior-maxima-process)) (goto-char (point-max))
(insert string) (inferior-maxima-comint-send-input) (goto-char
(point-max)))), 2

Expected Results:  
Start Imaxima session in GNU/Emacs.

Long ago in Sep, 2004, I asked the author of Imaxima, Jesper Harder
<harder@ifa.au.dk>, about this bug and he gave me a patch which did solve the
problem.  But I haven't see any upgrade in imaxima, and it seems he no longer
maitains this elisp package.  I think Gentoo had better include this patch for
users.  Following is the patch.

diff -c /home/harder/imaxima-0.9/imaxima.el
/home/harder/projekter/imaxima/imaxima.el
*** /home/harder/imaxima-0.9/imaxima.el Sun Aug 15 17:19:39 2004
--- /home/harder/projekter/imaxima/imaxima.el   Tue Sep 21 23:46:32 2004
***************
*** 937,943 ****
        (add-hook 'kill-buffer-hook 'imaxima-clean-up t t)
        (imaxima-setup-preoutput-filter)
        (maxima-single-string
!        (format "block(load(\"%s\"), linenum:0)$\n" imaxima-lisp-file) t)
        (goto-char (point-max)))))
  
  (defun imaxima ()
--- 937,943 ----
        (add-hook 'kill-buffer-hook 'imaxima-clean-up t t)
        (imaxima-setup-preoutput-filter)
        (maxima-single-string
!        (format "block(load(\"%s\"), linenum:0)$\n" imaxima-lisp-file))
        (goto-char (point-max)))))
  
  (defun imaxima ()
Comment 1 PL Hayes 2006-03-06 07:13:30 UTC
Created attachment 81519 [details]
New imaxima ebuild

I found another bug in imaxima-0.9 this morning (while trying out the new maxima-5.9.2 from the gentooscience.org overlay). It was a missing progn in part of the imaxima.lisp file and it's been fixed in imaxima-0.93.

imaxima does have a new maintainer now, Y. Honda, and it may well be that this bug has also been fixed. I've attached an ebuild for it with the new homepage and src URI, if you'd like to try it.
Comment 2 Sébastien Fabbro (RETIRED) gentoo-dev 2006-04-08 10:53:19 UTC
Created attachment 84216 [details]
imaxima-0.94.ebuild

New imaxima ebuild for version bump
- update src_uri
- added some examples doc
- cleaned a bit the ebuild
Comment 3 Sebastian Schubert 2006-06-09 16:25:04 UTC
I took the last ebuild and added the possibility to use breqn in texlive and renamed it to use 0.94b. It works x86.
Comment 4 Sebastian Schubert 2006-06-09 16:26:14 UTC
Created attachment 88798 [details]
imaxima-0.94b.ebuild
Comment 5 PL Hayes 2006-06-13 02:48:43 UTC
The patch given in the original bug report seems to have been applied to the imaxima.el in imaxima-0.94b but when I tried it out it didn't work because of a dollar sign instead of a semicolon. IOW, I think the patch should have been:

diff -c /home/harder/imaxima-0.9/imaxima.el
/home/harder/projekter/imaxima/imaxima.el
--- /home/harder/imaxima-0.9/imaxima.el Sun Aug 15 17:19:39 2004
+++ /home/harder/projekter/imaxima/imaxima.el   Tue Sep 21 23:46:32 2004
@@ -937,7 +937,7 @@
       (add-hook 'kill-buffer-hook 'imaxima-clean-up t t)
       (imaxima-setup-preoutput-filter)
       (maxima-single-string
-       (format "block(load(\"%s\"), linenum:0)$\n" imaxima-lisp-file) t)
+       (format "block(load(\"%s\"), linenum:0);\n" imaxima-lisp-file))
       (goto-char (point-max)))))
 
 (defun imaxima ()

which works for me.
Comment 6 Sébastien Fabbro (RETIRED) gentoo-dev 2006-06-13 03:22:35 UTC
I commited an imaxima-0.94b full ebuild in the gentoo scientific overlay at http://gentooscience.org. Please test it and report here.
Comment 7 PL Hayes 2006-06-13 03:41:54 UTC
(In reply to comment #6)
> I commited an imaxima-0.94b full ebuild in the gentoo scientific overlay at
> http://gentooscience.org. Please test it and report here.
> 

Works great. Thanks. :)
Comment 8 Sebastian Schubert 2006-06-13 04:20:29 UTC
(In reply to comment #6)
> I commited an imaxima-0.94b full ebuild in the gentoo scientific overlay at
> http://gentooscience.org. Please test it and report here.
> 

Works. Thx
Comment 9 Matthew Kennedy (RETIRED) gentoo-dev 2006-06-18 12:18:35 UTC
Could someone from the science team take the ebuild described in the overlay and commit it to portage?
Comment 10 Christian Faulhammer (RETIRED) gentoo-dev 2006-10-31 05:57:07 UTC
Ebuild was commited today