Hi Nick,

I'm very happy you look at this problem.
Two other french users get the same error.

I use an ubuntu laptop for emacs, but download and compile sage with ".configure" and "make".
I believe I install sage*.el by spkg some months ago.

could you tell me what emacs version you are running, what python-mode version, and what sage-mode version?
You'll find
 Emacs version
 version and test of Sage
 .emacs part
 a part of sage-mode.el (I don't find any date)
 the *.el files in the sage directory and md5sum
 the beginning of the python.el file and its md5sum.

All others questions are welcome !

Francois Maltey (in France)

I use ;

"GNU Emacs 22.2.1 (i486-pc-linux-gnu, GTK+ Version 2.16.1)
of 2010-03-26 on palmer, modified by Ubuntu"

The sage part in my .emacs file :

(add-to-list 'load-path (expand-file-name "/usr/local/sage-4.1.1-test/data/emacs"))
(require 'sage-view "sage-view")
(require 'sage "sage")
(setq sage-command "/usr/local/bin/sage")
; (load "~/Configuration/emacs/hook4sage.el") ; I disconnect theses changes when I test this question.

The main test :

----------------------------------------------------------------------
| Sage Version 4.5.3, Release Date: 2010-09-04                       |
| Type notebook() for the GUI, and license() for information.        |
----------------------------------------------------------------------
sage:
sage: def qaq (n) :
....:   if n==2 :
....:     return 4
....:   else :
------------------------------------------------------------
  File "<ipython console>", line 4
    se :
     ^
SyntaxError: invalid syntax
sage:

I don't find any version number in the sage-mode.el file
(and I don't remember how I get it with a spkg tips).
But a changing part of the sage-mode.el file may help you :

;;; Todo:

;; (DONE) Print path in instructions again?
;;
;; M-q fills comments correctly after """ ; "
;;
;; (DONE) C-x ` jump from one error to the next one.
;;
;; Replace test output.
;; Replace output for all tests.
;; Actually compare test outputs?
;; (DONE) C-c C-j copies multiline tests.
;; (DONE) C-u sage-test only tests, does not rebuild.
;; (DONE) C-c C-j in the *Help* buffer.
;;
;; (DONE) Make sage-send-{buffer, doctest} quit pdb before sending.
;; (DONE) Remove pdb history/different history based on prompt.
;;
;; (DONE) sage-rerun exits from pdb.
;; (DONE) C-u sage-build hangs with exiting from pdb code.
;; (DONE) search *sage-test* buffer for test status rather than rely on exit codes ;; search *sage-build* buffer for build status rather than rely on exit codes (how to tell?)
;;
;; (DONE) Fix pyrex-mode
;;
;; Upload an optional package?

;;; Code:

(require 'python)
(require 'comint)
(require 'ansi-color)
(require 'compile)

My directory about emacs in Sage :

f...@solen:/usr/local/sage-4.1.1-test/data/emacs$ ls -l sage*
-rw-r--r-- 1 root root  5776 2009-09-29 21:36 sage-build.el
-rw-r--r-- 1 root root  6537 2009-09-29 21:36 sage.el
-rw-r--r-- 1 root root   437 2009-09-29 21:36 sage-flymake.el
-rw-r--r-- 1 root root   425 2009-09-29 21:36 sage-imenu.el
-rw-r--r-- 1 root root  8993 2009-09-29 21:36 sage-load.el
-rw-r--r-- 1 root root 54441 2009-09-29 21:36 sage-mode.el
-rw-r--r-- 1 root root  9916 2009-09-29 21:36 sage-test.el
-rw-r--r-- 1 root root 15888 2009-09-29 21:36 sage-view.el

e42ec2412a71a1b6defabd4f1888e95  pyrex-mode.el
43ac1e30f9d9e7096501791e38d56327  sage-build.el
98d14f2364522d6feb82d8366241b89d  sage.el
059f7f483c844e15cccdb293eae25c61  sage-flymake.el
033b7ffc6729bd1951e6d8c3dbc583f3  sage-imenu.el
b0ba8bccaba7e992c0ac00e2a61193a0  sage-load.el
f98e87ffe92cd0a69d95b4df1b6d57cb  sage-mode.el
dba3c865ec6a657b96794d138826b76e  sage-test.el
6e3c74bb45b943613560f970e3eac738  sage-view.el

;;; python.el --- silly walks for Python  -*- coding: iso-8859-1 -*-

;; Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.

;; Author: Dave Love <f...@gnu.org>
;; Maintainer: FSF
;; Created: Nov 2003
;; Keywords: languages

;; This file is part of GNU Emacs.

;; GNU Emacs is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 3, or (at your option)
;; any later version.

f...@solen:/usr/share/emacs/22.2/lisp/progmodes$ ls -l python*
-rw-r--r-- 1 root root 73752 2010-03-26 05:01 python.elc
-rw-r--r-- 1 root root 27174 2008-01-21 01:25 python.el.gz
f...@solen:/usr/share/emacs/22.2/lisp/progmodes$ md5sum python.el*
b7f53e79ba001c06a96108155041340d  python.elc
60fff5085522c3a27c1c823cf256955c  python.el.gz
f...@solen:/usr/share/emacs/22.2/lisp/progmodes$

f...@solen:/usr/share/emacs/22.2/lisp/progmodes$ zcat python.el.gz | md5sum
31d8354fe1b673a23fc79e38fd88253f  -

--
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to