Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions julia/TeXmacsJulia.jl
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import REPL.REPLCompletions: completions, completion_text
using REPL
import UUIDs
import Markdown
import Base: AbstractDisplay, display, redisplay, catch_stack, show
import Base: AbstractDisplay, display, redisplay, show

const current_module = Ref{Module}(Main)
const orig_stdout = Ref{IO}(stdout)
Expand Down Expand Up @@ -186,6 +186,9 @@ display(d::InlineDisplay, m::MIME"image/png", x) =
display(d::InlineDisplay, m::MIME"image/jpeg", x) =
sendimage("jpg", m, x)

display(d::InlineDisplay, m::MIME"image/svg+xml", x) =
sendimage("svg", m, x)

display(d::InlineDisplay, m::MIME"application/pdf", x) =
sendimage("pdf", m, x)

Expand All @@ -211,10 +214,10 @@ display(d::InlineDisplay, x::Markdown.MD) = display(d, MIME("text/markdown"), x)
# we try to display data according to these mime types
# in order
const tm_mimetypes = [
MIME("image/svg"),
MIME("image/svg+xml"),
MIME("application/pdf"),
MIME("image/png"),
MIME("image/jpg"),
MIME("image/jpeg"),
MIME("text/html"),
MIME("text/markdown"),
MIME("text/latex")]
Expand Down Expand Up @@ -341,7 +344,7 @@ while true
end
catch e
err = e
result = catch_stack()
result = current_exceptions()
end

# output
Expand All @@ -354,7 +357,7 @@ while true
end
catch e
write(stdout, "Error showing values $(e)");
Base.invokelatest(Base.display_error, stderr, catch_stack())
Base.invokelatest(Base.display_error, stderr, current_exceptions())
end
flush_all() # send all to texmacs
# flush_output() # send all to texmacs
Expand Down
4 changes: 1 addition & 3 deletions progs/init-julia.scm
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@

(define (julia-launcher)
(with boot (raw-quote (julia-entry))
(if (url-exists-in-path? "julia")
(string-append "julia " boot)
(string-append "julia " boot))))
(string-append "julia " boot)))

(plugin-configure julia
(:winpath "Julia" "bin")
Expand Down