Mercurial > emacs
comparison lisp/gnus/gnus-diary.el @ 77680:61b19e0bfa5e
Remove the description comment (nndiary is now properly documented in the Gnus
manual). Fix the spelling of "Back End".
author | Reiner Steib <Reiner.Steib@gmx.de> |
---|---|
date | Thu, 10 May 2007 18:44:49 +0000 |
parents | e3694f1cb928 |
children | 0286c7ebd081 |
comparison
equal
deleted
inserted
replaced
77679:a48d35b7189f | 77680:61b19e0bfa5e |
---|---|
1 ;;; gnus-diary.el --- Wrapper around the NNDiary Gnus backend | 1 ;;; gnus-diary.el --- Wrapper around the NNDiary Gnus back end |
2 | 2 |
3 ;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, | 3 ;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, |
4 ;; 2006, 2007 Free Software Foundation, Inc. | 4 ;; 2006, 2007 Free Software Foundation, Inc. |
5 | 5 |
6 ;; Author: Didier Verna <didier@xemacs.org> | 6 ;; Author: Didier Verna <didier@xemacs.org> |
31 ;; Contents management by FCM version 0.1. | 31 ;; Contents management by FCM version 0.1. |
32 | 32 |
33 ;; Description: | 33 ;; Description: |
34 ;; =========== | 34 ;; =========== |
35 | 35 |
36 ;; Gnus-Diary is a wrapper around the NNDiary Gnus backend. It is here to | 36 ;; gnus-diary is a utility toolkit used on top of the nndiary back end. It is |
37 ;; make your nndiary-user life easier in different ways. So, you don't have | 37 ;; now fully documented in the Gnus manual. |
38 ;; to use it if you don't want to. But, really, you should. | |
39 | |
40 ;; Gnus-Diary offers the following features on top of the NNDiary backend: | |
41 | |
42 ;; - A nice summary line format: | |
43 ;; Displaying diary messages in standard summary line format (usually | |
44 ;; something like "<From Joe>: <Subject>") is pretty useless. Most of the | |
45 ;; time, you're the one who wrote the message, and you mostly want to see | |
46 ;; the event's date. Gnus-Diary offers you a nice summary line format | |
47 ;; which will do this. By default, a summary line will appear like this: | |
48 ;; | |
49 ;; <Event Date>: <Subject> <Remaining time> | |
50 ;; | |
51 ;; for example, here's how Joe's birthday is displayed in my | |
52 ;; "nndiary:birhdays" summary buffer (the message is expirable, but will | |
53 ;; never be deleted, as it specifies a regular event): | |
54 ;; | |
55 ;; E Sat, Sep 22 01, 12:00: Joe's birthday (in 6 months, 1 week) | |
56 | |
57 ;; - More article sorting functions: | |
58 ;; Gnus-Diary adds a new sorting function called | |
59 ;; `gnus-summary-sort-by-schedule'. This function lets you organize your | |
60 ;; diary summary buffers from the closest event to the farthest one. | |
61 | |
62 ;; - Automatic generation of diary group parameters: | |
63 ;; When you create a new diary group, or visit one, Gnus-Diary checks your | |
64 ;; group parameters, and if needed, sets the summary line format to the | |
65 ;; diary-specific value, adds the diary-specific sorting functions, and | |
66 ;; also adds the different `X-Diary-*' headers to the group's | |
67 ;; posting-style. It is then easier to send a diary message, because if | |
68 ;; you use `C-u a' or `C-u m' on a diary group to prepare a message, these | |
69 ;; headers will be inserted automatically (but not filled with proper | |
70 ;; values yet). | |
71 | |
72 ;; - An interactive mail-to-diary convertion function: | |
73 ;; The function `gnus-diary-check-message' ensures that the current message | |
74 ;; contains all the required diary headers, and prompts you for values / | |
75 ;; correction if needed. This function is hooked in the nndiary backend so | |
76 ;; that moving an article to an nndiary group will trigger it | |
77 ;; automatically. It is also bound to `C-c D c' in message-mode and | |
78 ;; article-edit-mode in order to ease the process of converting a usual | |
79 ;; mail to a diary one. This function takes a prefix argument which will | |
80 ;; force prompting of all diary headers, regardless of their | |
81 ;; presence/validity. That way, you can very easily reschedule a diary | |
82 ;; message for instance. | |
83 | |
84 | |
85 ;; Usage: | |
86 ;; ===== | |
87 | |
88 ;; 0/ Don't use any `gnus-user-format-function-[d|D]'. Gnus-Diary provides | |
89 ;; both of these (sorry if you used them before). | |
90 ;; 1/ Add '(require 'gnus-diary) to your gnusrc file. | |
91 ;; 2/ Customize your gnus-diary options to suit your needs. | |
92 | |
93 | 38 |
94 | 39 |
95 ;; Bugs / Todo: | 40 ;; Bugs / Todo: |
96 ;; =========== | 41 ;; =========== |
97 | 42 |
101 (require 'nndiary) | 46 (require 'nndiary) |
102 (require 'message) | 47 (require 'message) |
103 (require 'gnus-art) | 48 (require 'gnus-art) |
104 | 49 |
105 (defgroup gnus-diary nil | 50 (defgroup gnus-diary nil |
106 "Utilities on top of the nndiary backend for Gnus." | 51 "Utilities on top of the nndiary back end for Gnus." |
107 :version "22.1" | 52 :version "22.1" |
108 :group 'gnus) | 53 :group 'gnus) |
109 | 54 |
110 (defcustom gnus-diary-summary-line-format "%U%R%z %uD: %(%s%) (%ud)\n" | 55 (defcustom gnus-diary-summary-line-format "%U%R%z %uD: %(%s%) (%ud)\n" |
111 "*Summary line format for nndiary groups." | 56 "*Summary line format for nndiary groups." |
134 (const :tag "french" gnus-diary-delay-format-french) | 79 (const :tag "french" gnus-diary-delay-format-french) |
135 (symbol :tag "other")) | 80 (symbol :tag "other")) |
136 :group 'gnus-diary) | 81 :group 'gnus-diary) |
137 | 82 |
138 (defconst gnus-diary-version nndiary-version | 83 (defconst gnus-diary-version nndiary-version |
139 "Current Diary backend version.") | 84 "Current Diary back end version.") |
140 | 85 |
141 | 86 |
142 ;; Compatibility functions ================================================== | 87 ;; Compatibility functions ================================================== |
143 | 88 |
144 (eval-and-compile | 89 (eval-and-compile |
332 (list | 277 (list |
333 'gnus-thread-sort-by-schedule))))) | 278 'gnus-thread-sort-by-schedule))))) |
334 )) | 279 )) |
335 | 280 |
336 ;; Called when a group is subscribed. This is needed because groups created | 281 ;; Called when a group is subscribed. This is needed because groups created |
337 ;; because of mail splitting are *not* created with the backend function. | 282 ;; because of mail splitting are *not* created with the back end function. |
338 ;; Thus, `nndiary-request-create-group-hooks' is inoperative. | 283 ;; Thus, `nndiary-request-create-group-hooks' is inoperative. |
339 (defun gnus-diary-maybe-update-group-parameters (group) | 284 (defun gnus-diary-maybe-update-group-parameters (group) |
340 (when (eq (car (gnus-find-method-for-group group)) 'nndiary) | 285 (when (eq (car (gnus-find-method-for-group group)) 'nndiary) |
341 (gnus-diary-update-group-parameters group))) | 286 (gnus-diary-update-group-parameters group))) |
342 | 287 |
450 | 395 |
451 | 396 |
452 ;; The end ================================================================== | 397 ;; The end ================================================================== |
453 | 398 |
454 (defun gnus-diary-version () | 399 (defun gnus-diary-version () |
455 "Current Diary backend version." | 400 "Current Diary back end version." |
456 (interactive) | 401 (interactive) |
457 (message "NNDiary version %s" nndiary-version)) | 402 (message "NNDiary version %s" nndiary-version)) |
458 | 403 |
459 (define-key message-mode-map "\C-cDv" 'gnus-diary-version) | 404 (define-key message-mode-map "\C-cDv" 'gnus-diary-version) |
460 (define-key gnus-article-edit-mode-map "\C-cDv" 'gnus-diary-version) | 405 (define-key gnus-article-edit-mode-map "\C-cDv" 'gnus-diary-version) |