From 97615c9dc04939ab73c454a25cf6c64bbe35607b Mon Sep 17 00:00:00 2001 From: yamaoka Date: Wed, 23 Mar 2005 03:07:35 +0000 Subject: [PATCH] Synch to No Gnus 200503230048. --- lisp/ChangeLog | 10 + lisp/gnus-group.el | 6 +- lisp/gnus-srvr.el | 19 +- texi/ChangeLog | 26 + texi/gnus-faq.texi | 3514 ++++++++++++++++++++++++---------------------------- texi/xml2texi.scm | 432 +++++++ texi/xml2texi.sh | 65 + 7 files changed, 2147 insertions(+), 1925 deletions(-) create mode 100644 texi/xml2texi.scm create mode 100644 texi/xml2texi.sh diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a6029ea..74a5c29 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,13 @@ +2005-03-21 Reiner Steib + + * gnus-srvr.el (gnus-browse-select-group): Add NUMBER argument and + pass it to `gnus-browse-read-group'. + (gnus-browse-read-group): Add NUMBER argument and pass it to + `gnus-group-read-ephemeral-group'. + + * gnus-group.el (gnus-group-read-ephemeral-group): Add NUMBER + argument pass it to `gnus-group-read-group'. + 2005-03-19 Aidan Kehoe * lisp/mm-util.el (mm-xemacs-find-mime-charset): Only call diff --git a/lisp/gnus-group.el b/lisp/gnus-group.el index caae6c4..d9719ce 100644 --- a/lisp/gnus-group.el +++ b/lisp/gnus-group.el @@ -2055,7 +2055,8 @@ confirmation is required." (defun gnus-group-read-ephemeral-group (group method &optional activate quit-config request-only select-articles - parameters) + parameters + number) "Read GROUP from METHOD as an ephemeral group. If ACTIVATE, request the group first. If QUIT-CONFIG, use that window configuration when exiting from the @@ -2063,6 +2064,7 @@ ephemeral group. If REQUEST-ONLY, don't actually read the group; just request it. If SELECT-ARTICLES, only select those articles. If PARAMETERS, use those as the group parameters. +If NUMBER, fetch this number of articles. Return the name of the group if selection was successful." (interactive @@ -2110,7 +2112,7 @@ Return the name of the group if selection was successful." (when (let ((gnus-large-newsgroup gnus-large-ephemeral-newsgroup) (gnus-fetch-old-headers gnus-fetch-old-ephemeral-headers)) - (gnus-group-read-group t t group select-articles)) + (gnus-group-read-group (or number t) t group select-articles)) group) ;;(error nil) (quit diff --git a/lisp/gnus-srvr.el b/lisp/gnus-srvr.el index 07ca456..d7cbcfc 100644 --- a/lisp/gnus-srvr.el +++ b/lisp/gnus-srvr.el @@ -863,23 +863,26 @@ buffer. (setq buffer-read-only t) (gnus-run-hooks 'gnus-browse-mode-hook)) -(defun gnus-browse-read-group (&optional no-article) - "Enter the group at the current line." - (interactive) +(defun gnus-browse-read-group (&optional no-article number) + "Enter the group at the current line. +If NUMBER, fetch this number of articles." + (interactive "P") (let ((group (gnus-browse-group-name))) (if (or (not (gnus-get-info group)) (gnus-ephemeral-group-p group)) (unless (gnus-group-read-ephemeral-group group gnus-browse-current-method nil - (cons (current-buffer) 'browse)) + (cons (current-buffer) 'browse) + nil nil nil number) (error "Couldn't enter %s" group)) (unless (gnus-group-read-group nil no-article group) (error "Couldn't enter %s" group))))) -(defun gnus-browse-select-group () - "Select the current group." - (interactive) - (gnus-browse-read-group 'no)) +(defun gnus-browse-select-group (&optional number) + "Select the current group. +If NUMBER, fetch this number of articles." + (interactive "P") + (gnus-browse-read-group 'no number)) (defun gnus-browse-next-group (n) "Go to the next group." diff --git a/texi/ChangeLog b/texi/ChangeLog index 9612efa..b06a3e7 100644 --- a/texi/ChangeLog +++ b/texi/ChangeLog @@ -1,3 +1,29 @@ +2005-03-22 Reiner Steib + + * gnus-faq.texi: Generated from gnus-faq.xml using xml2texi.*. + + * message.texi, gnus.texi: Update copyright. + + * xml2texi.scm (+tag-for-gnus-faq-texi+): New variable. + (transform): Use it. From Karl Pfl,Ad(Bsterer with + minor modifications. + (boilerplate): Update copyright for the output file. + +2005-03-21 Reiner Steib + + * xml2texi.sh: Fix arch tag. + +2005-03-20 Reiner Steib + + * xml2texi.scm, xml2texi.sh: Added copyright. + (transform): Avoid redundant entries in @urefs. + (format-node): Don't insert optional arguments of @node. + +2005-03-20 Karl Pfl,Ad(Bsterer + + * xml2texi.scm, xml2texi.sh: New files. PLT Scheme program to + convert FAQ from xml to texi. + 2005-03-03 Reiner Steib * gnus.texi (Slow/Expensive Connection): Don't abbreviate "very". diff --git a/texi/gnus-faq.texi b/texi/gnus-faq.texi index 72c37e5..29553fb 100644 --- a/texi/gnus-faq.texi +++ b/texi/gnus-faq.texi @@ -1,210 +1,198 @@ -@c Insert "\input texinfo" at 1st line before texing this file alone. -@c -*-texinfo-*- -@c Copyright (C) 1995, 2001, 2003, 2004, 2005 Free Software Foundation, Inc. +@c \input texinfo @c -*-texinfo-*- +@c Uncomment 1st line before texing this file alone. +@c %**start of header +@c Copyright (C) 1995, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. @setfilename gnus-faq.info - -@c Frequently Asked Questions, FAQ - Introduction, Emacs for Heathens, Top +@settitle Frequently Asked Questions +@c %**end of header @node Frequently Asked Questions -@comment node-name, next, previous, up - -@c @chapter Frequently Asked Questions @section Frequently Asked Questions -@cindex FAQ -@cindex Frequently Asked Questions - -@c - Uncomment @chapter, comment @section -@c - run (texinfo-every-node-update) -@c - revert it. @menu -* FAQ - Introduction:: About Gnus and this FAQ. -* FAQ 1 - Installation:: Installation of Gnus. -* FAQ 2 - Startup / Group buffer:: Start up questions and the first - buffer Gnus shows you. -* FAQ 3 - Getting messages:: Making Gnus read your mail and news. -* FAQ 4 - Reading messages:: How to efficiently read messages. -* FAQ 5 - Composing messages:: Composing mails or Usenet postings. -* FAQ 6 - Old messages:: Importing, archiving, searching - and deleting messages. -* FAQ 7 - Gnus in a dial-up environment:: Reading mail and news while offline. -* FAQ 8 - Getting help:: When this FAQ isn't enough. -* FAQ 9 - Tuning Gnus:: How to make Gnus faster. -* FAQ - Glossary:: Terms used in the FAQ explained. +* FAQ - Changes:: +* FAQ - Introduction:: About Gnus and this FAQ. +* FAQ 1 - Installation FAQ:: Installation of Gnus. +* FAQ 2 - Startup / Group buffer:: Start up questions and the + first buffer Gnus shows you. +* FAQ 3 - Getting Messages:: Making Gnus read your mail + and news. +* FAQ 4 - Reading messages:: How to efficiently read + messages. +* FAQ 5 - Composing messages:: Composing mails or Usenet + postings. +* FAQ 6 - Old messages:: Importing, archiving, + searching and deleting messages. +* FAQ 7 - Gnus in a dial-up environment:: Reading mail and news while + offline. +* FAQ 8 - Getting help:: When this FAQ isn't enough. +* FAQ 9 - Tuning Gnus:: How to make Gnus faster. +* FAQ - Glossary:: Terms used in the FAQ + explained. @end menu - @subheading Abstract - This is the new Gnus Frequently Asked Questions list. If you have a -Web browser, the official hypertext version is at -@uref{http://my.gnus.org/FAQ/}, the Docbook source is available from -@uref{http://sourceforge.net/projects/gnus/}. - +This is the new Gnus Frequently Asked Questions list. +If you have a Web browser, the official hypertext version is at +@uref{http://my.gnus.org/FAQ/}, +the Docbook source is available from +@uref{http://sourceforge.net/projects/gnus/, http://sourceforge.net}. - Please submit features and suggestions to the - @email{faq-discuss@@my.gnus.org,FAQ discussion list}. - The list is protected against junk mail with - @uref{http://smarden.org/qconfirm/index.html,qconfirm, qconfirm}. As - a subscriber, your submissions will automatically pass. You can - also subscribe to the list by sending a blank email to - @email{faq-discuss-subscribe@@my.gnus.org} - and - @uref{http://mail1.kens.com/cgi-bin/ezmlm-browse?command=monthbythread%26list=faq-discuss,browse - the archive, browse the archive}. - -@node FAQ - Introduction, FAQ 1 - Installation, Frequently Asked Questions, Frequently Asked Questions -@comment node-name, next, previous, up -@heading Introduction +Please submit features and suggestions to the +@email{faq-discuss@@my.gnus.org, FAQ discussion list}. +The list is protected against junk mail with +@uref{http://smarden.org/qconfirm/index.html, qconfirm}. As +a subscriber, your submissions will automatically pass. You can +also subscribe to the list by sending a blank email to +@email{faq-discuss-subscribe@@my.gnus.org, faq-discuss-subscribe@@my.gnus.org} +and @uref{http://mail1.kens.com/cgi-bin/ezmlm-browse?command=monthbythread%26list=faq-discuss, browse +the archive}. -This is the Gnus Frequently Asked Questions list. +@node FAQ - Changes +@subheading Changes -Gnus is a Usenet Newsreader and Electronic Mail User Agent implemented - as a part of Emacs. It's been around in some form for almost a decade - now, and has been distributed as a standard part of Emacs for much of - that time. Gnus 5 is the latest (and greatest) incarnation. The - original version was called GNUS, and was written by Masanobu UMEDA. - When autumn crept up in '94, Lars Magne Ingebrigtsen grew bored and - decided to rewrite Gnus. - - Its biggest strength is the fact that it is extremely - customizable. It is somewhat intimidating at first glance, but - most of the complexity can be ignored until you're ready to take - advantage of it. If you receive a reasonable volume of e-mail - (you're on various mailing lists), or you would like to read - high-volume mailing lists but cannot keep up with them, or read - high volume newsgroups or are just bored, then Gnus is what you - want. - - This FAQ was maintained by Justin Sheehy until March 2002. He - would like to thank Steve Baur and Per Abrahamsen for doing a wonderful - job with this FAQ before him. We would like to do the same - thanks, - Justin! - - If you have a Web browser, the official hypertext version is at:@* - @uref{http://my.gnus.org/FAQ/}. - This version is much nicer than the unofficial hypertext - versions that are archived at Utrecht, Oxford, Smart Pages, Ohio - State, and other FAQ archives. See the resources question below - if you want information on obtaining it in another format. - - The information contained here was compiled with the assistance - of the Gnus development mailing list, and any errors or - misprints are the my.gnus.org team's fault, sorry. +@itemize @bullet + +@item +Updated FAQ to reflect release of Gnus 5.10 and start of +No Gnus development. +@end itemize +@node FAQ - Introduction +@subheading Introduction + +This is the Gnus Frequently Asked Questions list. -@ifnottex -@node FAQ 1 - Installation, FAQ 2 - Startup / Group buffer, FAQ - Introduction, Frequently Asked Questions -@end ifnottex -@subsection Installation +Gnus is a Usenet Newsreader and Electronic Mail User Agent implemented +as a part of Emacs. It's been around in some form for almost a decade +now, and has been distributed as a standard part of Emacs for much of +that time. Gnus 5 is the latest (and greatest) incarnation. The +original version was called GNUS, and was written by Masanobu UMEDA. +When autumn crept up in '94, Lars Magne Ingebrigtsen grew bored and +decided to rewrite Gnus. + +Its biggest strength is the fact that it is extremely +customizable. It is somewhat intimidating at first glance, but +most of the complexity can be ignored until you're ready to take +advantage of it. If you receive a reasonable volume of e-mail +(you're on various mailing lists), or you would like to read +high-volume mailing lists but cannot keep up with them, or read +high volume newsgroups or are just bored, then Gnus is what you +want. + +This FAQ was maintained by Justin Sheehy until March 2002. He +would like to thank Steve Baur and Per Abrahamsen for doing a wonderful +job with this FAQ before him. We would like to do the same - thanks, +Justin! + +If you have a Web browser, the official hypertext version is at: +@uref{http://my.gnus.org/FAQ/}. +This version is much nicer than the unofficial hypertext +versions that are archived at Utrecht, Oxford, Smart Pages, Ohio +State, and other FAQ archives. See the resources question below +if you want information on obtaining it in another format. + +The information contained here was compiled with the assistance +of the Gnus development mailing list, and any errors or +misprints are the my.gnus.org team's fault, sorry. + +@node FAQ 1 - Installation FAQ +@subsection Installation FAQ @menu -* [1.1]:: What is the latest version of Gnus? -* [1.2]:: What's new in 5.10? -* [1.3]:: Where and how to get Gnus? -* [1.4]:: What to do with the tarball now? -* [1.5]:: Which version of Emacs do I need? -* [1.6]:: How do I run Gnus on both Emacs and XEmacs? +* [1.1]:: What is the latest version of Gnus? +* [1.2]:: What's new in 5.10? +* [1.3]:: Where and how to get Gnus? +* [1.4]:: What to do with the tarball now? +* [1.5]:: I sometimes read references to No Gnus and Oort Gnus, what + are those? +* [1.6]:: Which version of Emacs do I need? +* [1.7]:: How do I run Gnus on both Emacs and XEmacs? @end menu - -@ifnottex -@node [1.1], [1.2], FAQ 1 - Installation, FAQ 1 - Installation -@end ifnottex -@subsubheading Question 1.1: +@node [1.1] +@subsubheading Question 1.1 What is the latest version of Gnus? -Answer: +@subsubheading Answer - Jingle please: Gnus 5.10 is released, get it while it's - hot! As well as the step in version number is rather - small, Gnus 5.10 has tons of new features which you - shouldn't miss, however if you are cautious, you might - prefer to stay with 5.8.8 respectively 5.9 (they are - basically the same) until some bugfix releases are out. - -@ifnottex -@node [1.2], [1.3], [1.1], FAQ 1 - Installation -@end ifnottex -@subsubheading Question 1.2: +Jingle please: Gnus 5.10 is released, get it while it's +hot! As well as the step in version number is rather +small, Gnus 5.10 has tons of new features which you +shouldn't miss. The current release (5.10.6) should be at +least as stable as the latest release of the 5.8 series. -What's new in 5.10? +@node [1.2] +@subsubheading Question 1.2 -Answer: +What's new in 5.10? - First of all, you should have a look into the file - GNUS-NEWS in the toplevel directory of the Gnus tarball, - there the most important changes are listed. Here's a - short list of the changes I find especially - important/interesting: - +@subsubheading Answer - +First of all, you should have a look into the file +GNUS-NEWS in the toplevel directory of the Gnus tarball, +there the most important changes are listed. Here's a +short list of the changes I find especially +important/interesting: -@itemize @bullet{} +@itemize @bullet @item - Major rewrite of the Gnus agent, Gnus agent is now - active by default. - +Major rewrite of the Gnus agent, Gnus agent is now +active by default. + @item - Many new article washing functions for dealing with - ugly formatted articles. - +Many new article washing functions for dealing with +ugly formatted articles. + @item - Anti Spam features. - +Anti Spam features. + @item - message-utils now included in Gnus. - +Message-utils now included in Gnus. + @item - New format specifiers for summary lines, e.g. %B for - a complex trn-style thread tree. - +New format specifiers for summary lines, e.g. %B for +a complex trn-style thread tree. @end itemize - -@ifnottex -@node [1.3], [1.4], [1.2], FAQ 1 - Installation -@end ifnottex -@subsubheading Question 1.3: + +@node [1.3] +@subsubheading Question 1.3 Where and how to get Gnus? -Answer: +@subsubheading Answer - The latest released version of Gnus isn't included in - Emacs 21 and until now it also isn't available through the - package system of XEmacs 21.4, therefor you should get the - Gnus tarball from - @uref{http://www.gnus.org/dist/gnus.tar.gz} - or via anonymous FTP from - @uref{ftp://ftp.gnus.org/pub/gnus/gnus.tar.gz}. - -@ifnottex -@node [1.4], [1.5], [1.3], FAQ 1 - Installation -@end ifnottex -@subsubheading Question 1.4: +The latest released version of Gnus isn't included in +Emacs 21, therefor you should get the Gnus tarball from +@uref{http://www.gnus.org/dist/gnus.tar.gz} +or via anonymous FTP from +@uref{ftp://ftp.gnus.org/pub/gnus/gnus.tar.gz}. +If you use XEmacs instead of Emacs you can use XEmacs' +package system instead. - What to do with the tarball now? - +@node [1.4] +@subsubheading Question 1.4 -Answer: - - Untar it via @samp{tar xvzf gnus.tar.gz} and do the common - @samp{./configure; make; make install} circle. - (under MS-Windows either get the Cygwin environment from - @uref{http://www.cygwin.com} - which allows you to do what's described above or unpack the - tarball with some packer (e.g. Winace from - @uref{http://www.winace.com}) - and use the batch-file make.bat included in the tarball to install - Gnus. If you don't want to (or aren't allowed to) install Gnus - system-wide, you can install it in your home directory and add the - following lines to your ~/.xemacs/init.el or ~/.emacs: - +What to do with the tarball now? + +@subsubheading Answer + +Untar it via @samp{tar xvzf gnus.tar.gz} and do the common +@samp{./configure; make; make install} circle. +(under MS-Windows either get the Cygwin environment from +@uref{http://www.cygwin.com} +which allows you to do what's described above or unpack the +tarball with some packer (e.g. Winace from +@uref{http://www.winace.com}) +and use the batch-file make.bat included in the tarball to install +Gnus.) If you don't want to (or aren't allowed to) install Gnus +system-wide, you can install it in your home directory and add the +following lines to your ~/.xemacs/init.el or ~/.emacs: @example (add-to-list 'load-path "/path/to/gnus/lisp") @@ -212,436 +200,395 @@ Answer: (add-to-list 'Info-directory-list "/path/to/gnus/texi/") (add-to-list 'Info-default-directory-list "/path/to/gnus/texi/")) @end example - @noindent - Make sure that you don't have any Gnus related stuff - before this line, on MS Windows use something like - "C:/path/to/lisp" (yes, "/"). - -@ifnottex -@node [1.5], [1.6], [1.4], FAQ 1 - Installation -@end ifnottex -@subsubheading Question 1.5: + +Make sure that you don't have any Gnus related stuff +before this line, on MS Windows use something like +"C:/path/to/lisp" (yes, "/"). + +@node [1.5] +@subsubheading Question 1.5 + +I sometimes read references to No Gnus and Oort Gnus, +what are those? + +@subsubheading Answer + +Oort Gnus was the name of the development version of +Gnus, which became Gnus 5.10 in autumn 2003. No Gnus is +the name of the current development version which will +once become Gnus 5.12 or Gnus 6. (If you're wondering why +not 5.11, the odd version numbers are normally used for +the Gnus versions bundled with Emacs) + +@node [1.6] +@subsubheading Question 1.6 Which version of Emacs do I need? -Answer: +@subsubheading Answer - Gnus 5.10 requires an Emacs version that is greater - than or equal to Emacs 20.7 or XEmacs 21.1. - -@ifnottex -@node [1.6], , [1.5], FAQ 1 - Installation -@end ifnottex -@subsubheading Question 1.6: +Gnus 5.10 requires an Emacs version that is greater +than or equal to Emacs 20.7 or XEmacs 21.1. The +development versions of Gnus (aka No Gnus) require Emacs +21 or XEmacs 21.4. + +@node [1.7] +@subsubheading Question 1.7 How do I run Gnus on both Emacs and XEmacs? -Answer: +@subsubheading Answer - You can't use the same copy of Gnus in both as the Lisp - files are byte-compiled to a format which is different - depending on which Emacs did the compilation. Get one copy - of Gnus for Emacs and one for XEmacs. - -@ifnottex -@node FAQ 2 - Startup / Group buffer, FAQ 3 - Getting messages, FAQ 1 - Installation, Frequently Asked Questions -@end ifnottex +You can't use the same copy of Gnus in both as the Lisp +files are byte-compiled to a format which is different +depending on which Emacs did the compilation. Get one copy +of Gnus for Emacs and one for XEmacs. + +@node FAQ 2 - Startup / Group buffer @subsection Startup / Group buffer @menu -* [2.1]:: Every time I start Gnus I get a message - "Gnus auto-save file exists. Do you want to read it?", - what does this mean and how to prevent it? -* [2.2]:: Gnus doesn't remember which groups I'm subscribed to, what's this? -* [2.3]:: How to change the format of the lines in Group buffer? -* [2.4]:: My group buffer becomes a bit crowded, is there a way to sort my - groups into categories so I can easier browse through them? -* [2.5]:: How to manually sort the groups in Group buffer? How to sort the - groups in a topic? +* [2.1]:: Every time I start Gnus I get a message "Gnus auto-save + file exists. Do you want to read it?", what does this mean and + how to prevent it? +* [2.2]:: Gnus doesn't remember which groups I'm subscribed to, + what's this? +* [2.3]:: How to change the format of the lines in Group buffer? +* [2.4]:: My group buffer becomes a bit crowded, is there a way to + sort my groups into categories so I can easier browse through + them? +* [2.5]:: How to manually sort the groups in Group buffer? How to + sort the groups in a topic? @end menu -@ifnottex -@node [2.1], [2.2], FAQ 2 - Startup / Group buffer, FAQ 2 - Startup / Group buffer -@end ifnottex -@subsubheading Question 2.1: +@node [2.1] +@subsubheading Question 2.1 - Every time I start Gnus I get a message "Gnus auto-save - file exists. Do you want to read it?", what does this mean - and how to prevent it? - +Every time I start Gnus I get a message "Gnus auto-save +file exists. Do you want to read it?", what does this mean +and how to prevent it? -Answer: +@subsubheading Answer - This message means that the last time you used Gnus, it - wasn't properly exited and therefor couldn't write its - informations to disk (e.g. which messages you read), you - are now asked if you want to restore those informations - from the auto-save file. - +This message means that the last time you used Gnus, it +wasn't properly exited and therefor couldn't write its +informations to disk (e.g. which messages you read), you +are now asked if you want to restore those informations +from the auto-save file. - To prevent this message make sure you exit Gnus - via @samp{q} in group buffer instead of - just killing Emacs. - -@ifnottex -@node [2.2], [2.3], [2.1], FAQ 2 - Startup / Group buffer -@end ifnottex -@subsubheading Question: 2.2 +To prevent this message make sure you exit Gnus +via @samp{q} in group buffer instead of +just killing Emacs. - Gnus doesn't remember which groups I'm subscribed to, - what's this? - +@node [2.2] +@subsubheading Question 2.2 -Answer: +Gnus doesn't remember which groups I'm subscribed to, +what's this? - You get the message described in the q/a pair above while - starting Gnus, right? It's an other symptom for the same - problem, so read the answer above. - -@ifnottex -@node [2.3], [2.4], [2.2], FAQ 2 - Startup / Group buffer -@end ifnottex -@subsubheading Question 2.3: +@subsubheading Answer - How to change the format of the lines in Group buffer? - +You get the message described in the q/a pair above while +starting Gnus, right? It's an other symptom for the same +problem, so read the answer above. -Answer: +@node [2.3] +@subsubheading Question 2.3 - You've got to tweak the value of the variable - gnus-group-line-format. See the manual node "Group Line - Specification" for information on how to do this. An - example for this (guess from whose .gnus :-)): - +How to change the format of the lines in Group buffer? -@example +@subsubheading Answer +You've got to tweak the value of the variable +gnus-group-line-format. See the manual node "Group Line +Specification" for information on how to do this. An +example for this (guess from whose .gnus :-)): + +@example (setq gnus-group-line-format "%P%M%S[%5t]%5y : %(%g%)\n") - @end example - -@ifnottex -@node [2.4], [2.5], [2.3], FAQ 2 - Startup / Group buffer -@end ifnottex -@subsubheading Question 2.4: - - My group buffer becomes a bit crowded, is there a way to - sort my groups into categories so I can easier browse - through them? - +@noindent -Answer: +@node [2.4] +@subsubheading Question 2.4 - Gnus offers the topic mode, it allows you to sort your - groups in, well, topics, e.g. all groups dealing with - Linux under the topic linux, all dealing with music under - the topic music and all dealing with scottish music under - the topic scottish which is a subtopic of music. - +My group buffer becomes a bit crowded, is there a way to +sort my groups into categories so I can easier browse +through them? - To enter topic mode, just hit t while in Group buffer. Now - you can use @samp{T n} to create a topic - at point and @samp{T m} to move a group to - a specific topic. For more commands see the manual or the - menu. You might want to include the %P specifier at the - beginning of your gnus-group-line-format variable to have - the groups nicely indented. - -@ifnottex -@node [2.5], , [2.4], FAQ 2 - Startup / Group buffer -@end ifnottex -@subsubheading Question 2.5: +@subsubheading Answer - How to manually sort the groups in Group buffer? How to - sort the groups in a topic? - +Gnus offers the topic mode, it allows you to sort your +groups in, well, topics, e.g. all groups dealing with +Linux under the topic linux, all dealing with music under +the topic music and all dealing with scottish music under +the topic scottish which is a subtopic of music. -Answer: +To enter topic mode, just hit t while in Group buffer. Now +you can use @samp{T n} to create a topic +at point and @samp{T m} to move a group to +a specific topic. For more commands see the manual or the +menu. You might want to include the %P specifier at the +beginning of your gnus-group-line-format variable to have +the groups nicely indented. - Move point over the group you want to move and - hit @samp{C-k}, now move point to the - place where you want the group to be and - hit @samp{C-y}. - -@ifnottex -@node FAQ 3 - Getting messages, FAQ 4 - Reading messages, FAQ 2 - Startup / Group buffer, Frequently Asked Questions -@end ifnottex -@subsection Getting messages +@node [2.5] +@subsubheading Question 2.5 + +How to manually sort the groups in Group buffer? How to +sort the groups in a topic? + +@subsubheading Answer + +Move point over the group you want to move and +hit @samp{C-k}, now move point to the +place where you want the group to be and +hit @samp{C-y}. + +@node FAQ 3 - Getting Messages +@subsection Getting Messages @menu -* [3.1]:: I just installed Gnus, started it via M-x gnus but it only says - "nntp (news) open error", what to do? -* [3.2]:: I'm working under Windows and have no idea what ~/.gnus means. -* [3.3]:: My news server requires authentication, how to store user name - and password on disk? -* [3.4]:: Gnus seems to start up OK, but I can't find out how to - subscribe to a group. -* [3.5]:: Gnus doesn't show all groups / Gnus says I'm not allowed to - post on this server as well as I am, what's that? -* [3.6]:: I want Gnus to fetch news from several servers, is this possible? -* [3.7]:: And how about local spool files? -* [3.8]:: OK, reading news works now, but I want to be able to read my mail - with Gnus, too. How to do it? -* [3.9]:: And what about IMAP? -* [3.10]:: At the office we use one of those MS Exchange servers, - can I use Gnus to read my mail from it? -* [3.11]:: Can I tell Gnus not to delete the mails on the server - it retrieves via POP3? +* [3.1]:: I just installed Gnus, started it via @samp{M-x gnus} + but it only says "nntp (news) open error", what to do? +* [3.2]:: I'm working under Windows and have no idea what ~/.gnus.el + means. +* [3.3]:: My news server requires authentication, how to store user + name and password on disk? +* [3.4]:: Gnus seems to start up OK, but I can't find out how to + subscribe to a group. +* [3.5]:: Gnus doesn't show all groups / Gnus says I'm not allowed + to post on this server as well as I am, what's that? +* [3.6]:: I want Gnus to fetch news from several servers, is this + possible? +* [3.7]:: And how about local spool files? +* [3.8]:: OK, reading news works now, but I want to be able to read + my mail with Gnus, too. How to do it? +* [3.9]:: And what about IMAP? +* [3.10]:: At the office we use one of those MS Exchange servers, can + I use Gnus to read my mail from it? +* [3.11]:: Can I tell Gnus not to delete the mails on the server it + retrieves via POP3? @end menu -@ifnottex -@node [3.1], [3.2], FAQ 3 - Getting messages, FAQ 3 - Getting messages -@end ifnottex -@subsubheading Question 3.1: +@node [3.1] +@subsubheading Question 3.1 - I just installed Gnus, started it via - @samp{M-x gnus} - but it only says "nntp (news) open error", what to do? - +I just installed Gnus, started it via +@samp{M-x gnus} +but it only says "nntp (news) open error", what to do? -Answer: +@subsubheading Answer - You've got to tell Gnus where to fetch the news from. Read - the documentation for information on how to do this. As a - first start, put those lines in ~/.gnus: - +You've got to tell Gnus where to fetch the news from. Read +the documentation for information on how to do this. As a +first start, put those lines in ~/.gnus.el: @example (setq gnus-select-method '(nntp "news.yourprovider.net")) (setq user-mail-address "you@@yourprovider.net") (setq user-full-name "Your Name") @end example - -@ifnottex -@node [3.2], [3.3], [3.1], FAQ 3 - Getting messages -@end ifnottex -@subsubheading Question 3.2: - - I'm working under Windows and have no idea what ~/.gnus means. - +@noindent -Answer: - - The ~/ means the home directory where Gnus and Emacs look for the -configuration files. However, you don't really need to know what this -means, it suffices that Emacs knows what it means :-) You can type -@samp{C-x C-f ~/.gnus RET } (yes, with the forward slash, even on -Windows), and Emacs will open the right file for you. (It will most -likely be new, and thus empty.) However, I'd discourage you from -doing so, since the directory Emacs chooses will most certainly not be -what you want, so let's do it the correct way. The first thing you've -got to do is to create a suitable directory (no blanks in directory -name please) e.g. @file{c:\myhome}. Then you must set the environment -variable HOME to this directory. To do this under Win9x or Me include -the line - +@node [3.2] +@subsubheading Question 3.2 + +I'm working under Windows and have no idea what ~/.gnus.el means. + +@subsubheading Answer + +The ~/ means the home directory where Gnus and Emacs look +for the configuration files. However, you don't really +need to know what this means, it suffices that Emacs knows +what it means :-) You can type +@samp{C-x C-f ~/.gnus.el RET } +(yes, with the forward slash, even on Windows), and +Emacs will open the right file for you. (It will most +likely be new, and thus empty.) +However, I'd discourage you from doing so, since the +directory Emacs chooses will most certainly not be what +you want, so let's do it the correct way. +The first thing you've got to do is to +create a suitable directory (no blanks in directory name +please) e.g. c:\myhome. Then you must set the environment +variable HOME to this directory. To do this under Win9x +or Me include the line @example - SET HOME=C:\myhome - @end example - @noindent - in your autoexec.bat and reboot. Under NT, 2000 and XP, - hit Winkey+Pause/Break to enter system options (if it - doesn't work, go to Control Panel -> System). There you'll - find the possibility to set environment variables, create - a new one with name HOME and value @file{c:\myhome}, a reboot is - not necessary. - - Now to create ~/.gnus, say - @samp{C-x C-f ~/.gnus RET C-x C-s}. - in Emacs. - -@ifnottex -@node [3.3], [3.4], [3.2], FAQ 3 - Getting messages -@end ifnottex -@subsubheading Question 3.3: +in your autoexec.bat and reboot. Under NT, 2000 and XP, +hit Winkey+Pause/Break to enter system options (if it +doesn't work, go to Control Panel -> System). There you'll +find the possibility to set environment variables, create +a new one with name HOME and value C:\myhome, a reboot is +not necessary. - My news server requires authentication, how to store - user name and password on disk? - +Now to create ~/.gnus.el, say +@samp{C-x C-f ~/.gnus.el RET C-x C-s}. +in Emacs. -Answer: +@node [3.3] +@subsubheading Question 3.3 - Create a file ~/.authinfo which includes for each server a line like this - +My news server requires authentication, how to store +user name and password on disk? + +@subsubheading Answer + +Create a file ~/.authinfo which includes for each server a line like this @example machine news.yourprovider.net login YourUserName password YourPassword @end example - @noindent . - Make sure that the file isn't readable to others if you - work on a OS which is capable of doing so. (Under Unix - say - +Make sure that the file isn't readable to others if you +work on a OS which is capable of doing so. (Under Unix +say @example chmod 600 ~/.authinfo @end example - @noindent - in a shell.) - -@ifnottex -@node [3.4], [3.5], [3.3], FAQ 3 - Getting messages -@end ifnottex -@subsubheading Question 3.4: - Gnus seems to start up OK, but I can't find out how to - subscribe to a group. - +in a shell.) -Answer: +@node [3.4] +@subsubheading Question 3.4 - If you know the name of the group say @samp{U - name.of.group RET} in group buffer (use the - tab-completion Luke). Otherwise hit ^ in group buffer, - this brings you to the server buffer. Now place point (the - cursor) over the server which carries the group you want, - hit @samp{RET}, move point to the group - you want to subscribe to and say @samp{u} - to subscribe to it. - -@ifnottex -@node [3.5], [3.6], [3.4], FAQ 3 - Getting messages -@end ifnottex -@subsubheading Question 3.5: +Gnus seems to start up OK, but I can't find out how to +subscribe to a group. - Gnus doesn't show all groups / Gnus says I'm not allowed to - post on this server as well as I am, what's that? - +@subsubheading Answer -Answer: +If you know the name of the group say @samp{U +name.of.group RET} in group buffer (use the +tab-completion Luke). Otherwise hit ^ in group buffer, +this brings you to the server buffer. Now place point (the +cursor) over the server which carries the group you want, +hit @samp{RET}, move point to the group +you want to subscribe to and say @samp{u} +to subscribe to it. - Some providers allow restricted anonymous access and full - access only after authorization. To make Gnus send authinfo - to those servers append - +@node [3.5] +@subsubheading Question 3.5 + +Gnus doesn't show all groups / Gnus says I'm not allowed to +post on this server as well as I am, what's that? + +@subsubheading Answer + +Some providers allow restricted anonymous access and full +access only after authorization. To make Gnus send authinfo +to those servers append @example force yes @end example - - @noindent - to the line for those servers in ~/.authinfo. -@ifnottex -@node [3.6], [3.7], [3.5], FAQ 3 - Getting messages -@end ifnottex -@subsubheading Question 3.6: +to the line for those servers in ~/.authinfo. - I want Gnus to fetch news from several servers, is this possible? - +@node [3.6] +@subsubheading Question 3.6 -Answer: +I want Gnus to fetch news from several servers, is this possible? - Of course. You can specify more sources for articles in the - variable gnus-secondary-select-methods. Add something like - this in ~/.gnus: - +@subsubheading Answer + +Of course. You can specify more sources for articles in the +variable gnus-secondary-select-methods. Add something like +this in ~/.gnus.el: @example -(add-to-list 'gnus-secondary-select-methods +(add-to-list 'gnus-secondary-select-methods '(nntp "news.yourSecondProvider.net")) -(add-to-list 'gnus-secondary-select-methods - '(nntp "news.yourThirdProvider.net")) +(add-to-list 'gnus-secondary-select-methods + '(nntp "news.yourThirdProvider.net")) @end example - -@ifnottex -@node [3.7], [3.8], [3.6], FAQ 3 - Getting messages -@end ifnottex -@subsubheading Question 3.7: +@noindent - And how about local spool files? - +@node [3.7] +@subsubheading Question 3.7 -Answer: +And how about local spool files? - No problem, this is just one more select method called - nnspool, so you want this: - +@subsubheading Answer + +No problem, this is just one more select method called +nnspool, so you want this: @example (add-to-list 'gnus-secondary-select-methods '(nnspool "")) @end example - @noindent - Or this if you don't want an NNTP Server as primary news source: - + +Or this if you don't want an NNTP Server as primary news source: @example (setq gnus-select-method '(nnspool "")) @end example - @noindent - Gnus will look for the spool file in /usr/spool/news, if you - want something different, change the line above to something like this: - + +Gnus will look for the spool file in /usr/spool/news, if you +want something different, change the line above to something like this: @example (add-to-list 'gnus-secondary-select-methods - '(nnspool "" (nnspool-directory "/usr/local/myspoolddir"))) + '(nnspool "" + (nnspool-directory "/usr/local/myspoolddir"))) @end example - @noindent - This sets the spool directory for this server only. - You might have to specify more stuff like the program used - to post articles, see the Gnus manual on how to do this. - -@ifnottex -@node [3.8], [3.9], [3.7], FAQ 3 - Getting messages -@end ifnottex -@subsubheading Question 3.8: - OK, reading news works now, but I want to be able to read my mail - with Gnus, too. How to do it? - - -Answer: - - That's a bit harder since there are many possible sources - for mail, many possible ways for storing mail and many - different ways for sending mail. The most common cases are - these: 1: You want to read your mail from a pop3 server and - send them directly to a SMTP Server 2: Some program like - fetchmail retrieves your mail and stores it on disk from - where Gnus shall read it. Outgoing mail is sent by - Sendmail, Postfix or some other MTA. Sometimes, you even - need a combination of the above cases. - - - However, the first thing to do is to tell Gnus in which way - it should store the mail, in Gnus terminology which back end - to use. Gnus supports many different back ends, the most - commonly used one is nnml. It stores every mail in one file - and is therefor quite fast. However you might prefer a one - file per group approach if your file system has problems with - many small files, the nnfolder back end is then probably the - choice for you. To use nnml add the following to ~/.gnus: - +This sets the spool directory for this server only. +You might have to specify more stuff like the program used +to post articles, see the Gnus manual on how to do this. + +@node [3.8] +@subsubheading Question 3.8 + +OK, reading news works now, but I want to be able to read my mail +with Gnus, too. How to do it? + +@subsubheading Answer + +That's a bit harder since there are many possible sources +for mail, many possible ways for storing mail and many +different ways for sending mail. The most common cases are +these: 1: You want to read your mail from a pop3 server and +send them directly to a SMTP Server 2: Some program like +fetchmail retrieves your mail and stores it on disk from +where Gnus shall read it. Outgoing mail is sent by +Sendmail, Postfix or some other MTA. Sometimes, you even +need a combination of the above cases. + +However, the first thing to do is to tell Gnus in which way +it should store the mail, in Gnus terminology which back end +to use. Gnus supports many different back ends, the most +commonly used one is nnml. It stores every mail in one file +and is therefor quite fast. However you might prefer a one +file per group approach if your file system has problems with +many small files, the nnfolder back end is then probably the +choice for you. To use nnml add the following to ~/.gnus.el: @example (add-to-list 'gnus-secondary-select-methods '(nnml "")) @end example - @noindent - As you might have guessed, if you want nnfolder, it's - + +As you might have guessed, if you want nnfolder, it's @example (add-to-list 'gnus-secondary-select-methods '(nnfolder "")) @end example - +@noindent - Now we need to tell Gnus, where to get it's mail from. If - it's a POP3 server, then you need something like this: - +Now we need to tell Gnus, where to get it's mail from. If +it's a POP3 server, then you need something like this: @example (eval-after-load "mail-source" @@ -649,75 +596,68 @@ Answer: :user "yourUserName" :password "yourPassword"))) @end example - @noindent - Make sure ~/.gnus isn't readable to others if you store - your password there. If you want to read your mail from a - traditional spool file on your local machine, it's - + +Make sure ~/.gnus.el isn't readable to others if you store +your password there. If you want to read your mail from a +traditional spool file on your local machine, it's @example (eval-after-load "mail-source" - '(add-to-list 'mail-sources '(file :path "/path/to/spool/file"))) + '(add-to-list 'mail-sources '(file :path "/path/to/spool/file")) @end example - @noindent - If it's a Maildir, with one file per message as used by - postfix, Qmail and (optionally) fetchmail it's - + +If it's a Maildir, with one file per message as used by +postfix, Qmail and (optionally) fetchmail it's @example (eval-after-load "mail-source" '(add-to-list 'mail-sources '(maildir :path "/path/to/Maildir/" :subdirs ("cur" "new"))) @end example - @noindent - And finally if you want to read your mail from several files - in one directory, for example because procmail already split your - mail, it's - + +And finally if you want to read your mail from several files +in one directory, for example because procmail already split your +mail, it's @example (eval-after-load "mail-source" - '(add-to-list 'mail-sources '(directory :path "/path/to/procmail-dir/" - :suffix ".prcml")) + '(add-to-list 'mail-sources + '(directory :path "/path/to/procmail-dir/" + :suffix ".prcml"))) @end example - @noindent - Where :suffix ".prcml" tells Gnus only to use files with the - suffix .prcml. - - OK, now you only need to tell Gnus how to send mail. If you - want to send mail via sendmail (or whichever MTA is playing - the role of sendmail on your system), you don't need to do - anything. However, if you want to send your mail to an - SMTP Server you need the following in your ~/.gnus - +Where :suffix ".prcml" tells Gnus only to use files with the +suffix .prcml. + +OK, now you only need to tell Gnus how to send mail. If you +want to send mail via sendmail (or whichever MTA is playing +the role of sendmail on your system), you don't need to do +anything. However, if you want to send your mail to an +SMTP Server you need the following in your ~/.gnus.el @example (setq send-mail-function 'smtpmail-send-it) (setq message-send-mail-function 'smtpmail-send-it) (setq smtpmail-default-smtp-server "smtp.yourProvider.net") @end example - -@ifnottex -@node [3.9], [3.10], [3.8], FAQ 3 - Getting messages -@end ifnottex -@subsubheading Question 3.9: +@noindent - And what about IMAP? - +@node [3.9] +@subsubheading Question 3.9 -Answer: +And what about IMAP? - There are two ways of using IMAP with Gnus. The first one is - to use IMAP like POP3, that means Gnus fetches the mail from - the IMAP server and stores it on disk. If you want to do - this (you don't really want to do this) add the following to - ~/.gnus - +@subsubheading Answer + +There are two ways of using IMAP with Gnus. The first one is +to use IMAP like POP3, that means Gnus fetches the mail from +the IMAP server and stores it on disk. If you want to do +this (you don't really want to do this) add the following to +~/.gnus.el @example (add-to-list 'mail-sources '(imap :server "mail.mycorp.com" @@ -728,249 +668,215 @@ Answer: :mailbox "INBOX" :fetchflag "\\Seen")) @end example - @noindent - You might have to tweak the values for stream and/or - authentification, see the Gnus manual node "Mail Source - Specifiers" for possible values. - - If you want to use IMAP the way it's intended, you've got to - follow a different approach. You've got to add the nnimap - back end to your select method and give the information - about the server there. - +You might have to tweak the values for stream and/or +authentification, see the Gnus manual node "Mail Source +Specifiers" for possible values. + +If you want to use IMAP the way it's intended, you've got to +follow a different approach. You've got to add the nnimap +back end to your select method and give the information +about the server there. @example -(add-to-list - 'gnus-secondary-select-methods - '(nnimap "Give the baby a name" - (nnimap-address "imap.yourProvider.net") - (nnimap-port 143) - (nnimap-list-pattern "archive.*"))) +(add-to-list 'gnus-secondary-select-methods + '(nnimap "Give the baby a name" + (nnimap-address "imap.yourProvider.net") + (nnimap-port 143) + (nnimap-list-pattern "archive.*"))) @end example - @noindent - Again, you might have to specify how to authenticate to the - server if Gnus can't guess the correct way, see the Manual - Node "IMAP" for detailed information. - -@ifnottex -@node [3.10], [3.11], [3.9], FAQ 3 - Getting messages -@end ifnottex -@subsubheading Question 3.10: - - At the office we use one of those MS Exchange servers, can I use - Gnus to read my mail from it? - - -Answer: - Offer your administrator a pair of new running shoes for - activating IMAP on the server and follow the instructions - above. - -@ifnottex -@node [3.11], , [3.10], FAQ 3 - Getting messages -@end ifnottex -@subsubheading Question 3.11: - - Can I tell Gnus not to delete the mails on the server it - retrieves via POP3? - - -Answer: - - First of all, that's not the way POP3 is intended to work, - if you have the possibility, you should use the IMAP - Protocol if you want your messages to stay on the - server. Nevertheless there might be situations where you - need the feature, but sadly Gnus itself has no predefined - functionality to do so. - - - However this is Gnus county so there are possibilities to - achieve what you want. The easiest way is to get an external - program which retrieves copies of the mail and stores them - on disk, so Gnus can read it from there. On Unix systems you - could use e.g. fetchmail for this, on MS Windows you can use - Hamster, an excellent local news and mail server. - - - The other solution would be, to replace the method Gnus - uses to get mail from POP3 servers by one which is capable - of leaving the mail on the server. If you use XEmacs, get - the package mail-lib, it includes an enhanced pop3.el, - look in the file, there's documentation on how to tell - Gnus to use it and not to delete the retrieved mail. For - GNU Emacs look for the file epop3.el which can do the same - (If you know the home of this file, please send me an - e-mail). You can also tell Gnus to use an external program - (e.g. fetchmail) to fetch your mail, see the info node - "Mail Source Specifiers" in the Gnus manual on how to do - it. - - -@ifnottex -@node FAQ 4 - Reading messages, FAQ 5 - Composing messages, FAQ 3 - Getting messages, Frequently Asked Questions -@end ifnottex +Again, you might have to specify how to authenticate to the +server if Gnus can't guess the correct way, see the Manual +Node "IMAP" for detailed information. + +@node [3.10] +@subsubheading Question 3.10 + +At the office we use one of those MS Exchange servers, can I use +Gnus to read my mail from it? + +@subsubheading Answer + +Offer your administrator a pair of new running shoes for +activating IMAP on the server and follow the instructions +above. + +@node [3.11] +@subsubheading Question 3.11 + +Can I tell Gnus not to delete the mails on the server it +retrieves via POP3? + +@subsubheading Answer + +First of all, that's not the way POP3 is intended to work, +if you have the possibility, you should use the IMAP +Protocol if you want your messages to stay on the +server. Nevertheless there might be situations where you +need the feature, but sadly Gnus itself has no predefined +functionality to do so. + +However this is Gnus county so there are possibilities to +achieve what you want. The easiest way is to get an external +program which retrieves copies of the mail and stores them +on disk, so Gnus can read it from there. On Unix systems you +could use e.g. fetchmail for this, on MS Windows you can use +Hamster, an excellent local news and mail server. + +The other solution would be, to replace the method Gnus +uses to get mail from POP3 servers by one which is capable +of leaving the mail on the server. If you use XEmacs, get +the package mail-lib, it includes an enhanced pop3.el, +look in the file, there's documentation on how to tell +Gnus to use it and not to delete the retrieved mail. For +GNU Emacs look for the file epop3.el which can do the same +(If you know the home of this file, please send me an +e-mail). You can also tell Gnus to use an external program +(e.g. fetchmail) to fetch your mail, see the info node +"Mail Source Specifiers" in the Gnus manual on how to do +it. + +@node FAQ 4 - Reading messages @subsection Reading messages @menu -* [4.1]:: When I enter a group, all read messages are gone. - How to view them again? -* [4.2]:: How to tell Gnus to show an important message every time - I enter a group, even when it's read? -* [4.3]:: How to view the headers of a message? -* [4.4]:: How to view the raw unformatted message? -* [4.5]:: How can I change the headers Gnus displays by default at the - top of the article buffer? -* [4.6]:: I'd like Gnus NOT to render HTML-mails but show me the - text part if it's available. How to do it? -* [4.7]:: Can I use some other browser than w3 to render my HTML-mails? -* [4.8]:: Is there anything I can do to make poorly formatted mails - more readable? -* [4.9]:: Is there a way to automatically ignore posts by specific authors - or with specific words in the subject? And can I highlight more - interesting ones in some way? -* [4.10]:: How can I disable threading in some (e.g. mail-) groups, or set - other variables specific for some groups? -* [4.11]:: Can I highlight messages written by me and follow-ups to those? -* [4.12]:: The number of total messages in a group which Gnus displays in - group buffer is by far to high, especially in mail groups. - Is this a bug? -* [4.13]:: I don't like the layout of summary and article buffer, - how to change it? Perhaps even a three pane display? -* [4.14]:: I don't like the way the Summary buffer looks, how to tweak it? -* [4.15]:: How to split incoming mails in several groups? +* [4.1]:: When I enter a group, all read messages are gone. How to + view them again? +* [4.2]:: How to tell Gnus to show an important message every time I + enter a group, even when it's read? +* [4.3]:: How to view the headers of a message? +* [4.4]:: How to view the raw unformatted message? +* [4.5]:: How can I change the headers Gnus displays by default at + the top of the article buffer? +* [4.6]:: I'd like Gnus NOT to render HTML-mails but show me the + text part if it's available. How to do it? +* [4.7]:: Can I use some other browser than w3 to render my + HTML-mails? +* [4.8]:: Is there anything I can do to make poorly formatted mails + more readable? +* [4.9]:: Is there a way to automatically ignore posts by specific + authors or with specific words in the subject? And can I highlight + more interesting ones in some way? +* [4.10]:: How can I disable threading in some (e.g. mail-) groups, + or set other variables specific for some groups? +* [4.11]:: Can I highlight messages written by me and follow-ups to + those? +* [4.12]:: The number of total messages in a group which Gnus + displays in group buffer is by far to high, especially in mail + groups. Is this a bug? +* [4.13]:: I don't like the layout of summary and article buffer, how + to change it? Perhaps even a three pane display? +* [4.14]:: I don't like the way the Summary buffer looks, how to + tweak it? +* [4.15]:: How to split incoming mails in several groups? @end menu -@ifnottex -@node [4.1], [4.2], FAQ 4 - Reading messages, FAQ 4 - Reading messages -@end ifnottex -@subsubheading Question 4.1: +@node [4.1] +@subsubheading Question 4.1 - When I enter a group, all read messages are gone. How to view them again? - +When I enter a group, all read messages are gone. How to view them again? -Answer: +@subsubheading Answer - If you enter the group by saying - @samp{RET} - in group buffer with point over the group, only unread and ticked messages are loaded. Say - @samp{C-u RET} - instead to load all available messages. If you want only the e.g. 300 newest say - @samp{C-u 300 RET} - +If you enter the group by saying +@samp{RET} +in group buffer with point over the group, only unread and ticked messages are loaded. Say +@samp{C-u RET} +instead to load all available messages. If you want only the e.g. 300 newest say +@samp{C-u 300 RET} - Loading only unread messages can be annoying if you have threaded view enabled, say - +Loading only unread messages can be annoying if you have threaded view enabled, say @example (setq gnus-fetch-old-headers 'some) @end example - - @noindent - in ~/.gnus to load enough old articles to prevent teared threads, replace 'some with t to load - all articles (Warning: Both settings enlarge the amount of data which is - fetched when you enter a group and slow down the process of entering a group). +in ~/.gnus.el to load enough old articles to prevent teared threads, replace 'some with t to load +all articles (Warning: Both settings enlarge the amount of data which is +fetched when you enter a group and slow down the process of entering a group). - If you already use Gnus 5.10, you can say - @samp{/o N} - In summary buffer to load the last N messages, this feature is not available in 5.8.8 - +If you already use Gnus 5.10, you can say +@samp{/o N} +In summary buffer to load the last N messages, this feature is not available in 5.8.8 - If you don't want all old messages, but the parent of the message you're just reading, - you can say @samp{^}, if you want to retrieve the whole thread - the message you're just reading belongs to, @samp{A T} is your friend. - -@ifnottex -@node [4.2], [4.3], [4.1], FAQ 4 - Reading messages -@end ifnottex -@subsubheading Question 4.2: +If you don't want all old messages, but the parent of the message you're just reading, +you can say @samp{^}, if you want to retrieve the whole thread +the message you're just reading belongs to, @samp{A T} is your friend. - How to tell Gnus to show an important message every time I - enter a group, even when it's read? - +@node [4.2] +@subsubheading Question 4.2 -Answer: +How to tell Gnus to show an important message every time I +enter a group, even when it's read? - You can tick important messages. To do this hit - @samp{u} while point is in summary buffer - over the message. When you want to remove the mark, hit - either @samp{d} (this deletes the tick - mark and set's unread mark) or @samp{M c} - (which deletes all marks for the message). - -@ifnottex -@node [4.3], [4.4], [4.2], FAQ 4 - Reading messages -@end ifnottex -@subsubheading Question 4.3: +@subsubheading Answer - How to view the headers of a message? - +You can tick important messages. To do this hit +@samp{u} while point is in summary buffer +over the message. When you want to remove the mark, hit +either @samp{d} (this deletes the tick +mark and set's unread mark) or @samp{M c} +(which deletes all marks for the message). -Answer: +@node [4.3] +@subsubheading Question 4.3 - Say @samp{t} - to show all headers, one more - @samp{t} - hides them again. - -@ifnottex -@node [4.4], [4.5], [4.3], FAQ 4 - Reading messages -@end ifnottex -@subsubheading Question 4.4: +How to view the headers of a message? - How to view the raw unformatted message? - +@subsubheading Answer -Answer: +Say @samp{t} +to show all headers, one more +@samp{t} +hides them again. - Say - @samp{C-u g} - to show the raw message - @samp{g} - returns to normal view. - -@ifnottex -@node [4.5], [4.6], [4.4], FAQ 4 - Reading messages -@end ifnottex -@subsubheading Question 4.5: +@node [4.4] +@subsubheading Question 4.4 - How can I change the headers Gnus displays by default at - the top of the article buffer? - +How to view the raw unformatted message? -Answer: +@subsubheading Answer + +Say +@samp{C-u g} +to show the raw message +@samp{g} +returns to normal view. + +@node [4.5] +@subsubheading Question 4.5 + +How can I change the headers Gnus displays by default at +the top of the article buffer? + +@subsubheading Answer + +The variable gnus-visible-headers controls which headers +are shown, its value is a regular expression, header lines +which match it are shown. So if you want author, subject, +date, and if the header exists, Followup-To and MUA / NUA +say this in ~/.gnus.el: - The variable gnus-visible-headers controls which headers - are shown, its value is a regular expression, header lines - which match it are shown. So if you want author, subject, - date, and if the header exists, Followup-To and MUA / NUA - say this in ~/.gnus: - @example -(setq gnus-visible-headers - "^\\(From:\\|Subject:\\|Date:\\|Followup-To:\ -\\|X-Newsreader:\\|User-Agent:\\|X-Mailer:\\)") +(setq gnus-visible-headers + '("^From" "^Subject" "^Date" "^Newsgroups" "^Followup-To" + "^User-Agent" "^X-Newsreader" "^X-Mailer")) @end example - -@ifnottex -@node [4.6], [4.7], [4.5], FAQ 4 - Reading messages -@end ifnottex -@subsubheading Question 4.6: +@noindent - I'd like Gnus NOT to render HTML-mails but show me the - text part if it's available. How to do it? - +@node [4.6] +@subsubheading Question 4.6 -Answer: +I'd like Gnus NOT to render HTML-mails but show me the +text part if it's available. How to do it? - Say - +@subsubheading Answer + +Say @example (eval-after-load "mm-decode" @@ -978,240 +884,206 @@ Answer: (add-to-list 'mm-discouraged-alternatives "text/html") (add-to-list 'mm-discouraged-alternatives "text/richtext"))) @end example - @noindent - in ~/.gnus. If you don't want HTML rendered, even if there's no text alternative add - + +in ~/.gnus.el. If you don't want HTML rendered, even if there's no text alternative add @example (setq mm-automatic-display (remove "text/html" mm-automatic-display)) @end example - @noindent - too. - -@ifnottex -@node [4.7], [4.8], [4.6], FAQ 4 - Reading messages -@end ifnottex -@subsubheading Question 4.7: - Can I use some other browser than w3 to render my HTML-mails? - +too. -Answer: +@node [4.7] +@subsubheading Question 4.7 - Only if you use Gnus 5.10 or younger. In this case you've got the - choice between w3, w3m, links, lynx and html2text, which - one is used can be specified in the variable - mm-text-html-renderer, so if you want links to render your - mail say - +Can I use some other browser than w3 to render my HTML-mails? + +@subsubheading Answer + +Only if you use Gnus 5.10 or younger. In this case you've got the +choice between w3, w3m, links, lynx and html2text, which +one is used can be specified in the variable +mm-text-html-renderer, so if you want links to render your +mail say @example (setq mm-text-html-renderer 'links) @end example - -@ifnottex -@node [4.8], [4.9], [4.7], FAQ 4 - Reading messages -@end ifnottex -@subsubheading Question 4.8: - - Is there anything I can do to make poorly formatted mails - more readable? - - -Answer: - - Gnus offers you several functions to "wash" incoming mail, - you can find them if you browse through the menu, item Article->Washing. The most - interesting ones are probably "Wrap long lines" ( - @samp{W w} - ), "Decode ROT13" ( - @samp{W r} - ) and "Outlook Deuglify" which repairs the dumb quoting used - by many users of Microsoft products ( - @samp{W Y f} gives you full deuglify. - See @samp{W Y C-h} or - have a look at the menus for other deuglifications). - Outlook deuglify is only available since Gnus 5.10. - -@ifnottex -@node [4.9], [4.10], [4.8], FAQ 4 - Reading messages -@end ifnottex -@subsubheading Question 4.9: - - Is there a way to automatically ignore posts by specific - authors or with specific words in the subject? And can I - highlight more interesting ones in some way? - - -Answer: - - You want Scoring. Scoring means, that you define rules - which assign each message an integer value. Depending on - the value the message is highlighted in summary buffer (if - it's high, say +2000) or automatically marked read (if the - value is low, say -800) or some other action happens. - - - There are basically three ways of setting up rules which assign - the scoring-value to messages. The first and easiest way is to set - up rules based on the article you are just reading. Say you're - reading a message by a guy who always writes nonsense and you want - to ignore his messages in the future. Hit - @samp{L}, to set up a rule which lowers the score. - Now Gnus asks you which the criteria for lowering the Score shall - be. Hit @samp{?} twice to see all possibilities, - we want @samp{a} which means the author (the from - header). Now Gnus wants to know which kind of matching we want. - Hit either @samp{e} for an exact match or - @samp{s} for substring-match and delete afterwards - everything but the name to score down all authors with the given - name no matter which email address is used. Now you need to tell - Gnus when to apply the rule and how long it should last, hit e.g. - @samp{p} to apply the rule now and let it last - forever. If you want to raise the score instead of lowering it say - @samp{I} instead of @samp{L}. - +@noindent - You can also set up rules by hand. To do this say @samp{V - f} in summary buffer. Then you are asked for the name - of the score file, it's name.of.group.SCORE for rules valid in - only one group or all.Score for rules valid in all groups. See the - Gnus manual for the exact syntax, basically it's one big list - whose elements are lists again. the first element of those lists - is the header to score on, then one more list with what to match, - which score to assign, when to expire the rule and how to do the - matching. If you find me very interesting, you could e.g. add the - following to your all.Score: - +@node [4.8] +@subsubheading Question 4.8 + +Is there anything I can do to make poorly formatted mails +more readable? + +@subsubheading Answer + +Gnus offers you several functions to "wash" incoming mail, you can +find them if you browse through the menu, item +Article->Washing. The most interesting ones are probably "Wrap +long lines" (@samp{W w}), "Decode ROT13" +(@samp{W r}) and "Outlook Deuglify" which repairs +the dumb quoting used by many users of Microsoft products +(@samp{W Y f} gives you full deuglify. +See @samp{W Y C-h} or have a look at the menus for +other deuglifications). Outlook deuglify is only available since +Gnus 5.10. + +@node [4.9] +@subsubheading Question 4.9 + +Is there a way to automatically ignore posts by specific +authors or with specific words in the subject? And can I +highlight more interesting ones in some way? + +@subsubheading Answer + +You want Scoring. Scoring means, that you define rules +which assign each message an integer value. Depending on +the value the message is highlighted in summary buffer (if +it's high, say +2000) or automatically marked read (if the +value is low, say -800) or some other action happens. + +There are basically three ways of setting up rules which assign +the scoring-value to messages. The first and easiest way is to set +up rules based on the article you are just reading. Say you're +reading a message by a guy who always writes nonsense and you want +to ignore his messages in the future. Hit +@samp{L}, to set up a rule which lowers the score. +Now Gnus asks you which the criteria for lowering the Score shall +be. Hit @samp{?} twice to see all possibilities, +we want @samp{a} which means the author (the from +header). Now Gnus wants to know which kind of matching we want. +Hit either @samp{e} for an exact match or +@samp{s} for substring-match and delete afterwards +everything but the name to score down all authors with the given +name no matter which email address is used. Now you need to tell +Gnus when to apply the rule and how long it should last, hit e.g. +@samp{p} to apply the rule now and let it last +forever. If you want to raise the score instead of lowering it say +@samp{I} instead of @samp{L}. + +You can also set up rules by hand. To do this say @samp{V +f} in summary buffer. Then you are asked for the name +of the score file, it's name.of.group.SCORE for rules valid in +only one group or all.Score for rules valid in all groups. See the +Gnus manual for the exact syntax, basically it's one big list +whose elements are lists again. the first element of those lists +is the header to score on, then one more list with what to match, +which score to assign, when to expire the rule and how to do the +matching. If you find me very interesting, you could e.g. add the +following to your all.Score: @example (("references" ("hschmi22.userfqdn.rz-online.de" 500 nil s)) ("message-id" ("hschmi22.userfqdn.rz-online.de" 999 nil s))) @end example - @noindent - This would add 999 to the score of messages written by me - and 500 to the score of messages which are a (possibly - indirect) answer to a message written by me. Of course - nobody with a sane mind would do this :-) - - The third alternative is adaptive scoring. This means Gnus - watches you and tries to find out what you find - interesting and what annoying and sets up rules - which reflect this. Adaptive scoring can be a huge help - when reading high traffic groups. If you want to activate - adaptive scoring say - +This would add 999 to the score of messages written by me +and 500 to the score of messages which are a (possibly +indirect) answer to a message written by me. Of course +nobody with a sane mind would do this :-) + +The third alternative is adaptive scoring. This means Gnus +watches you and tries to find out what you find +interesting and what annoying and sets up rules +which reflect this. Adaptive scoring can be a huge help +when reading high traffic groups. If you want to activate +adaptive scoring say @example (setq gnus-use-adaptive-scoring t) @end example - @noindent - in ~/.gnus. - -@ifnottex -@node [4.10], [4.11], [4.9], FAQ 4 - Reading messages -@end ifnottex -@subsubheading Question 4.10: - How can I disable threading in some (e.g. mail-) groups, or - set other variables specific for some groups? - +in ~/.gnus.el. -Answer: +@node [4.10] +@subsubheading Question 4.10 - While in group buffer move point over the group and hit - @samp{G c}, this opens a buffer where you - can set options for the group. At the bottom of the buffer - you'll find an item that allows you to set variables - locally for the group. To disable threading enter - gnus-show-threads as name of variable and nil as - value. Hit button done at the top of the buffer when - you're ready. - -@ifnottex -@node [4.11], [4.12], [4.10], FAQ 4 - Reading messages -@end ifnottex -@subsubheading Question 4.11: +How can I disable threading in some (e.g. mail-) groups, or +set other variables specific for some groups? - Can I highlight messages written by me and follow-ups to - those? - +@subsubheading Answer -Answer: +While in group buffer move point over the group and hit +@samp{G c}, this opens a buffer where you +can set options for the group. At the bottom of the buffer +you'll find an item that allows you to set variables +locally for the group. To disable threading enter +gnus-show-threads as name of variable and nil as +value. Hit button done at the top of the buffer when +you're ready. - Stop those "Can I ..." questions, the answer is always yes - in Gnus Country :-). It's a three step process: First we - make faces (specifications of how summary-line shall look - like) for those postings, then we'll give them some - special score and finally we'll tell Gnus to use the new - faces. You can find detailed instructions on how to do it on - @uref{http://my.gnus.org/Members/dzimmerm/HowTo%2C2002-07-25%2C1027619165012198456/view,my.gnus.org} - -@ifnottex -@node [4.12], [4.13], [4.11], FAQ 4 - Reading messages -@end ifnottex -@subsubheading Question 4.12: - - The number of total messages in a group which Gnus - displays in group buffer is by far to high, especially in - mail groups. Is this a bug? - +@node [4.11] +@subsubheading Question 4.11 -Answer: - - No, that's a matter of design of Gnus, fixing this would - mean reimplementation of major parts of Gnus' - back ends. Gnus thinks "highest-article-number - - lowest-article-number = total-number-of-articles". This - works OK for Usenet groups, but if you delete and move - many messages in mail groups, this fails. To cure the - symptom, enter the group via @samp{C-u RET} - (this makes Gnus get all messages), then - hit @samp{M P b} to mark all messages and - then say @samp{B m name.of.group} to move - all messages to the group they have been in before, they - get new message numbers in this process and the count is - right again (until you delete and move your mail to other - groups again). - -@ifnottex -@node [4.13], [4.14], [4.12], FAQ 4 - Reading messages -@end ifnottex -@subsubheading Question 4.13: +Can I highlight messages written by me and follow-ups to +those? - I don't like the layout of summary and article buffer, how - to change it? Perhaps even a three pane display? - +@subsubheading Answer -Answer: +Stop those "Can I ..." questions, the answer is always yes +in Gnus Country :-). It's a three step process: First we +make faces (specifications of how summary-line shall look +like) for those postings, then we'll give them some +special score and finally we'll tell Gnus to use the new +faces. You can find detailed instructions on how to do it on +@uref{http://my.gnus.org/node/view/224, my.gnus.org} - You can control the windows configuration by calling the - function gnus-add-configuration. The syntax is a bit - complicated but explained very well in the manual node - "Window Layout". Some popular examples: - +@node [4.12] +@subsubheading Question 4.12 - Instead 25% summary 75% article buffer 35% summary and 65% - article (the 1.0 for article means "take the remaining - space"): - +The number of total messages in a group which Gnus +displays in group buffer is by far to high, especially in +mail groups. Is this a bug? + +@subsubheading Answer + +No, that's a matter of design of Gnus, fixing this would +mean reimplementation of major parts of Gnus' +back ends. Gnus thinks "highest-article-number - +lowest-article-number = total-number-of-articles". This +works OK for Usenet groups, but if you delete and move +many messages in mail groups, this fails. To cure the +symptom, enter the group via @samp{C-u RET} +(this makes Gnus get all messages), then +hit @samp{M P b} to mark all messages and +then say @samp{B m name.of.group} to move +all messages to the group they have been in before, they +get new message numbers in this process and the count is +right again (until you delete and move your mail to other +groups again). + +@node [4.13] +@subsubheading Question 4.13 + +I don't like the layout of summary and article buffer, how +to change it? Perhaps even a three pane display? + +@subsubheading Answer + +You can control the windows configuration by calling the +function gnus-add-configuration. The syntax is a bit +complicated but explained very well in the manual node +"Window Layout". Some popular examples: + +Instead 25% summary 75% article buffer 35% summary and 65% +article (the 1.0 for article means "take the remaining +space"): @example -(gnus-add-configuration - '(article (vertical 1.0 - (summary .35 point) - (article 1.0)))) +(gnus-add-configuration + '(article (vertical 1.0 (summary .35 point) (article 1.0)))) @end example - +@noindent - A three pane layout, Group buffer on the left, summary - buffer top-right, article buffer bottom-right: - +A three pane layout, Group buffer on the left, summary +buffer top-right, article buffer bottom-right: @example (gnus-add-configuration @@ -1228,46 +1100,40 @@ Answer: (vertical 25 (group 1.0)) (vertical 1.0 - (summary 1.0 point))))) + (summary 1.0 point))))) @end example - -@ifnottex -@node [4.14], [4.15], [4.13], FAQ 4 - Reading messages -@end ifnottex -@subsubheading Question 4.14: +@noindent - I don't like the way the Summary buffer looks, how to tweak it? - +@node [4.14] +@subsubheading Question 4.14 -Answer: - - You've got to play around with the variable - gnus-summary-line-format. It's value is a string of - symbols which stand for things like author, date, subject - etc. A list of the available specifiers can be found in the - manual node "Summary Buffer Lines" and the often forgotten - node "Formatting Variables" and it's sub-nodes. There - you'll find useful things like positioning the cursor and - tabulators which allow you a summary in table form, but - sadly hard tabulators are broken in 5.8.8. - +I don't like the way the Summary buffer looks, how to tweak it? - Since 5.10, Gnus offers you some very nice new specifiers, - e.g. %B which draws a thread-tree and %&user-date which - gives you a date where the details are dependent of the - articles age. Here's an example which uses both: - +@subsubheading Answer + +You've got to play around with the variable +gnus-summary-line-format. It's value is a string of +symbols which stand for things like author, date, subject +etc. A list of the available specifiers can be found in the +manual node "Summary Buffer Lines" and the often forgotten +node "Formatting Variables" and it's sub-nodes. There +you'll find useful things like positioning the cursor and +tabulators which allow you a summary in table form, but +sadly hard tabulators are broken in 5.8.8. + +Since 5.10, Gnus offers you some very nice new specifiers, +e.g. %B which draws a thread-tree and %&user-date which +gives you a date where the details are dependent of the +articles age. Here's an example which uses both: @example -(setq gnus-summary-line-format - ":%U%R %B %s %-60=|%4L |%-20,20f |%&user-date; \n") +(setq gnus-summary-line-format ":%U%R %B %s %-60=|%4L |%-20,20f |%&user-date; \n") @end example - @noindent - resulting in: - -@smallexample +resulting in: + +@example :O Re: [Richard Stallman] rfc2047.el | 13 |Lars Magne Ingebrigt |Sat 23:06 :O Re: Revival of the ding-patches list | 13 |Lars Magne Ingebrigt |Sat 23:12 :R > Re: Find correct list of articles for a gro| 25 |Lars Magne Ingebrigt |Sat 23:16 @@ -1280,54 +1146,48 @@ Answer: :R > Re: Gnus still doesn't count messages prope| 23 |Lars Magne Ingebrigt |Sat 23:57 :O \-> ... | 18 |Kai Grossjohann | 0:35 :O \-> ... | 13 |Lars Magne Ingebrigt | 0:56 -@end smallexample - -@ifnottex -@node [4.15], , [4.14], FAQ 4 - Reading messages -@end ifnottex -@subsubheading Question 4.15: +@end example +@noindent - How to split incoming mails in several groups? - +@node [4.15] +@subsubheading Question 4.15 -Answer: +How to split incoming mails in several groups? - Gnus offers two possibilities for splitting mail, the easy - nnmail-split-methods and the more powerful Fancy Mail - Splitting. I'll only talk about the first one, refer to - the manual, node "Fancy Mail Splitting" for the latter. - +@subsubheading Answer - The value of nnmail-split-methods is a list, each element - is a list which stands for a splitting rule. Each rule has - the form "group where matching articles should go to", - "regular expression which has to be matched", the first - rule which matches wins. The last rule must always be a - general rule (regular expression .*) which denotes where - articles should go which don't match any other rule. If - the folder doesn't exist yet, it will be created as soon - as an article lands there. By default the mail will be - send to all groups whose rules match. If you - don't want that (you probably don't want), say - +Gnus offers two possibilities for splitting mail, the easy +nnmail-split-methods and the more powerful Fancy Mail +Splitting. I'll only talk about the first one, refer to +the manual, node "Fancy Mail Splitting" for the latter. + +The value of nnmail-split-methods is a list, each element +is a list which stands for a splitting rule. Each rule has +the form "group where matching articles should go to", +"regular expression which has to be matched", the first +rule which matches wins. The last rule must always be a +general rule (regular expression .*) which denotes where +articles should go which don't match any other rule. If +the folder doesn't exist yet, it will be created as soon +as an article lands there. By default the mail will be +send to all groups whose rules match. If you +don't want that (you probably don't want), say @example (setq nnmail-crosspost nil) @end example - @noindent - in ~/.gnus. - - An example might be better than thousand words, so here's - my nnmail-split-methods. Note that I send duplicates in a - special group and that the default group is spam, since I - filter all mails out which are from some list I'm - subscribed to or which are addressed directly to me - before. Those rules kill about 80% of the Spam which - reaches me (Email addresses are changed to prevent spammers - from using them): - +in ~/.gnus.el. + +An example might be better than thousand words, so here's +my nnmail-split-methods. Note that I send duplicates in a +special group and that the default group is spam, since I +filter all mails out which are from some list I'm +subscribed to or which are addressed directly to me +before. Those rules kill about 80% of the Spam which +reaches me (Email addresses are changed to prevent spammers +from using them): @example (setq nnmail-split-methods @@ -1336,133 +1196,114 @@ Answer: ("Gnus-Tut" "^\\(To:\\|CC:\\).*localpart@@socha.bla.*") ("tcsh" "^\\(To:\\|CC:\\).*localpart@@mx.gw.bla.*") ("BAfH" "^\\(To:\\|CC:\\).*localpart@@.*uni-muenchen.bla.*") - ("Hamster-src" - "^\\(CC:\\|To:\\).*hamster-sourcen@@yahoogroups.\\(de\\|com\\).*") + ("Hamster-src" "^\\(CC:\\|To:\\).*hamster-sourcen@@yahoogroups.\\(de\\|com\\).*") ("Tagesschau" "^From: tagesschau $") ("Replies" "^\\(CC:\\|To:\\).*localpart@@Frank-Schmitt.bla.*") - ("EK" - "^From:.*\\(localpart@@privateprovider.bla\\|localpart@@workplace.bla\\).*") - ("Spam" - "^Content-Type:.*\\(ks_c_5601-1987\\|EUC-KR\\|big5\\|iso-2022-jp\\).*") - ("Spam" - "^Subject:.*\\(This really work\\|XINGA\\|ADV:\\|XXX\\|adult\\|sex\\).*") - ("Spam" - "^Subject:.*\\(\=\?ks_c_5601-1987\?\\|\=\?euc-kr\?\\|\=\?big5\?\\).*") + ("EK" "^From:.*\\(localpart@@privateprovider.bla\\|localpart@@workplace.bla\\).*") + ("Spam" "^Content-Type:.*\\(ks_c_5601-1987\\|EUC-KR\\|big5\\|iso-2022-jp\\).*") + ("Spam" "^Subject:.*\\(This really work\\|XINGA\\|ADV:\\|XXX\\|adult\\|sex\\).*") + ("Spam" "^Subject:.*\\(\=\?ks_c_5601-1987\?\\|\=\?euc-kr\?\\|\=\?big5\?\\).*") ("Spam" "^X-Mailer:\\(.*BulkMailer.*\\|.*MIME::Lite.*\\|\\)") - ("Spam" - "^X-Mailer:\\(.*CyberCreek Avalanche\\|.*http\:\/\/GetResponse\.com\\)") - ("Spam" - "^From:.*\\(verizon\.net\\|prontomail\.com\\|money\\|ConsumerDirect\\).*") + ("Spam" "^X-Mailer:\\(.*CyberCreek Avalanche\\|.*http\:\/\/GetResponse\.com\\)") + ("Spam" "^From:.*\\(verizon\.net\\|prontomail\.com\\|money\\|ConsumerDirect\\).*") ("Spam" "^Delivered-To: GMX delivery to spamtrap@@gmx.bla$") ("Spam" "^Received: from link2buy.com") ("Spam" "^CC: .*azzrael@@t-online.bla") ("Spam" "^X-Mailer-Version: 1.50 BETA") ("Uni" "^\\(CC:\\|To:\\).*localpart@@uni-koblenz.bla.*") - ("Inbox" - "^\\(CC:\\|To:\\).*\\(my\ name\\|address@@one.bla\\|adress@@two.bla\\)") + ("Inbox" "^\\(CC:\\|To:\\).*\\(my\ name\\|address@@one.bla\\|adress@@two.bla\\)") ("Spam" ""))) @end example - +@noindent -@ifnottex -@node FAQ 5 - Composing messages, FAQ 6 - Old messages, FAQ 4 - Reading messages, Frequently Asked Questions -@end ifnottex +@node FAQ 5 - Composing messages @subsection Composing messages @menu -* [5.1]:: What are the basic commands I need to know for sending mail and - postings? -* [5.2]:: How to enable automatic word-wrap when composing messages? -* [5.3]:: How to set stuff like From, Organization, Reply-To, signature...? -* [5.4]:: Can I set things like From, Signature etc group based on the - group I post too? -* [5.5]:: Is there a spell-checker? Perhaps even on-the-fly spell-checking? -* [5.6]:: Can I set the dictionary based on the group I'm posting to? -* [5.7]:: Is there some kind of address-book, so I needn't remember all - those email addresses? -* [5.8]:: Sometimes I see little images at the top of article buffer. - What's that and how can I send one with my postings, too? -* [5.9]:: Sometimes I accidentally hit r instead of f in newsgroups. - Can Gnus warn me, when I'm replying by mail in newsgroups? -* [5.10]:: How to tell Gnus not to generate a sender header? -* [5.11]:: I want Gnus to locally store copies of my send mail and news, - how to do it? -* [5.12]:: People tell me my Message-IDs are not correct, - why aren't they and how to fix it? +* [5.1]:: What are the basic commands I need to know for sending + mail and postings? +* [5.2]:: How to enable automatic word-wrap when composing messages? +* [5.3]:: How to set stuff like From, Organization, Reply-To, + signature...? +* [5.4]:: Can I set things like From, Signature etc group based on + the group I post too? +* [5.5]:: Is there a spell-checker? Perhaps even on-the-fly + spell-checking? +* [5.6]:: Can I set the dictionary based on the group I'm posting + to? +* [5.7]:: Is there some kind of address-book, so I needn't remember + all those email addresses? +* [5.8]:: Sometimes I see little images at the top of article + buffer. What's that and how can I send one with my postings, too? +* [5.9]:: Sometimes I accidentally hit r instead of f in newsgroups. + Can Gnus warn me, when I'm replying by mail in newsgroups? +* [5.10]:: How to tell Gnus not to generate a sender header? +* [5.11]:: I want Gnus to locally store copies of my send mail and + news, how to do it? +* [5.12]:: People tell me my Message-IDs are not correct, why aren't + they and how to fix it? @end menu -@ifnottex -@node [5.1], [5.2], FAQ 5 - Composing messages, FAQ 5 - Composing messages -@end ifnottex -@subsubheading Question 5.1: +@node [5.1] +@subsubheading Question 5.1 - What are the basic commands I need to know for sending mail and postings? - +What are the basic commands I need to know for sending mail and postings? -Answer: - - To start composing a new mail hit @samp{m} - either in Group or Summary buffer, for a posting, it's - either @samp{a} in Group buffer and - filling the Newsgroups header manually - or @samp{a} in the Summary buffer of the - group where the posting shall be send to. Replying by mail - is - @samp{r} if you don't want to cite the - author, or import the cited text manually and - @samp{R} to cite the text of the original - message. For a follow up to a newsgroup, it's - @samp{f} and @samp{F} - (analog to @samp{r} and - @samp{R}). - +@subsubheading Answer - Enter new headers above the line saying "--text follows - this line--", enter the text below the line. When ready - hit @samp{C-c C-c}, to send the message, - if you want to finish it later hit @samp{C-c - C-d} to save it in the drafts group, where you - can start editing it again by saying @samp{D - e}. - -@ifnottex -@node [5.2], [5.3], [5.1], FAQ 5 - Composing messages -@end ifnottex -@subsubheading Question 5.2: +To start composing a new mail hit @samp{m} +either in Group or Summary buffer, for a posting, it's +either @samp{a} in Group buffer and +filling the Newsgroups header manually +or @samp{a} in the Summary buffer of the +group where the posting shall be send to. Replying by mail +is +@samp{r} if you don't want to cite the +author, or import the cited text manually and +@samp{R} to cite the text of the original +message. For a follow up to a newsgroup, it's +@samp{f} and @samp{F} +(analogously to @samp{r} and +@samp{R}). - How to enable automatic word-wrap when composing messages? - +Enter new headers above the line saying "--text follows +this line--", enter the text below the line. When ready +hit @samp{C-c C-c}, to send the message, +if you want to finish it later hit @samp{C-c +C-d} to save it in the drafts group, where you +can start editing it again by saying @samp{D +e}. -Answer: +@node [5.2] +@subsubheading Question 5.2 - Say - +How to enable automatic word-wrap when composing messages? + +@subsubheading Answer + +Say @example (add-hook 'message-mode-hook - (lambda () - (setq fill-column 72) - (turn-on-auto-fill))) + (lambda () + (setq fill-column 72) + (turn-on-auto-fill))) @end example - @noindent - in ~/.gnus. You can reformat a paragraph by hitting - @samp{M-q} (as usual) - -@ifnottex -@node [5.3], [5.4], [5.2], FAQ 5 - Composing messages -@end ifnottex -@subsubheading Question 5.3: - How to set stuff like From, Organization, Reply-To, signature...? - +in ~/.gnus.el. You can reformat a paragraph by hitting +@samp{M-q} (as usual) -Answer: +@node [5.3] +@subsubheading Question 5.3 - There are other ways, but you should use posting styles - for this. (See below why). - This example should make the syntax clear: - +How to set stuff like From, Organization, Reply-To, signature...? + +@subsubheading Answer + +There are other ways, but you should use posting styles +for this. (See below why). +This example should make the syntax clear: @example (setq gnus-posting-styles @@ -1474,146 +1315,121 @@ Answer: ("X-SampleHeader" "foobar") (eval (setq some-variable "Foo bar"))))) @end example - @noindent - The ".*" means that this settings are the default ones - (see below), valid values for the first element of the - following lists are signature, signature-file, - organization, address, name or body. The attribute name - can also be a string. In that case, this will be used as - a header name, and the value will be inserted in the - headers of the article; if the value is `nil', the header - name will be removed. You can also say (eval (foo bar)), - then the function foo will be evaluated with argument bar - and the result will be thrown away. - -@ifnottex -@node [5.4], [5.5], [5.3], FAQ 5 - Composing messages -@end ifnottex -@subsubheading Question 5.4: - - Can I set things like From, Signature etc group based on the group I post too? - -Answer: - - That's the strength of posting styles. Before, we used ".*" - to set the default for all groups. You can use a regexp - like "^gmane" and the following settings are only applied - to postings you send to the gmane hierarchy, use - ".*binaries" instead and they will be applied to postings - send to groups containing the string binaries in their - name etc. - - - You can instead of specifying a regexp specify a function - which is evaluated, only if it returns true, the - corresponding settings take effect. Two interesting - candidates for this are message-news-p which returns t if - the current Group is a newsgroup and the corresponding - message-mail-p. - - - Note that all forms that match are applied, that means in - the example below, when I post to - gmane.mail.spam.spamassassin.general, the settings under - ".*" are applied and the settings under message-news-p and - those under "^gmane" and those under - "^gmane\\.mail\\.spam\\.spamassassin\\.general$". Because - of this put general settings at the top and specific ones - at the bottom. - +The ".*" means that this settings are the default ones +(see below), valid values for the first element of the +following lists are signature, signature-file, +organization, address, name or body. The attribute name +can also be a string. In that case, this will be used as +a header name, and the value will be inserted in the +headers of the article; if the value is `nil', the header +name will be removed. You can also say (eval (foo bar)), +then the function foo will be evaluated with argument bar +and the result will be thrown away. + +@node [5.4] +@subsubheading Question 5.4 + +Can I set things like From, Signature etc group based on the group I post too? + +@subsubheading Answer + +That's the strength of posting styles. Before, we used ".*" +to set the default for all groups. You can use a regexp +like "^gmane" and the following settings are only applied +to postings you send to the gmane hierarchy, use +".*binaries" instead and they will be applied to postings +send to groups containing the string binaries in their +name etc. + +You can instead of specifying a regexp specify a function +which is evaluated, only if it returns true, the +corresponding settings take effect. Two interesting +candidates for this are message-news-p which returns t if +the current Group is a newsgroup and the corresponding +message-mail-p. + +Note that all forms that match are applied, that means in +the example below, when I post to +gmane.mail.spam.spamassassin.general, the settings under +".*" are applied and the settings under message-news-p and +those under "^gmane" and those under +"^gmane\\.mail\\.spam\\.spamassassin\\.general$". Because +of this put general settings at the top and specific ones +at the bottom. @example (setq gnus-posting-styles '((".*" ;;default (name "Frank Schmitt") (organization "Hamme net, kren mer och nimmi") - (signature-file "~/.signature")) + (signature-file "~/.signature") ) ((message-news-p) ;;Usenet news? (address "mySpamTrap@@Frank-Schmitt.bla") - ("Reply-To" "hereRealRepliesOnlyPlease@@Frank-Schmitt.bla")) + ("Reply-To" "hereRealRepliesOnlyPlease@@Frank-Schmitt.bla") ) ((message-mail-p) ;;mail? - (address "usedForMails@@Frank-Schmitt.bla")) + (address "usedForMails@@Frank-Schmitt.bla") ) ("^gmane" ;;this is mail, too in fact (address "usedForMails@@Frank-Schmitt.net") - ("Reply-To" nil)) + ("Reply-To" nil) ) ("^gmane.mail.spam.spamassassin.general$" (eval (setq mail-envelope-from "Azzrael@@rz-online.de")) - (address "Azzrael@@rz-online.de")))) + (address "Azzrael@@rz-online.de")) )) @end example - -@ifnottex -@node [5.5], [5.6], [5.4], FAQ 5 - Composing messages -@end ifnottex -@subsubheading Question 5.5: +@noindent - Is there a spell-checker? Perhaps even on-the-fly spell-checking? - +@node [5.5] +@subsubheading Question 5.5 -Answer: +Is there a spell-checker? Perhaps even on-the-fly spell-checking? -You can use ispell.el to spell-check stuff in Emacs. So the first -thing to do is to make sure that you've got either -@itemize @bullet -@item -@uref{http://fmg-www.cs.ucla.edu/fmg-members/geoff/ispell.html,ispell} -or -@item -@uref{http://aspell.sourceforge.net/,aspell} -@end itemize -@noindent -installed and in your Path. - -Then you need -@uref{http://www.kdstevens.com/~stevens/ispell-page.html,ispell.el,ispell.el} -and for on-the-fly spell-checking -@uref{http://www-sop.inria.fr/mimosa/personnel/Manuel.Serrano/flyspell/flyspell.html,flyspell.el,flyspell.el}. -Ispell.el is shipped with Gnus Emacs and available through the Emacs -package system, flyspell.el is shipped with Emacs and part of XEmacs -text-modes package which is available through the package system, so -there should be no need to install them manually. - +@subsubheading Answer - Ispell.el assumes you use ispell, if you choose aspell say - +You can use ispell.el to spell-check stuff in Emacs. So the +first thing to do is to make sure that you've got either +@uref{http://fmg-www.cs.ucla.edu/fmg-members/geoff/ispell.html, ispell} +or @uref{http://aspell.sourceforge.net/, aspell} +installed and in your Path. Then you need +@uref{http://www.kdstevens.com/~stevens/ispell-page.html, ispell.el} +and for on-the-fly spell-checking +@uref{http://www-sop.inria.fr/mimosa/personnel/Manuel.Serrano/flyspell/flyspell.html, flyspell.el}. +Ispell.el is shipped with Emacs and available through the XEmacs package system, +flyspell.el is shipped with Emacs and part of XEmacs text-modes package which is +available through the package system, so there should be no need to install them +manually. + +Ispell.el assumes you use ispell, if you choose aspell say @example (setq ispell-program-name "aspell") @end example - - @noindent - in your Emacs configuration file. +in your Emacs configuration file. - If you want your outgoing messages to be spell-checked, say - +If you want your outgoing messages to be spell-checked, say @example (add-hook 'message-send-hook 'ispell-message) @end example - @noindent - In your ~/.gnus, if you prefer on-the-fly spell-checking say - + +In your ~/.gnus.el, if you prefer on-the-fly spell-checking say @example (add-hook 'message-mode-hook (lambda () (flyspell-mode 1))) @end example - -@ifnottex -@node [5.6], [5.7], [5.5], FAQ 5 - Composing messages -@end ifnottex -@subsubheading Question 5.6: +@noindent - Can I set the dictionary based on the group I'm posting to? - +@node [5.6] +@subsubheading Question 5.6 -Answer: +Can I set the dictionary based on the group I'm posting to? - Yes, say something like - +@subsubheading Answer + +Yes, say something like @example (add-hook 'gnus-select-group-hook @@ -1625,55 +1441,47 @@ Answer: (t (ispell-change-dictionary "english"))))) @end example - - @noindent - in ~/.gnus. Change "^de\\." and "deutsch8" to something - that suits your needs. -@ifnottex -@node [5.7], [5.8], [5.6], FAQ 5 - Composing messages -@end ifnottex -@subsubheading Question 5.7: +in ~/.gnus.el. Change "^de\\." and "deutsch8" to something +that suits your needs. - Is there some kind of address-book, so I needn't remember - all those email addresses? - +@node [5.7] +@subsubheading Question 5.7 -Answer: +Is there some kind of address-book, so I needn't remember +all those email addresses? - There's an very basic solution for this, mail aliases. - You can store your mail addresses in a ~/.mailrc file using a simple - alias syntax: - +@subsubheading Answer + +There's an very basic solution for this, mail aliases. +You can store your mail addresses in a ~/.mailrc file using a simple +alias syntax: @example alias al "Al " @end example - @noindent - Then typing your alias (followed by a space or punctuation - character) on a To: or Cc: line in the message buffer will - cause Gnus to insert the full address for you. See the - node "Mail Aliases" in Message (not Gnus) manual for - details. - - However, what you really want is the Insidious Big Brother - Database bbdb. Get it through the XEmacs package system or from - @uref{http://bbdb.sourceforge.net/,bbdb's homepage}. - Now place the following in ~/.gnus, to activate bbdb for Gnus: - +Then typing your alias (followed by a space or punctuation +character) on a To: or Cc: line in the message buffer will +cause Gnus to insert the full address for you. See the +node "Mail Aliases" in Message (not Gnus) manual for +details. + +However, what you really want is the Insidious Big Brother +Database bbdb. Get it through the XEmacs package system or from +@uref{http://bbdb.sourceforge.net/, bbdb's homepage}. +Now place the following in ~/.gnus.el, to activate bbdb for Gnus: @example (require 'bbdb) (bbdb-initialize 'gnus 'message) @end example - @noindent - Now you probably want some general bbdb configuration, - place them in ~/.emacs: - + +Now you probably want some general bbdb configuration, +place them in ~/.emacs: @example (require 'bbdb) @@ -1689,56 +1497,50 @@ alias al "Al " ;;No popup-buffers (setq bbdb-use-pop-up nil) @end example - @noindent - Now you should be ready to go. Say @samp{M-x bbdb RET - RET} to open a bbdb buffer showing all - entries. Say @samp{c} to create a new - entry, @samp{b} to search your BBDB and - @samp{C-o} to add a new field to an - entry. If you want to add a sender to the BBDB you can - also just hit `:' on the posting in the summary buffer and - you are done. When you now compose a new mail, - hit @samp{TAB} to cycle through know - recipients. - -@ifnottex -@node [5.8], [5.9], [5.7], FAQ 5 - Composing messages -@end ifnottex -@subsubheading Question 5.8: - - Sometimes I see little images at the top of article - buffer. What's that and how can I send one with my - postings, too? - -Answer: - - Those images are called X-Faces. They are 48*48 pixel b/w - pictures, encoded in a header line. If you want to include - one in your posts, you've got to convert some image to a - X-Face. So fire up some image manipulation program (say - Gimp), open the image you want to include, cut out the - relevant part, reduce color depth to 1 bit, resize to - 48*48 and save as bitmap. Now you should get the compface - package from - @uref{ftp://ftp.cs.indiana.edu:/pub/faces/,this site}. - and create the actual X-face by saying - +Now you should be ready to go. Say @samp{M-x bbdb RET +RET} to open a bbdb buffer showing all +entries. Say @samp{c} to create a new +entry, @samp{b} to search your BBDB and +@samp{C-o} to add a new field to an +entry. If you want to add a sender to the BBDB you can +also just hit `:' on the posting in the summary buffer and +you are done. When you now compose a new mail, +hit @samp{TAB} to cycle through know +recipients. + +@node [5.8] +@subsubheading Question 5.8 + +Sometimes I see little images at the top of article +buffer. What's that and how can I send one with my +postings, too? + +@subsubheading Answer + +Those images are called X-Faces. They are 48*48 pixel b/w +pictures, encoded in a header line. If you want to include +one in your posts, you've got to convert some image to a +X-Face. So fire up some image manipulation program (say +Gimp), open the image you want to include, cut out the +relevant part, reduce color depth to 1 bit, resize to +48*48 and save as bitmap. Now you should get the compface +package from +@uref{ftp://ftp.cs.indiana.edu:/pub/faces/, this site}. +and create the actual X-face by saying @example -cat file.xbm | xbm2ikon |compface > file.face -cat ./file.face | sed 's/\\/\\\\/g' | sed 's/\"/\\\"/g' > ./file.face.quoted +cat file.xbm | xbm2ikon | compface > file.face +cat file.face | sed 's/\\/\\\\/g;s/\"/\\\"/g;' > file.face.quoted @end example - @noindent -If you can't use compface, there's an online X-face converter at@* -@uref{http://www.dairiki.org/xface/}. If you use MS Windows, you -could also use the WinFace program from -@uref{http://www.xs4all.nl/~walterln/winface/}. -Now you only have to tell Gnus to include the X-face in your postings -by saying +If you can't use compface, there's an online X-face converter at +@uref{http://www.dairiki.org/xface/}. +If you use MS Windows, you could also use the WinFace program from +@uref{http://www.xs4all.nl/~walterln/winface/}. +Now you only have to tell Gnus to include the X-face in your postings by saying @example (setq message-default-headers @@ -1747,33 +1549,28 @@ by saying (insert-file-contents "~/.xemacs/xface") (buffer-string))) @end example - @noindent - in ~/.gnus. - -@ifnottex -@node [5.9], [5.10], [5.8], FAQ 5 - Composing messages -@end ifnottex -@subsubheading Question 5.9: - - Sometimes I accidentally hit r instead of f in - newsgroups. Can Gnus warn me, when I'm replying by mail in - newsgroups? - -Answer: +in ~/.gnus.el. - Put this in ~/.gnus: - +@node [5.9] +@subsubheading Question 5.9 + +Sometimes I accidentally hit r instead of f in +newsgroups. Can Gnus warn me, when I'm replying by mail in +newsgroups? + +@subsubheading Answer + +Put this in ~/.gnus.el: @example (setq gnus-confirm-mail-reply-to-news t) @end example - @noindent - if you already use Gnus 5.10, if you still use 5.8.8 or - 5.9 try this instead: - + +if you already use Gnus 5.10, if you still use 5.8.8 or +5.9 try this instead: @example (eval-after-load "gnus-msg" @@ -1785,44 +1582,37 @@ Answer: (y-or-n-p "Really reply by mail to article author? ")) ad-do-it)))) @end example - -@ifnottex -@node [5.10], [5.11], [5.9], FAQ 5 - Composing messages -@end ifnottex -@subsubheading Question 5.10: +@noindent - How to tell Gnus not to generate a sender header? - +@node [5.10] +@subsubheading Question 5.10 -Answer: +How to tell Gnus not to generate a sender header? - Since 5.10 Gnus doesn't generate a sender header by - default. For older Gnus' try this in ~/.gnus: - +@subsubheading Answer + +Since 5.10 Gnus doesn't generate a sender header by +default. For older Gnus' try this in ~/.gnus.el: @example (eval-after-load "message" '(add-to-list 'message-syntax-checks '(sender . disabled))) @end example - - -@ifnottex -@node [5.11], [5.12], [5.10], FAQ 5 - Composing messages -@end ifnottex -@subsubheading Question 5.11: +@noindent - I want gnus to locally store copies of my send mail and - news, how to do it? - +@node [5.11] +@subsubheading Question 5.11 -Answer: +I want Gnus to locally store copies of my send mail and +news, how to do it? - You must set the variable gnus-message-archive-group to do - this. You can set it to a string giving the name of the - group where the copies shall go or like in the example - below use a function which is evaluated and which returns - the group to use. - +@subsubheading Answer + +You must set the variable gnus-message-archive-group to do +this. You can set it to a string giving the name of the +group where the copies shall go or like in the example +below use a function which is evaluated and which returns +the group to use. @example (setq gnus-message-archive-group @@ -1830,31 +1620,31 @@ Answer: "nnml:Send-News" "nnml:Send-Mail"))) @end example - - -@ifnottex -@node [5.12], , [5.11], FAQ 5 - Composing messages -@end ifnottex -@subsubheading Question 5.12: +@noindent - People tell me my Message-IDs are not correct, why - aren't they and how to fix it? - +@node [5.12] +@subsubheading Question 5.12 + +People tell me my Message-IDs are not correct, why +aren't they and how to fix it? -Answer: +@subsubheading Answer + +The message-ID is an unique identifier for messages you +send. To make it unique, Gnus need to know which machine +name to put after the "@@". If the name of the machine +where Gnus is running isn't suitable (it probably isn't +at most private machines) you can tell Gnus what to use +by saying: - The message-ID is an unique identifier for messages you - send. To make it unique, Gnus need to know which machine - name to put after the "@@". If the name of the machine - where Gnus is running isn't suitable (it probably isn't - at most private machines) you can tell Gnus what to use - by saying @example (setq message-user-fqdn "yourmachine.yourdomain.tld") @end example @noindent - in ~/.gnus. If you use Gnus 5.9 or ealier, you can use this -instead (works for newer versions a well): + +in ~/.gnus.el. If you use Gnus 5.9 or ealier, you can use this +instead (works for newer versions a well): + @example (eval-after-load "message" '(let ((fqdn "yourmachine.yourdomain.tld"));; <-- Edit this! @@ -1865,110 +1655,97 @@ instead (works for newer versions a well): "Return user's fully qualified domain name." fqdn)))) @end example +@noindent - If you have no idea what to insert for - "yourmachine.yourdomain.tld", you've got several - choices. You can either ask your provider if he allows - you to use something like - yourUserName.userfqdn.provider.net, or you can use - somethingUnique.yourdomain.tld if you own the domain - yourdomain.tld, or you can register at a service which - gives private users a FQDN for free, e.g. - @uref{http://www.stura.tu-freiberg.de/~dlx/addfqdn.html}. - (Sorry but this website is in German, if you know of an - English one offering the same, drop me a note). - - - Finally you can tell Gnus not to generate a Message-ID - for News at all (and letting the server do the job) by saying - +If you have no idea what to insert for +"yourmachine.yourdomain.tld", you've got several +choices. You can either ask your provider if he allows +you to use something like +yourUserName.userfqdn.provider.net, or you can use +somethingUnique.yourdomain.tld if you own the domain +yourdomain.tld, or you can register at a service which +gives private users a FQDN for free, e.g. +@uref{http://www.stura.tu-freiberg.de/~dlx/addfqdn.html}. +(Sorry but this website is in German, if you know of an +English one offering the same, drop me a note). + +Finally you can tell Gnus not to generate a Message-ID +for News at all (and letting the server do the job) by saying @example (setq message-required-news-headers (remove' Message-ID message-required-news-headers)) @end example - @noindent - you can also tell Gnus not to generate Message-IDs for mail by saying - + +you can also tell Gnus not to generate Message-IDs for mail by saying @example (setq message-required-mail-headers (remove' Message-ID message-required-mail-headers)) @end example - @noindent - , however some mail servers don't generate proper - Message-IDs, too, so test if your Mail Server behaves - correctly by sending yourself a Mail and looking at the Message-ID. - -@ifnottex -@node FAQ 6 - Old messages, FAQ 7 - Gnus in a dial-up environment, FAQ 5 - Composing messages, Frequently Asked Questions -@end ifnottex +, however some mail servers don't generate proper +Message-IDs, too, so test if your Mail Server behaves +correctly by sending yourself a Mail and looking at the Message-ID. + +@node FAQ 6 - Old messages @subsection Old messages @menu -* [6.1]:: How to import my old mail into Gnus? -* [6.2]:: How to archive interesting messages? -* [6.3]:: How to search for a specific message? -* [6.4]:: How to get rid of old unwanted mail? -* [6.5]:: I want that all read messages are expired (at least in some - groups). How to do it? -* [6.6]:: I don't want expiration to delete my mails but to move them - to another group. +* [6.1]:: How to import my old mail into Gnus? +* [6.2]:: How to archive interesting messages? +* [6.3]:: How to search for a specific message? +* [6.4]:: How to get rid of old unwanted mail? +* [6.5]:: I want that all read messages are expired (at least in some + groups). How to do it? +* [6.6]:: I don't want expiration to delete my mails but to move them + to another group. @end menu -@ifnottex -@node [6.1], [6.2], FAQ 6 - Old messages, FAQ 6 - Old messages -@end ifnottex -@subsubheading Question 6.1: - - How to import my old mail into Gnus? - - -Answer: - - The easiest way is to tell your old mail program to - export the messages in mbox format. Most Unix mailers - are able to do this, if you come from the MS Windows - world, you may find tools at - @uref{http://mbx2mbox.sourceforge.net/}. - - - Now you've got to import this mbox file into Gnus. To do - this, create a nndoc group based on the mbox file by - saying @samp{G f /path/file.mbox RET} in - Group buffer. You now have read-only access to your - mail. If you want to import the messages to your normal - Gnus mail groups hierarchy, enter the nndoc group you've - just created by saying @samp{C-u RET} - (thus making sure all messages are retrieved), mark all - messages by saying @samp{M P b} and - either copy them to the desired group by saying - @samp{B c name.of.group RET} or send them - through nnmail-split-methods (respool them) by saying - @samp{B r}. - -@ifnottex -@node [6.2], [6.3], [6.1], FAQ 6 - Old messages -@end ifnottex -@subsubheading Question 6.2: - - How to archive interesting messages? - - -Answer: - - If you stumble across an interesting message, say in - gnu.emacs.gnus and want to archive it there are several - solutions. The first and easiest is to save it to a file - by saying @samp{O f}. However, wouldn't - it be much more convenient to have more direct access to - the archived message from Gnus? If you say yes, put this - snippet by Frank Haun in - ~/.gnus: - +@node [6.1] +@subsubheading Question 6.1 + +How to import my old mail into Gnus? + +@subsubheading Answer + +The easiest way is to tell your old mail program to +export the messages in mbox format. Most Unix mailers +are able to do this, if you come from the MS Windows +world, you may find tools at +@uref{http://mbx2mbox.sourceforge.net/}. + +Now you've got to import this mbox file into Gnus. To do +this, create a nndoc group based on the mbox file by +saying @samp{G f /path/file.mbox RET} in +Group buffer. You now have read-only access to your +mail. If you want to import the messages to your normal +Gnus mail groups hierarchy, enter the nndoc group you've +just created by saying @samp{C-u RET} +(thus making sure all messages are retrieved), mark all +messages by saying @samp{M P b} and +either copy them to the desired group by saying +@samp{B c name.of.group RET} or send them +through nnmail-split-methods (respool them) by saying +@samp{B r}. + +@node [6.2] +@subsubheading Question 6.2 + +How to archive interesting messages? + +@subsubheading Answer + +If you stumble across an interesting message, say in +gnu.emacs.gnus and want to archive it there are several +solutions. The first and easiest is to save it to a file +by saying @samp{O f}. However, wouldn't +it be much more convenient to have more direct access to +the archived message from Gnus? If you say yes, put this +snippet by Frank Haun in +~/.gnus.el: @example (defun my-archive-article (&optional n) @@ -1987,620 +1764,527 @@ more then one article." (replace-regexp-in-string "^.*:" "" gnus-newsgroup-name))))) (gnus-summary-copy-article n archive-name))) @end example - @noindent - You can now say @samp{M-x - my-archive-article} in summary buffer to - archive the article under the cursor in a nnml - group. (Change nnml to your preferred back end) - - Of course you can also make sure the cache is enabled by saying - +You can now say @samp{M-x +my-archive-article} in summary buffer to +archive the article under the cursor in a nnml +group. (Change nnml to your preferred back end) + +Of course you can also make sure the cache is enabled by saying @example (setq gnus-use-cache t) @end example - @noindent - then you only have to set either the tick or the dormant - mark for articles you want to keep, setting the read - mark will remove them from cache. - -@ifnottex -@node [6.3], [6.4], [6.2], FAQ 6 - Old messages -@end ifnottex -@subsubheading Question 6.3: - - How to search for a specific message? - - -Answer: - - There are several ways for this, too. For a posting from - a Usenet group the easiest solution is probably to ask - @uref{http://groups.google.com,groups.google.com}, - if you found the posting there, tell Google to display - the raw message, look for the message-id, and say - @samp{M-^ the@@message.id RET} in a - summary buffer. - Since Gnus 5.10 there's also a Gnus interface for - groups.google.com which you can call with - @samp{G W}) in group buffer. - - - Another idea which works for both mail and news groups - is to enter the group where the message you are - searching is and use the standard Emacs search - @samp{C-s}, it's smart enough to look at - articles in collapsed threads, too. If you want to - search bodies, too try @samp{M-s} - instead. Further on there are the - gnus-summary-limit-to-foo functions, which can help you, - too. - - Of course you can also use grep to search through your - local mail, but this is both slow for big archives and - inconvenient since you are not displaying the found mail - in Gnus. Here comes nnir into action. Nnir is a front end - to search engines like swish-e or swish++ and - others. You index your mail with one of those search - engines and with the help of nnir you can search trough - the indexed mail and generate a temporary group with all - messages which met your search criteria. If this sound - cool to you get nnir.el from the contrib directory of the Gnus - distribution or - @uref{http://quimby.gnus.org/cgi-bin/cvsweb.cgi/~checkout~/gnus/contrib/nnir.el?rev=HEAD&content-type=text/plain} - Instructions on how to use it are at the top of the file. - -@ifnottex -@node [6.4], [6.5], [6.3], FAQ 6 - Old messages -@end ifnottex -@subsubheading Question 6.4: - - How to get rid of old unwanted mail? - - -Answer: - - You can of course just mark the mail you don't need - anymore by saying @samp{#} with point - over the mail and then say @samp{B DEL} - to get rid of them forever. You could also instead of - actually deleting them, send them to a junk-group by - saying @samp{B m nnml:trash-bin} which - you clear from time to time, but both are not the intended - way in Gnus. - - - In Gnus, we let mail expire like news expires on a news - server. That means you tell Gnus the message is - expirable (you tell Gnus "I don't need this mail - anymore") by saying @samp{E} with point - over the mail in summary buffer. Now when you leave the - group, Gnus looks at all messages which you marked as - expirable before and if they are old enough (default is - older than a week) they are deleted. - -@ifnottex -@node [6.5], [6.6], [6.4], FAQ 6 - Old messages -@end ifnottex -@subsubheading Question 6.5: - - I want that all read messages are expired (at least in - some groups). How to do it? - - -Answer: - - If you want all read messages to be expired (e.g. in - mailing lists where there's an online archive), you've - got two choices: auto-expire and - total-expire. Auto-expire means, that every article - which has no marks set and is selected for reading is - marked as expirable, Gnus hits @samp{E} - for you every time you read a message. Total-expire - follows a slightly different approach, here all article - where the read mark is set are expirable. - - - To activate auto-expire, include auto-expire in the - Group parameters for the group. (Hit @samp{G - c} in summary buffer with point over the - group to change group parameters). For total-expire add - total-expire to the group-parameters. - - - Which method you choose is merely a matter of taste: - Auto-expire is faster, but it doesn't play together with - Adaptive Scoring, so if you want to use this feature, - you should use total-expire. - - - If you want a message to be excluded from expiration in - a group where total or auto expire is active, set either - tick (hit @samp{u}) or dormant mark (hit - @samp{u}), when you use auto-expire, you - can also set the read mark (hit - @samp{d}). - -@ifnottex -@node [6.6], , [6.5], FAQ 6 - Old messages -@end ifnottex -@subsubheading Question 6.6: - - I don't want expiration to delete my mails but to move them - to another group. - - -Answer: - - Say something like this in ~/.gnus: - +then you only have to set either the tick or the dormant +mark for articles you want to keep, setting the read +mark will remove them from cache. + +@node [6.3] +@subsubheading Question 6.3 + +How to search for a specific message? + +@subsubheading Answer + +There are several ways for this, too. For a posting from +a Usenet group the easiest solution is probably to ask +@uref{http://groups.google.com, groups.google.com}, +if you found the posting there, tell Google to display +the raw message, look for the message-id, and say +@samp{M-^ the@@message.id RET} in a +summary buffer. +Since Gnus 5.10 there's also a Gnus interface for +groups.google.com which you can call with +@samp{G W}) in group buffer. + +Another idea which works for both mail and news groups +is to enter the group where the message you are +searching is and use the standard Emacs search +@samp{C-s}, it's smart enough to look at +articles in collapsed threads, too. If you want to +search bodies, too try @samp{M-s} +instead. Further on there are the +gnus-summary-limit-to-foo functions, which can help you, +too. + +Of course you can also use grep to search through your +local mail, but this is both slow for big archives and +inconvenient since you are not displaying the found mail +in Gnus. Here comes nnir into action. Nnir is a front end +to search engines like swish-e or swish++ and +others. You index your mail with one of those search +engines and with the help of nnir you can search trough +the indexed mail and generate a temporary group with all +messages which met your search criteria. If this sound +cool to you get nnir.el from +@uref{ftp://ls6-ftp.cs.uni-dortmund.de/pub/src/emacs/} +or @uref{ftp://ftp.is.informatik.uni-duisburg.de/pub/src/emacs/}. +Instructions on how to use it are at the top of the file. + +@node [6.4] +@subsubheading Question 6.4 + +How to get rid of old unwanted mail? + +@subsubheading Answer + +You can of course just mark the mail you don't need +anymore by saying @samp{#} with point +over the mail and then say @samp{B DEL} +to get rid of them forever. You could also instead of +actually deleting them, send them to a junk-group by +saying @samp{B m nnml:trash-bin} which +you clear from time to time, but both are not the intended +way in Gnus. + +In Gnus, we let mail expire like news expires on a news +server. That means you tell Gnus the message is +expirable (you tell Gnus "I don't need this mail +anymore") by saying @samp{E} with point +over the mail in summary buffer. Now when you leave the +group, Gnus looks at all messages which you marked as +expirable before and if they are old enough (default is +older than a week) they are deleted. + +@node [6.5] +@subsubheading Question 6.5 + +I want that all read messages are expired (at least in +some groups). How to do it? + +@subsubheading Answer + +If you want all read messages to be expired (e.g. in +mailing lists where there's an online archive), you've +got two choices: auto-expire and +total-expire. Auto-expire means, that every article +which has no marks set and is selected for reading is +marked as expirable, Gnus hits @samp{E} +for you every time you read a message. Total-expire +follows a slightly different approach, here all article +where the read mark is set are expirable. + +To activate auto-expire, include auto-expire in the +Group parameters for the group. (Hit @samp{G +c} in summary buffer with point over the +group to change group parameters). For total-expire add +total-expire to the group-parameters. + +Which method you choose is merely a matter of taste: +Auto-expire is faster, but it doesn't play together with +Adaptive Scoring, so if you want to use this feature, +you should use total-expire. + +If you want a message to be excluded from expiration in +a group where total or auto expire is active, set either +tick (hit @samp{u}) or dormant mark (hit +@samp{u}), when you use auto-expire, you +can also set the read mark (hit +@samp{d}). + +@node [6.6] +@subsubheading Question 6.6 + +I don't want expiration to delete my mails but to move them +to another group. + +@subsubheading Answer + +Say something like this in ~/.gnus.el: @example (setq nnmail-expiry-target "nnml:expired") @end example - @noindent - (If you want to change the value of nnmail-expiry-target - on a per group basis see the question "How can I disable - threading in some (e.g. mail-) groups, or set other - variables specific for some groups?") - -@ifnottex -@node FAQ 7 - Gnus in a dial-up environment, FAQ 8 - Getting help, FAQ 6 - Old messages, Frequently Asked Questions -@end ifnottex +(If you want to change the value of nnmail-expiry-target +on a per group basis see the question "How can I disable +threading in some (e.g. mail-) groups, or set other +variables specific for some groups?") + +@node FAQ 7 - Gnus in a dial-up environment @subsection Gnus in a dial-up environment @menu -* [7.1]:: I don't have a permanent connection to the net, how can I - minimize the time I've got to be connected? -* [7.2]:: So what was this thing about the Agent? -* [7.3]:: I want to store article bodies on disk, too. How to do it? -* [7.4]:: How to tell Gnus not to try to send mails / postings while - I'm offline? +* [7.1]:: I don't have a permanent connection to the net, how can I + minimize the time I've got to be connected? +* [7.2]:: So what was this thing about the Agent? +* [7.3]:: I want to store article bodies on disk, too. How to do it? +* [7.4]:: How to tell Gnus not to try to send mails / postings while + I'm offline? @end menu - -@ifnottex -@node [7.1], [7.2], FAQ 7 - Gnus in a dial-up environment, FAQ 7 - Gnus in a dial-up environment -@end ifnottex -@subsubheading Question 7.1: - - I don't have a permanent connection to the net, how can - I minimize the time I've got to be connected? - - -Answer: - - You've got basically two options: Either you use the - Gnus Agent (see below) for this, or you can install - programs which fetch your news and mail to your local - disk and Gnus reads the stuff from your local - machine. - - - If you want to follow the second approach, you need a - program which fetches news and offers them to Gnus, a - program which does the same for mail and a program which - receives the mail you write from Gnus and sends them - when you're online. - - -Let's talk about Unix systems first: For the news part, the easiest -solution is a small nntp server like -@uref{http://www.leafnode.org/,Leafnode} or -@uref{http://infa.abo.fi/~patrik/sn/,sn}, of course you can also -install a full featured news server like -@uref{http://www.isc.org/products/INN/,inn}. - -Then you want to fetch your Mail, popular choices are -@itemize @bullet -@item -@uref{http://www.catb.org/~esr/fetchmail/,fetchmail} and -@item -@uref{http://www.qcc.ca/~charlesc/software/getmail-3.0/,getmail}. -@end itemize -You should tell those to write the mail to your disk and Gnus to read -it from there. Last but not least the mail sending part: This can be -done with every MTA like @uref{http://www.sendmail.org/,sendmail}, -@uref{http://www.qmail.org/,postfix}, @uref{http://www.exim.org/,exim} -or @uref{http://www.qmail.org/,qmail}. - - - On windows boxes I'd vote for - @uref{http://www.tglsoft.de/,Hamster}, - it's a small freeware, open-source program which fetches - your mail and news from remote servers and offers them - to Gnus (or any other mail and/or news reader) via nntp - respectively POP3 or IMAP. It also includes a smtp - server for receiving mails from Gnus. - -@ifnottex -@node [7.2], [7.3], [7.1], FAQ 7 - Gnus in a dial-up environment -@end ifnottex -@subsubheading Question 7.2: - - So what was this thing about the Agent? - - -Answer: - - The Gnus agent is part of Gnus, it allows you to fetch - mail and news and store them on disk for reading them - later when you're offline. It kind of mimics offline - newsreaders like e.g. Forte Agent. If you want to use - the Agent place the following in ~/.gnus if you are - still using 5.8.8 or 5.9 (it's the default since 5.10): - +@node [7.1] +@subsubheading Question 7.1 + +I don't have a permanent connection to the net, how can +I minimize the time I've got to be connected? + +@subsubheading Answer + +You've got basically two options: Either you use the +Gnus Agent (see below) for this, or you can install +programs which fetch your news and mail to your local +disk and Gnus reads the stuff from your local +machine. + +If you want to follow the second approach, you need a +program which fetches news and offers them to Gnus, a +program which does the same for mail and a program which +receives the mail you write from Gnus and sends them +when you're online. + +Let's talk about Unix systems first: For the news part, +the easiest solution is a small nntp server like +@uref{http://www.leafnode.org/, Leafnode} or +@uref{http://infa.abo.fi/~patrik/sn/, sn}, +of course you can also install a full featured news +server like +@uref{http://www.isc.org/products/INN/, inn}. +Then you want to fetch your Mail, popular choices +are @uref{http://www.catb.org/~esr/fetchmail/, fetchmail} +and @uref{http://www.qcc.ca/~charlesc/software/getmail-3.0/, getmail}. +You should tell those to write the mail to your disk and +Gnus to read it from there. Last but not least the mail +sending part: This can be done with every MTA like +@uref{http://www.sendmail.org/, sendmail}, +@uref{http://www.qmail.org/, postfix}, +@uref{http://www.exim.org/, exim} or +@uref{http://www.qmail.org/, qmail}. + +On windows boxes I'd vote for +@uref{http://www.tglsoft.de/, Hamster}, +it's a small freeware, open-source program which fetches +your mail and news from remote servers and offers them +to Gnus (or any other mail and/or news reader) via nntp +respectively POP3 or IMAP. It also includes a smtp +server for receiving mails from Gnus. + +@node [7.2] +@subsubheading Question 7.2 + +So what was this thing about the Agent? + +@subsubheading Answer + +The Gnus agent is part of Gnus, it allows you to fetch +mail and news and store them on disk for reading them +later when you're offline. It kind of mimics offline +newsreaders like e.g. Forte Agent. If you want to use +the Agent place the following in ~/.gnus.el if you are +still using 5.8.8 or 5.9 (it's the default since 5.10): @example (setq gnus-agent t) @end example - +@noindent - Now you've got to select the servers whose groups can be - stored locally. To do this, open the server buffer - (that is press @samp{^} while in the - group buffer). Now select a server by moving point to - the line naming that server. Finally, agentize the - server by typing @samp{J a}. If you - make a mistake, or change your mind, you can undo this - action by typing @samp{J r}. When - you're done, type 'q' to return to the group buffer. - Now the next time you enter a group on a agentized - server, the headers will be stored on disk and read from - there the next time you enter the group. - -@ifnottex -@node [7.3], [7.4], [7.2], FAQ 7 - Gnus in a dial-up environment -@end ifnottex -@subsubheading Question 7.3: +Now you've got to select the servers whose groups can be +stored locally. To do this, open the server buffer +(that is press @samp{^} while in the +group buffer). Now select a server by moving point to +the line naming that server. Finally, agentize the +server by typing @samp{J a}. If you +make a mistake, or change your mind, you can undo this +action by typing @samp{J r}. When +you're done, type 'q' to return to the group buffer. +Now the next time you enter a group on a agentized +server, the headers will be stored on disk and read from +there the next time you enter the group. + +@node [7.3] +@subsubheading Question 7.3 + +I want to store article bodies on disk, too. How to do it? + +@subsubheading Answer + +You can tell the agent to automatically fetch the bodies +of articles which fulfill certain predicates, this is +done in a special buffer which can be reached by +saying @samp{J c} in group +buffer. Please refer to the documentation for +information which predicates are possible and how +exactly to do it. + +Further on you can tell the agent manually which +articles to store on disk. There are two ways to do +this: Number one: In the summary buffer, process mark a +set of articles that shall be stored in the agent by +saying @samp{#} with point over the +article and then type @samp{J s}. The +other possibility is to set, again in the summary +buffer, downloadable (%) marks for the articles you +want by typing @samp{@@} with point over +the article and then typing @samp{J u}. +What's the difference? Well, process marks are erased as +soon as you exit the summary buffer while downloadable +marks are permanent. You can actually set downloadable +marks in several groups then use fetch session ('J s' in +the GROUP buffer) to fetch all of those articles. The +only downside is that fetch session also fetches all of +the headers for every selected group on an agentized +server. Depending on the volume of headers, the initial +fetch session could take hours. + +@node [7.4] +@subsubheading Question 7.4 + +How to tell Gnus not to try to send mails / postings +while I'm offline? + +@subsubheading Answer + +All you've got to do is to tell Gnus when you are online +(plugged) and when you are offline (unplugged), the rest +works automatically. You can toggle plugged/unplugged +state by saying @samp{J j} in group +buffer. To start Gnus unplugged say @samp{M-x +gnus-unplugged} instead of +@samp{M-x gnus}. Note that for this to +work, the agent must be active. + +@node FAQ 8 - Getting help +@subsection Getting help - I want to store article bodies on disk, too. How to do it? - +@menu +* [8.1]:: How to find information and help inside Emacs? +* [8.2]:: I can't find anything in the Gnus manual about X (e.g. + attachments, PGP, MIME...), is it not documented? +* [8.3]:: Which websites should I know? +* [8.4]:: Which mailing lists and newsgroups are there? +* [8.5]:: Where to report bugs? +* [8.6]:: I need real-time help, where to find it? +@end menu -Answer: +@node [8.1] +@subsubheading Question 8.1 - You can tell the agent to automatically fetch the bodies - of articles which fulfill certain predicates, this is - done in a special buffer which can be reached by - saying @samp{J c} in group - buffer. Please refer to the documentation for - information which predicates are possible and how - exactly to do it. - +How to find information and help inside Emacs? - Further on you can tell the agent manually which - articles to store on disk. There are two ways to do - this: Number one: In the summary buffer, process mark a - set of articles that shall be stored in the agent by - saying @samp{#} with point over the - article and then type @samp{J s}. The - other possibility is to set, again in the summary - buffer, downloadable (%) marks for the articles you - want by typing @samp{@@} with point over - the article and then typing @samp{J u}. - What's the difference? Well, process marks are erased as - soon as you exit the summary buffer while downloadable - marks are permanent. You can actually set downloadable - marks in several groups then use fetch session ('J s' in - the GROUP buffer) to fetch all of those articles. The - only downside is that fetch session also fetches all of - the headers for every selected group on an agentized - server. Depending on the volume of headers, the initial - fetch session could take hours. - -@ifnottex -@node [7.4], , [7.3], FAQ 7 - Gnus in a dial-up environment -@end ifnottex -@subsubheading Question 7.4: +@subsubheading Answer - How to tell Gnus not to try to send mails / postings - while I'm offline? - +The first stop should be the Gnus manual (Say +@samp{C-h i d m Gnus RET} to start the +Gnus manual, then walk through the menus or do a +full-text search with @samp{s}). Then +there are the general Emacs help commands starting with +C-h, type @samp{C-h ? ?} to get a list +of all available help commands and their meaning. Finally +@samp{M-x apropos-command} lets you +search through all available functions and @samp{M-x +apropos} searches the bound variables. -Answer: +@node [8.2] +@subsubheading Question 8.2 - All you've got to do is to tell Gnus when you are online - (plugged) and when you are offline (unplugged), the rest - works automatically. You can toggle plugged/unplugged - state by saying @samp{J j} in group - buffer. To start Gnus unplugged say @samp{M-x - gnus-unplugged} instead of - @samp{M-x gnus}. Note that for this to - work, the agent must be active. - +I can't find anything in the Gnus manual about X +(e.g. attachments, PGP, MIME...), is it not documented? -@ifnottex -@node FAQ 8 - Getting help, FAQ 9 - Tuning Gnus, FAQ 7 - Gnus in a dial-up environment, Frequently Asked Questions -@end ifnottex -@subsection Getting help +@subsubheading Answer -@menu -* [8.1]:: How to find information and help inside Emacs? -* [8.2]:: I can't find anything in the Gnus manual about X - (e.g. attachments, PGP, MIME...), is it not documented? -* [8.3]:: Which websites should I know? -* [8.4]:: Which mailing lists and newsgroups are there? -* [8.5]:: Where to report bugs? -* [8.6]:: I need real-time help, where to find it? -@end menu +There's not only the Gnus manual but also the manuals +for message, emacs-mime, sieve and pgg. Those packages +are distributed with Gnus and used by Gnus but aren't +really part of core Gnus, so they are documented in +different info files, you should have a look in those +manuals, too. -@ifnottex -@node [8.1], [8.2], FAQ 8 - Getting help, FAQ 8 - Getting help -@end ifnottex -@subsubheading Question 8.1: +@node [8.3] +@subsubheading Question 8.3 - How to find information and help inside Emacs? - +Which websites should I know? -Answer: - - The first stop should be the Gnus manual (Say - @samp{C-h i d m Gnus RET} to start the - Gnus manual, then walk through the menus or do a - full-text search with @samp{s}). Then - there are the general Emacs help commands starting with - C-h, type @samp{C-h ? ?} to get a list - of all available help commands and their meaning. Finally - @samp{M-x apropos-command} lets you - search through all available functions and @samp{M-x - apropos} searches the bound variables. - -@ifnottex -@node [8.2], [8.3], [8.1], FAQ 8 - Getting help -@end ifnottex -@subsubheading Question 8.2: +@subsubheading Answer - I can't find anything in the Gnus manual about X - (e.g. attachments, PGP, MIME...), is it not documented? - +The two most important ones are the +@uref{http://www.gnus.org, official Gnus website}. +and it's sister site +@uref{http://my.gnus.org, my.gnus.org (MGO)}, +hosting an archive of lisp snippets, howtos, a (not +really finished) tutorial and this FAQ. -Answer: +Tell me about other sites which are interesting. - There's not only the Gnus manual but also the manuals - for message, emacs-mime, sieve and pgg. Those packages - are distributed with Gnus and used by Gnus but aren't - really part of core Gnus, so they are documented in - different info files, you should have a look in those - manuals, too. - -@ifnottex -@node [8.3], [8.4], [8.2], FAQ 8 - Getting help -@end ifnottex -@subsubheading Question 8.3: +@node [8.4] +@subsubheading Question 8.4 - Which websites should I know? - +Which mailing lists and newsgroups are there? -Answer: +@subsubheading Answer - The two most important ones are the - @uref{http://www.gnus.org,official Gnus website}. - and it's sister site - @uref{http://my.gnus.org,my.gnus.org (MGO)}, - hosting an archive of lisp snippets, howtos, a (not - really finished) tutorial and this FAQ. - +There's the newsgroup gnu.emacs.gnus (pull it from +e.g. news.gnus.org) which deals with general questions and the +ding mailing list (ding@@gnus.org) dealing with development of +Gnus. You can read the ding list via NNTP, too under the name +gmane.emacs.gnus.general from news.gmane.org. - Tell me about other sites which are interesting. - -@ifnottex -@node [8.4], [8.5], [8.3], FAQ 8 - Getting help -@end ifnottex -@subsubheading Question 8.4: +If you want to stay in the big8, +news.software.newssreaders is also read by some Gnus +users (but chances for qualified help are much better in +the above groups) and if you speak German, there's +de.comm.software.gnus. - Which mailing lists and newsgroups are there? - +@node [8.5] +@subsubheading Question 8.5 -Answer: +Where to report bugs? - There's the newsgroup gnu.emacs.gnus (pull it from - e.g. news.gnus.org) which deals with general questions - and the ding mailing list (ding@@gnus.org) dealing with - development of Gnus. You can read the ding list via - NNTP, too under the name gnus.ding from news.gnus.org. - +@subsubheading Answer - If you want to stay in the big8, - news.software.newssreaders is also read by some Gnus - users (but chances for qualified help are much better in - the above groups) and if you speak German, there's - de.comm.software.gnus. - -@ifnottex -@node [8.5], [8.6], [8.4], FAQ 8 - Getting help -@end ifnottex -@subsubheading Question 8.5: +Say @samp{M-x gnus-bug}, this will start +a message to the +@email{bugs@@gnus.org, gnus bug mailing list} +including information about your environment which make +it easier to help you. - Where to report bugs? - +@node [8.6] +@subsubheading Question 8.6 -Answer: +I need real-time help, where to find it? -Say @samp{M-x gnus-bug}, this will start a message to the -@email{bugs@@gnus.org,gnus bug mailing list} including information -about your environment which make it easier to help you. - -@ifnottex -@node [8.6], , [8.5], FAQ 8 - Getting help -@end ifnottex -@subsubheading Question 8.6: +@subsubheading Answer - I need real-time help, where to find it? - - -Answer: - - Point your IRC client to irc.my.gnus.org channel - #mygnus. Don't be afraid if people there speak German, - they are willing and capable of switching to - English when people from outside Germany enter. - +Point your IRC client to irc.my.gnus.org channel +#mygnus. Don't be afraid if people there speak German, +they are willing and capable of switching to +English when people from outside Germany enter. -@ifnottex -@node FAQ 9 - Tuning Gnus, FAQ - Glossary, FAQ 8 - Getting help, Frequently Asked Questions -@end ifnottex +@node FAQ 9 - Tuning Gnus @subsection Tuning Gnus @menu -* [9.1]:: Starting Gnus is really slow, how to speed it up? -* [9.2]:: How to speed up the process of entering a group? -* [9.3]:: Sending mail becomes slower and slower, what's up? +* [9.1]:: Starting Gnus is really slow, how to speed it up? +* [9.2]:: How to speed up the process of entering a group? +* [9.3]:: Sending mail becomes slower and slower, what's up? @end menu -@ifnottex -@node [9.1], [9.2], FAQ 9 - Tuning Gnus, FAQ 9 - Tuning Gnus -@end ifnottex -@subsubheading Question 9.1: +@node [9.1] +@subsubheading Question 9.1 - Starting Gnus is really slow, how to speed it up? - +Starting Gnus is really slow, how to speed it up? -Answer: - - The reason for this could be the way Gnus reads it's - active file, see the node "The Active File" in the Gnus - manual for things you might try to speed the process up. - An other idea would be to byte compile your ~/.gnus (say - @samp{M-x byte-compile-file RET ~/.gnus - RET} to do it). Finally, if you have require - statements in your .gnus, you could replace them with - eval-after-load, which loads the stuff not at startup - time, but when it's needed. Say you've got this in your - ~/.gnus: - +@subsubheading Answer + +The reason for this could be the way Gnus reads it's +active file, see the node "The Active File" in the Gnus +manual for things you might try to speed the process up. +An other idea would be to byte compile your ~/.gnus.el (say +@samp{M-x byte-compile-file RET ~/.gnus.el +RET} to do it). Finally, if you have require +statements in your .gnus, you could replace them with +eval-after-load, which loads the stuff not at startup +time, but when it's needed. Say you've got this in your +~/.gnus.el: @example (require 'message) (add-to-list 'message-syntax-checks '(sender . disabled)) @end example - @noindent - then as soon as you start Gnus, message.el is loaded. If - you replace it with - + +then as soon as you start Gnus, message.el is loaded. If +you replace it with @example (eval-after-load "message" '(add-to-list 'message-syntax-checks '(sender . disabled))) @end example - @noindent - it's loaded when it's needed. - -@ifnottex -@node [9.2], [9.3], [9.1], FAQ 9 - Tuning Gnus -@end ifnottex -@subsubheading Question 9.2: - How to speed up the process of entering a group? - +it's loaded when it's needed. -Answer: +@node [9.2] +@subsubheading Question 9.2 - A speed killer is setting the variable - gnus-fetch-old-headers to anything different from nil, - so don't do this if speed is an issue. To speed up - building of summary say - +How to speed up the process of entering a group? + +@subsubheading Answer + +A speed killer is setting the variable +gnus-fetch-old-headers to anything different from nil, +so don't do this if speed is an issue. To speed up +building of summary say @example (gnus-compile) @end example - @noindent - at the bottom of your ~/.gnus, this will make gnus - byte-compile things like - gnus-summary-line-format. - then you could increase the value of gc-cons-threshold - by saying something like - + +at the bottom of your ~/.gnus.el, this will make gnus +byte-compile things like +gnus-summary-line-format. +then you could increase the value of gc-cons-threshold +by saying something like @example (setq gc-cons-threshold 3500000) @end example - @noindent - in ~/.emacs. If you don't care about width of CJK - characters or use Gnus 5.10 or younger together with a - recent GNU Emacs, you should say - + +in ~/.emacs. If you don't care about width of CJK +characters or use Gnus 5.10 or younger together with a +recent GNU Emacs, you should say @example -(setq gnus-use-correct-string-widths nil) +(setq gnus-use-correct-string-widths nil) @end example - - @noindent - in ~/.gnus (thanks to Jesper harder for the last - two suggestions). Finally if you are still using 5.8.8 - or 5.9 and experience speed problems with summary - buffer generation, you definitely should update to - 5.10 since there quite some work on improving it has - been done. -@ifnottex -@node [9.3], , [9.2], FAQ 9 - Tuning Gnus -@end ifnottex -@subsubheading Question 9.3: +in ~/.gnus.el (thanks to Jesper harder for the last +two suggestions). Finally if you are still using 5.8.8 +or 5.9 and experience speed problems with summary +buffer generation, you definitely should update to +5.10 since there quite some work on improving it has +been done. - Sending mail becomes slower and slower, what's up? - +@node [9.3] +@subsubheading Question 9.3 -Answer: +Sending mail becomes slower and slower, what's up? - The reason could be that you told Gnus to archive the - messages you wrote by setting - gnus-message-archive-group. Try to use a nnml group - instead of an archive group, this should bring you back - to normal speed. - +@subsubheading Answer -@ifnottex -@node FAQ - Glossary, , FAQ 9 - Tuning Gnus, Frequently Asked Questions -@end ifnottex +The reason could be that you told Gnus to archive the +messages you wrote by setting +gnus-message-archive-group. Try to use a nnml group +instead of an archive group, this should bring you back +to normal speed. + +@node FAQ - Glossary @subsection Glossary @table @dfn -@item ~/.gnus - When the term ~/.gnus is used it just means your Gnus - configuration file. You might as well call it ~/.gnus.el or - specify another name. - +@item ~/.gnus.el +When the term ~/.gnus.el is used it just means your Gnus +configuration file. You might as well call it ~/.gnus or +specify another name. @item Back End - In Gnus terminology a back end is a virtual server, a layer - between core Gnus and the real NNTP-, POP3-, IMAP- or - whatever-server which offers Gnus a standardized interface - to functions like "get message", "get Headers" etc. - +In Gnus terminology a back end is a virtual server, a layer +between core Gnus and the real NNTP-, POP3-, IMAP- or +whatever-server which offers Gnus a standardized interface +to functions like "get message", "get Headers" etc. @item Emacs - When the term Emacs is used in this FAQ, it means either GNU - Emacs or XEmacs. - +When the term Emacs is used in this FAQ, it means either GNU +Emacs or XEmacs. @item Message - In this FAQ message means a either a mail or a posting to a - Usenet Newsgroup or to some other fancy back end, no matter - of which kind it is. - +In this FAQ message means a either a mail or a posting to a +Usenet Newsgroup or to some other fancy back end, no matter +of which kind it is. @item MUA - MUA is an acronym for Mail User Agent, it's the program you - use to read and write e-mails. - +MUA is an acronym for Mail User Agent, it's the program you +use to read and write e-mails. @item NUA - NUA is an acronym for News User Agent, it's the program you - use to read and write Usenet news. - -@end table +NUA is an acronym for News User Agent, it's the program you +use to read and write Usenet news. -@c @bye +@end table diff --git a/texi/xml2texi.scm b/texi/xml2texi.scm new file mode 100644 index 0000000..de68c37 --- /dev/null +++ b/texi/xml2texi.scm @@ -0,0 +1,432 @@ +;;; xml2texi.scm --- Convert gnus-faq.xml to gnus-faq.texi +;; Copyright (C) 2005 Free Software Foundation, Inc. + +;; Author: Karl Pflästerer +;; Keywords: tools + +;; This file is not part of GNU Emacs. + +;; GNU Emacs is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 2, or (at your option) +;; any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, +;; Boston, MA 02111-1307, USA. + +;;; Commentary: +;; + +;;; Code: + +(require (lib "ssax.ss" "ssax") + (lib "sxpath.ss" "ssax") + (lib "sxml-tree-trans.ss" "ssax") + (lib "pregexp.ss") + (lib "list.ss") + (lib "etc.ss") + (rename (lib "1.ss" "srfi") list-index list-index) + (rename (lib "13.ss" "srfi") string-join string-join)) + + +;;; Constants +;; In and out; for convenience if we work from the REPL +(define +infile+ "gnus-faq.xml") +(define +outfile+ "gnus-faq.texi") + +;; These are the names of the sections. These variables hold the names +;; of the sections where numbering starts in the main menu. +;; Where we start numbering in menu +(define +first-numbered-section+ "Installation FAQ") +;; Where we end numbering in menu +(define +last-numbered-section+ "Tuning Gnus") + +;; Which sections not to include; i.e. not to name a node. +(define +ignored-sections+ '("Frequently Asked Questions with Answers")) + +;; Names of menu entries and the corresponding descriptions (used in the +;; main menu). +(define +section-comments-alist+ + '(("Introduction" . "About Gnus and this FAQ.") + ("Installation FAQ" . "Installation of Gnus.") + ("Startup / Group buffer" . "Start up questions and the first buffer Gnus shows you.") + ("Getting Messages" . "Making Gnus read your mail and news.") + ("Reading messages" . "How to efficiently read messages.") + ("Composing messages" . "Composing mails or Usenet postings.") + ("Old messages" . "Importing, archiving, searching and deleting messages.") + ("Gnus in a dial-up environment" . "Reading mail and news while offline.") + ("Getting help" . "When this FAQ isn't enough.") + ("Tuning Gnus" . "How to make Gnus faster.") + ("Glossary" . "Terms used in the FAQ explained."))) + +;; Where to break descriptions in menus +(define +width+ 72) + +;; The boilerplate text we include before the document +(define boilerplate + (lambda (titel) + (format + "\ +@c \\input texinfo @c -*-texinfo-*-~%\ +@c Uncomment 1st line before texing this file alone.~%\ +@c %**start of header~%\ +@c Copyright (C) 1995, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.~%\ +@setfilename gnus-faq.info~%\ +@settitle ~A~%\ +@c %**end of header~%\ +" titel))) + +;; Inserted right before the end of the file +(define +tag-for-gnus-faq-texi+ + (format "\ +~%\ +@ignore~%\ +arch-\ +tag: 64dc5692-edb4-4848-a965-7aa0181acbb8~%\ +@end ignore~%\ +")) + +;;; Little Helpers +;; (a b c) -> (1 2 3) +(define (number-list start inc lst) + (let loop ((lst lst) (lvl start) (acc '())) + (if (null? lst) + (reverse acc) + (loop (cdr lst) (+ inc lvl) (cons lvl acc))))) + +;; Given an alist made of regexps and their replacements (key and value +;; are in a proper list) returns a function which given a string +;; replaces all occurences of the regexps (from left to right). +;; ((re1 repl1) (re2 repl2)) -> str -> str +(define make-reg-replacer + (lambda (defalist) + (let ((allreg (string-join (map car defalist) "|"))) + (lambda (str) + (if (and (string? str) (pregexp-match allreg str)) + (let loop ((lst defalist) (str str)) + (if (null? lst) + str + (loop (cdr lst) (pregexp-replace* (caar lst) str (cadar lst))))) + str))))) + +(define escape-texi + (make-reg-replacer '(("@" "@@") ("{" "@{") ("}" "@}")))) + +(define normalize + (compose escape-texi (make-reg-replacer `((,(format "~%\\s+") ,(format "~%")))))) + +(define normalize-example + (compose escape-texi (make-reg-replacer '(("^\\s+|\\s+$" ""))))) + +(define trim-ws (make-reg-replacer '(("^\\s+|\\s+$" "")))) + +(define filter-sect + (lambda (lst) + (filter (lambda (e) (not (member e +ignored-sections+))) lst))) + +;;;; Para +(define format-para + (lambda (list-of-entries) + (format "~%~A~%" (trim-ws (apply string-append list-of-entries))))) + +;;;; Questions +(define format-q-level + (lambda (level) + (apply format "[~A.~A]" (reverse level)))) + +(define format-q-description + (compose trim-ws (make-reg-replacer `((,(format "~%") " "))))) + +;;;; Building nodes +;; curr-node up-node (list of nodes) (list of node names) -> +;; ((curr-node curr-name) (next next-name) (prev prev-name) up) +(define (find-prev-next-up curr up search-list name-list) + (do ((lst search-list (cdr lst)) + (rlst name-list (cdr rlst)) + (prev up (car lst)) + (prevn up (car rlst))) + ((or (null? lst) (equal? (car lst) curr)) + (values (cons curr (if (pair? rlst) (car rlst) curr)) + (if (and (pair? lst) (pair? (cdr lst))) ;next + (cons (cadr lst) (cadr rlst)) + (cons "" "")) + (cons prev prevn) + up)))) + + +(define (format-node section title up lst-of-nodes lst-of-names) + (if (member title +ignored-sections+) + () + (call-with-values + (lambda () (find-prev-next-up title up lst-of-nodes lst-of-names)) + (lambda (currn prevn nextn up) + (format "~%@node ~A~%~A ~A~%" + (cdr currn) ;; (cdr prevn) (cdr nextn) up + section ;; @subsection etc. + (if (pair? title) + (apply format "~A.~A" (reverse title)) + title)))))) + +;;;; Building menus + +(define format-menu + (lambda (alist-of-entries) + (let ((len (apply max (map (lambda (s) (string-length (car s))) alist-of-entries)))) + (format "~%@menu~%~A@end menu~%" + (apply string-append + (map (lambda (e) + (format "* ~A::~A~A~%" + (car e) ;the entry + (make-string (- len (string-length (car e)) -3) #\ ) + (format-menu-description (cdr e) +width+ (+ len 7)))) + alist-of-entries)))))) + + +(define format-menu-description + (lambda (entry width offset) + (let loop ((lst (pregexp-split "\\s" entry)) (len 0) (acc '())) + (if (null? lst) + (apply string-append (reverse! acc)) + (let ((slen (+ 1 (string-length (car lst))))) ; +1 because of whitespace added later + (if (> (+ slen len) (- width offset)) + (loop (cdr lst) 0 (cons + (format "~%~A ~A" ; start a new line + (make-string offset #\ ) ; the whitespace + (car lst)) + acc)) + (loop (cdr lst) (+ slen len) (cons (format " ~A"(car lst)) acc)))))))) + + +(define format-sub-titles + (lambda (list-of-entries first-number-entry last-number-entry) + (let ((offset (or (list-index (lambda (e) (equal? e first-number-entry)) list-of-entries) 0)) + (end (or (list-index (lambda (e) (equal? e last-number-entry)) list-of-entries) + (length list-of-entries)))) + (map (lambda (entry ind) + (format "FAQ ~A ~A" + (if (<= offset ind end) + (format "~A -" (- ind offset -1)) ;numbered entry + "-") + entry)) + list-of-entries (number-list 0 1 list-of-entries))))) + +;;;; We number some sections first + +;; ntags is an alist => ((tag startcounter increment) +(define (number-nodes tree level ntags) + (if (null? ntags) + tree + (let* ((vals (car ntags)) + (ntag (car vals)) + (start (second vals)) + (inc (third vals)) + (ntags (cdr ntags))) + + (map + (lambda (node sublevel) + (pre-post-order + node + `((,ntag *preorder* + . ,(lambda (tag . entry) + `(,tag ,(cons sublevel level) + ,@(number-nodes entry (cons sublevel level) ntags)))) + (*default* . ,(lambda x x)) + (*text* . ,(lambda (tag s) s))))) + tree (number-list start inc tree))))) + + +;;(transform->numbered faqsxml '(section article qandaset ((qandadiv 1 1) (qandaentry 0 1)))) +(define transform->numbered + (lambda (sxml rules) + (let* ((rules (reverse rules)) + (rule (car rules)) + (ntag (cadr rules)) + (styles (map (lambda (tag) (cons tag (lambda x x))) (list-tail rules 2)))) + (pre-post-order + sxml + `((*default* *preorder* . ,(lambda x x)) + (*TOP* . ,(lambda x x)) + ,@styles + (,ntag *preorder* + . ,(lambda (tag . nodes) + (cons tag (number-nodes nodes '() rule))))))))) + + +;;;; The main transform function + +(define (transform sxml) + (let* ((sxml (transform->numbered + sxml '(section article qandaset ((qandadiv 1 1) (qandaentry 0 1))))) + (qandadivtitles (filter-sect (map second ((sxpath '(// qandadiv title)) sxml)))) + (fqandadivtitles (format-sub-titles qandadivtitles "" "")) + (subtitles (filter-sect (append (map second ((sxpath '(// section title)) sxml)) + qandadivtitles + (map second ((sxpath '(// glossary title)) sxml))))) + (fsubtitles (format-sub-titles subtitles +first-numbered-section+ + +last-numbered-section+)) + (questlevel (map second ((sxpath '(article section qandaset qandadiv qandaentry)) sxml))) + (up1 (cadar ((sxpath '(article articleinfo title)) sxml))) + +;;; ************************************************************ +;;; The Style Sheet +;;; ************************************************************ + (style-sheet + `( +;;; ************************************************************ +;;; First the SXML special markers +;;; ************************************************************ + ;; *TOP* *PI* @ are markers from SXML + (*TOP* . ,(lambda (tag . x) x)) + (*PI* . ,(lambda _ '())) + (@ . ,(lambda _ "")) + + ;; Look for the example rule where we overwrite the *text* rule + ;; so code doesn't get mangled. + (*text* + . ,(lambda (tag string) + (normalize string))) + ;; If nothing else matches + (*default* . ,(lambda x x)) +;;; ************************************************************ +;;; Now to the tags of our FAQ +;;; ************************************************************ + (article . ,(lambda (tag . sects) + (list (boilerplate up1) sects + +tag-for-gnus-faq-texi+))) + + (articleinfo + ((*default* . ,(lambda _ '())) + (title + . ,(lambda (tag titel) + (let ((menucom (map (lambda (entry) + (let ((e (assoc entry +section-comments-alist+))) + (if e (cdr e) ""))) + subtitles))) + (list (format-node '@section titel "" '() '()) + (format-menu (map cons fsubtitles menucom))))))) + . ,(lambda (tag . info) info)) + + ;; Sections + (abstract + . ,(lambda (tag . text) + (cons (format "~%@subheading Abstract~%") text))) + (section + ((title + . ,(lambda (tag titel) + (format-node '@subheading titel up1 subtitles fsubtitles)))) + . ,(lambda (tag . entry) entry)) + + ;; Q&A well it's called FAQ isn't it? + (qandaset . ,(lambda (tag . x) x)) + (qandadiv + ((title + . ,(lambda (tag titel) titel))) + . ,(lambda (tag level titel . entries) + (let ((questions (map cadr entries)) + (nlevel (filter (lambda (lvl) (eq? (car level) (cadr lvl))) questlevel))) + (list* + (format-node '@subsection titel up1 subtitles fsubtitles) + (format-menu (map (lambda (lvl quest) + (cons (format-q-level lvl) + (format-q-description quest))) + nlevel questions)) + entries)))) + (qandaentry + . ,(lambda (tag level question answer) + (let ((nodes + (filter (lambda (lvl) (eq? (cadr lvl) (cadr level))) questlevel)) + (up (list-ref fqandadivtitles (- (cadr level) 1)))) + (list* + (format-node "@subsubheading Question" level up nodes (map format-q-level nodes)) + question answer)))) + (question . ,(lambda (tag quest) quest)) + (answer + . ,(lambda (tag . answ) (list* (format "~%@subsubheading Answer~%") answ))) + + ;; Para + (para . ,(lambda (tag . x) (format-para x))) + (simpara . ,(lambda (tag . x) (cons (format "~%") x))) + + ;; Itemized lists. + ;; We rewrite para here because it plays here the role of an + ;; item marker + (itemizedlist + . ,(lambda (tag lstitem) + (format "~%@itemize @bullet~%~A@end itemize~%" lstitem))) + (listitem + ((para + . ,(lambda (tag item) + (format "~%@item~%~A~%" (trim-ws item))))) + . ,(lambda (tag . x) (string-join x ""))) + + ;; The glossary. + (glossary + ((title . ,(lambda _'()))) + . ,(lambda (tag . terms) + (let ((titel (cadar ((sxpath '(article glossary title)) sxml)))) + (cons (format-node '@subsection titel up1 subtitles fsubtitles) + (list (format "~%@table @dfn~%") + terms + (format "~%@end table~%")))))) + (glossentry . ,(lambda (tag . entry) entry)) + (glossterm + . ,(lambda (tag term) + (format "~%@item ~A" term))) + (glossdef + . ,(lambda (tag def) def)) + + ;; Lisp examples + ;; We rewrite the *text* rule so code stays the way it's writen. + (programlisting + ((*text* + . ,(lambda (tag exampl) + (normalize-example exampl)))) + . ,(lambda (tag . exampl) + (format "~%@example~%~A~%@end example~%@noindent~%" (string-join exampl "")))) + + ;; The link handling + ;; Here we are interested in the attributes, so we rewrite the @ + ;; rule. If we find a value we look if it's an email or http + ;; uri. + (ulink + ((@ + . ,(lambda (at val) val))) + . ,(lambda (tag uri name) + (if (pregexp-match "^http:|^ftp:" uri) + (if (equal? uri name) + (format "@uref{~A}" uri) + (format "@uref{~A, ~A}" uri name)) + (format "@email{~A, ~A}" (substring uri 7) name)))) + (url + . ,(lambda (tag val) val)) + + ;; userinput + (userinput + . ,(lambda (tag val) + (format "@samp{~A}" val))) + ))) + (pre-post-order sxml style-sheet))) + +;;;; We call main with infile and outfile as arguments +(define main + (lambda (in out) + (with-output-to-file out + (lambda () + (call-with-input-file in + (lambda (port) + (SRV:send-reply (transform (ssax:xml->sxml port '())))))) + 'replace))) + +;; Local Variables: +;; coding: iso-8859-1 +;; End: + +;; arch-tag: cdd948f7-def9-4ea1-b5ae-b57c308097d7 +;;; xml2texi.scm ends here diff --git a/texi/xml2texi.sh b/texi/xml2texi.sh new file mode 100644 index 0000000..e40e770 --- /dev/null +++ b/texi/xml2texi.sh @@ -0,0 +1,65 @@ +#! /bin/sh +#| +exec mzscheme -mr $0 ${1+"$@"} +|# +;; Copyright (C) 2005 Free Software Foundation, Inc. +;; +;; Author: Karl Pflästerer +;; Keywords: tools +;; +;; This file is not part of GNU Emacs. +;; +;; GNU Emacs is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 2, or (at your option) +;; any later version. +;; +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. +;; +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, +;; Boston, MA 02111-1307, USA. + +;;; Commentary: +;; + +;;; Code: + +(require (lib "cmdline.ss")) +(define +scmfile+ "xml2texi.scm") +(define +in+ "gnus-faq.xml") +(define +out+ "gnus-faq.texi") + +(command-line + "xml2texi" + (current-command-line-arguments) + (once-each + (("-i" "--input") in "Name of XML data file (default gnus-faq.xml)" + (set! +in+ in)) + (("-o" "--output") out "Name of output file (default gnus-faq.texi)" + (set! +out+ out)) + (("-l" "--library") lib "Name of Scheme library to load (default faqxml2texi.scm)" + (set! +scmfile+ lib))) + (help-labels "The first (or only) remaining argument is used as the name of the Input file" + "The second argument is used as the name of the Output file") + (args infile+outfile + (cond ((= (length infile+outfile) 2) + (set! +in+ (car infile+outfile)) + (set! +out+ (cadr infile+outfile))) + ((= (length infile+outfile) 1) + (set! +in+ (car infile+outfile))) + (else #f)))) + +(load +scmfile+) +(main +in+ +out+) + +;; Local Variables: +;; mode: scheme +;; coding: iso-8859-1 +;; End: + +;; arch-tag: 582279c5-b7bf-44b0-ba09-d243a7d7f6e0 -- 1.7.10.4