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 122 forks source link

automatic login #816

Closed xiaohan2012 closed 3 years ago

xiaohan2012 commented 3 years ago

Hi,

I have a jupyter notebook server running in the background.

When I use ein, I need to login everytime my emacs starts.

How can I ask ein to automatically login or at least ask me to login whenever I start using ein?

I'm not very familiar with Emacs and ein; any patience will be much appreciated!

dickmao commented 3 years ago
(defun ein:auto-login (url-or-port password)
  (ein:login url-or-port (lambda (buffer _) (pop-to-buffer buffer))
             nil nil password))
(ein:auto-login "8888" "detachment2702")