aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorReiner Steib2007-05-09 19:07:32 +0000
committerReiner Steib2007-05-09 19:07:32 +0000
commit9135a6699c96097a8e013b3fab9c2426c043fa76 (patch)
treea6d1a4fc836095cf8964e02d0b3696e9de4b657e
parentc70938839402399fd73c389e065d8047f7c43f30 (diff)
downloademacs-9135a6699c96097a8e013b3fab9c2426c043fa76.tar.gz
emacs-9135a6699c96097a8e013b3fab9c2426c043fa76.zip
(Running NNDiary): Use ~/.gnus.el instead of gnusrc.
(Email Based Diary): New. Proper documentation for the nndiary back end and the gnus-diary library.
-rw-r--r--man/ChangeLog9
-rw-r--r--man/gnus.texi396
2 files changed, 405 insertions, 0 deletions
diff --git a/man/ChangeLog b/man/ChangeLog
index 37cfd08869f..e4dd9d18a8c 100644
--- a/man/ChangeLog
+++ b/man/ChangeLog
@@ -1,3 +1,12 @@
12007-05-09 Reiner Steib <Reiner.Steib@gmx.de>
2
3 * gnus.texi (Running NNDiary): Use ~/.gnus.el instead of gnusrc.
4
52007-05-09 Didier Verna <didier@xemacs.org>
6
7 * gnus.texi (Email Based Diary): New. Proper documentation for the
8 nndiary back end and the gnus-diary library.
9
12007-05-07 Karl Berry <karl@gnu.org> 102007-05-07 Karl Berry <karl@gnu.org>
2 11
3 * emacs.texi (EMACSVER): back to 22. 12 * emacs.texi (EMACSVER): back to 22.
diff --git a/man/gnus.texi b/man/gnus.texi
index dfc732f7deb..dc02efa766f 100644
--- a/man/gnus.texi
+++ b/man/gnus.texi
@@ -623,6 +623,7 @@ Select Methods
623* IMAP:: Using Gnus as a @acronym{IMAP} client. 623* IMAP:: Using Gnus as a @acronym{IMAP} client.
624* Other Sources:: Reading directories, files, SOUP packets. 624* Other Sources:: Reading directories, files, SOUP packets.
625* Combined Groups:: Combining groups into one group. 625* Combined Groups:: Combining groups into one group.
626* Email Based Diary:: Using mails to manage diary events in Gnus.
626* Gnus Unplugged:: Reading news and mail offline. 627* Gnus Unplugged:: Reading news and mail offline.
627 628
628Server Buffer 629Server Buffer
@@ -720,6 +721,25 @@ Combined Groups
720* Virtual Groups:: Combining articles from many groups. 721* Virtual Groups:: Combining articles from many groups.
721* Kibozed Groups:: Looking through parts of the newsfeed for articles. 722* Kibozed Groups:: Looking through parts of the newsfeed for articles.
722 723
724Email Based Diary
725
726* The NNDiary Back End:: Basic setup and usage.
727* The Gnus Diary Library:: Utility toolkit on top of nndiary.
728* Sending or Not Sending:: A final note on sending diary messages.
729
730The NNDiary Back End
731
732* Diary Messages:: What makes a message valid for nndiary.
733* Running NNDiary:: NNDiary has two modes of operation.
734* Customizing NNDiary:: Bells and whistles.
735
736The Gnus Diary Library
737
738* Diary Summary Line Format:: A nicer summary buffer line format.
739* Diary Articles Sorting:: A nicer way to sort messages.
740* Diary Headers Generation:: Not doing it manually.
741* Diary Group Parameters:: Not handling them manually.
742
723Gnus Unplugged 743Gnus Unplugged
724 744
725* Agent Basics:: How it all is supposed to work. 745* Agent Basics:: How it all is supposed to work.
@@ -12343,6 +12363,7 @@ The different methods all have their peculiarities, of course.
12343* IMAP:: Using Gnus as a @acronym{IMAP} client. 12363* IMAP:: Using Gnus as a @acronym{IMAP} client.
12344* Other Sources:: Reading directories, files, SOUP packets. 12364* Other Sources:: Reading directories, files, SOUP packets.
12345* Combined Groups:: Combining groups into one group. 12365* Combined Groups:: Combining groups into one group.
12366* Email Based Diary:: Using mails to manage diary events in Gnus.
12346* Gnus Unplugged:: Reading news and mail offline. 12367* Gnus Unplugged:: Reading news and mail offline.
12347@end menu 12368@end menu
12348 12369
@@ -17878,6 +17899,381 @@ Articles marked as read in the @code{nnkiboze} group will have
17878their @acronym{NOV} lines removed from the @acronym{NOV} file. 17899their @acronym{NOV} lines removed from the @acronym{NOV} file.
17879 17900
17880 17901
17902@node Email Based Diary
17903@section Email Based Diary
17904@cindex diary
17905@cindex email based diary
17906@cindex calendar
17907
17908This section describes a special mail back end called @code{nndiary},
17909and its companion library @code{gnus-diary}. It is ``special'' in the
17910sense that it is not meant to be one of the standard alternatives for
17911reading mail with Gnus. See @ref{Choosing a Mail Back End} for that.
17912Instead, it is used to treat @emph{some} of your mails in a special way,
17913namely, as event reminders.
17914
17915Here is a typical scenario:
17916
17917@itemize @bullet
17918@item
17919You've got a date with Andy Mc Dowell or Bruce Willis (select according
17920to your sexual preference) in one month. You don't want to forget it.
17921@item
17922So you send a ``reminder'' message (actually, a diary one) to yourself.
17923@item
17924You forget all about it and keep on getting and reading new mail, as usual.
17925@item
17926From time to time, as you type `g' in the group buffer and as the date
17927is getting closer, the message will pop up again to remind you of your
17928appointment, just as if it were new and unread.
17929@item
17930Read your ``new'' messages, this one included, and start dreaming again
17931of the night you're gonna have.
17932@item
17933Once the date is over (you actually fell asleep just after dinner), the
17934message will be automatically deleted if it is marked as expirable.
17935@end itemize
17936
17937The Gnus Diary back end has the ability to handle regular appointments
17938(that wouldn't ever be deleted) as well as punctual ones, operates as a
17939real mail back end and is configurable in many ways. All of this is
17940explained in the sections below.
17941
17942@menu
17943* The NNDiary Back End:: Basic setup and usage.
17944* The Gnus Diary Library:: Utility toolkit on top of nndiary.
17945* Sending or Not Sending:: A final note on sending diary messages.
17946@end menu
17947
17948
17949@node The NNDiary Back End
17950@subsection The NNDiary Back End
17951@cindex nndiary
17952@cindex the nndiary back end
17953
17954@code{nndiary} is a back end very similar to @code{nnml} (@pxref{Mail
17955Spool}). Actually, it could appear as a mix of @code{nnml} and
17956@code{nndraft}. If you know @code{nnml}, you're already familiar with
17957the message storing scheme of @code{nndiary}: one file per message, one
17958directory per group.
17959
17960 Before anything, there is one requirement to be able to run
17961@code{nndiary} properly: you @emph{must} use the group timestamp feature
17962of Gnus. This adds a timestamp to each group's parameters. @ref{Group
17963Timestamp} to see how it's done.
17964
17965@menu
17966* Diary Messages:: What makes a message valid for nndiary.
17967* Running NNDiary:: NNDiary has two modes of operation.
17968* Customizing NNDiary:: Bells and whistles.
17969@end menu
17970
17971@node Diary Messages
17972@subsubsection Diary Messages
17973@cindex nndiary messages
17974@cindex nndiary mails
17975
17976@code{nndiary} messages are just normal ones, except for the mandatory
17977presence of 7 special headers. These headers are of the form
17978@code{X-Diary-<something>}, @code{<something>} being one of
17979@code{Minute}, @code{Hour}, @code{Dom}, @code{Month}, @code{Year},
17980@code{Time-Zone} and @code{Dow}. @code{Dom} means ``Day of Month'', and
17981@code{dow} means ``Day of Week''. These headers actually behave like
17982crontab specifications and define the event date(s):
17983
17984@itemize @bullet
17985@item
17986For all headers except the @code{Time-Zone} one, a header value is
17987either a star (meaning all possible values), or a list of fields
17988(separated by a comma).
17989@item
17990A field is either an integer, or a range.
17991@item
17992A range is two integers separated by a dash.
17993@item
17994Possible integer values are 0--59 for @code{Minute}, 0--23 for
17995@code{Hour}, 1--31 for @code{Dom}, 1--12 for @code{Month}, above 1971
17996for @code{Year} and 0--6 for @code{Dow} (0 meaning Sunday).
17997@item
17998As a special case, a star in either @code{Dom} or @code{Dow} doesn't
17999mean ``all possible values'', but ``use only the other field''. Note
18000that if both are star'ed, the use of either one gives the same result.
18001@item
18002The @code{Time-Zone} header is special in that it can only have one
18003value (@code{GMT}, for instance). A star doesn't mean ``all possible
18004values'' (because it makes no sense), but ``the current local time
18005zone''. Most of the time, you'll be using a star here. However, for a
18006list of available time zone values, see the variable
18007@code{nndiary-headers}.
18008@end itemize
18009
18010As a concrete example, here are the diary headers to add to your message
18011for specifying ``Each Monday and each 1st of month, at 12:00, 20:00,
1801221:00, 22:00, 23:00 and 24:00, from 1999 to 2010'' (I'll let you find
18013what to do then):
18014
18015@example
18016X-Diary-Minute: 0
18017X-Diary-Hour: 12, 20-24
18018X-Diary-Dom: 1
18019X-Diary-Month: *
18020X-Diary-Year: 1999-2010
18021X-Diary-Dow: 1
18022X-Diary-Time-Zone: *
18023@end example
18024
18025@node Running NNDiary
18026@subsubsection Running NNDiary
18027@cindex running nndiary
18028@cindex nndiary operation modes
18029
18030@code{nndiary} has two modes of operation: ``traditional'' (the default)
18031and ``autonomous''. In traditional mode, @code{nndiary} does not get new
18032mail by itself. You have to move (@kbd{B m}) or copy (@kbd{B c}) mails
18033from your primary mail back end to nndiary groups in order to handle them
18034as diary messages. In autonomous mode, @code{nndiary} retrieves its own
18035mail and handles it independently from your primary mail back end.
18036
18037One should note that Gnus is not inherently designed to allow several
18038``master'' mail back ends at the same time. However, this does make
18039sense with @code{nndiary}: you really want to send and receive diary
18040messages to your diary groups directly. So, @code{nndiary} supports
18041being sort of a ``second primary mail back end'' (to my knowledge, it is
18042the only back end offering this feature). However, there is a limitation
18043(which I hope to fix some day): respooling doesn't work in autonomous
18044mode.
18045
18046In order to use @code{nndiary} in autonomous mode, you have several
18047things to do:
18048
18049@itemize @bullet
18050@item
18051Allow @code{nndiary} to retrieve new mail by itself. Put the following
18052line in your @file{~/.gnus.el} file:
18053
18054@lisp
18055(setq nndiary-get-new-mail t)
18056@end lisp
18057@item
18058You must arrange for diary messages (those containing @code{X-Diary-*}
18059headers) to be split in a private folder @emph{before} Gnus treat them.
18060Again, this is needed because Gnus cannot (yet ?) properly handle
18061multiple primary mail back ends. Getting those messages from a separate
18062source will compensate this misfeature to some extent.
18063
18064As an example, here's my procmailrc entry to store diary files in
18065@file{~/.nndiary} (the default @code{nndiary} mail source file):
18066
18067@example
18068:0 HD :
18069* ^X-Diary
18070.nndiary
18071@end example
18072@end itemize
18073
18074Once this is done, you might want to customize the following two options
18075that affect the diary mail retrieval and splitting processes:
18076
18077@defvar nndiary-mail-sources
18078This is the diary-specific replacement for the standard
18079@code{mail-sources} variable. It obeys the same syntax, and defaults to
18080@code{(file :path "~/.nndiary")}.
18081@end defvar
18082
18083@defvar nndiary-split-methods
18084This is the diary-specific replacement for the standard
18085@code{nnmail-split-methods} variable. It obeys the same syntax.
18086@end defvar
18087
18088 Finally, you may add a permanent @code{nndiary} virtual server
18089(something like @code{(nndiary "diary")} should do) to your
18090@code{gnus-secondary-select-methods}.
18091
18092 Hopefully, almost everything (see the TODO section in
18093@file{nndiary.el}) will work as expected when you restart Gnus: in
18094autonomous mode, typing @kbd{g} and @kbd{M-g} in the group buffer, will
18095also get your new diary mails and split them according to your
18096diary-specific rules, @kbd{F} will find your new diary groups etc.
18097
18098@node Customizing NNDiary
18099@subsubsection Customizing NNDiary
18100@cindex customizing nndiary
18101@cindex nndiary customization
18102
18103Now that @code{nndiary} is up and running, it's time to customize it.
18104The custom group is called @code{nndiary} (no, really ?!). You should
18105browse it to figure out which options you'd like to tweak. The following
18106two variables are probably the only ones you will want to change:
18107
18108@defvar nndiary-reminders
18109This is the list of times when you want to be reminded of your
18110appointements (e.g. 3 weeks before, then 2 days before, then 1 hour
18111before and that's it). Remember that ``being reminded'' means that the
18112diary message will pop up as brand new and unread again when you get new
18113mail.
18114@end defvar
18115
18116@defvar nndiary-week-starts-on-monday
18117Rather self-explanatory. Otherwise, Sunday is assumed (this is the
18118default).
18119@end defvar
18120
18121
18122@node The Gnus Diary Library
18123@subsection The Gnus Diary Library
18124@cindex gnus-diary
18125@cindex the gnus diary library
18126
18127Using @code{nndiary} manually (I mean, writing the headers by hand and
18128so on) would be rather boring. Fortunately, there is a library called
18129@code{gnus-diary} written on top of @code{nndiary}, that does many
18130useful things for you.
18131
18132 In order to use it, add the following line to your @file{~/.gnus.el} file:
18133
18134@lisp
18135(require 'gnus-diary)
18136@end lisp
18137
18138 Also, you shouldn't use any @code{gnus-user-format-function-[d|D]}
18139(@pxref{Summary Buffer Lines}). @code{gnus-diary} provides both of these
18140(sorry if you used them before).
18141
18142
18143@menu
18144* Diary Summary Line Format:: A nicer summary buffer line format.
18145* Diary Articles Sorting:: A nicer way to sort messages.
18146* Diary Headers Generation:: Not doing it manually.
18147* Diary Group Parameters:: Not handling them manually.
18148@end menu
18149
18150@node Diary Summary Line Format
18151@subsubsection Diary Summary Line Format
18152@cindex diary summary buffer line
18153@cindex diary summary line format
18154
18155Displaying diary messages in standard summary line format (usually
18156something like @samp{From Joe: Subject}) is pretty useless. Most of
18157the time, you're the one who wrote the message, and you mostly want to
18158see the event's date.
18159
18160 @code{gnus-diary} provides two supplemental user formats to be used in
18161summary line formats. @code{D} corresponds to a formatted time string
18162for the next occurrence of the event (e.g. ``Sat, Sep 22 01, 12:00''),
18163while @code{d} corresponds to an approximative remaining time until the
18164next occurrence of the event (e.g. ``in 6 months, 1 week'').
18165
18166 For example, here's how Joe's birthday is displayed in my
18167@code{nndiary+diary:birthdays} summary buffer (note that the message is
18168expirable, but will never be deleted, as it specifies a periodic event):
18169
18170@example
18171 E Sat, Sep 22 01, 12:00: Joe's birthday (in 6 months, 1 week)
18172@end example
18173
18174In order to get something like the above, you would normally add the
18175following line to your diary groups'parameters:
18176
18177@lisp
18178(gnus-summary-line-format "%U%R%z %uD: %(%s%) (%ud)\n")
18179@end lisp
18180
18181However, @code{gnus-diary} does it automatically (@pxref{Diary Group
18182Parameters}). You can however customize the provided summary line format
18183with the following user options:
18184
18185@defvar gnus-diary-summary-line-format
18186Defines the summary line format used for diary groups (@pxref{Summary
18187Buffer Lines}). @code{gnus-diary} uses it to automatically update the
18188diary groups'parameters.
18189@end defvar
18190
18191@defvar gnus-diary-time-format
18192Defines the format to display dates in diary summary buffers. This is
18193used by the @code{D} user format. See the docstring for details.
18194@end defvar
18195
18196@defvar gnus-diary-delay-format-function
18197Defines the format function to use for displaying delays (remaining
18198times) in diary summary buffers. This is used by the @code{d} user
18199format. There are currently built-in functions for English and French;
18200you can also define your own. See the docstring for details.
18201@end defvar
18202
18203@node Diary Articles Sorting
18204@subsubsection Diary Articles Sorting
18205@cindex diary articles sorting
18206@cindex diary summary lines sorting
18207@findex gnus-summary-sort-by-schedule
18208@findex gnus-thread-sort-by-schedule
18209@findex gnus-article-sort-by-schedule
18210
18211@code{gnus-diary} provides new sorting functions (@pxref{Sorting the
18212Summary Buffer} ) called @code{gnus-summary-sort-by-schedule},
18213@code{gnus-thread-sort-by-schedule} and
18214@code{gnus-article-sort-by-schedule}. These functions let you organize
18215your diary summary buffers from the closest event to the farthest one.
18216
18217@code{gnus-diary} automatically installs
18218@code{gnus-summary-sort-by-schedule} as a menu item in the summary
18219buffer's ``sort'' menu, and the two others as the primary (hence
18220default) sorting functions in the group parameters (@pxref{Diary Group
18221Parameters}).
18222
18223@node Diary Headers Generation
18224@subsubsection Diary Headers Generation
18225@cindex diary headers generation
18226@findex gnus-diary-check-message
18227
18228@code{gnus-diary} provides a function called
18229@code{gnus-diary-check-message} to help you handle the @code{X-Diary-*}
18230headers. This function ensures that the current message contains all the
18231required diary headers, and prompts you for values or corrections if
18232needed.
18233
18234 This function is hooked into the @code{nndiary} back end, so that
18235moving or copying an article to a diary group will trigger it
18236automatically. It is also bound to @kbd{C-c D c} in @code{message-mode}
18237and @code{article-edit-mode} in order to ease the process of converting
18238a usual mail to a diary one.
18239
18240 This function takes a prefix argument which will force prompting of
18241all diary headers, regardless of their presence or validity. That way,
18242you can very easily reschedule an already valid diary message, for
18243instance.
18244
18245@node Diary Group Parameters
18246@subsubsection Diary Group Parameters
18247@cindex diary group parameters
18248
18249When you create a new diary group, or visit one, @code{gnus-diary}
18250automatically checks your group parameters and if needed, sets the
18251summary line format to the diary-specific value, installs the
18252diary-specific sorting functions, and also adds the different
18253@code{X-Diary-*} headers to the group's posting-style. It is then easier
18254to send a diary message, because if you use @kbd{C-u a} or @kbd{C-u m}
18255on a diary group to prepare a message, these headers will be inserted
18256automatically (although not filled with proper values yet).
18257
18258@node Sending or Not Sending
18259@subsection Sending or Not Sending
18260
18261Well, assuming you've read of of the above, here are two final notes on
18262mail sending with @code{nndiary}:
18263
18264@itemize @bullet
18265@item
18266@code{nndiary} is a @emph{real} mail back end. You really send real diary
18267messsages for real. This means for instance that you can give
18268appointements to anybody (provided they use Gnus and @code{nndiary}) by
18269sending the diary message to them as well.
18270@item
18271However, since @code{nndiary} also has a @code{request-post} method, you
18272can also use @kbd{C-u a} instead of @kbd{C-u m} on a diary group and the
18273message won't actually be sent; just stored locally in the group. This
18274comes in very handy for private appointments.
18275@end itemize
18276
17881@node Gnus Unplugged 18277@node Gnus Unplugged
17882@section Gnus Unplugged 18278@section Gnus Unplugged
17883@cindex offline 18279@cindex offline