mirror of
https://github.com/vale981/emacs-ipython-notebook
synced 2025-03-06 01:21:38 -05:00
Fix ein:notebook-save-notebook-success
:dirty slot in worksheet was not set after saving notebook.
This commit is contained in:
parent
d3bf631204
commit
eb5662e9c9
2 changed files with 7 additions and 2 deletions
|
@ -557,8 +557,8 @@ This is equivalent to do ``C-c`` in the console program."
|
|||
(defun ein:notebook-save-notebook-success (notebook &rest ignore)
|
||||
(ein:log 'info "Notebook is saved.")
|
||||
(setf (ein:$notebook-dirty notebook) nil)
|
||||
(with-current-buffer (ein:notebook-buffer notebook)
|
||||
(set-buffer-modified-p nil))
|
||||
(mapc (lambda (ws) (ein:worksheet-set-modified-p ws nil))
|
||||
(ein:$notebook-worksheets notebook))
|
||||
(ein:events-trigger (ein:$notebook-events notebook)
|
||||
'notebook_saved.Notebook))
|
||||
|
||||
|
|
|
@ -125,6 +125,11 @@
|
|||
(ein:with-live-buffer (ein:worksheet-buffer)
|
||||
(rename-buffer (ein:worksheet--buffer-name ws))))
|
||||
|
||||
(defmethod ein:worksheet-set-modified-p ((ws ein:worksheet) dirty)
|
||||
(ein:with-live-buffer (ein:worksheet-buffer ws)
|
||||
(set-buffer-modified-p dirty))
|
||||
(oset ws :dirty dirty))
|
||||
|
||||
(defmethod ein:worksheet-render ((ws ein:worksheet))
|
||||
(with-current-buffer (ein:worksheet--get-buffer ws)
|
||||
(setq ein:%worksheet% ws)
|
||||
|
|
Loading…
Add table
Reference in a new issue