Comments (2)
Also as a side note, it looks like you use rainbow-delimiters-mode
. You can also enable that in the REPL by adding rainbow-delimiters-mode-enable
to jupyter-repl-mode-hook
.
from jupyter.
I did previously try to get color in code block output. The functions used to colorize the ANSI escape sequences in the REPL are the same ones used in the org-mode
output block, the difference is that org-mode
strips the color for some reason and I haven't put in the time to figure out why yet. Most likely it is related to using text properties to add in the color and how org-mode
does its fontification using font-lock
.
Thinking about it again, I don't think it is correct to remove the ANSI escape sequences in org-mode
output since we lose information that the kernel sent. We should be able to add color by inserting the ANSI escape sequences into the buffer, instead of stripping them and adding the colors as text properties before insertion (which is what the REPL does), and use ansi-color-apply-on-region
to overlay them with color. This way we use overlays instead of text properties so we don't interfere with font-lock
. The only downside is that overlays are known to slow down editing when there are a lot of them in the buffer.
from jupyter.
Related Issues (20)
- Expose refreshing kernelspecs HOT 1
- Feasibility of connecting to kernel running behind tmux or screen HOT 8
- automatic display inline image? HOT 2
- No `org-babel-execute-function` for jupyter-python before loading PROPERTY header HOT 1
- Command to clear input HOT 2
- get the overlay content/view it in a dedicated buffer
- [Q] How do I wrap the results in a markdown block? HOT 1
- unable to start kernel HOT 1
- jupyter-session-with-random-ports: ‘jupyter kernel‘ failed to show connection file path HOT 9
- [BUG] Copying text from REPL buffer breaks kill ring HOT 1
- up arrow and down arrow key to navigate code HOT 2
- Enable Github Discussions HOT 1
- `org-element-cache` warnings when displaying text with ANSI colours
- :file header fails to create the link to the result
- [Upstream Regresion?] `jupyter-tramp-read-passwd`: `tramp-read-passwd nil` no longer works HOT 4
- jupyter source blocks in orgmode don't work with noweb function calls HOT 1
- How do I reconnect a kernel whose websocket has been closed without restarting emacs? HOT 3
- error in process filter: zmq--subprocess-filter: Error in ZMQ subprocess: error, HOT 6
- error in process sentinel: JSON readtable error: 27
- jupyter-run-repl is picking up wrong python HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jupyter.