Xmaxima suggestions



I have a few suggestions for Xmaxima.

1. In the File menu, add an option to 'Save Maxima Input'
to disk;

2. In the File menu, change the option from 'Save Expressions'
to 'Save Maxima State' and have the file chooser screen for *.lisp
files. The present menu option is misleading, as it generates a
lisp file to reproduce the current state of the Maxima session,
and since it is a lisp file that is being saved, it is misleading
to screen for *.bin files.

I have attached patches to Menu.tcl and FileDlg.tcl to implement
these changes. If these are ok, I'll patch the documentation, too.

3. In the Options menu, under Preferences, add an option to save
the current directory on closing Xmaxima & restore it
on start-up.

After poking around, it's not clear to me how to implement 3...

------

I am writing a tutorial for my 1st year maths students on using
Maxima, and in writing the introductory material on using Xmaxima,
these features appeared to be both useful (expected) and missing.

Leo

Index: Tkmaxima/Menu.tcl
===================================================================
RCS file: /cvsroot/maxima/maxima/interfaces/xmaxima/Tkmaxima/Menu.tcl,v
retrieving revision 1.32
diff -u -r1.32 Menu.tcl
--- Tkmaxima/Menu.tcl   7 May 2007 00:35:30 -0000       1.32
+++ Tkmaxima/Menu.tcl   11 Apr 2010 20:13:15 -0000
@@ -55,16 +55,27 @@

      $m add separator
      $m add command -underline 0 \
-       -label [set label [mc "Save Expressions to File"]] \
+       -label [set label [mc "Save Maxima State to File"]] \
         -accel {Ctrl+s} \
         -command [set command [cIDECreateEvent $text $label {
-           set file [tide_savefile [M [mc "Save to a file"]] "" *.bin]
+           set file [tide_savefile [M [mc "Save to a file"]] "" *.lisp]
             if {$file != ""} {
                 sendMaxima $maxima_priv(cConsoleText)
"save(\"$file\",all)\$\n"
             }
         }]]
      bind $text <Control-Key-s> $command

+    $m add command -underline 0 \
+       -label [set label [mc "Save Maxima Input to File"]] \
+       -accel {Ctrl+a} \
+       -command [set command [cIDECreateEvent $text $label {
+           set file [tide_savefile [M [mc "Save to a file"]] "" *.mac]
+           if {$file != ""} {
+               sendMaxima $maxima_priv(cConsoleText)
"apply(stringout,\[\"$file\",\[1,linenum-1\]\])\$\n"
+           }
+       }]]
+    bind $text <Control-Key-a> $command
+

      $m add sep
      $m add command -underline 0 \

Index: Utils/FileDlg.tcl
===================================================================
RCS file: /cvsroot/maxima/maxima/interfaces/xmaxima/Utils/FileDlg.tcl,v
retrieving revision 1.1
diff -u -r1.1 FileDlg.tcl
--- Utils/FileDlg.tcl   7 Sep 2002 08:48:34 -0000       1.1
+++ Utils/FileDlg.tcl   11 Apr 2010 20:31:09 -0000
@@ -14,6 +14,8 @@
         set types [list {"Binary Files" {.bin .sav}} {"All Files" *}]
      } *.mac {
         set types [list {"Maxima Files" {.mc .mac .dem}} {"All Files"
*}]
+    } *.lisp {
+       set types [list {"Lisp Files" {.lisp}} {"All Files" *}]
      } *.tcl {
         set types [list {"Tcl Files" .tcl} {"All Files" *}]
      } *.clp {


-- 
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.