mirror of
https://github.com/vale981/emacs-ipython-notebook
synced 2025-03-04 16:51:38 -05:00
ecukes clear kernel connect message
This commit is contained in:
parent
53ab1c34f3
commit
a0943af912
3 changed files with 9 additions and 6 deletions
|
@ -118,5 +118,5 @@ Scenario: Test ein:on-kernel-connect-functions abnormal hooks
|
|||
Given I set the kernel connect message
|
||||
Given new python notebook
|
||||
And I wait for the smoke to clear
|
||||
And I switch to buffer "*Messages*"
|
||||
Then I should see "Hello ein."
|
||||
Then I should see message "Hello ein"
|
||||
And I clear the kernel connect message
|
||||
|
|
|
@ -2,9 +2,12 @@
|
|||
(lambda ()
|
||||
(insert-char 37)))
|
||||
|
||||
(When "^I set the kernel connect message$"
|
||||
(lambda ()
|
||||
(add-to-list 'ein:on-kernel-connect-functions #'(lambda (_) (message "Hello ein.")))))
|
||||
(When "^I \\(set\\|clear\\) the kernel connect message$"
|
||||
(lambda (which)
|
||||
(if (string= which "clear")
|
||||
(setq ein:on-kernel-connect-functions nil)
|
||||
(add-to-list 'ein:on-kernel-connect-functions
|
||||
(apply-partially #'message "Hello ein")))))
|
||||
|
||||
(When "^I type session port \\([0-9]+\\)$"
|
||||
(lambda (port)
|
||||
|
|
|
@ -299,7 +299,7 @@ See https://github.com/ipython/ipython/pull/3307"
|
|||
(let* ((websocket (websocket-client-data ws))
|
||||
(kernel (ein:$websocket-kernel websocket)))
|
||||
(when (ein:kernel-live-p kernel)
|
||||
(ein:log 'verbose "ein:start-single-websocket: Running on-connect abnormal hooks.")
|
||||
(ein:log 'debug "ein:start-single-websocket: Running on-connect abnormal hooks.")
|
||||
(run-hook-with-args 'ein:on-kernel-connect-functions kernel)
|
||||
(when cb
|
||||
(funcall cb kernel)))
|
||||
|
|
Loading…
Add table
Reference in a new issue