millejoh / emacs-ipython-notebook

Jupyter notebook client in Emacs
http://millejoh.github.io/emacs-ipython-notebook/
GNU General Public License v3.0
1.47k stars 123 forks source link

make opening .ipynb files instaneous #873

Open danielkrajnik opened 1 year ago

danielkrajnik commented 1 year ago

Opening .ipynb files should get you straight away to the rendered notebook. No steps in-between. No manual server starting. No buffer switching. Just open file = open notebook.

There is no point for the user to start server and switch buffer - vscode jupyter extension gets you directly to the notebook... why would you make it so complicated to the users?

It's such a bad idea, please can we change it?

dickmao commented 1 year ago

It's such a bad idea, please can we change it?

tl;dr

(add-hook 'ein:ipynb-mode-hook
          (lambda ()
            (cl-letf (((symbol-function 'read-directory-name)
                       (lambda (_prompt dir &rest _args) dir)))
              (ein:process-find-file-callback))))

29 out of 30 people would agree with you, which is why roughly that ratio of the computing public uses vscode.

The exception is someone with a strong UNIX background who would find your presumption about skipping steps distasteful.

That person would also find distasteful the entire premise of a json format impervious to version control that also requires rendering by an additional moving part of a server or viewer.

This is not an endorsement of org-babel which I also find obtuse. For whatever reason, it's not cool anymore to just write a python script.

In my defence, I first encountered jupyter notebooks during graduate school before I knew what git was.

danielkrajnik commented 1 year ago

Fuck it, I give up. ein is a mess