Emacs日历:显示超过3个月? [英] Emacs calendar: show more than 3 months?
本文介绍了Emacs日历:显示超过3个月?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在Emacs中,当您以 Mx日历
显示日历时,您将获得三个月的展示 - 上个月,本月和下个月 - 在新窗口中这只是8行高。
In Emacs, when you display the calendar with M-x calendar
, you get a three-month display – last month, this month, and next month – in a new window that's just 8 lines tall.
是否可以在全尺寸窗口中生成十二个月的日历?
Is it possible to generate a twelve-month calendar in a full-size window?
推荐答案
似乎没有一个简单的方法来做到这一点。我能够敲下以下代码,这个代码将在一个单独的框架中连续显示所有的十二个月。
There doesn't seem to be an easy way to do this. I was able to knock up the following code, which will show all twelve months, in a row, in a separate frame.
(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)))
根据您的屏幕/字体大小,您可能需要调整一下。
You might need to tweak it a bit, depending on your screen/font size.
这篇关于Emacs日历:显示超过3个月?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文