Comments (6)
Thanks for the report. Yes, I noticed the problem. I think this is because python.el and MuMaMo do not work well in this particular situation. I just type C-o
before hitting Tab to avoid this problem. It's lame, but I don't know what is the best way to solve this problem.
from emacs-ipython-notebook.
BTW, you are using Fabián E. Gallina's python.el, right? I am using it, so I don't know if it happens in other python modes.
from emacs-ipython-notebook.
Nope, I am using the vanilla python.el that ships with Emacs. (Although it looks like Gallina's version has just been merged into Emacs trunk, so I will be getting it sooner or later.)
Anyway, the trouble with that workaround is that it breaks my muscle memory. :)
But you've done a great job with the project. I've been hoping for a while that someone would take advantage of IPython's new client-server architecture to make a good Emacs client. Thanks for your hard work!
from emacs-ipython-notebook.
OK, I got a super dirty solution!
(defadvice mumamo-indent-line-function
(around ein-workaround-mumamo-indent-line-function activate)
(let (m)
(unwind-protect
(progn
(insert "\n")
(setq m (point-marker))
(backward-char)
ad-do-it)
(save-excursion
(goto-char m)
(backward-char)
(delete-char 1)))))
I will put this in my Emacs init.el for a while and see if it works properly. If it is an OK-solution, I will probably put in EIN and make it possible to optionally enable (or disable).
Yea, I really like IPython's client-server architecture. What is nice about it is that you can share server program with Vim guys. :) I hope many other program languages follow this way.
from emacs-ipython-notebook.
A bit better version:
(defadvice mumamo-indent-line-function
(around ein-workaround-mumamo-indent-line-function activate)
"Workaround the indentation problem when the cursor is at the
end of input area."
(if (and (looking-at-p "\n")
(get-char-property (point) 'read-only))
(let (m)
;; The cursor is at the end of input area.
;; Indentation does not work as-is. Here is the workaround:
(unwind-protect
(progn
(insert "\n")
(setq m (point-marker))
(backward-char)
ad-do-it)
(save-excursion
(goto-char m)
(backward-char)
(delete-char 1))))
ad-do-it))
from emacs-ipython-notebook.
I added the above workaround code in master.
http://tkf.github.com/emacs-ipython-notebook/#ein:use-mumamo-indent-line-function-workaround
If you are using the above code, you can remove it after updating EIN.
from emacs-ipython-notebook.
Related Issues (20)
- Remote-server docker-container Jupyter HOT 1
- Have not been able to save notebooks: "Wrong type argument: arrayp, nil" HOT 5
- EIN causes org-capture to stall HOT 1
- ipython-notebook layer does not show inline plots HOT 6
- Huge error message when worksheet contains plots
- Jupyter seems to only print out the last out of all cells HOT 4
- Feature request: Change notebook kernel interactively HOT 1
- Can not open notebook from notebook list HOT 1
- ein: [error] Content list call failed with status error. HOT 2
- No axes in inline pyplots HOT 2
- restart and execute all
- void-function: (Emacs-list-mode
- The actively maintained repo is at https://github.com/millejoh/emacs-ipython-notebook
- ipythonNotebook vs SCIMAX
- ein: [info] Failed to save notebook HOT 7
- Installing 20190703.1230 fails
- Google results for "emacs jupyter"
- 20210216.1627 does not work, 403 error on ein:run HOT 2
- https://github.com/millejoh/emacs-ipython-notebook/ is the official repo, archive this one
- [Feature Request] Is there a way to exporte the notebook as emacs-org or generate a notebook from org file? 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 emacs-ipython-notebook.