ASKSAGE: Sage Q&A Forum - Individual question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Mon, 18 Jun 2012 08:33:44 -0500sage-view not working in emacshttp://ask.sagemath.org/question/9088/sage-view-not-working-in-emacs/I'm trying to use sage-view in emacs with sage-mode.
My emacs configuration for Sage is as follows:
(setq sage-dir "~/Programming/Sage/sage-5.0.1")
(add-to-list 'load-path (expand-file-name (concat sage-dir "/data/emacs")))
(require 'sage "sage")
(setq sage-command (concat sage-dir "/sage"))
(require 'sage-view "sage-view")
(add-hook 'sage-startup-hook 'sage-view
'sage-view-enable-inline-output 'sage-view-enable-inline-plots)
But when emacs starts up, sage-view is not started. I have to manually start it with `M-x sage-view`.Sun, 17 Jun 2012 13:22:03 -0500http://ask.sagemath.org/question/9088/sage-view-not-working-in-emacs/Comment by Sean Lynch for <p>I'm trying to use sage-view in emacs with sage-mode.</p>
<p>My emacs configuration for Sage is as follows:</p>
<pre><code>(setq sage-dir "~/Programming/Sage/sage-5.0.1")
(add-to-list 'load-path (expand-file-name (concat sage-dir "/data/emacs")))
(require 'sage "sage")
(setq sage-command (concat sage-dir "/sage"))
(require 'sage-view "sage-view")
(add-hook 'sage-startup-hook 'sage-view
'sage-view-enable-inline-output 'sage-view-enable-inline-plots)
</code></pre>
<p>But when emacs starts up, sage-view is not started. I have to manually start it with <code>M-x sage-view</code>.</p>
http://ask.sagemath.org/question/9088/sage-view-not-working-in-emacs/?comment=19578#post-id-19578Also, a grep in $SAGE_ROOT/data/emacs doesn't find `sage-startup-hook` defined anywhere. Maybe this changed in the latest version (I'm using 5.0.1)? Sun, 17 Jun 2012 13:45:08 -0500http://ask.sagemath.org/question/9088/sage-view-not-working-in-emacs/?comment=19578#post-id-19578Answer by Ivan Andrus for <p>I'm trying to use sage-view in emacs with sage-mode.</p>
<p>My emacs configuration for Sage is as follows:</p>
<pre><code>(setq sage-dir "~/Programming/Sage/sage-5.0.1")
(add-to-list 'load-path (expand-file-name (concat sage-dir "/data/emacs")))
(require 'sage "sage")
(setq sage-command (concat sage-dir "/sage"))
(require 'sage-view "sage-view")
(add-hook 'sage-startup-hook 'sage-view
'sage-view-enable-inline-output 'sage-view-enable-inline-plots)
</code></pre>
<p>But when emacs starts up, sage-view is not started. I have to manually start it with <code>M-x sage-view</code>.</p>
http://ask.sagemath.org/question/9088/sage-view-not-working-in-emacs/?answer=13713#post-id-13713I need to update the documentation since it seems things changed at some point. Sean Lynch is right that `sage-startup-hook` is not defined anywhere. What I have in my .emacs is the following:
(add-hook 'sage-startup-after-prompt-hook
(lambda () (interactive)
(sage-view 1)
(sage-view-disable-inline-output)))Sun, 17 Jun 2012 21:01:56 -0500http://ask.sagemath.org/question/9088/sage-view-not-working-in-emacs/?answer=13713#post-id-13713Comment by Sean Lynch for <p>I need to update the documentation since it seems things changed at some point. Sean Lynch is right that <code>sage-startup-hook</code> is not defined anywhere. What I have in my .emacs is the following:</p>
<pre><code>(add-hook 'sage-startup-after-prompt-hook
(lambda () (interactive)
(sage-view 1)
(sage-view-disable-inline-output)))
</code></pre>
http://ask.sagemath.org/question/9088/sage-view-not-working-in-emacs/?comment=19573#post-id-19573That worked great. Thanks.Mon, 18 Jun 2012 08:33:44 -0500http://ask.sagemath.org/question/9088/sage-view-not-working-in-emacs/?comment=19573#post-id-19573