summaryrefslogblamecommitdiffstats
path: root/2022/talks/jupyter.md
blob: 9260d7f4b9d54bb2372edb46075a6177e98b8da6 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
                       








                                                                                                     
                                                                     

























                                                                                                                                                                            
















                                                                      





                                                                                                   


                        
                                                                

























                                                                        





                                                               
[[!sidebar content=""]]
[[!meta title="Edit live Jupyter notebook cells with Emacs"]]
[[!meta copyright="Copyright © 2022 Blaine Mooers"]]
[[!inline pages="internal(2022/info/jupyter-nav)" raw="yes"]]

<!-- Initially generated with emacsconf-generate-talk-page and then left alone for manual editing -->
<!-- You can manually edit this file to update the abstract, add links, etc. --->


# Edit live Jupyter notebook cells with Emacs
Blaine Mooers (Blane Moors, he/him, <mailto:Blaine-Mooers@ouhsc.edu>)

[[!inline pages="internal(2022/info/jupyter-before)" raw="yes"]]

My talk will address a dilemma faced daily by many technical writers and programmers.
Like many academics, I use several web-based platforms for writing prose (e.g., 750words, Overleaf) and interactive computing (Jupyter Notebook, Google Colab Notebooks).
The first group lacks support for snippets.
The second group has support for snippets, but this support does not include tab triggers and tab stops.
The absence of tab stops can increase the number of bugs by overlooking parameter values in the snippet that need to be changed to adapt the snippet to the current problem.
One solution to the absence of full-powered snippets is to apply Emacs with yasnippets to these web-based platforms.

One route to doing so is to use the atomic-chrome package for Emacs and the GhostText Extension for web browsers.
These two software packages enable two-way communication via a web socket between an Emacs buffer and the text area of the web page.
Edits made on the web side of the socket are immediately sent to the Emacs buffer and vice versa.
The Emacs's snippets and other editing tools only work in the Emacs buffer.
The connection can be closed from either side.
This route has enabled me to apply snippets of LaTeX code to my daily writing in 750words.
I have been able to convert 750words into a platform for writing in LaTeX; by default, it uses markdown.
I have also been able to apply code snippets for Julia, Python, R, and so on in Jupyter notebook cells.
In other words, I get to extend my time writing in Emacs.

In my ten-minute talk, I will describe my problems with web-based platforms and their solution with Emacs.
I will describe where to find the required software and how I configured Emacs.
I will present several precautions for using GhostText and describe the limitations of its application.
I will provide links to collections of snippets I found handy daily usage of 750words and Jupyter.


# Discussion

## Notes

-   <https://github.com/alpha22jp/atomic-chrome> atomic chrome is by
    alpha2jp. It is available on MELPA.
-   <https://ghosttext.fregante.com/> Central website for GhostText.
-   <https://www.youtube.com/watch?v=JWW3o104npY&t=190s> Example of
    using GhostText with Moodle to write web papes.
-   <https://github.com/MooersLab/latex-emacs> My configuration
    targeting LaTeX in Gnu Emacs.
-   <https://github.com/MooersLab/BerlinEmacsAugust2022> Slides from a
    90-minute talk in August at the Berlin Emacs Meetup about using
    LaTeX in Emacs.
-   <https://github.com/MooersLab/DSW22ghosttext> Slides to 50-minute
    talk in July about using GhostText with Emacs and other editors.
    Includes slides for friends that use Vim.
- Great talk, thank you!
- Btw, great talk Blaine!
- I've got ghosttext and emacs via atomicchrome working now: very easy and very useful!  Thank you.
- Nice job Blaine!
- Thank you!
- Pretty inspring!

## Questions and answers

-   Q: Kind of a silly question but I'm curious... Do you have a
    favourite color theme?
    -   A:
-   Q: Really interesting to discover GhostText thanks. I use ein (Emacs
    Ipython Notebooks
    <https://github.com/millejoh/emacs-ipython-notebook>) for running
    notebooks locally, I can clearly see the advantage of using
    GhostText with non-local notebooks/websites but is there anything
    that GhostText provides over EIN when interacting with locally
    running Jupyter Notebooks?
    -   A:
-   Q: To your knowledge are recent/coming security changes in Chrome
    going to impact the browswer exstention?   Thanks !
    -   A:
-   Q:Is this browser-agnostic, or do you have to use Chrome? (answered
    in talk 15:58)
    -   A: Works on different browsers
-   Q: You mentioned a couple other solutions to allow emacs editing of
    text areas.  Pointers?
    -   A: 
-   Q: Why not save text from emacs?
    -   A: 
-   Q: What was the key binding for Linux/Firefox?
    -   A: Ctrl+Shift+h
-   Q: how long have you been in Emacs?
    -   A: 18 months ago full-time


[[!inline pages="internal(2022/info/jupyter-after)" raw="yes"]]

[[!inline pages="internal(2022/info/jupyter-nav)" raw="yes"]]

[[!taglink CategoryOrgMode]]