mirror of
https://github.com/vale981/emacs-ipython-notebook
synced 2025-03-05 09:01:40 -05:00
Cleaning up status messages
Corrected error in response code checking when saving a network (IPython server now returns 200 instead of 204). Cleaned up error that was being raised from EIN's notification system. Seems like there is some logic for popping to a buffer once a notification event first, but to what buffer is unclear so for know I have disabled that functionality.
This commit is contained in:
parent
66a035cfe5
commit
b9e145c4db
3 changed files with 9 additions and 5 deletions
|
@ -651,7 +651,8 @@ of NOTEBOOK."
|
|||
;; accessed via PUT or DELETE. As it seems Emacs failed to
|
||||
;; choose PUT method every two times, let's check the response
|
||||
;; here and fail when 204 is not returned.
|
||||
(unless (eq response-status 204)
|
||||
;; UPDATE 12Sep2014 (JMM) - IPython server now returns 200 on successful save.
|
||||
(unless (eq response-status 200)
|
||||
(with-current-buffer (ein:notebook-buffer notebook)
|
||||
(if (< retry ein:notebook-save-retry-max)
|
||||
(progn
|
||||
|
@ -660,7 +661,7 @@ of NOTEBOOK."
|
|||
callback cbarg))
|
||||
(ein:notebook-save-notebook-error notebook :status status)
|
||||
(ein:log 'info
|
||||
"Status code (=%s) is not 204 and retry exceeds limit (=%s)."
|
||||
"Status code (=%s) is not 200 and retry exceeds limit (=%s)."
|
||||
response-status ein:notebook-save-retry-max)))))
|
||||
|
||||
(defun ein:notebook-save-notebook-success (notebook &rest ignore)
|
||||
|
|
|
@ -52,7 +52,7 @@ is opened at first time.::
|
|||
`ein:$notebooklist-url-or-port'
|
||||
URL or port of IPython server.
|
||||
|
||||
`ein:$notbooklist-url-or-port'
|
||||
`ein:$notbooklist-path'
|
||||
The path for the notebooklist.
|
||||
|
||||
`ein:$notebooklist-data'
|
||||
|
@ -142,6 +142,7 @@ To suppress popup, you can pass a function `ein:do-nothing' as CALLBACK."
|
|||
"Open notebook list buffer."
|
||||
(interactive (list (ein:notebooklist-ask-url-or-port)))
|
||||
(unless url-or-port (setq url-or-port (ein:default-url-or-port)))
|
||||
(unless path (setq path ""))
|
||||
(ein:subpackages-load)
|
||||
(let ((success
|
||||
(if no-popup
|
||||
|
@ -311,6 +312,7 @@ Notebook list data is passed via the buffer local variable
|
|||
(remove-overlays)
|
||||
;; Create notebook list
|
||||
(widget-insert "IPython Notebook list\n\n")
|
||||
(widget-insert " | " (ein:$notebooklist-path ein:%notebooklist%) " |\n")
|
||||
(widget-create
|
||||
'link
|
||||
:notify (lambda (&rest ignore) (ein:notebooklist-new-notebook))
|
||||
|
|
|
@ -161,8 +161,9 @@ where NS is `:kernel' or `:notebook' slot of NOTIFICATION."
|
|||
(lambda (ns message status next)
|
||||
(when (equal (oref ns :status) status)
|
||||
(ein:notification-status-set ns next)
|
||||
(ein:with-live-buffer (oref ns :buffer)
|
||||
(force-mode-line-update))))
|
||||
;; (ein:with-live-buffer (oref ns :buffer)
|
||||
;; (force-mode-line-update))
|
||||
))
|
||||
packed)))
|
||||
|
||||
(defun ein:notification-setup (buffer events &rest tab-slots)
|
||||
|
|
Loading…
Add table
Reference in a new issue