tpapp / julia-repl

Run an inferior Julia REPL in a terminal inside Emacs
Other
170 stars 35 forks source link

send long code line breaks? #58

Closed taqtiqa-mark closed 3 years ago

taqtiqa-mark commented 5 years ago

When reporting an issue, please provide

  1. the Emacs version (M-x emacs-version [RET], will also appear in the buffer *Messages*), GNU Emacs 26.1 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.18.9) of 2018-05-29

  2. the Julia version (VERSION) v1.1.0

  3. the version of julia-repl (something like “latest master” is fine). SPC-h-d-p: 20190420.1455

  4. self-contained steps to replicate the issue. Following long with the Julia Academy course: "Introduction to Julia >> Plotting": C-c C-c for the following line:

    globaltemperatures = [14.4, 14.5, 14.8, 15.2, 15.5, 15.8]

    Shows in the Julia terminal buffer as:

    julia> 
    5.8]

    It appears to be due to the line length. C-c C-c for the following line:

    temperatures = [14.4, 14.5, 14.8, 15.2, 15.5, 15.8]

    Shows as

    julia> temperatures = [14.4, 14.5, 14.8, 15.2, 15.5, 15.8]
    6-element Array{Float64,1}:
    14.4
    14.5
    14.8
    15.2
    15.5
    15.8

    I've been able to reproduce this after starting a new Julia REPL (M-m, r).

tpapp commented 5 years ago

I have experienced something like this, but for longer lines. How wide is the emacs frame with the terminal?

taqtiqa-mark commented 5 years ago

The emacs frame is split into four (2x2) windows.
The frame is nearly the width of a 17" monitor. The relevant windows, holding the Julia REPL buffer and the source code being submitted, are stacked one above the other. Their width, from memory: definitely< 80 characters and likely < 70 characters.

Alexander-Barth commented 3 years ago

For your information I see this issue too. Per default the window is split horizontally (which I indeed prefer). The width of the julia window is 82 characters. The issues occurs when I send a code line with 76 characters or more (with the 7 characters wide julia> prompt, the combined length would be 83 characters.

Thank you very much for your work on julia-relp. In my opinion, emacs+julia-repl is most responsive and feature-rish editor (at least for feature that I need) out there :-)

tpapp commented 3 years ago

I am sorry, still cannot replicate this, even on super-small windows (eg 45x20), on Emacs 26.3 or 27.1.

I recommend that you try the vterm backend, introduced recently. It fixes a lot of issues with the ansi term.

taqtiqa-mark commented 3 years ago

Closing as unable to reproduce.

Alexander-Barth commented 3 years ago

I have this issue on different machines with different emacs version (Emacs 26.1, Emacs 25.2.2, Emacs 26.3), but the same .emacs configuration. I was suspecting an issue with my .emacs file but I can also reproduce this issue with a minimal .emacs file:

(require 'package)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
;; Comment/uncomment this line to enable MELPA Stable if desired.  See `package-archive-priorities`
;; and `package-pinned-packages`. Most users will not need or want to do this.
;;(add-to-list 'package-archives '("melpa-stable" . "https://stable.melpa.org/packages/") t)
(package-initialize)

(require 'julia-mode)
(require 'julia-repl)
(add-hook 'julia-mode-hook 'julia-repl-mode) ;; always use minor mode
(custom-set-variables
 ;; custom-set-variables was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 '(package-selected-packages
   (quote
    (tabbar session pod-mode muttrc-mode mutt-alias lua-mode initsplit htmlize graphviz-dot-mode folding eproject diminish csv-mode browse-kill-ring boxquote bm bar-cursor apache-mode yaml-mode use-package ob-ess-julia lsp-julia jupyter julia-repl biblio))))
(custom-set-faces
 ;; custom-set-faces was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 )

Everything after always use minor mode was added automatically. The only package installed were julia-mode-20200917.713 and julia-repl-20210124.923. If you are curious, attached is a screenshot how it looks on my side.

emacs-julia-repl

Thank you for the suggestion about vterm. I will try it next.

Alexander-Barth commented 3 years ago

For the records, the issue is indeed fixed in vterm. Thanks again!