Я только начал использовать emacs в Windows 7, и это очень нервно. Кажется, не в состоянии сразу же читать или записывать файлы. Когда я пытаюсь сделать это с помощью Cx Cf и записать путь через несколько секунд после запуска, минибуфер дает мне что-то вроде
wrong type argument: stringp, (\, temporary-file-directory)
Но если я подожду пару минут или продолжу попытки, в конце концов я получу файл загруженным.
ЧТО ЗДЕСЬ ПРОИСХОДИТ?!
РЕДАКТИРОВАТЬ:
Это мой файл init.el, Emacs, кажется, работает без него
;; ***My load path***
(cd "x:/PyStuff/")
(setenv "PYTHONPATH" "c:/Python27")
(add-to-list 'load-path "c:/Users/dmvianna/.emacs.d")
;; ***server stuff***
(require 'server)
(when (and (= emacs-major-version 23)
(= emacs-minor-version 1)
(equal window-system 'w32))
;; Suppress error "directory ~/.emacs.d/server is unsafe" on Windows.
(defun server-ensure-safe-dir (dir) "Noop" t))
(condition-case nil
(server-start)
(error
(let* ((server-dir (if server-use-tcp server-auth-dir server-socket-dir)))
(when (and server-use-tcp
(not (file-accessible-directory-p server-dir)))
(display-warning
'server (format "Creating %S" server-dir) :warning)
(make-directory server-dir t)
(server-start))))
)
;; ***Miscellaneous inits***
(setq backup-directory-alist
'((".*" . ,temporary-file-directory)))
(setq auto-save-file-name-transforms
'((".*" ,temporary-file-directory t)))
(setq delete-by-moving-to-trash t)
(setq inhibit-startup-screen t)
(put 'upcase-region 'disabled nil)
(put 'downcase-region 'disabled nil)
;;****Python stuff****
(require 'python-mode)
(add-to-list 'auto-mode-alist '("\\.py\\'" . python-mode))
;; *Python mode fixes*
(defun python-reinstate-current-directory ()
"When running Python, add the current directory ('') to the head of sys.path.
For reasons unexplained, run-python passes arguments to the
interpreter that explicitly remove '' from sys.path. This means
that, for example, using 'python-send-buffer' in a buffer
visiting a module's code will fail to find other modules in the
same directory.
Adding this function to 'inferior-python-mode-hook' reinstates
the current directory in Python's search path."
(python-send-string "sys.path[0:0] = ['']"))
(add-hook 'inferior-python-mode-hook 'python-reinstate-current-directory)
;;*End Python mode fixes*
(require 'lambda-mode)
(add-hook 'python-mode-hook #'lambda-mode 1)
(require 'ipython)
(require 'anything) (require 'anything-ipython)
(when (require 'anything-show-completion nil t)
(use-anything-show-completion 'anything-ipython-complete
'(length initial-pattern)))
(add-hook 'python-mode-hook #'(lambda ()
(define-key py-mode-map (kbd "M-<tab>") 'anything-ipython-complete)))
(add-hook 'ipython-shell-hook #'(lambda ()
(define-key py-mode-map (kbd "M-<tab>") 'anything-ipython-complete)))
(require 'comint)
(define-key comint-mode-map (kbd "M-") 'comint-next-input)
(define-key comint-mode-map (kbd "M-") 'comint-previous-input)
(define-key comint-mode-map [down] 'comint-next-matching-input-from-input)
(define-key comint-mode-map [up] 'comint-previous-matching-input-from-input)
(require 'python-pep8)
(require 'python-pylint)
(add-hook 'before-save-hook 'delete-trailing-whitespace)
(provide 'emacs-init)