Ask Your Question

bthomas's profile - activity

2023-09-03 17:53:18 +0200 asked a question Can three.js URL be configured by user

Can three.js URL be configured by user Hi, On the latest stable Debian release (version 12 - Bookworm) 3D plots using t

2022-02-13 05:36:27 +0200 received badge  Notable Question (source)
2021-04-08 05:49:22 +0200 received badge  Popular Question (source)
2020-12-27 18:09:57 +0200 answered a question sage-shell-mode positions cursor incorrectly

For whatever it is worth, I was able to find a work around on Ubuntu 20.04 using the prepackaged Sage 9.0. The trick is to follow the advice on issue 52 by editing the line exec sage-ipython "$@" -i in /usr/bin/sage and changing it to exec sage-ipython "$@" --simple-prompt -i . It is also necessary to add (setq sage-shell::sage-simple-prompt nil) to the .emacs file. All this was found to work with the latest sage-shell-mode version from its git repository that had Emmanuel Charpentier's patches merged in.

2020-12-26 00:38:14 +0200 commented answer sage-shell-mode positions cursor incorrectly

Thank you for your response.

I just pulled latest git master. Sage version 9.0 does not seem to support "simple-prompt". So after setting (setq sage-shell::sage-simple-prompt nil) and executing M-x run-sage, I find the problem still occurs. Although looks like with a few less spaces.

2020-12-26 00:37:22 +0200 answered a question sage-shell-mode positions cursor incorrectly

I just pulled latest git master. Sage version 9.0 does not seem to support "simple-prompt". So after setting (setq sage-shell::sage-simple-prompt nil) and executing M-x run-sage, I find the problem still occurs. Although looks like with a few less spaces.

2020-12-25 01:08:34 +0200 received badge  Student (source)
2020-12-24 20:17:35 +0200 asked a question 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