2

I am new to emacs. I have a visual impairment which necessitates the use of very large font: (set-face-attribute 'default nil :height 700). When I open calendar, the third month flows to the next set of lines and meshes with the first month, making it useless.

Is it possible to display only two months (current and next), or even just show a single month?

  • Calfw can fill up the entire screen or window with one (1) calendar month: github.com/kiwanami/emacs-calfw – lawlist Dec 7 '15 at 19:01
  • If you are really interested in a 1-month or 2-month mini-calendar, then you'll need to invest the time to create custom calculations for moving the cursor to a particular date so that holidays / birthdays / appointments are properly placed. stackoverflow.com/q/9547912/2112489 – lawlist Dec 7 '15 at 19:03
  • @lawlist: thanks for pointing out calfw. I've never used it, but it looks helpful. Any chance you could add that as another answer? – Dan Dec 8 '15 at 17:20
  • @Dan -- to do it justice, I would need to spend some time on an answer and include pictures -- I'll mark this thread and come back to it. I have made several bug-fixes and enhancements, including support for birthdays -- however, the author never responded: github.com/kiwanami/emacs-calfw/issues/61 Not all of my enhancements are present in Github issue number 61, but most of them are included there. For example, I added sunrise/sunset to the upper right-hand corner of each day based on the framework that existed out-of-the-box. One or two additional bug fixes are also missing. – lawlist Dec 8 '15 at 17:38
1

Unfortunately, you can only display the 3-month calendar with the built-in calendar-mode.

However, a work-around that I use is to enable line truncation so that the extra months flow out of sight across the screen rather than wrap into the next line.

You can add the following to your init file to get that effect:

(defun my-calendar-hook ()
  "Turn line truncation on."
  (toggle-truncate-lines 1))

(add-hook 'calendar-mode-hook #'my-calendar-hook)

If you would like the current month to be on the left, you can instruct Emacs to scroll one month over when it opens the initial window. The function in question is calendar-scroll-left.

To get it to run automatically, you need to add it to the relevant hook, so put the following in your init file:

(add-hook 'calendar-initial-window-hook #'calendar-scroll-left)
| improve this answer | |
  • This worked! Thank you so much for your help. One more question for you on this approach -- right now, it shows only the previous month and the current month (and then next month goes onto the next page, which is fine. Is it possible for this to default to the current month on the left, next month on the center and next next month going onto the next page? – Karthik Dec 8 '15 at 5:21
  • 1
    @Karthik: I edited the post to address how to get the current month on the left. – Dan Dec 8 '15 at 12:13
  • @Dan this was incredibly helpful -- thank you for your time and help! – Karthik Dec 8 '15 at 12:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.