1. Ivan Andrus
  2. sage-mode


Ivan Andrus  committed 819af9d

Added sage-attach-this-file

  • Participants
  • Parent commits c939cdf
  • Branches default

Comments (0)

Files changed (1)

File emacs/sage-mode.el

View file
       ;; `python-send-command''s call to `compilation-forget-errors'.
       (compilation-fake-loc orig-start f))))
+(defun sage-attach-this-file ()
+  "Attach this file to the current Sage process."
+  (interactive)
+  (sage-maybe-quit-debugger)
+  (if buffer-file-name
+      (sage-send-command (format "attach(r'''%s''')" buffer-file-name) nil)
+    (error "This buffer is not associated with a file.  Please save it first.")))
 ;;;_* Integrate SAGE mode with Emacs