Ask Your Question
0

sage-view not working in emacs

asked 2012-06-17 20:22:03 +0200

Sean Lynch gravatar image

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.

edit retag flag offensive close merge delete

Comments

Also, 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)?

Sean Lynch gravatar imageSean Lynch ( 2012-06-17 20:45:08 +0200 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2012-06-18 04:01:56 +0200

Ivan Andrus gravatar image

I 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)))
edit flag offensive delete link more

Comments

That worked great. Thanks.

Sean Lynch gravatar imageSean Lynch ( 2012-06-18 15:33:44 +0200 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2012-06-17 20:22:03 +0200

Seen: 589 times

Last updated: Jun 18 '12