Skip to content

win10 下 emacs org-mode agenda时间乱码 问题

这两天开始使用emacs,新手入门当然免不了诸多的问题.
在了解了org-mode的个人计划管理之后.准备上手使用.
但是在使用的过程中,发现添加开始日期的时候 SCHEDULED 的星期几 显示的是转义符.

跟这个情况比较相似:
https://emacs-china.org/t/org-mode-agenda-learn-emacs-in-21-days-day-6/2780

(set-terminal-coding-system ‘gb18030)
(set-keyboard-coding-system ‘gb18030)
(set-selection-coding-system ‘gb18030)
(setq locale-coding-system ‘gb18030)

(prefer-coding-system ‘gb18030)
(prefer-coding-system ‘gb18030)

但是上面的方式会修改编码,本身我是跨平台使用,习惯了UTF-8的格式.

最后在init.el中添加

改变emacs的区域设置

(add-hook ‘org-mode-hook
(lambda ()
(set (make-local-variable ‘system-time-locale) “C”)))

system-time-locale的取值,在windows下,可以通过M-x w32-list-locales查看,C区域设置是C语言程序进入时的区域设置,是标准的美国区域设置。

这样出来时间就是英文显示了。

发表评论

电子邮件地址不会被公开。 必填项已用*标注