Sorry.  I just meant that I "moved" it from your hook to the code in 
sage-mode.el.  In other words I didn't fix the actual bug, just worked around 
it.

-Ivan

On Apr 26, 2012, at 2:22 AM, syd.lavas...@gmail.com wrote:

> Confirmed! It works as far as I can say. Thanks a lot. I'll update the thread 
> if I see something abnormal.
> 
> Where was the compilation-minor-mode before, that I had to call it manually?
> 
> Syd
> 
> בתאריך יום רביעי, 25 באפריל 2012 10:27:13 UTC-6, מאת Ivan Andrus:
> Sorry, I got involved in other problems and forgot about this one.  I have 
> updated my spkg [1] to include a work around.  It basically just moves the 
> call to `compilation-minor-mode' into `sage-send-command'.  If you could try 
> it out and let me know if you have any problems that would be great.
> 
> -Ivan
> 
> [1] http://boxen.math.washington.edu/home/iandrus/sage_mode-0.8.spkg
> 
> On Apr 24, 2012, at 4:27 PM, syd.lavas...@gmail.com wrote:
> 
>> 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
> 
> 
> -- 
> 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

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