Emacs日历: show more than 3 months?

标签 emacs

在Emacs中,当您使用M-x calendar显示日历时,您会在一个只有8行高的新窗口中看到三个月的显示-上个月,本月和下个月。

是否可以在全尺寸窗口中生成十二个月的日历?

最佳答案

似乎没有一个简单的方法可以做到这一点。我能够敲出以下代码,它将在单独的框架中连续显示所有十二个月的代码。

(require 'cl)
(require 'calendar)

(defun twelve-month-calendar ()
  (interactive)
  (let ((calendar-buffer (get-buffer-create "12-month calendar"))
        (month 12)
        (year 2012))
    (set-buffer calendar-buffer)
    (setq calendar-frame (make-frame))
    (make-variable-buffer-local 'font-lock-face)
    (set-face-attribute 'default calendar-frame :height 70)
    (set-frame-width calendar-frame 300)
    (erase-buffer)
    (dotimes (i 12)
      (calendar-generate-month month year 0)
      (calendar-increment-month month year -1))
    (calendar-mode)))

您可能需要对其进行一些调整,具体取决于屏幕/字体大小。

关于Emacs日历: show more than 3 months?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9547912/

相关文章:

unicode - 使用 US 布局在 Emacs 中快速输入 unicode

java - 如何在 MAC 上安装 Emacs 的 Java 调试器?

emacs - 在 Emacs ido 模式下更改颜色

Emacs 组织模式 : How to include properties in diary anniversaries?

emacs - EMACS Mumamo/nxhtml模式正在覆盖js文件的js2-模式

emacs - 我怎样才能最好地在 Emacs 中浏览源代码?

c++ - 在 Linux 服务器上编译代码似乎运行方式不同

regex - 用于将 PCRE 正则表达式转换为 emacs 正则表达式的 Elisp 机制

emacs - 在 elisp 中将 nil 更改为零

bash - 单个文件的特殊 Emacs 设置 : Run lisp code at startup from command line