I tried to set up the Emacs standard session engine using simple recipe. In general the directories can have Cyrillic names. The problem is the session saved in a wrong coding system. This is the header of .emacs.desktop
:
;; -*- mode: emacs-lisp; coding: emacs-mule; -*-
It turned out that exactly this string is hardcoded in desktop.el
. I also added this into my ~/.emacs
but the coding is still wrong:
(prefer-coding-system 'utf-8)
(set-language-environment 'utf-8)
(set-terminal-coding-system 'utf-8)
(set-selection-coding-system 'utf-8)
(set-keyboard-coding-system 'utf-8-unix)
(setq-default coding-system-for-read 'utf-8
coding-system-for-write 'utf-8
file-name-coding-system 'utf-8
default-buffer-file-coding-system 'utf-8)
I even tried to hardcode utf-8 into the local copy of desktop.el
, but this doesn't help. Maybe some hooks before the save/load procedure can be used?