#5295: Make Maxima not read global config files
------------------------+---------------------------------------------------
   Reporter:  mabshoff  |       Owner:  nbruin    
       Type:  defect    |      Status:  new       
   Priority:  major     |   Milestone:  sage-4.3.1
  Component:  build     |    Keywords:            
Work_issues:            |      Author:            
   Upstream:  N/A       |    Reviewer:            
     Merged:            |  
------------------------+---------------------------------------------------
Changes (by nbruin):

  * owner:  mabshoff => nbruin
  * upstream:  => N/A


Comment:

 The key here seems to be the {{{-userdir=}}} option. To illustrate
 (warning, this will seriously mess up maxima configuration you may have in
 your homedir. Back up {{{~/.maxima}}} if you have one)

 First to show the effect of the option:
 {{{
 > mkdir .maxima
 > echo "x : 1;" > .maxima/maxima-init.mac
 > mkdir othermax
 > echo "x : 2;" > othermax/maxima-init.mac
 > maxima --batch-string "x;"
 ;;; Loading #P"/usr/local/sage/4.3/local/lib/ecl/defsystem.fas"
 ;;; Loading #P"/usr/local/sage/4.3/local/lib/ecl/cmp.fas"
 ;;; Loading #P"/usr/local/sage/4.3/local/lib/ecl/sysfun.lsp"
 Maxima 5.19.1 http://maxima.sourceforge.net
 Using Lisp ECL 9.10.2
 Distributed under the GNU Public License. See the file COPYING.
 Dedicated to the memory of William Schelter.
 The function bug_report() provides bug reporting information.
 (%i1)                                  x
 (%o1)                                  1
 > maxima --userdir="$HOME/othermax" --batch-string "x;"
 ;;; Loading #P"/usr/local/sage/4.3/local/lib/ecl/defsystem.fas"
 ;;; Loading #P"/usr/local/sage/4.3/local/lib/ecl/cmp.fas"
 ;;; Loading #P"/usr/local/sage/4.3/local/lib/ecl/sysfun.lsp"
 Maxima 5.19.1 http://maxima.sourceforge.net
 Using Lisp ECL 9.10.2
 Distributed under the GNU Public License. See the file COPYING.
 Dedicated to the memory of William Schelter.
 The function bug_report() provides bug reporting information.
 (%i1)                                  x
 (%o1)                                  2
 }}}

 So, with the above {{{~/.maxima/maxima-init.mac}}} in place, currently the
 result is:
 {{{
 >  sage -c 'print maxima("x")'
                                        1
 }}}
 After applying attached patch "bug5295.patch" the result should be
 {{{
 > sage -c 'print maxima("x")'
                                        x
 }}}
 Since serious testing of this option involves making files in very
 sensitive locations, I think including a doctest for this behaviour is
 inadvisable.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/5295#comment:1>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB
-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.


Reply via email to