Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

sage-shell-mode positions cursor incorrectly

Hi

After clean apt-get install of Sage 9.0 on Ubuntu 20.04 and cloning the latest sage-shell-mode git repository I find that running sage within Emacs 26.3 results in the prompt being positioned to the far right of the screen with preceding spaces. After each command the cursor is positioned to the far right of the screen. I have filed a bug report (issue 56). I would be grateful if anyone is familiar with the problem, and could point me to any known work around.

The problem is reproducible with a bare minimum .emacs file shown below


;; Add local elisp directory and sub-directories to load-path
(let ((default-directory  "~/.elisp/"))
    (normal-top-level-add-subdirs-to-load-path))
;;-------------------------------------------------------------------
;; Sagemath mode
(require 'sage-shell-mode)
(setq sage-shell:use-prompt-toolkit t)
(setq sage-shell:sage-root "/usr/share/sagemath")
(setq sage-shell:sage-executable "/usr/bin/sage")
;; Run SageMath by M-x run-sage instead of M-x sage-shell:run-sage
(sage-shell:define-alias)
;; Turn on eldoc-mode in Sage terminal and in Sage source files
(add-hook 'sage-shell-mode-hook #'eldoc-mode)
(add-hook 'sage-shell:sage-mode-hook #'eldoc-mode)
;; Enable inline plots and LaTeX preview
(require 'sage-shell-view)
(setq sage-shell-view-default-commands 'output)
(setq sage-shell-view-default-commands 'plot)
(add-hook 'sage-shell-after-prompt-hook #'sage-shell-view-mode)

regards Thomas