More informative notification, assume python when no kernelspec.

Improved notification in the header when the notebook has no associated
kernelspec.

For advanced cell editing assume codecells contain python code when the notebook
has no associated kernelspec.
This commit is contained in:
John Miller 2016-12-14 15:55:18 -06:00
parent d85717bd24
commit f7225a65ba
2 changed files with 5 additions and 3 deletions

View file

@ -151,8 +151,10 @@ previous value."
(concat "*EIN Src " bufname "[ " cell-type " ]*" ))
(defun ein:get-mode-for-kernel (kernelspec)
(cond ((string-match-p "python" (ein:get-kernelspec-language kernelspec)) 'python)
(t 'python)))
(if (null kernelspec)
'python ;; FIXME
(cond ((string-match-p "python" (ein:get-kernelspec-language kernelspec)) 'python)
(t 'python))))
(defun ein:edit-src-continue (e)
(interactive "e")

View file

@ -263,7 +263,7 @@ insert-prev insert-next move-prev move-next)"
'face 'ein:notification-tab-normal)
(propertize (ein:aif (ein:$notebook-kernelspec ein:%notebook%)
(format "|%s|" (ein:$kernelspec-name it))
"|not connected|")
"|unknown: please click and select a kernel|")
'keymap ein:header-line-switch-kernel-map
'help-echo "Click (mouse-1) to change the running kernel."
'mouse-face 'highlight