"sage-update-autoloads" also did not solve my problem, but with the hack of 
Ezequiel

  > ;;; hack to avoid error in python-send-command
    > (add-hook 'sage-startup-before-prompt-

hook (lambda () (compilation-minor-mode 1)))

it works fine. It could be emacs 24 thing.


בתאריך יום שלישי, 24 באפריל 2012 08:27:29 UTC-6, מאת syd.la...@gmail.com:
>
> I confirm I getting the same bug, in emacs 24, sage 5, getting
>
> Wrong type argument: hash-table-p, nil
>
> buffer *SAGE-main* is in commint-run mode. No inferior-sage-mode.
>
> I have to run inferior-sage-mode, manually.
>
> I have installed sage-mode-0.6 and sage-mode-0.7 directly from sage website
> I also checked Ivan's sage_mode-0.8. The error is persistant in all 
> version.
>
> בתאריך יום שלישי, 10 באפריל 2012 15:38:54 UTC-6, מאת Ezequiel Birman:
>>
>> Are sage-mode inferior-sage-mode and sage-view still supported?
>>
>> I (kind of) managed to get an Inferior Sage. Is there a way to eval last
>> expresion in sage-mode instead of the whole buffer (C-c C-r)?
>>
>> I am using latest sage (4.8) and sage-mode cloned from mercurial
>> repo.  (by the way, I've built and installed sage-mode python packages in
>> the default location: /usr/lib/python2.7/site-packages/ Should I move
>> them under the sage dir hierarchy? ie. overwrite the old python packages
>> installed by sage 4.8?)
>>
>> After 'M-x sage' i got this error:
>>
>>     > compilation-forget-errors: Wrong type argument: hash-table-p, nil
>>
>> and buffer *SAGE-main* is in commint-run mode. No inferior-sage-mode.
>>
>> The problem seems to lie in python-send-command. I'm not quite sure, but
>> i've added
>>
>>     > ;;; hack to avoid error in python-send-command
>>     > (add-hook 'sage-startup-before-prompt-hook (lambda () 
>> (compilation-minor-mode 1)))
>>
>> which initializes a hash table needed by compilation-mode, to my .emacs.
>>
>> Now, after 'M-x sage' *SAGE-main* pops-up properly but i still get:
>>
>>     > comint-redirect-send-command-to-process: No prompt found or
>>     > `comint-prompt-regexp' not set properly
>>
>> but comint-prompt-regexp local value for buffer *SAGE-main* is:
>>
>>     > 
>> "^\\(?:\\(?:\\(?:(\\(?:[Pg]db)\\)\\|\\.\\.\\.\\(?:\\.\\.\\)?\\|>>>\\|ipdb>\\|sage:\\)\\)
>>  
>> \\)+"
>>
>> Here is a portion of my .emacs:
>>
>> ;;;; sage-mode
>> ;;; https://bitbucket.org/ncalexan/sage-mode
>> ;;; http://wiki.sagemath.org/sage-mode
>> ;;(add-to-list 'load-path "/usr/local/share/sage/data/emacs")
>> (add-to-list 'load-path "/usr/local/src/sage/sage-mode/emacs")
>> (require 'sage)
>> (setq sage-command "/usr/local/share/sage/sage")
>>
>> ;; If you want sage-view to typeset all your output and have plot()
>> ;; commands inline, uncomment the following line and configure sage-view:
>> (autoload 'sage-view "sage-view" "" t)
>>
>> ;; (add-hook 'sage-startup-before-prompt-hook
>> ;;           (lambda ()
>> ;;             (set (make-local-variable 'compilation-locs)
>> ;;                  (make-hash-table :test 'equal :weakness 'value))))
>>
>> ;; (remove-hook 'sage-startup-before-prompt-hook 
>> 'sage-send-startup-before-prompt-command)
>>
>> (add-hook 'inferior-sage-mode-hook
>>           (function
>>            (lambda ()
>>              ;;(setq comint-redirect-perform-sanity-check t)
>>              (sage-view)
>>              ;; (sage-view-enable-inline-output)
>>              ;; (sage-view-enable-inline-plots)
>>              )))
>>
>> ;;; hack to avoid error in python-send-command
>> (add-hook 'sage-startup-before-prompt-hook
>>            (lambda () (compilation-minor-mode 1)))
>>           
>> (add-hook 'sage-mode-hook
>>       '(lambda () ; taken from 
>> http://www.cs.caltech.edu/courses/cs11/material/python/misc/python_style_guide.html#TABS
>>          (set-variable 'py-indent-offset 4)
>>          (set-variable 'py-smart-indentation nil)
>>          (set-variable 'indent-tabs-mode nil)))
>>
>> Thank you
>>
>> -- 
>> Ezequiel Birman
>>
>>

-- 
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