* [PATCH] Bug on calendar (was: The copyright issue)
@ 2010-08-09 6:16 MON KEY
2010-08-09 8:52 ` Andreas Schwab
0 siblings, 1 reply; 3+ messages in thread
From: MON KEY @ 2010-08-09 6:16 UTC (permalink / raw)
To: ofv; +Cc: emacs-devel
>> This will achieve results faster than waiting till the end of the
>> world which is by the way coming very soon according to many
>> calenders.
>
> emacs -Q
>
> M-x calendar ENTER
>
> Under the "Goto" menu I see "End of week", "End of month", "End of
> year" but not "End of the world"
>
> This is a serious omission that makes Emacs calendar look bad compared
> to many other calendars.
>
> Is anyone working on a patch? Also please don't accept diary entries
> for dates after the end of the world.
Here you go.
New function proposed for calendar `calendar-goto-doomsday'
;;; ==============================
;;; :CREATED <Timestamp: #{2010-08-08T18:59:25-04:00Z}#{10317} - by MON>
(defun calendar-goto-doomsday ()
"Reposition the calendar window to next known doomsday and warn of
pending doom."
(interactive)
(let* ((cnt-dwn (format-seconds "%Y %D %H %M and %S"
(1- most-positive-fixnum)))
(cnt-from (format-time-string
"%B %d, day %j \(a %A\) in week %U of %Y"))
(w-buffer "*Warning-Doomsday-Pending*")
(tm-left (format-seconds "%y" (1- most-positive-fixnum)))
(w-type '(Husserlian-Temporal-Disconnect . alarm))
(warning-minimum-level (cdr (assq (cdr w-type) warning-level-aliases)))
(warning-prefix-function
#'(lambda (lvl lvl-inf)
(list lvl "DOOMSDAY-ALERT!%s:"
#'(lambda ()
(font-lock-fontify-buffer)
(save-excursion
(goto-char (buffer-end 0))
(when
(add-text-properties
(point)
(or (and (search-forward-regexp
"DOOMSDAY-ALERT!"
(line-end-position) t)
(point))
(point))
'(face font-lock-warning-face fontified t))
(add-text-properties
(progn (forward-char 2) (point))
(or (and (> (skip-chars-forward "^:")
0)(1- (point)))
(point))
'(face font-lock-preprocessor-face
fontified t))))))))
(warning-fill-prefix (concat "\n" (make-string 17 32)))
(w-msg (concat warning-fill-prefix
"By Emacs' best calculations (all 29 bits worth),"
warning-fill-prefix
"passage of time will cease in approximately:"
warning-fill-prefix cnt-dwn " from now."
warning-fill-prefix "Today is " cnt-from "..."
warning-fill-prefix
"Pragmatists should now take a moment to update their "
tm-left " year plan."))
warning-suppress-types
warning-suppress-log-types
warning-series)
(with-current-buffer (get-buffer-create w-buffer)
(erase-buffer)
(display-warning (car w-type) w-msg (cdr w-type) w-buffer))
"Danger! Danger!"))
;;
;; (calendar-goto-doomsday)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Bug on calendar (was: The copyright issue)
2010-08-09 6:16 [PATCH] Bug on calendar (was: The copyright issue) MON KEY
@ 2010-08-09 8:52 ` Andreas Schwab
2010-08-09 14:38 ` MON KEY
0 siblings, 1 reply; 3+ messages in thread
From: Andreas Schwab @ 2010-08-09 8:52 UTC (permalink / raw)
To: MON KEY; +Cc: ofv, emacs-devel
MON KEY <monkey@sandpframing.com> writes:
> (defun calendar-goto-doomsday ()
> "Reposition the calendar window to next known doomsday and warn of
The first line of the doc string should be a complete sentence.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Bug on calendar (was: The copyright issue)
2010-08-09 8:52 ` Andreas Schwab
@ 2010-08-09 14:38 ` MON KEY
0 siblings, 0 replies; 3+ messages in thread
From: MON KEY @ 2010-08-09 14:38 UTC (permalink / raw)
To: Andreas Schwab; +Cc: ofv, emacs-devel
On Mon, Aug 9, 2010 at 4:52 AM, Andreas Schwab <schwab@linux-m68k.org> wrote:
> MON KEY <monkey@sandpframing.com> writes:
>
>> (defun calendar-goto-doomsday ()
>> "Reposition the calendar window to next known doomsday and warn of
>
> The first line of the doc string should be a complete sentence.
>
OK. Revised docstring:
"Reposition calendar window to next known doomsday and warn of pending doom."
> Andreas.
--
/s_P\
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-08-09 14:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-09 6:16 [PATCH] Bug on calendar (was: The copyright issue) MON KEY
2010-08-09 8:52 ` Andreas Schwab
2010-08-09 14:38 ` MON KEY
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.