mirror of
https://github.com/vale981/emacs-ipython-notebook
synced 2025-03-06 09:31:39 -05:00
Add ein:notebook-open-in-browser command
This commit is contained in:
parent
ce193c1421
commit
429b97706d
1 changed files with 8 additions and 0 deletions
|
@ -917,6 +917,14 @@ NAME is any non-empty string that does not contain '/' or '\\'."
|
|||
;; `ein:notebook-mode-map' is changed.
|
||||
(setcdr ein:notebook-plain-mode-map (cdr ein:notebook-mode-map))
|
||||
|
||||
(defun ein:notebook-open-in-browser ()
|
||||
"Open current notebook in web browser."
|
||||
(interactive)
|
||||
(let ((url (ein:url (ein:$notebook-url-or-port ein:notebook)
|
||||
(ein:$notebook-notebook-id ein:notebook))))
|
||||
(message "Opening %s in browser" url)
|
||||
(browse-url url)))
|
||||
|
||||
(defun ein:notebook-ask-before-kill ()
|
||||
"Return `nil' to prevent killing the notebook buffer.
|
||||
Called via `kill-buffer-query-functions'."
|
||||
|
|
Loading…
Add table
Reference in a new issue