0

I'm using Windows 10, Emacs 26.1, IPython 7.2.0, and ein 20190228.2008. C-x C-s gives the error: ein: [info] Failed to save notebook! . I'm able to save the files through the web interface.

As per #175, I tried changing the permissions of the files, but I can't chmod ug=rw files on Windows

Steps to reproduce the problem

  1. Open Anaconda Prompt
  2. run activate py37
  3. From within the prompt, I launch Emacs
  4. C-x C-f <the notebook>
  5. C-c C-o and click open in the relevant directory
  6. Make changes and then C-x C-s

My configuration (emacs.d/init.el)

;; package
(require 'package)
(add-to-list 'package-archives
         '("melpa" . "http://melpa.milkbox.net/packages/") t)
(add-to-list 'package-archives
         '("marmalade" . "http://marmalade-repo.org/packages/"))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(let* ((no-ssl (and (memq system-type '(windows-nt ms-dos))
                    (not (gnutls-available-p))))
       (proto (if no-ssl "http" "https")))
  (when no-ssl
    (warn "\
Your version of Emacs does not support SSL connections,
which is unsafe because it allows man-in-the-middle attacks.
There are two things you can do about this warning:
1. Install an Emacs version that does support SSL and be safe.
2. Remove this warning from your init file so you won't see it again."))
  ;; Comment/uncomment these two lines to enable/disable MELPA and MELPA Stable as desired
  (add-to-list 'package-archives (cons "melpa" (concat proto "://melpa.org/packages/")) t)
  ;;(add-to-list 'package-archives (cons "melpa-stable" (concat proto "://stable.melpa.org/packages/")) t)
  (when (< emacs-major-version 24)
    ;; For important compatibility libraries like cl-lib
    (add-to-list 'package-archives (cons "gnu" (concat proto "://elpa.gnu.org/packages/")))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(package-initialize)

(custom-set-variables
 ;; custom-set-variables was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 '(package-selected-packages
   (quote
    (package+ markdown-mode+ requirejs smartrep python-mode markdown-mode ipython-shell-send jupyter request-deferred tornado-template-mode ipython ein))))
(custom-set-faces
 ;; custom-set-faces was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 )


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(require 'ein)
(require 'ein-notebook)
(require 'ein-subpackages)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;; (defun ipython ()
;;     (interactive)
;;     (term "/usr/bin/ipython"))

System info:

("EIN system info"
 :emacs-version "GNU Emacs 26.1 (build 1, x86_64-w64-mingw32)
 of 2018-05-30"
 :emacs-bzr-version "07f8f9bc5a51f5aa94eb099f3e15fbe0c20ea1ea"
 :window-system w32
 :emacs-variant nil
 :os
 (:uname nil
     :lsb-release nil)
 :image-types
 (svg png gif tiff jpeg xpm xbm pbm)
 :image-types-available
 (svg png gif tiff jpeg xpm xbm pbm)
 :request
 (:backend curl)
 :ein
 (:version "0.15.0-20190222.1528"
       :source-dir "c:/Users/digby/AppData/Roaming/.emacs.d/elpa/ein-20190222.1528/")
 :lib
 ((:name "websocket"
     :path "~/.emacs.d/elpa/websocket-20180423.16/websocket.elc"
     :featurep t
     :version-var websocket-version
     :version "1.9")
  (:name "request"
     :path "~/.emacs.d/elpa/request-20181129.1138/request.elc"
     :featurep t
     :version-var request-version
     :version "0.3.0")
  (:name "auto-complete"
     :path "~/.emacs.d/elpa/auto-complete-20170125.245/auto-complete.elc"
     :featurep t
     :version-var nil
     :version nil)
  (:name "popup"
     :path "~/.emacs.d/elpa/popup-20160709.1429/popup.elc"
     :featurep t
     :version-var popup-version
     :version "0.5.3")
  (:name "python"
     :path
     "c:/Users/digby/MyEmacsInstallation/share/emacs/26.1/lisp/progmodes/python.elc"
     :featurep t
     :version-var nil
     :version nil)
  (:name "python-mode"
     :path "~/.emacs.d/elpa/python-mode-20181223.1933/python-mode.elc"
     :featurep nil
     :version-var nil
     :version nil)
  (:name "markdown-mode"
     :path "~/.emacs.d/elpa/markdown-mode-20181229.1430/markdown-mode.elc"
     :featurep t
     :version-var markdown-mode-version
     :version "2.4-dev")
  (:name "smartrep"
     :path "~/.emacs.d/elpa/smartrep-20150509.230/smartrep.elc"
     :featurep nil
     :version-var nil
     :version nil)))

Note: This issue is also posted on emacs-ipython-notebook github, but haven't had any luck.

  • I think this is an MS Windows limitation, but someone may correct me. – Drew Mar 6 at 15:58
  • That sucks. I don't know how the OS works and (more critically) what is the issue (permission related?). But, given that the notebook gets saved in the browser, I assume it should be "possible" to be saved via emacs too. Right? – troisquatre Mar 7 at 17:46
  • 1. I'm no expert on this. 2. I meant only that file/directory permissions are different on Windows, and I don't think you can control things for "group", etc. 3. Hopefully someone will give you a real (useful) answer. Don't put too much stock in what I've said here. – Drew Mar 7 at 18:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.