[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[emacs-wiki-discuss] Re: How to print a one-week schedule
From: |
Oursoye |
Subject: |
[emacs-wiki-discuss] Re: How to print a one-week schedule |
Date: |
Wed, 15 Mar 2006 22:07:59 +0000 (UTC) |
User-agent: |
slrn/0.9.8.1 (Debian) |
>
> I have looked into this. calendar-abbrev-length is an addition in CVS
> Emacs. Here is another version modified in much the same way as you
> suggest. Can you check it works; if so, I think I will add it to
> planner-appt.
>
I checked and it works. However, with
'calendar-abbrev-length set to 10 to display full
day names, the display is not
very nice. Here is a function
planner-appt-forthcoming-format
based on yours with a very little
change that adds whitespaces when the day names are too
short.
O.
(defun planner-appt-forthcoming-format (appt-data)
(let ((last-date "")
(empty-cell-p (string-match
(format "\\`[%s]+\\'" muse-regexp-blank)
planner-appt-forthcoming-repeat-date-string))
(day-padding (make-string (1+ calendar-abbrev-length) ?\ )))
(mapconcat #'(lambda (a)
(prog1
(concat
(if (string= (car a) last-date)
(concat
(when planner-appt-forthcoming-show-day-names-flag
day-padding)
(if empty-cell-p
planner-appt-forthcoming-repeat-date-string
(planner-make-link
(car a)
planner-appt-forthcoming-repeat-date-string)))
(concat
(substring (when
planner-appt-forthcoming-show-day-names-flag
(concat
(calendar-day-name
(planner-filename-to-calendar-date
(car a))
;; compatibility:
calendar-abbrev-length)
(make-string calendar-abbrev-length ?\ ))) 0 (+
1 calendar-abbrev-length))
(planner-make-link (car a))))
" | "
;; Remove @s from times to avoid spurious
;; highlighting.
(muse-replace-regexp-in-string
"@\\([ \t]*[0-9]\\)"
" \\1"
(cadr a)))
(setq last-date (car a))))
appt-data "\n")))
- Re: [emacs-wiki-discuss] Re: How to print a one-week schedule, (continued)
- [emacs-wiki-discuss] Re: How to print a one-week schedule, Oursoye, 2006/03/13
- Re: [emacs-wiki-discuss] Re: How to print a one-week schedule, Jim Ottaway, 2006/03/14
- [emacs-wiki-discuss] Re: How to print a one-week schedule, Oursoye, 2006/03/14
- Re: [emacs-wiki-discuss] Re: How to print a one-week schedule, Jim Ottaway, 2006/03/14
- Re: [emacs-wiki-discuss] Re: How to print a one-week schedule, Jim Ottaway, 2006/03/15
- [emacs-wiki-discuss] Re: How to print a one-week schedule, René, 2006/03/15
- [emacs-wiki-discuss] Re: How to print a one-week schedule,
Oursoye <=
- Re: [emacs-wiki-discuss] Re: How to print a one-week schedule, Jim Ottaway, 2006/03/15