This is a *SUPER BETA* release: I reworked the keymaps, the customize
interface, and the elisp loading mechanism entirely. sage-mode should
load much faster now and have better documentation -- the help for
`sage-mode.el' is better, and both `sage-mode' and `inferior-sage-
mode' have menus now that at least suggest that you can build and
doctest sage within Emacs. In addition, Matthias Meulien's new
multiple-output `sage-view' code has been folded in.
A *SUPER BETA* release requires *SUPER BETA* testers. Please let me
know what problems you have.
My next goals are to improve the documentation and customization
interface, and to remove a lot of the outdated crud that has
accumulated. There is a lot of that :)
Cheers!
Nick
Cool! I'll try out soon.
By the way: a couple suggestions, many of them coming from discussions
with users at Sage days 14:
- M-x rerun-sage is proving as extremely useful as I had expected!
Could it be possible to have do its job in the background?
(so that I can do something else in the 2 seconds it takes)
- C-c C-j to send doctests from the *Help* buffer
- Shortcut to run all doctests in a file until an error occurs
- filename tab-completion for attach / load /
- It is very handy to have the file names as links in the stack
trace! However, I would personally find more practical if C-x `
did not iterate through all of them, but would just jump from one
error to the next one.
- Some times, the last file of the stack trace is not linked
to. Well, sorry, as such, my report is not very useful. I'll try to
remember saving an example next time it occurs.
I also had noted that 1._<TAB> caused a freeze, but this does not seem
anymore to be the case.
Thanks very much!
Best,
Nicolas
--
Nicolas M. Thiéry "Isil" <nth...@users.sf.net>
http://Nicolas.Thiery.name/
> Hi Nick,
>
> First of all: yay!
>
> Second: the installation instructions seem to have changed on the
> wiki page, but not in what the package itself prints when it's done
> building. I imagine the wiki version is the correct one?
You are correct, the wiki/SPKG.txt/elisp source code is correct. What
now happens is that sage.el declares customization options and Emacs
autoloads; the actual code is not loaded until a sage- function is
called. This makes startup much faster, whilst hopefully not
introducing undefined function errors :) I'll update the install
script next release.
Nick
Thanks for your work. This is very helpful !
I'd like to report a problem. I don't know if I'm the only one who has it.
I installed 0.5.3, I now c-c c-t raise a
Symbol's function definition is void: sage-test
Am I doing something wrong ?
I'm using
tomahawk-*/sage/categories $ emacs --version
emacsclient 22.3
Cheers,
Florent
--
Florent Hivert
---
Il y a trois sortes de gens dans le monde : ceux qui savent compter et
ceux qui ne savent pas.
There are three kinds of people in the world: those who can count,
and those who cannot.
---
Professeur, Coordinateur équipe Combinatoire et Algorithmes
Laboratoire d'Informatique, de Traitement de l'Information
et des Systèmes (EA 4108)
Bureau U2.2.11 -- Campus du Madrillet
Université de Rouen -- Faculté des Sciences et des Techniques
Avenue de l'université -- 76801 SAINT ETIENNE DU ROUVRAY
Tél. : 02.32.95.52.91 -- Fax : 02.32.95.51.87
Mél. : Florent...@univ-rouen.fr
>
> Hi Nick,
>
> Thanks for your work. This is very helpful !
>
> I'd like to report a problem. I don't know if I'm the only one who
> has it.
> I installed 0.5.3, I now c-c c-t raise a
> Symbol's function definition is void: sage-test
Certainly not, my autoloads were too aggressive. There's a 0.5.4 on
the wiki now.
Thanks for the testing!
Nick
I'm sorry to say so, but things get even worse. sage-mode does not
load anymore. I'm not an expert in emacs-lisp so please ask me if the
following informations are not sufficient:
from a sage -f ... I got
Successfully installed sage-mode-0.5.4
Now cleaning up tmp files.
Making Sage/Python scripts relocatable...
Making script relocatable
Finished installing sage-mode-0.5.4.spkg
I load sage from a file called "/home/averell/lib/site-lisp/modes.el"
which contains those lines:
(add-to-list 'load-path (expand-file-name "/usr/local/sage/sage/data/emacs"))
(require 'python)
(require 'pyrex "pyrex-mode")
(require 'sage "sage-mode")
(setq sage-command "/usr/local/sage/sage/sage")
and:
tomahawk-*rc/Sage/Archives $ /usr/local/sage/sage/sage
----------------------------------------------------------------------
| Sage Version 3.4.rc0, Release Date: 2009-03-02 |
| Type notebook() for the GUI, and license() for information. |
----------------------------------------------------------------------
Loading Sage library. Current Mercurial branch is: combinat
sage:
Debugger entered--Lisp error: (error "Required feature `sage' was not provided")
require(sage "sage-mode")
eval-buffer(#<buffer *load*<3>> nil "/home/averell/lib/site-lisp/modes.el" nil t) ; Reading at buffer position 8385
load-with-code-conversion("/home/averell/lib/site-lisp/modes.el" "/home/averell/lib/site-lisp/modes.el" nil t)
require(modes)
eval-buffer(#<buffer *load*<2>> nil "/home/averell/.gnu-emacs" nil t) ; Reading at buffer position 922
load-with-code-conversion("/home/averell/.gnu-emacs" "/home/averell/.gnu-emacs" nil t)
load("~/.gnu-emacs" nil t)
(if (file-readable-p "~/.gnu-emacs") (load "~/.gnu-emacs" nil t) (if (file-readable-p "/etc/skel/.gnu-emacs") (load "/etc/skel/.gnu-emacs" nil t)))
(if (string-match "XEmacs\\|Lucid" emacs-version) (progn (if ... ...)) (if (file-readable-p "~/.gnu-emacs") (load "~/.gnu-emacs" nil t) (if ... ...)) (setq custom-file "~/.gnu-emacs-custom") (load "~/.gnu-emacs-custom" t t))
eval-buffer(#<buffer *load*> nil "/home/averell/.emacs" nil t) ; Reading at buffer position 1633
load-with-code-conversion("/home/averell/.emacs" "/home/averell/.emacs" t t)
load("~/.emacs" t t)
#[nil " …¾ Æ=ƒ Ç ÈQ‚A É=ƒ3 ÊÇËÌ#ƒ# Í‚A ÊÇËÎ#ƒ/ Ï‚A Í‚A Ð=ƒ= Ñ‚A Ç ÒQ Ó Ô\nÓ‰#ˆ Ó=ƒi ÕÖ×Ç ØQ!\" Ô\fÓ‰#ˆ Ó=ƒh \n ) ƒ® Ù !Úšƒ® Û !‰ ÜP $Ý $!ƒŠ $‚• Ý
!ƒ”
‚• ˉ ƒ Þ
\"ƒ« ßà
#ˆáâ!ˆ
* %?…½ Ë &ÔãÓ‰#))‡" [init-file-user system-type user-init-file-1 user-init-file otherfile source ms-dos "~" "/_emacs" windows-nt directory-files nil "^\\.emacs\\(\\.elc?\\)?$" "~/.emacs" "^_emacs\\(\\.elc?\\)?$" "~/_emacs" vax-vms "sys$login:.emacs" "/.emacs" t load expand-file-name "init" file-name-as-directory "/.emacs.d" file-name-extension "elc" file-name-sans-extension ".el" file-exists-p file-newer-than-file-p message "Warning: %s is newer than %s" sit-for 1 "default" alt inhibit-default-init inhibit-startup-screen] 7]()
command-line()
normal-top-level()
> Thanks for the testing!
Thanks **you** for the work.
Florent
Hi Florent, the installation instructions changed (updated
instructions should have been printed on sage -f). You should just
now need:
(add-to-list 'load-path (expand-file-name "/usr/local/sage/sage/data/
emacs"))
(require 'sage "sage")
We will get this working eventually!
Nick
Oups !!! Sorry I should have read more carefully. Thanks for your quick help
and your work.
Florent
Thanks... I've also some suggestions:
1) Could it be possible that the send-* command launch a sage if no one is
launched ?
2) There are two variable sage-run-command and sage-rerun-command. Is there
any use for that ? Right now if either if I set the first one by hand as you
suggest or else by emacs-custom the second one is not set properly.
> - C-c C-j to send doctests from the *Help* buffer
+1 to this one.
Cheers,
Florent
>
> Dear Nick,
>
> Thanks... I've also some suggestions:
>
> 1) Could it be possible that the send-* command launch a sage if no
> one is
> launched ?
Once upon a time this worked; I've made it work again and will post a
new spkg shortly.
> 2) There are two variable sage-run-command and sage-rerun-command.
> Is there
> any use for that ? Right now if either if I set the first one by
> hand as you
> suggest or else by emacs-custom the second one is not set properly.
The price of maximum configurability. I have a lot to learn about the
Emacs customize mechanism, and this is one thing I will try to improve.
>> - C-c C-j to send doctests from the *Help* buffer
>
> +1 to this one.
I am glad that people find that function so handy -- it has changed
how I develop sage code. I'll get it bound in the *Help* buffer next
release.
Nick
One more feature request for M-x rerun-sage
More often than not when I rerun-sage, I am at an ipdb> prompt.
Currently the soft kill (which is much faster than the hard kill!)
does not work in that case. Could the soft kill try to sent twice
'quit' to sage, so as to first quit from ipdb> and then from sage?
Thanks in advance!
Best regards,
>
> Dear Nick,
>
> One more feature request for M-x rerun-sage
>
> More often than not when I rerun-sage, I am at an ipdb> prompt.
> Currently the soft kill (which is much faster than the hard kill!)
> does not work in that case. Could the soft kill try to sent twice
> 'quit' to sage, so as to first quit from ipdb> and then from sage?
Sure! In sage-build.el, find the line (comint-send-eof) (in defun
rerun-sage ()) and repeat it a few times. I've folded this in but
won't be cutting a new release until I have some more time or emacs
frustrations.
Nick
Curious: this seems to make sage build and rerun hang on my machine.
But it works interactively. I imagine I'm not polling for input
correctly. Use with caution, sorry.
Nick
For information:
zephyr-/opt/sage>sage -f sage-mode-0.5.4.spkg
Force installing sage-mode-0.5.4.spkg
...
Attempting to download it.
http://www.sagemath.org//packages/optional/sage-mode-0.5.4.spkg --> sage-mode-0.5.4.spkg
[ ]
http://www.sagemath.org//packages/standard/sage-mode-0.5.4.spkg --> sage-mode-0.5.4.spkg
[ ]
http://www.sagemath.org//packages/experimental/sage-mode-0.5.4.spkg --> sage-mode-0.5.4.spkg
[ ]
http://www.sagemath.org//packages/archive/sage-mode-0.5.4.spkg --> sage-mode-0.5.4.spkg
[ ]
**********************************************************************
* Unable to download sage-mode-0.5.4.spkg
* Please see http://www.sagemath.org//packages for a list of valid
* packages or check the package name.
**********************************************************************
I could not find sage-mode on http://www.sagemath.org/packages/
Cheers,
As far as I know, sage-mode is only available from the wiki right now.
I downloaded the spkg locally from http://wiki.sagemath.org/sage-mode
and now use it every time I upgrade my sage installation, by typing
sage -f ~/Downloads/sage-mode-0.5.4.spkg
(i.e. note that I need to give it the path to the local copy of the file).
Remark: in theory, it should be possible to give sage -f the URL of
the spkg, that is
sage -f "http://wiki.sagemath.org/sage-mode?action=AttachFile&do=get&target=sage-mode-0.5.4.spkg"
but this doesn't work because of all the crap that the wiki puts in the URL.
Best,
Alex