Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 448242 - app-emacs/imaxima removal (was: app-emacs/imaxima-1.0-r2 with sci-mathematics/maxima-5.29.1 - LaTeX error in: \mbox{\tt\red(\mathrm{\%o1}) \black}2)
Summary: app-emacs/imaxima removal (was: app-emacs/imaxima-1.0-r2 with sci-mathematics...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Science Mathematics related packages
URL:
Whiteboard: Pending removal: 2017-02-12
Keywords:
Depends on: 573544
Blocks:
  Show dependency tree
 
Reported: 2012-12-23 00:34 UTC by Carlos Konstanski
Modified: 2017-02-13 12:32 UTC (History)
2 users (show)

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


Attachments
LaTeX log file (1.log,4.73 KB, text/plain)
2013-01-02 14:32 UTC, Carlos Konstanski
Details
Consolidate emacs and latex flags in maxima-5.37.3-r2.ebuild (maxima-5.37.3-r2.ebuild.diff,2.90 KB, patch)
2015-12-22 09:43 UTC, Ulrich Müller
Details | Diff
files/emacs-0.patch (emacs-0.patch,807 bytes, patch)
2015-12-22 09:43 UTC, Ulrich Müller
Details | Diff
files/wish-2.patch (wish-2.patch,662 bytes, patch)
2015-12-22 09:45 UTC, Ulrich Müller
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Konstanski 2012-12-23 00:34:06 UTC
sci-mathematics/maxima-5.29.1 has a problem generating LaTeX output. I get a LaTeX error. Rolling back to sci-mathematics/maxima-5.28.0 fixes the issue.

I was testing with emacs/imaxima. Not sure if the problem is solely within maxima, or if it's the interplay between maxima and imaxima.

Example error:

(%i1) 1+1;
LaTeX error in: \mbox{\tt\red(\mathrm{\%o1}) \black}2

Reproducible: Always

Steps to Reproduce:
1. open emacs
2. M-x imaxima
3. type any expression, e.g. 1+1;
Comment 1 Robert Dodier 2013-01-01 22:19:58 UTC
I cannot reproduce this bug. I am working w/ Maxima 5.29.1 (compiled w/ Clisp) on Xubuntu 8.04.

Some questions to help clarify the situation.

(1) Can you please find the LaTeX output file generated by imaxima and attach it to this report. I believe it will be something like: /tmp/imaximaXXXXXX/1.tex

(2) What is the value of load-path in your $HOME/.emacs?

(3) Does there exist more than one Maxima executable and/or imaxima.lisp in your system?

Sorry I can't be more helpful at this point.
Comment 2 Robert Dodier 2013-01-01 22:46:26 UTC
I suspect what's going on is a version mismatch between Maxima and imaxima. Was imaxima built from the Maxima 5.29.1 tarball (or equivalent)? The two have to match because a symbol name changed in Maxima (MLABLE changed to MLABEL) and imaxima contains a corresponding change.
Comment 3 James Cloos 2013-01-02 00:00:54 UTC
> Was imaxima built from the Maxima 5.29.1 tarball

Gentoo’s ebuild for imaxima uses uses the src file at:

http://members3.jcom.home.ne.jp/imaxima/Site/Download_and_Install_files/imaxima-imath-1.0.tar.gz

Which explains the version mismatch.

Its ebuild for maxima does not install the version of imaxima therein; it patches the Makefile.am to avoid the imaxima subdir in favour of the package mentioned above.

It looks like that needs to change.
Comment 4 Ulrich Müller gentoo-dev 2013-01-02 00:59:37 UTC
(In reply to comment #2)
> [...] a symbol name changed in Maxima (MLABLE changed to MLABEL)

Looks like an unnecessary change to me, which breaks backwards compatibility for no good reason. Or am I missing something?


(In reply to comment #3)
> Its ebuild for maxima does not install the version of imaxima therein; it
> patches the Makefile.am to avoid the imaxima subdir in favour of the package
> mentioned above.

This was discussed in 2009 (see bug 260663), and at least back then we decided to keep the two packages separate.

> It looks like that needs to change.

Not sure. Does imaxima still have its own upstream?
Comment 5 Carlos Konstanski 2013-01-02 14:32:16 UTC
Created attachment 334038 [details]
LaTeX log file

The log file generated by LaTeX when evalutating 1+1; in an imaxima buffer.
Comment 6 Robert Dodier 2013-01-02 17:49:41 UTC
(In reply to comment #4)
> (In reply to comment #2)
> > [...] a symbol name changed in Maxima (MLABLE changed to MLABEL)
> 
> Looks like an unnecessary change to me, which breaks backwards compatibility
> for no good reason. Or am I missing something?

Imaxima depends on undocumented internal features of Maxima. I won't promise that those never change. I have made my best effort to update Imaxima by making corresponding changes in the copy of Imaxima in Maxima's Git repo.

> (In reply to comment #3)
> > Its ebuild for maxima does not install the version of imaxima therein; it
> > patches the Makefile.am to avoid the imaxima subdir in favour of the package
> > mentioned above.
> 
> This was discussed in 2009 (see bug 260663), and at least back then we
> decided to keep the two packages separate.

I compared the code found here: (home.ne.jp link is broken)

https://sites.google.com/site/imaximaimath/download-and-install/imaxima-imath-1.0.tar.gz

and, in addition to the MLABEL business, there are some other minor updates which appear in the Maxima version of Imaxima. At this point the tarball is out of date. My advice is to build Imaxima from Maxima (Git or tarball).
Comment 7 Ulrich Müller gentoo-dev 2013-01-02 21:13:11 UTC
As a quick fix, I've made a revision bump of app-emacs/imaxima:

+*imaxima-1.0-r3 (02 Jan 2013)
+
+  02 Jan 2013; Ulrich Müller <ulm@gentoo.org> imaxima-1.0-r2.ebuild,
+  +imaxima-1.0-r3.ebuild, +files/imaxima-1.0-1.03.patch,
+  +files/imaxima-1.0-mlabel.patch:
+  Fix problem with LaTeX output caused by renamed mlabel symbol in maxima-5.29,
+  bug 448242. Apply some minor updates from imaxima-imath-1.03, see the
+  ChangeLog of the package for details.
+

We may drop the separate imaxima package at some later point and install it from sci-mathematics/maxima instead, in case that Yasuaki Honda won't release any more imaxima tarballs.

Leaving this bug open until >=maxima-5.29 and >=imaxima-1.0-r3 are marked stable.


BTW, I've noticed that the file imaxima.texi (which is also included in the maxima-5.29.1 tarball) is non-free: Its license permits only verbatim distribution, but no modification.
Comment 8 PL Hayes 2015-12-13 20:52:20 UTC
(In reply to Ulrich Müller from comment #7)

> Leaving this bug open until >=maxima-5.29 and >=imaxima-1.0-r3 are marked
> stable.
> 
> 

Bump! :)
Comment 9 Ulrich Müller gentoo-dev 2015-12-13 22:10:15 UTC
Indeed, both ebuilds are stable since a long time. Closing.
Comment 10 PL Hayes 2015-12-14 05:47:12 UTC
(In reply to Ulrich Müller from comment #9)
> Indeed, both ebuilds are stable since a long time. Closing.

Yes, but that leaves us with the broken separate imaxima.
Comment 11 Ulrich Müller gentoo-dev 2015-12-14 07:24:02 UTC
Right, looks like it's time to revise our decision from 2009 and finally drop the separate app-emacs/imaxima package.

@grozin: Would you mind if I take care of the transition and of revbumping sci-mathematics/maxima so that it will install imaxima? The ebuild already inherits elisp-common.eclass so I expect the changes to be non-intrusive.

And if I do, should I add the emacs herd to maxima's metadata.xml?
Comment 12 Andrey Grozin gentoo-dev 2015-12-14 07:34:07 UTC
(In reply to Ulrich Müller from comment #11)
> Right, looks like it's time to revise our decision from 2009 and finally
> drop the separate app-emacs/imaxima package.
> 
> @grozin: Would you mind if I take care of the transition and of revbumping
> sci-mathematics/maxima so that it will install imaxima? The ebuild already
> inherits elisp-common.eclass so I expect the changes to be non-intrusive.
Of course I don't mind. This split into 2 packages is unnatural.

> And if I do, should I add the emacs herd to maxima's metadata.xml?
I don't think it's necessary. Most maxima bugs are about maxima itself, not its emacs interface. If there will be a bug related to emacs stuff, I can cc: emacs@gentoo.org.
Comment 13 Ulrich Müller gentoo-dev 2015-12-21 21:23:08 UTC
I have committed sci-mathematics/maxima-5.37.3-r2 which will install imaxima. In addition it will now byte-compile all elisp files. Currently -r2 is package.masked for testing.

I am not entirely happy with the emacs and latex USE flags: USE="emacs -latex" results in a configuration where imaxima is installed but not usable. On the other hand, USE="-emacs latex" will install only emaxima.sty which doesn't make much sense without the corresponding Emacs mode.

Therefore I would suggest removing the latex flag, i.e. merging its function with the emacs flag.

Also the "xemacs" USE flag is pretty much non-functional (it only pulls xemacs as dependency) and should be removed, until there will be real XEmacs support.
Comment 14 Ulrich Müller gentoo-dev 2015-12-22 09:43:01 UTC
Created attachment 420184 [details, diff]
Consolidate emacs and latex flags in maxima-5.37.3-r2.ebuild

See attached patch for what I propose.
- Consolidate emacs and latex USE flags
- Remove non-functional xemacs flag
- Add a configure option to disable emacs support
Comment 15 Ulrich Müller gentoo-dev 2015-12-22 09:43:36 UTC
Created attachment 420186 [details, diff]
files/emacs-0.patch
Comment 16 Ulrich Müller gentoo-dev 2015-12-22 09:45:35 UTC
Created attachment 420188 [details, diff]
files/wish-2.patch

Updated patch for wish/tk to have things in Makefile.am more uniform, and to avoid a four-fold conditional.
Comment 17 Ulrich Müller gentoo-dev 2015-12-22 09:55:28 UTC
@grozin: Can you please acknowledge (or not) this the USE flag change?
Comment 18 Andrey Grozin gentoo-dev 2015-12-23 05:39:09 UTC
I completely agree with your suggestion to have just one USE flag emacs.

To my shame, I don't know how to use imaxima (I use rmaxima, a readline wrapper around command-line maxima). I installed maxima-5.37.3-r3 locally from your ebuild (with one extra change: in pkg_setup(), after the line

if [ -z "${NLISPS}" ]; then

I inserted

use arm && DEF_LISP=${ARM_LISP}

in order not to produce a wrong ewarn on arm). In emacs, I do M-x imaxima, then at the prompt

integrate(f(x),x,minf,inf);

In the emacs window I get

LaTeX error in: \int_{ -\infty }^{\infty }{f\left(x\right)\;dx}

/tmp/imaxima31143dwi/1.tex is

\documentclass[11pt,leqno]{article}

% mylatex
\setlength{\textwidth}{351mm}
\begin{document}
\pagecolor[rgb]{0.996109,0.996109,0.996109}\pagestyle{empty}
\begin{normalsize}
\color[rgb]{1.000000,0.000000,0.000000}\tt\begin{dmath}[number={\%o1}]
\color[rgb]{0.121096,0.109377,0.105470}\int_{ -\infty }^{\infty }{f\left(x\right)\;dx}\end{dmath}
\end{normalsize}
\end{document}

/tmp/imaxima31143dwi/1.log is

This is pdfTeX, Version 3.14159265-2.6-1.40.16 (TeX Live 2015) (preloaded format=mylatex 2015.12.23)  23 DEC 2015 11:08
entering extended mode
 restricted \write18 enabled.
 %&-line parsing enabled.
**&mylatex /tmp/imaxima31143dwi/1.tex
(/tmp/imaxima31143dwi/1.tex
LaTeX2e <2015/01/01> patch level 2
Babel <3.9l> and hyphenation patterns for 11 languages loaded.
CUSTOMISED FORMAT. Preloaded files:
        .
 article.cls    2014/09/29 v1.4h Standard LaTeX document class
   leqno.clo    2015/03/31 v1.1i Standard LaTeX option (left equation numbers)
  size11.clo    2014/09/29 v1.4h Standard LaTeX file (size option)
   color.sty    2014/10/28 v1.1a Standard LaTeX Color (DPC)
   color.cfg    2007/01/18 v1.5 color configuration of teTeX/TeXLive
   dvips.def    2014/10/14 v3.0j Driver-dependent file (DPC,SPQR)
dvipsnam.def    2014/10/14 v3.0j Driver-dependent file (DPC,SPQR)
 exscale.sty    2014/09/29 v2.1h Standard LaTeX package exscale
flexisym.sty    2010/09/17 v0.97b Make math characters macros
   expl3.sty    2015/06/15 v5630 L3 programming layer (loader) 
expl3-code.tex    2015/06/15 v5630 L3 programming layer 
l3unicode-data.def    2015/03/01 v5544 L3 Unicode data
 l3dvips.def    2015/05/21 v5613 L3 Experimental driver: dvips
  cmbase.sym    2007/12/19 v0.92
mathstyle.sty    2010/11/17 v0.89
   breqn.sty    2009/08/07 v0.98a Breaking equations
  keyval.sty    2014/10/28 v1.15 key=value parser (DPC)
    calc.sty    2014/10/28 v4.3 Infix arithmetic (KKT,FJ)
        .
No file 1.aux.
LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 5.
LaTeX Font Info:    ... okay on input line 5.
LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 5.
LaTeX Font Info:    ... okay on input line 5.
LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 5.
LaTeX Font Info:    ... okay on input line 5.
LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 5.
LaTeX Font Info:    ... okay on input line 5.
LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 5.
LaTeX Font Info:    ... okay on input line 5.
LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 5.
LaTeX Font Info:    ... okay on input line 5.
LaTeX Font Info:    External font `cmex7' loaded for size
(Font)              <6> on input line 8.
! Undefined control sequence.
\math_delimiter:NNnNn ..._delimiter:D \int_eval:w 
                                                  "#1#2#3#4#5\int_eval_end: 
l.8 ...00,0.000000}\tt\begin{dmath}[number={\%o1}]
                                                  
? 
! Emergency stop.
\math_delimiter:NNnNn ..._delimiter:D \int_eval:w 
                                                  "#1#2#3#4#5\int_eval_end: 
l.8 ...00,0.000000}\tt\begin{dmath}[number={\%o1}]
                                                  
End of file on the terminal!

 
Here is how much of TeX's memory you used:
 26 strings out of 42362
 371 string characters out of 290869
 148231 words of memory out of 1100000
 10386 multiletter control sequences out of 15000+15000
 9136 words of font info for 33 fonts, out of 400000 for 9000
 452 hyphenation exceptions out of 8191
 19i,5n,22p,127b,221s stack positions out of 1500i,500n,1500p,200000b,5000s
No pages of output.

Am I doing something wrong?
Comment 19 Ulrich Müller gentoo-dev 2015-12-23 09:00:07 UTC
(In reply to Andrey Grozin from comment #18)

I have committed -r3, including your change for the ewarn on arm (still package.masked).

If I compare the list of loaded file between your 1.log and what I get here, I see these differences:

    dvips.def    2014/10/14 v3.0j Driver-dependent file (DPC,SPQR)
 dvipsnam.def    2014/10/14 v3.0j Driver-dependent file (DPC,SPQR)
  exscale.sty    2014/09/29 v2.1h Standard LaTeX package exscale
-flexisym.sty    2010/09/17 v0.97b Make math characters macros
+flexisym.sty    2013/03/16 v0.97c Make math characters macros
    expl3.sty    2015/06/15 v5630 L3 programming layer (loader) 
 expl3-code.tex    2015/06/15 v5630 L3 programming layer 
 l3unicode-data.def    2015/03/01 v5544 L3 Unicode data
  l3dvips.def    2015/05/21 v5613 L3 Experimental driver: dvips
   cmbase.sym    2007/12/19 v0.92
-mathstyle.sty    2010/11/17 v0.89
-   breqn.sty    2009/08/07 v0.98a Breaking equations
+mathstyle.sty    2014/06/10 v0.90a Tracking mathstyle implicitly
+   breqn.sty    2012/05/10 v0.98b Breaking equations
   keyval.sty    2014/10/28 v1.15 key=value parser (DPC)
     calc.sty    2014/10/28 v4.3 Infix arithmetic (KKT,FJ)

The three files flexisym.sty, mathstyle.sty, and breqn.sty were part of the mh bundle which was removed some time ago. You don't happen to have an old dev-tex/mh installed?

> ! Undefined control sequence.
> \math_delimiter:NNnNn ..._delimiter:D \int_eval:w 
>                                                   "#1#2#3#4#5\int_eval_end: 
> l.8 ...00,0.000000}\tt\begin{dmath}[number={\%o1}]

This also looks similar to bug 524114.
Comment 20 Andrey Grozin gentoo-dev 2015-12-23 13:34:11 UTC
(In reply to Ulrich Müller from comment #19)
> The three files flexisym.sty, mathstyle.sty, and breqn.sty were part of the
> mh bundle which was removed some time ago. You don't happen to have an old
> dev-tex/mh installed?
You are right, I still had dev-tex/mh installed on this computer. Now imaxima works (and looks very nice!). I think we can now unmask 5.37.3-r3, and remove 
5.37.3-r1.
The problem is what to do with maxima-5.34.1 which is stable on amd64 ppc x86. We cannot remove app-emacs/imaxima until it is in the tree. Producing 5.34.1-r1 with changes similar to 5.37.3-r3 makes no sense: its stabilization will not be faster than that of 5.37.3-r3, and why stabilize an outdated version? The only way I can see is (1) wait for 1 month; (2) require stabilization of 5.37.3-r3; (3) wait who knows how long (especially for the ppc team); (4) remove imaxima.
Comment 21 Ulrich Müller gentoo-dev 2015-12-23 15:10:31 UTC
(In reply to Andrey Grozin from comment #20)
> I think we can now unmask 5.37.3-r3,

Done.

> and remove 5.37.3-r1.

Not done. I am leaving this for the package's maintainer. :)

> The problem is what to do with maxima-5.34.1 which is stable on amd64 ppc
> x86. We cannot remove app-emacs/imaxima until it is in the tree. Producing
> 5.34.1-r1 with changes similar to 5.37.3-r3 makes no sense: its
> stabilization will not be faster than that of 5.37.3-r3, and why stabilize
> an outdated version? The only way I can see is (1) wait for 1 month; (2)
> require stabilization of 5.37.3-r3; (3) wait who knows how long (especially
> for the ppc team); (4) remove imaxima.

I agree that (1)..(4) will be the procedure which we'll have to follow.

However, unstable users will no longer be able to install app-emacs/imaxima, because maxima-5.37.3-r3 blocks against it. Also Portage gets the upgrade path right, at least on my system imaxima was unmerged automatically. So I believe the waiting period won't do any harm.

Leaving this bug open until app-emacs/imaxima is removed.
Comment 22 Ulrich Müller gentoo-dev 2017-01-02 23:19:37 UTC
After maxima-5.38.1 being stable, can sci-mathematics/maxima-5.34.1 be removed now? It is the only reverse dependency of app-emacs/imaxima.

Keywords for sci-mathematics/maxima:
             |                                 |   u   |  
             | a a         p s     a   n r     |   n   |  
             | l m   h i   p p   m r m i i s   | e u s | r
             | p d a p a p c a x i m 6 o s 3   | a s l | e
             | h 6 r p 6 p 6 r 8 p 6 8 s c 9 s | p e o | p
             | a 4 m a 4 c 4 c 6 s 4 k 2 v 0 h | i d t | o
-------------+---------------------------------+-------+-------
   5.34.1    | o + o o o + o o + o o o o o o o | 5 # 0 | gentoo
   5.37.3-r4 | o + o o o ~ o o ~ o o o o o o o | 5 #   | gentoo
   5.38.1    | o + o o o + o o + o o o o o o o | 5 o   | gentoo
[I]5.39.0    | o ~ o o o ~ o o ~ o o o o o o o | 5 o   | gentoo
Comment 23 Ulrich Müller gentoo-dev 2017-01-13 20:43:19 UTC
(In reply to Ulrich Müller from comment #22)
> After maxima-5.38.1 being stable, can sci-mathematics/maxima-5.34.1 be
> removed now? It is the only reverse dependency of app-emacs/imaxima.

I see no objections, therefore I have:
- removed maxima-5.34.1,
- masked imaxima for removal.

# Ulrich Müller <ulm@gentoo.org> (13 Jan 2017)
# No longer maintained as a separate package.
# Use sci-mathematics/maxima with USE=emacs instead.
# Masked for removal in 30 days. Bug #448242.
app-emacs/imaxima
Comment 24 Ulrich Müller gentoo-dev 2017-02-13 12:31:28 UTC
commit 4d72ebeab4493f85f57a5c75d2be2c9fe0e57191
Author: Ulrich Müller <ulm@gentoo.org>
Date:   Mon Feb 13 13:27:08 2017 +0100

    app-emacs/imaxima: Remove package.
    
    Bug: 448242