aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiles Bader2008-06-17 02:32:59 +0000
committerMiles Bader2008-06-17 02:32:59 +0000
commit2b96868715a33d5c1bfbd03e961a222076398722 (patch)
tree20970dd09c2627a50edad2fb5fee45fe8f459cca
parent4a3a621fb4465ac8535808a7d6fdf389cb40d4de (diff)
downloademacs-2b96868715a33d5c1bfbd03e961a222076398722.tar.gz
emacs-2b96868715a33d5c1bfbd03e961a222076398722.zip
Merge from gnus--devo--0
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-1244
-rw-r--r--doc/misc/ChangeLog35
-rw-r--r--doc/misc/gnus-faq.texi424
-rw-r--r--doc/misc/gnus.texi105
-rw-r--r--lisp/gnus/ChangeLog74
-rw-r--r--lisp/gnus/gnus-sum.el12
-rw-r--r--lisp/gnus/gnus-util.el21
-rw-r--r--lisp/gnus/nnimap.el2
-rw-r--r--lisp/gnus/nnmairix.el934
8 files changed, 1147 insertions, 460 deletions
diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog
index e62f8732e64..7f74be79b39 100644
--- a/doc/misc/ChangeLog
+++ b/doc/misc/ChangeLog
@@ -63,9 +63,42 @@
63 * woman.texi: 63 * woman.texi:
64 Update Back-Cover Text as per maintain.info. 64 Update Back-Cover Text as per maintain.info.
65 65
662008-06-15 Reiner Steib <Reiner.Steib@gmx.de>
67
68 * gnus-faq.texi: Generate. Change node names to "FAQ N-M".
69
70 * Makefile.in (gnus-faq-clean): Don't remove gnus-faq.texi.
71 (gnus-faq.xml): Update repository host.
72
73 * xml2texi.scm (boilerplate): Update copyright years.
74 (format-q-level): Change node names to "FAQ N-M", since period in
75 "[N.M]" is invalid, see "(texinfo)Node Line Requirements".
76
77 * gnus-faq.texi: Generate from gnus-faq.xml (sourceforge.net).
78
792008-06-15 Frank Schmitt <ich@frank-schmitt.net>
80
81 * gnus-faq.texi ([5.12]): Add entry about message-kill-buffer-on-exit.
82 Fix a typo.
83
842008-06-15 Reiner Steib <Reiner.Steib@gmx.de>
85
86 * gnus.texi (Mail Source Customization): Correct values of
87 `mail-source-delete-incoming'. Reported by Tassilo Horn.
88 (Oort Gnus): Fix version comment for mml-dnd-protocol-alist.
89
902008-06-14 Reiner Steib <Reiner.Steib@gmx.de>
91
92 * gnus.texi (nnmairix): Eliminate wrong use of `path', cf. the GNU
93 coding standards.
94
952008-06-14 David Engster <dengste@eml.cc>
96
97 * gnus.texi (nnmairix): Markup fixes.
98
662008-06-05 Reiner Steib <Reiner.Steib@gmx.de> 992008-06-05 Reiner Steib <Reiner.Steib@gmx.de>
67 100
68 * gnus.texi (nnmairix): Markup and othe minor fixes. 101 * gnus.texi (nnmairix): Markup and other minor fixes.
69 102
702008-06-05 David Engster <dengste@eml.cc> 1032008-06-05 David Engster <dengste@eml.cc>
71 104
diff --git a/doc/misc/gnus-faq.texi b/doc/misc/gnus-faq.texi
index 8d482d5b487..fe9555a5a02 100644
--- a/doc/misc/gnus-faq.texi
+++ b/doc/misc/gnus-faq.texi
@@ -63,8 +63,12 @@ the archive (BROKEN)}.
63@itemize @bullet 63@itemize @bullet
64 64
65@item 65@item
66Updated FAQ to reflect release of Gnus 5.10 and start of 662008-06-15: Adjust for message-fill-column. Add x-face-file.
67No Gnus development. 67Clarify difference between ding and gnu.emacs.gnus. Remove
68reference to discontinued service.
69
70@item
712006-04-15: Added tip on how to delete sent buffer on exit.
68@end itemize 72@end itemize
69 73
70@node FAQ - Introduction 74@node FAQ - Introduction
@@ -109,17 +113,17 @@ misprints are the my.gnus.org team's fault, sorry.
109@subsection Installation FAQ 113@subsection Installation FAQ
110 114
111@menu 115@menu
112* [1.1]:: What is the latest version of Gnus? 116* FAQ 1-1:: What is the latest version of Gnus?
113* [1.2]:: What's new in 5.10? 117* FAQ 1-2:: What's new in 5.10?
114* [1.3]:: Where and how to get Gnus? 118* FAQ 1-3:: Where and how to get Gnus?
115* [1.4]:: What to do with the tarball now? 119* FAQ 1-4:: What to do with the tarball now?
116* [1.5]:: I sometimes read references to No Gnus and Oort Gnus, what 120* FAQ 1-5:: I sometimes read references to No Gnus and Oort Gnus,
117 are those? 121 what are those?
118* [1.6]:: Which version of Emacs do I need? 122* FAQ 1-6:: Which version of Emacs do I need?
119* [1.7]:: How do I run Gnus on both Emacs and XEmacs? 123* FAQ 1-7:: How do I run Gnus on both Emacs and XEmacs?
120@end menu 124@end menu
121 125
122@node [1.1] 126@node FAQ 1-1
123@subsubheading Question 1.1 127@subsubheading Question 1.1
124 128
125What is the latest version of Gnus? 129What is the latest version of Gnus?
@@ -132,7 +136,7 @@ small, Gnus 5.10 has tons of new features which you
132shouldn't miss. The current release (5.13) should be at 136shouldn't miss. The current release (5.13) should be at
133least as stable as the latest release of the 5.8 series. 137least as stable as the latest release of the 5.8 series.
134 138
135@node [1.2] 139@node FAQ 1-2
136@subsubheading Question 1.2 140@subsubheading Question 1.2
137 141
138What's new in 5.10? 142What's new in 5.10?
@@ -166,7 +170,7 @@ New format specifiers for summary lines, e.g. %B for
166a complex trn-style thread tree. 170a complex trn-style thread tree.
167@end itemize 171@end itemize
168 172
169@node [1.3] 173@node FAQ 1-3
170@subsubheading Question 1.3 174@subsubheading Question 1.3
171 175
172Where and how to get Gnus? 176Where and how to get Gnus?
@@ -176,13 +180,13 @@ Where and how to get Gnus?
176Gnus is released independent from releases of Emacs and XEmacs. 180Gnus is released independent from releases of Emacs and XEmacs.
177Therefore, the version bundled with Emacs or the version in XEmacs' 181Therefore, the version bundled with Emacs or the version in XEmacs'
178package system might not be up to date (e.g. Gnus 5.9 bundled with Emacs 182package system might not be up to date (e.g. Gnus 5.9 bundled with Emacs
17920 is outdated). 18321 is outdated).
180@c
181You can get the latest released version of Gnus from 184You can get the latest released version of Gnus from
182@uref{http://www.gnus.org/dist/gnus.tar.gz} or via anonymous FTP from 185@uref{http://www.gnus.org/dist/gnus.tar.gz}
186or via anonymous FTP from
183@uref{ftp://ftp.gnus.org/pub/gnus/gnus.tar.gz}. 187@uref{ftp://ftp.gnus.org/pub/gnus/gnus.tar.gz}.
184 188
185@node [1.4] 189@node FAQ 1-4
186@subsubheading Question 1.4 190@subsubheading Question 1.4
187 191
188What to do with the tarball now? 192What to do with the tarball now?
@@ -213,7 +217,7 @@ Make sure that you don't have any Gnus related stuff
213before this line, on MS Windows use something like 217before this line, on MS Windows use something like
214"C:/path/to/lisp" (yes, "/"). 218"C:/path/to/lisp" (yes, "/").
215 219
216@node [1.5] 220@node FAQ 1-5
217@subsubheading Question 1.5 221@subsubheading Question 1.5
218 222
219I sometimes read references to No Gnus and Oort Gnus, 223I sometimes read references to No Gnus and Oort Gnus,
@@ -228,7 +232,7 @@ once become Gnus 5.12 or Gnus 6. (If you're wondering why
228not 5.11, the odd version numbers are normally used for 232not 5.11, the odd version numbers are normally used for
229the Gnus versions bundled with Emacs) 233the Gnus versions bundled with Emacs)
230 234
231@node [1.6] 235@node FAQ 1-6
232@subsubheading Question 1.6 236@subsubheading Question 1.6
233 237
234Which version of Emacs do I need? 238Which version of Emacs do I need?
@@ -240,7 +244,7 @@ to Emacs 20.7 or XEmacs 21.1.
240The development versions of Gnus (aka No Gnus) requires Emacs 21 244The development versions of Gnus (aka No Gnus) requires Emacs 21
241or XEmacs 21.4. 245or XEmacs 21.4.
242 246
243@node [1.7] 247@node FAQ 1-7
244@subsubheading Question 1.7 248@subsubheading Question 1.7
245 249
246How do I run Gnus on both Emacs and XEmacs? 250How do I run Gnus on both Emacs and XEmacs?
@@ -256,20 +260,20 @@ of Gnus for Emacs and one for XEmacs.
256@subsection Startup / Group buffer 260@subsection Startup / Group buffer
257 261
258@menu 262@menu
259* [2.1]:: Every time I start Gnus I get a message "Gnus auto-save 263* FAQ 2-1:: Every time I start Gnus I get a message "Gnus auto-save
260 file exists. Do you want to read it?", what does this mean and 264 file exists. Do you want to read it?", what does this mean and
261 how to prevent it? 265 how to prevent it?
262* [2.2]:: Gnus doesn't remember which groups I'm subscribed to, 266* FAQ 2-2:: Gnus doesn't remember which groups I'm subscribed to,
263 what's this? 267 what's this?
264* [2.3]:: How to change the format of the lines in Group buffer? 268* FAQ 2-3:: How to change the format of the lines in Group buffer?
265* [2.4]:: My group buffer becomes a bit crowded, is there a way to 269* FAQ 2-4:: My group buffer becomes a bit crowded, is there a way to
266 sort my groups into categories so I can easier browse through 270 sort my groups into categories so I can easier browse through
267 them? 271 them?
268* [2.5]:: How to manually sort the groups in Group buffer? How to 272* FAQ 2-5:: How to manually sort the groups in Group buffer? How to
269 sort the groups in a topic? 273 sort the groups in a topic?
270@end menu 274@end menu
271 275
272@node [2.1] 276@node FAQ 2-1
273@subsubheading Question 2.1 277@subsubheading Question 2.1
274 278
275Every time I start Gnus I get a message "Gnus auto-save 279Every time I start Gnus I get a message "Gnus auto-save
@@ -288,7 +292,7 @@ To prevent this message make sure you exit Gnus
288via @samp{q} in group buffer instead of 292via @samp{q} in group buffer instead of
289just killing Emacs. 293just killing Emacs.
290 294
291@node [2.2] 295@node FAQ 2-2
292@subsubheading Question 2.2 296@subsubheading Question 2.2
293 297
294Gnus doesn't remember which groups I'm subscribed to, 298Gnus doesn't remember which groups I'm subscribed to,
@@ -300,7 +304,7 @@ You get the message described in the q/a pair above while
300starting Gnus, right? It's an other symptom for the same 304starting Gnus, right? It's an other symptom for the same
301problem, so read the answer above. 305problem, so read the answer above.
302 306
303@node [2.3] 307@node FAQ 2-3
304@subsubheading Question 2.3 308@subsubheading Question 2.3
305 309
306How to change the format of the lines in Group buffer? 310How to change the format of the lines in Group buffer?
@@ -317,7 +321,7 @@ example for this (guess from whose .gnus :-)):
317@end example 321@end example
318@noindent 322@noindent
319 323
320@node [2.4] 324@node FAQ 2-4
321@subsubheading Question 2.4 325@subsubheading Question 2.4
322 326
323My group buffer becomes a bit crowded, is there a way to 327My group buffer becomes a bit crowded, is there a way to
@@ -340,7 +344,7 @@ menu. You might want to include the %P specifier at the
340beginning of your gnus-group-line-format variable to have 344beginning of your gnus-group-line-format variable to have
341the groups nicely indented. 345the groups nicely indented.
342 346
343@node [2.5] 347@node FAQ 2-5
344@subsubheading Question 2.5 348@subsubheading Question 2.5
345 349
346How to manually sort the groups in Group buffer? How to 350How to manually sort the groups in Group buffer? How to
@@ -357,29 +361,29 @@ hit @samp{C-y}.
357@subsection Getting Messages 361@subsection Getting Messages
358 362
359@menu 363@menu
360* [3.1]:: I just installed Gnus, started it via @samp{M-x gnus} 364* FAQ 3-1:: I just installed Gnus, started it via @samp{M-x gnus}
361 but it only says "nntp (news) open error", what to do? 365 but it only says "nntp (news) open error", what to do?
362* [3.2]:: I'm working under Windows and have no idea what ~/.gnus.el 366* FAQ 3-2:: I'm working under Windows and have no idea what
363 means. 367 ~/.gnus.el means.
364* [3.3]:: My news server requires authentication, how to store user 368* FAQ 3-3:: My news server requires authentication, how to store
365 name and password on disk? 369 user name and password on disk?
366* [3.4]:: Gnus seems to start up OK, but I can't find out how to 370* FAQ 3-4:: Gnus seems to start up OK, but I can't find out how to
367 subscribe to a group. 371 subscribe to a group.
368* [3.5]:: Gnus doesn't show all groups / Gnus says I'm not allowed 372* FAQ 3-5:: Gnus doesn't show all groups / Gnus says I'm not allowed
369 to post on this server as well as I am, what's that? 373 to post on this server as well as I am, what's that?
370* [3.6]:: I want Gnus to fetch news from several servers, is this 374* FAQ 3-6:: I want Gnus to fetch news from several servers, is this
371 possible? 375 possible?
372* [3.7]:: And how about local spool files? 376* FAQ 3-7:: And how about local spool files?
373* [3.8]:: OK, reading news works now, but I want to be able to read 377* FAQ 3-8:: OK, reading news works now, but I want to be able to
374 my mail with Gnus, too. How to do it? 378 read my mail with Gnus, too. How to do it?
375* [3.9]:: And what about IMAP? 379* FAQ 3-9:: And what about IMAP?
376* [3.10]:: At the office we use one of those MS Exchange servers, can 380* FAQ 3-10:: At the office we use one of those MS Exchange servers,
377 I use Gnus to read my mail from it? 381 can I use Gnus to read my mail from it?
378* [3.11]:: Can I tell Gnus not to delete the mails on the server it 382* FAQ 3-11:: Can I tell Gnus not to delete the mails on the server it
379 retrieves via POP3? 383 retrieves via POP3?
380@end menu 384@end menu
381 385
382@node [3.1] 386@node FAQ 3-1
383@subsubheading Question 3.1 387@subsubheading Question 3.1
384 388
385I just installed Gnus, started it via 389I just installed Gnus, started it via
@@ -399,7 +403,7 @@ first start, put those lines in ~/.gnus.el:
399@end example 403@end example
400@noindent 404@noindent
401 405
402@node [3.2] 406@node FAQ 3-2
403@subsubheading Question 3.2 407@subsubheading Question 3.2
404 408
405I'm working under Windows and have no idea what ~/.gnus.el means. 409I'm working under Windows and have no idea what ~/.gnus.el means.
@@ -429,16 +433,16 @@ SET HOME=C:\myhome
429@noindent 433@noindent
430 434
431in your autoexec.bat and reboot. Under NT, 2000 and XP, hit 435in your autoexec.bat and reboot. Under NT, 2000 and XP, hit
432Winkey+Pause/Break to enter system options (if it doesn't work, go to 436Winkey+Pause/Break to enter system options (if it doesn't work, go
433Control Panel -> System -> Advanced). There you'll find the possibility 437to Control Panel -> System -> Advanced). There you'll find the
434to set environment variables. Create a new one with name HOME and value 438possibility to set environment variables. Create a new one with
435C:\myhome. Rebooting is not necessary. 439name HOME and value C:\myhome. Rebooting is not necessary.
436 440
437Now to create ~/.gnus.el, say 441Now to create ~/.gnus.el, say
438@samp{C-x C-f ~/.gnus.el RET C-x C-s}. 442@samp{C-x C-f ~/.gnus.el RET C-x C-s}.
439in Emacs. 443in Emacs.
440 444
441@node [3.3] 445@node FAQ 3-3
442@subsubheading Question 3.3 446@subsubheading Question 3.3
443 447
444My news server requires authentication, how to store 448My news server requires authentication, how to store
@@ -463,7 +467,7 @@ chmod 600 ~/.authinfo
463 467
464in a shell.) 468in a shell.)
465 469
466@node [3.4] 470@node FAQ 3-4
467@subsubheading Question 3.4 471@subsubheading Question 3.4
468 472
469Gnus seems to start up OK, but I can't find out how to 473Gnus seems to start up OK, but I can't find out how to
@@ -480,7 +484,7 @@ hit @samp{RET}, move point to the group
480you want to subscribe to and say @samp{u} 484you want to subscribe to and say @samp{u}
481to subscribe to it. 485to subscribe to it.
482 486
483@node [3.5] 487@node FAQ 3-5
484@subsubheading Question 3.5 488@subsubheading Question 3.5
485 489
486Gnus doesn't show all groups / Gnus says I'm not allowed to 490Gnus doesn't show all groups / Gnus says I'm not allowed to
@@ -499,7 +503,7 @@ force yes
499 503
500to the line for those servers in ~/.authinfo. 504to the line for those servers in ~/.authinfo.
501 505
502@node [3.6] 506@node FAQ 3-6
503@subsubheading Question 3.6 507@subsubheading Question 3.6
504 508
505I want Gnus to fetch news from several servers, is this possible? 509I want Gnus to fetch news from several servers, is this possible?
@@ -518,7 +522,7 @@ this in ~/.gnus.el:
518@end example 522@end example
519@noindent 523@noindent
520 524
521@node [3.7] 525@node FAQ 3-7
522@subsubheading Question 3.7 526@subsubheading Question 3.7
523 527
524And how about local spool files? 528And how about local spool files?
@@ -554,7 +558,7 @@ This sets the spool directory for this server only.
554You might have to specify more stuff like the program used 558You might have to specify more stuff like the program used
555to post articles, see the Gnus manual on how to do this. 559to post articles, see the Gnus manual on how to do this.
556 560
557@node [3.8] 561@node FAQ 3-8
558@subsubheading Question 3.8 562@subsubheading Question 3.8
559 563
560OK, reading news works now, but I want to be able to read my mail 564OK, reading news works now, but I want to be able to read my mail
@@ -652,7 +656,7 @@ SMTP Server you need the following in your ~/.gnus.el
652@end example 656@end example
653@noindent 657@noindent
654 658
655@node [3.9] 659@node FAQ 3-9
656@subsubheading Question 3.9 660@subsubheading Question 3.9
657 661
658And what about IMAP? 662And what about IMAP?
@@ -698,7 +702,7 @@ Again, you might have to specify how to authenticate to the
698server if Gnus can't guess the correct way, see the Manual 702server if Gnus can't guess the correct way, see the Manual
699Node "IMAP" for detailed information. 703Node "IMAP" for detailed information.
700 704
701@node [3.10] 705@node FAQ 3-10
702@subsubheading Question 3.10 706@subsubheading Question 3.10
703 707
704At the office we use one of those MS Exchange servers, can I use 708At the office we use one of those MS Exchange servers, can I use
@@ -710,7 +714,7 @@ Offer your administrator a pair of new running shoes for
710activating IMAP on the server and follow the instructions 714activating IMAP on the server and follow the instructions
711above. 715above.
712 716
713@node [3.11] 717@node FAQ 3-11
714@subsubheading Question 3.11 718@subsubheading Question 3.11
715 719
716Can I tell Gnus not to delete the mails on the server it 720Can I tell Gnus not to delete the mails on the server it
@@ -749,38 +753,38 @@ it.
749@subsection Reading messages 753@subsection Reading messages
750 754
751@menu 755@menu
752* [4.1]:: When I enter a group, all read messages are gone. How to 756* FAQ 4-1:: When I enter a group, all read messages are gone. How to
753 view them again? 757 view them again?
754* [4.2]:: How to tell Gnus to show an important message every time I 758* FAQ 4-2:: How to tell Gnus to show an important message every time
755 enter a group, even when it's read? 759 I enter a group, even when it's read?
756* [4.3]:: How to view the headers of a message? 760* FAQ 4-3:: How to view the headers of a message?
757* [4.4]:: How to view the raw unformatted message? 761* FAQ 4-4:: How to view the raw unformatted message?
758* [4.5]:: How can I change the headers Gnus displays by default at 762* FAQ 4-5:: How can I change the headers Gnus displays by default at
759 the top of the article buffer? 763 the top of the article buffer?
760* [4.6]:: I'd like Gnus NOT to render HTML-mails but show me the 764* FAQ 4-6:: I'd like Gnus NOT to render HTML-mails but show me the
761 text part if it's available. How to do it? 765 text part if it's available. How to do it?
762* [4.7]:: Can I use some other browser than w3 to render my 766* FAQ 4-7:: Can I use some other browser than w3 to render my
763 HTML-mails? 767 HTML-mails?
764* [4.8]:: Is there anything I can do to make poorly formatted mails 768* FAQ 4-8:: Is there anything I can do to make poorly formatted
765 more readable? 769 mails more readable?
766* [4.9]:: Is there a way to automatically ignore posts by specific 770* FAQ 4-9:: Is there a way to automatically ignore posts by specific
767 authors or with specific words in the subject? And can I highlight 771 authors or with specific words in the subject? And can I
768 more interesting ones in some way? 772 highlight more interesting ones in some way?
769* [4.10]:: How can I disable threading in some (e.g. mail-) groups, 773* FAQ 4-10:: How can I disable threading in some (e.g. mail-) groups,
770 or set other variables specific for some groups? 774 or set other variables specific for some groups?
771* [4.11]:: Can I highlight messages written by me and follow-ups to 775* FAQ 4-11:: Can I highlight messages written by me and follow-ups to
772 those? 776 those?
773* [4.12]:: The number of total messages in a group which Gnus 777* FAQ 4-12:: The number of total messages in a group which Gnus
774 displays in group buffer is by far to high, especially in mail 778 displays in group buffer is by far to high, especially in mail
775 groups. Is this a bug? 779 groups. Is this a bug?
776* [4.13]:: I don't like the layout of summary and article buffer, how 780* FAQ 4-13:: I don't like the layout of summary and article buffer,
777 to change it? Perhaps even a three pane display? 781 how to change it? Perhaps even a three pane display?
778* [4.14]:: I don't like the way the Summary buffer looks, how to 782* FAQ 4-14:: I don't like the way the Summary buffer looks, how to
779 tweak it? 783 tweak it?
780* [4.15]:: How to split incoming mails in several groups? 784* FAQ 4-15:: How to split incoming mails in several groups?
781@end menu 785@end menu
782 786
783@node [4.1] 787@node FAQ 4-1
784@subsubheading Question 4.1 788@subsubheading Question 4.1
785 789
786When I enter a group, all read messages are gone. How to view them again? 790When I enter a group, all read messages are gone. How to view them again?
@@ -813,7 +817,7 @@ If you don't want all old messages, but the parent of the message you're just re
813you can say @samp{^}, if you want to retrieve the whole thread 817you can say @samp{^}, if you want to retrieve the whole thread
814the message you're just reading belongs to, @samp{A T} is your friend. 818the message you're just reading belongs to, @samp{A T} is your friend.
815 819
816@node [4.2] 820@node FAQ 4-2
817@subsubheading Question 4.2 821@subsubheading Question 4.2
818 822
819How to tell Gnus to show an important message every time I 823How to tell Gnus to show an important message every time I
@@ -828,7 +832,7 @@ either @samp{d} (this deletes the tick
828mark and set's unread mark) or @samp{M c} 832mark and set's unread mark) or @samp{M c}
829(which deletes all marks for the message). 833(which deletes all marks for the message).
830 834
831@node [4.3] 835@node FAQ 4-3
832@subsubheading Question 4.3 836@subsubheading Question 4.3
833 837
834How to view the headers of a message? 838How to view the headers of a message?
@@ -840,7 +844,7 @@ to show all headers, one more
840@samp{t} 844@samp{t}
841hides them again. 845hides them again.
842 846
843@node [4.4] 847@node FAQ 4-4
844@subsubheading Question 4.4 848@subsubheading Question 4.4
845 849
846How to view the raw unformatted message? 850How to view the raw unformatted message?
@@ -853,7 +857,7 @@ to show the raw message
853@samp{g} 857@samp{g}
854returns to normal view. 858returns to normal view.
855 859
856@node [4.5] 860@node FAQ 4-5
857@subsubheading Question 4.5 861@subsubheading Question 4.5
858 862
859How can I change the headers Gnus displays by default at 863How can I change the headers Gnus displays by default at
@@ -874,7 +878,7 @@ say this in ~/.gnus.el:
874@end example 878@end example
875@noindent 879@noindent
876 880
877@node [4.6] 881@node FAQ 4-6
878@subsubheading Question 4.6 882@subsubheading Question 4.6
879 883
880I'd like Gnus NOT to render HTML-mails but show me the 884I'd like Gnus NOT to render HTML-mails but show me the
@@ -901,7 +905,7 @@ in ~/.gnus.el. If you don't want HTML rendered, even if there's no text alternat
901 905
902too. 906too.
903 907
904@node [4.7] 908@node FAQ 4-7
905@subsubheading Question 4.7 909@subsubheading Question 4.7
906 910
907Can I use some other browser than w3 to render my HTML-mails? 911Can I use some other browser than w3 to render my HTML-mails?
@@ -919,7 +923,7 @@ mail say
919@end example 923@end example
920@noindent 924@noindent
921 925
922@node [4.8] 926@node FAQ 4-8
923@subsubheading Question 4.8 927@subsubheading Question 4.8
924 928
925Is there anything I can do to make poorly formatted mails 929Is there anything I can do to make poorly formatted mails
@@ -938,7 +942,7 @@ See @samp{W Y C-h} or have a look at the menus for
938other deuglifications). Outlook deuglify is only available since 942other deuglifications). Outlook deuglify is only available since
939Gnus 5.10. 943Gnus 5.10.
940 944
941@node [4.9] 945@node FAQ 4-9
942@subsubheading Question 4.9 946@subsubheading Question 4.9
943 947
944Is there a way to automatically ignore posts by specific 948Is there a way to automatically ignore posts by specific
@@ -1008,7 +1012,7 @@ adaptive scoring say
1008 1012
1009in ~/.gnus.el. 1013in ~/.gnus.el.
1010 1014
1011@node [4.10] 1015@node FAQ 4-10
1012@subsubheading Question 4.10 1016@subsubheading Question 4.10
1013 1017
1014How can I disable threading in some (e.g. mail-) groups, or 1018How can I disable threading in some (e.g. mail-) groups, or
@@ -1025,7 +1029,7 @@ gnus-show-threads as name of variable and nil as
1025value. Hit button done at the top of the buffer when 1029value. Hit button done at the top of the buffer when
1026you're ready. 1030you're ready.
1027 1031
1028@node [4.11] 1032@node FAQ 4-11
1029@subsubheading Question 4.11 1033@subsubheading Question 4.11
1030 1034
1031Can I highlight messages written by me and follow-ups to 1035Can I highlight messages written by me and follow-ups to
@@ -1041,7 +1045,7 @@ special score and finally we'll tell Gnus to use the new
1041faces. You can find detailed instructions on how to do it on 1045faces. You can find detailed instructions on how to do it on
1042@uref{http://my.gnus.org/node/view/224, my.gnus.org} 1046@uref{http://my.gnus.org/node/view/224, my.gnus.org}
1043 1047
1044@node [4.12] 1048@node FAQ 4-12
1045@subsubheading Question 4.12 1049@subsubheading Question 4.12
1046 1050
1047The number of total messages in a group which Gnus 1051The number of total messages in a group which Gnus
@@ -1065,7 +1069,7 @@ get new message numbers in this process and the count is
1065right again (until you delete and move your mail to other 1069right again (until you delete and move your mail to other
1066groups again). 1070groups again).
1067 1071
1068@node [4.13] 1072@node FAQ 4-13
1069@subsubheading Question 4.13 1073@subsubheading Question 4.13
1070 1074
1071I don't like the layout of summary and article buffer, how 1075I don't like the layout of summary and article buffer, how
@@ -1110,7 +1114,7 @@ buffer top-right, article buffer bottom-right:
1110@end example 1114@end example
1111@noindent 1115@noindent
1112 1116
1113@node [4.14] 1117@node FAQ 4-14
1114@subsubheading Question 4.14 1118@subsubheading Question 4.14
1115 1119
1116I don't like the way the Summary buffer looks, how to tweak it? 1120I don't like the way the Summary buffer looks, how to tweak it?
@@ -1155,7 +1159,7 @@ resulting in:
1155@end example 1159@end example
1156@noindent 1160@noindent
1157 1161
1158@node [4.15] 1162@node FAQ 4-15
1159@subsubheading Question 4.15 1163@subsubheading Question 4.15
1160 1164
1161How to split incoming mails in several groups? 1165How to split incoming mails in several groups?
@@ -1226,31 +1230,36 @@ from using them):
1226@subsection Composing messages 1230@subsection Composing messages
1227 1231
1228@menu 1232@menu
1229* [5.1]:: What are the basic commands I need to know for sending 1233* FAQ 5-1:: What are the basic commands I need to know for sending
1230 mail and postings? 1234 mail and postings?
1231* [5.2]:: How to enable automatic word-wrap when composing messages? 1235* FAQ 5-2:: How to enable automatic word-wrap when composing
1232* [5.3]:: How to set stuff like From, Organization, Reply-To, 1236 messages?
1233 signature...? 1237* FAQ 5-3:: How to set stuff like From, Organization, Reply-To,
1234* [5.4]:: Can I set things like From, Signature etc group based on 1238 signature...?
1235 the group I post too? 1239* FAQ 5-4:: Can I set things like From, Signature etc group based on
1236* [5.5]:: Is there a spell-checker? Perhaps even on-the-fly 1240 the group I post too?
1237 spell-checking? 1241* FAQ 5-5:: Is there a spell-checker? Perhaps even on-the-fly
1238* [5.6]:: Can I set the dictionary based on the group I'm posting 1242 spell-checking?
1239 to? 1243* FAQ 5-6:: Can I set the dictionary based on the group I'm posting
1240* [5.7]:: Is there some kind of address-book, so I needn't remember 1244 to?
1241 all those email addresses? 1245* FAQ 5-7:: Is there some kind of address-book, so I needn't
1242* [5.8]:: Sometimes I see little images at the top of article 1246 remember all those email addresses?
1243 buffer. What's that and how can I send one with my postings, too? 1247* FAQ 5-8:: Sometimes I see little images at the top of article
1244* [5.9]:: Sometimes I accidentally hit r instead of f in newsgroups. 1248 buffer. What's that and how can I send one with my postings,
1245 Can Gnus warn me, when I'm replying by mail in newsgroups? 1249 too?
1246* [5.10]:: How to tell Gnus not to generate a sender header? 1250* FAQ 5-9:: Sometimes I accidentally hit r instead of f in
1247* [5.11]:: I want Gnus to locally store copies of my send mail and 1251 newsgroups. Can Gnus warn me, when I'm replying by mail in
1248 news, how to do it? 1252 newsgroups?
1249* [5.12]:: People tell me my Message-IDs are not correct, why aren't 1253* FAQ 5-10:: How to tell Gnus not to generate a sender header?
1250 they and how to fix it? 1254* FAQ 5-11:: I want Gnus to locally store copies of my send mail and
1255 news, how to do it?
1256* FAQ 5-12:: I want Gnus to kill the buffer after successful sending
1257 instead of keeping it alive as "Sent mail to...", how to do it?
1258* FAQ 5-13:: People tell me my Message-IDs are not correct, why
1259 aren't they and how to fix it?
1251@end menu 1260@end menu
1252 1261
1253@node [5.1] 1262@node FAQ 5-1
1254@subsubheading Question 5.1 1263@subsubheading Question 5.1
1255 1264
1256What are the basic commands I need to know for sending mail and postings? 1265What are the basic commands I need to know for sending mail and postings?
@@ -1280,7 +1289,7 @@ C-d} to save it in the drafts group, where you
1280can start editing it again by saying @samp{D 1289can start editing it again by saying @samp{D
1281e}. 1290e}.
1282 1291
1283@node [5.2] 1292@node FAQ 5-2
1284@subsubheading Question 5.2 1293@subsubheading Question 5.2
1285 1294
1286How to enable automatic word-wrap when composing messages? 1295How to enable automatic word-wrap when composing messages?
@@ -1303,9 +1312,10 @@ For other versions of Gnus, say
1303 1312
1304in ~/.gnus.el. 1313in ~/.gnus.el.
1305 1314
1306You can reformat a paragraph by hitting @samp{M-q} (as usual). 1315You can reformat a paragraph by hitting @samp{M-q}
1316(as usual).
1307 1317
1308@node [5.3] 1318@node FAQ 5-3
1309@subsubheading Question 5.3 1319@subsubheading Question 5.3
1310 1320
1311How to set stuff like From, Organization, Reply-To, signature...? 1321How to set stuff like From, Organization, Reply-To, signature...?
@@ -1339,7 +1349,7 @@ name will be removed. You can also say (eval (foo bar)),
1339then the function foo will be evaluated with argument bar 1349then the function foo will be evaluated with argument bar
1340and the result will be thrown away. 1350and the result will be thrown away.
1341 1351
1342@node [5.4] 1352@node FAQ 5-4
1343@subsubheading Question 5.4 1353@subsubheading Question 5.4
1344 1354
1345Can I set things like From, Signature etc group based on the group I post too? 1355Can I set things like From, Signature etc group based on the group I post too?
@@ -1390,7 +1400,7 @@ at the bottom.
1390@end example 1400@end example
1391@noindent 1401@noindent
1392 1402
1393@node [5.5] 1403@node FAQ 5-5
1394@subsubheading Question 5.5 1404@subsubheading Question 5.5
1395 1405
1396Is there a spell-checker? Perhaps even on-the-fly spell-checking? 1406Is there a spell-checker? Perhaps even on-the-fly spell-checking?
@@ -1433,7 +1443,7 @@ In your ~/.gnus.el, if you prefer on-the-fly spell-checking say
1433@end example 1443@end example
1434@noindent 1444@noindent
1435 1445
1436@node [5.6] 1446@node FAQ 5-6
1437@subsubheading Question 5.6 1447@subsubheading Question 5.6
1438 1448
1439Can I set the dictionary based on the group I'm posting to? 1449Can I set the dictionary based on the group I'm posting to?
@@ -1457,7 +1467,7 @@ Yes, say something like
1457in ~/.gnus.el. Change "^de\\." and "deutsch8" to something 1467in ~/.gnus.el. Change "^de\\." and "deutsch8" to something
1458that suits your needs. 1468that suits your needs.
1459 1469
1460@node [5.7] 1470@node FAQ 5-7
1461@subsubheading Question 5.7 1471@subsubheading Question 5.7
1462 1472
1463Is there some kind of address-book, so I needn't remember 1473Is there some kind of address-book, so I needn't remember
@@ -1521,7 +1531,7 @@ you are done. When you now compose a new mail,
1521hit @samp{TAB} to cycle through know 1531hit @samp{TAB} to cycle through know
1522recipients. 1532recipients.
1523 1533
1524@node [5.8] 1534@node FAQ 5-8
1525@subsubheading Question 5.8 1535@subsubheading Question 5.8
1526 1536
1527Sometimes I see little images at the top of article 1537Sometimes I see little images at the top of article
@@ -1571,7 +1581,7 @@ in ~/.gnus.el. If you use Gnus 5.10, you can simply add an entry
1571 1581
1572to gnus-posting-styles. 1582to gnus-posting-styles.
1573 1583
1574@node [5.9] 1584@node FAQ 5-9
1575@subsubheading Question 5.9 1585@subsubheading Question 5.9
1576 1586
1577Sometimes I accidentally hit r instead of f in 1587Sometimes I accidentally hit r instead of f in
@@ -1602,7 +1612,7 @@ if you already use Gnus 5.10, if you still use 5.8.8 or
1602@end example 1612@end example
1603@noindent 1613@noindent
1604 1614
1605@node [5.10] 1615@node FAQ 5-10
1606@subsubheading Question 5.10 1616@subsubheading Question 5.10
1607 1617
1608How to tell Gnus not to generate a sender header? 1618How to tell Gnus not to generate a sender header?
@@ -1618,7 +1628,7 @@ default. For older Gnus' try this in ~/.gnus.el:
1618@end example 1628@end example
1619@noindent 1629@noindent
1620 1630
1621@node [5.11] 1631@node FAQ 5-11
1622@subsubheading Question 5.11 1632@subsubheading Question 5.11
1623 1633
1624I want Gnus to locally store copies of my send mail and 1634I want Gnus to locally store copies of my send mail and
@@ -1640,9 +1650,24 @@ the group to use.
1640@end example 1650@end example
1641@noindent 1651@noindent
1642 1652
1643@node [5.12] 1653@node FAQ 5-12
1644@subsubheading Question 5.12 1654@subsubheading Question 5.12
1645 1655
1656I want Gnus to kill the buffer after successful sending instead of keeping
1657it alive as "Sent mail to...", how to do it?
1658
1659@subsubheading Answer
1660
1661Add this to your ~/.gnus:
1662
1663@example
1664(setq message-kill-buffer-on-exit t)
1665@end example
1666@noindent
1667
1668@node FAQ 5-13
1669@subsubheading Question 5.13
1670
1646People tell me my Message-IDs are not correct, why 1671People tell me my Message-IDs are not correct, why
1647aren't they and how to fix it? 1672aren't they and how to fix it?
1648 1673
@@ -1661,7 +1686,7 @@ by saying:
1661@noindent 1686@noindent
1662 1687
1663in ~/.gnus.el. If you use Gnus 5.9 or earlier, you can use this 1688in ~/.gnus.el. If you use Gnus 5.9 or earlier, you can use this
1664instead (works for newer versions a well): 1689instead (works for newer versions as well):
1665 1690
1666@example 1691@example
1667(eval-after-load "message" 1692(eval-after-load "message"
@@ -1709,17 +1734,17 @@ correctly by sending yourself a Mail and looking at the Message-ID.
1709@subsection Old messages 1734@subsection Old messages
1710 1735
1711@menu 1736@menu
1712* [6.1]:: How to import my old mail into Gnus? 1737* FAQ 6-1:: How to import my old mail into Gnus?
1713* [6.2]:: How to archive interesting messages? 1738* FAQ 6-2:: How to archive interesting messages?
1714* [6.3]:: How to search for a specific message? 1739* FAQ 6-3:: How to search for a specific message?
1715* [6.4]:: How to get rid of old unwanted mail? 1740* FAQ 6-4:: How to get rid of old unwanted mail?
1716* [6.5]:: I want that all read messages are expired (at least in some 1741* FAQ 6-5:: I want that all read messages are expired (at least in
1717 groups). How to do it? 1742 some groups). How to do it?
1718* [6.6]:: I don't want expiration to delete my mails but to move them 1743* FAQ 6-6:: I don't want expiration to delete my mails but to move
1719 to another group. 1744 them to another group.
1720@end menu 1745@end menu
1721 1746
1722@node [6.1] 1747@node FAQ 6-1
1723@subsubheading Question 6.1 1748@subsubheading Question 6.1
1724 1749
1725How to import my old mail into Gnus? 1750How to import my old mail into Gnus?
@@ -1746,7 +1771,7 @@ either copy them to the desired group by saying
1746through nnmail-split-methods (respool them) by saying 1771through nnmail-split-methods (respool them) by saying
1747@samp{B r}. 1772@samp{B r}.
1748 1773
1749@node [6.2] 1774@node FAQ 6-2
1750@subsubheading Question 6.2 1775@subsubheading Question 6.2
1751 1776
1752How to archive interesting messages? 1777How to archive interesting messages?
@@ -1797,7 +1822,7 @@ then you only have to set either the tick or the dormant
1797mark for articles you want to keep, setting the read 1822mark for articles you want to keep, setting the read
1798mark will remove them from cache. 1823mark will remove them from cache.
1799 1824
1800@node [6.3] 1825@node FAQ 6-3
1801@subsubheading Question 6.3 1826@subsubheading Question 6.3
1802 1827
1803How to search for a specific message? 1828How to search for a specific message?
@@ -1839,7 +1864,7 @@ cool to you get nnir.el from
1839or @uref{ftp://ftp.is.informatik.uni-duisburg.de/pub/src/emacs/}. 1864or @uref{ftp://ftp.is.informatik.uni-duisburg.de/pub/src/emacs/}.
1840Instructions on how to use it are at the top of the file. 1865Instructions on how to use it are at the top of the file.
1841 1866
1842@node [6.4] 1867@node FAQ 6-4
1843@subsubheading Question 6.4 1868@subsubheading Question 6.4
1844 1869
1845How to get rid of old unwanted mail? 1870How to get rid of old unwanted mail?
@@ -1864,7 +1889,7 @@ group, Gnus looks at all messages which you marked as
1864expirable before and if they are old enough (default is 1889expirable before and if they are old enough (default is
1865older than a week) they are deleted. 1890older than a week) they are deleted.
1866 1891
1867@node [6.5] 1892@node FAQ 6-5
1868@subsubheading Question 6.5 1893@subsubheading Question 6.5
1869 1894
1870I want that all read messages are expired (at least in 1895I want that all read messages are expired (at least in
@@ -1900,7 +1925,7 @@ tick (hit @samp{u}) or dormant mark (hit
1900can also set the read mark (hit 1925can also set the read mark (hit
1901@samp{d}). 1926@samp{d}).
1902 1927
1903@node [6.6] 1928@node FAQ 6-6
1904@subsubheading Question 6.6 1929@subsubheading Question 6.6
1905 1930
1906I don't want expiration to delete my mails but to move them 1931I don't want expiration to delete my mails but to move them
@@ -1924,15 +1949,16 @@ variables specific for some groups?")
1924@subsection Gnus in a dial-up environment 1949@subsection Gnus in a dial-up environment
1925 1950
1926@menu 1951@menu
1927* [7.1]:: I don't have a permanent connection to the net, how can I 1952* FAQ 7-1:: I don't have a permanent connection to the net, how can I
1928 minimize the time I've got to be connected? 1953 minimize the time I've got to be connected?
1929* [7.2]:: So what was this thing about the Agent? 1954* FAQ 7-2:: So what was this thing about the Agent?
1930* [7.3]:: I want to store article bodies on disk, too. How to do it? 1955* FAQ 7-3:: I want to store article bodies on disk, too. How to do
1931* [7.4]:: How to tell Gnus not to try to send mails / postings while 1956 it?
1932 I'm offline? 1957* FAQ 7-4:: How to tell Gnus not to try to send mails / postings
1958 while I'm offline?
1933@end menu 1959@end menu
1934 1960
1935@node [7.1] 1961@node FAQ 7-1
1936@subsubheading Question 7.1 1962@subsubheading Question 7.1
1937 1963
1938I don't have a permanent connection to the net, how can 1964I don't have a permanent connection to the net, how can
@@ -1978,7 +2004,7 @@ to Gnus (or any other mail and/or news reader) via nntp
1978respectively POP3 or IMAP. It also includes a smtp 2004respectively POP3 or IMAP. It also includes a smtp
1979server for receiving mails from Gnus. 2005server for receiving mails from Gnus.
1980 2006
1981@node [7.2] 2007@node FAQ 7-2
1982@subsubheading Question 7.2 2008@subsubheading Question 7.2
1983 2009
1984So what was this thing about the Agent? 2010So what was this thing about the Agent?
@@ -2010,7 +2036,7 @@ Now the next time you enter a group on a agentized
2010server, the headers will be stored on disk and read from 2036server, the headers will be stored on disk and read from
2011there the next time you enter the group. 2037there the next time you enter the group.
2012 2038
2013@node [7.3] 2039@node FAQ 7-3
2014@subsubheading Question 7.3 2040@subsubheading Question 7.3
2015 2041
2016I want to store article bodies on disk, too. How to do it? 2042I want to store article bodies on disk, too. How to do it?
@@ -2045,7 +2071,7 @@ the headers for every selected group on an agentized
2045server. Depending on the volume of headers, the initial 2071server. Depending on the volume of headers, the initial
2046fetch session could take hours. 2072fetch session could take hours.
2047 2073
2048@node [7.4] 2074@node FAQ 7-4
2049@subsubheading Question 7.4 2075@subsubheading Question 7.4
2050 2076
2051How to tell Gnus not to try to send mails / postings 2077How to tell Gnus not to try to send mails / postings
@@ -2066,16 +2092,16 @@ work, the agent must be active.
2066@subsection Getting help 2092@subsection Getting help
2067 2093
2068@menu 2094@menu
2069* [8.1]:: How to find information and help inside Emacs? 2095* FAQ 8-1:: How to find information and help inside Emacs?
2070* [8.2]:: I can't find anything in the Gnus manual about X (e.g. 2096* FAQ 8-2:: I can't find anything in the Gnus manual about X (e.g.
2071 attachments, PGP, MIME...), is it not documented? 2097 attachments, PGP, MIME...), is it not documented?
2072* [8.3]:: Which websites should I know? 2098* FAQ 8-3:: Which websites should I know?
2073* [8.4]:: Which mailing lists and newsgroups are there? 2099* FAQ 8-4:: Which mailing lists and newsgroups are there?
2074* [8.5]:: Where to report bugs? 2100* FAQ 8-5:: Where to report bugs?
2075* [8.6]:: I need real-time help, where to find it? 2101* FAQ 8-6:: I need real-time help, where to find it?
2076@end menu 2102@end menu
2077 2103
2078@node [8.1] 2104@node FAQ 8-1
2079@subsubheading Question 8.1 2105@subsubheading Question 8.1
2080 2106
2081How to find information and help inside Emacs? 2107How to find information and help inside Emacs?
@@ -2093,7 +2119,7 @@ of all available help commands and their meaning. Finally
2093search through all available functions and @samp{M-x 2119search through all available functions and @samp{M-x
2094apropos} searches the bound variables. 2120apropos} searches the bound variables.
2095 2121
2096@node [8.2] 2122@node FAQ 8-2
2097@subsubheading Question 8.2 2123@subsubheading Question 8.2
2098 2124
2099I can't find anything in the Gnus manual about X 2125I can't find anything in the Gnus manual about X
@@ -2108,7 +2134,7 @@ really part of core Gnus, so they are documented in
2108different info files, you should have a look in those 2134different info files, you should have a look in those
2109manuals, too. 2135manuals, too.
2110 2136
2111@node [8.3] 2137@node FAQ 8-3
2112@subsubheading Question 8.3 2138@subsubheading Question 8.3
2113 2139
2114Which websites should I know? 2140Which websites should I know?
@@ -2124,7 +2150,7 @@ really finished) tutorial and this FAQ.
2124 2150
2125Tell me about other sites which are interesting. 2151Tell me about other sites which are interesting.
2126 2152
2127@node [8.4] 2153@node FAQ 8-4
2128@subsubheading Question 8.4 2154@subsubheading Question 8.4
2129 2155
2130Which mailing lists and newsgroups are there? 2156Which mailing lists and newsgroups are there?
@@ -2132,15 +2158,15 @@ Which mailing lists and newsgroups are there?
2132@subsubheading Answer 2158@subsubheading Answer
2133 2159
2134There's the newsgroup gnu.emacs.gnus (also available as 2160There's the newsgroup gnu.emacs.gnus (also available as
2135@uref{http://dir.gmane.org/gmane.emacs.gnus.user, 2161@uref{http://dir.gmane.org/gmane.emacs.gnus.user,
2136gmane.emacs.gnus.user}) which deals with general Gnus questions. If you 2162gmane.emacs.gnus.user}) which deals with general Gnus
2137have questions about development versions of Gnus, you should better ask 2163questions. If you have questions about development versions of
2138on the ding mailing list, see below. 2164Gnus, you should better ask on the ding mailing list, see below.
2139 2165
2140If you want to stay in the big8, 2166If you want to stay in the big8,
2141news.software.newssreaders is also read by some Gnus 2167news.software.newssreaders is also read by some Gnus
2142users (but chances for qualified help are much better in 2168users (but chances for qualified help are much better in
2143the above groups). If you speak German, there's 2169the above groups). If you speak German, there's
2144de.comm.software.gnus. 2170de.comm.software.gnus.
2145 2171
2146The ding mailing list (ding@@gnus.org) deals with development of 2172The ding mailing list (ding@@gnus.org) deals with development of
@@ -2148,7 +2174,7 @@ Gnus. You can read the ding list via NNTP, too under the name
2148@uref{http://dir.gmane.org/gmane.emacs.gnus.general, 2174@uref{http://dir.gmane.org/gmane.emacs.gnus.general,
2149gmane.emacs.gnus.general} from news.gmane.org. 2175gmane.emacs.gnus.general} from news.gmane.org.
2150 2176
2151@node [8.5] 2177@node FAQ 8-5
2152@subsubheading Question 8.5 2178@subsubheading Question 8.5
2153 2179
2154Where to report bugs? 2180Where to report bugs?
@@ -2161,7 +2187,7 @@ a message to the
2161including information about your environment which make 2187including information about your environment which make
2162it easier to help you. 2188it easier to help you.
2163 2189
2164@node [8.6] 2190@node FAQ 8-6
2165@subsubheading Question 8.6 2191@subsubheading Question 8.6
2166 2192
2167I need real-time help, where to find it? 2193I need real-time help, where to find it?
@@ -2174,12 +2200,12 @@ Point your IRC client to irc.freenode.net, channel #gnus.
2174@subsection Tuning Gnus 2200@subsection Tuning Gnus
2175 2201
2176@menu 2202@menu
2177* [9.1]:: Starting Gnus is really slow, how to speed it up? 2203* FAQ 9-1:: Starting Gnus is really slow, how to speed it up?
2178* [9.2]:: How to speed up the process of entering a group? 2204* FAQ 9-2:: How to speed up the process of entering a group?
2179* [9.3]:: Sending mail becomes slower and slower, what's up? 2205* FAQ 9-3:: Sending mail becomes slower and slower, what's up?
2180@end menu 2206@end menu
2181 2207
2182@node [9.1] 2208@node FAQ 9-1
2183@subsubheading Question 9.1 2209@subsubheading Question 9.1
2184 2210
2185Starting Gnus is really slow, how to speed it up? 2211Starting Gnus is really slow, how to speed it up?
@@ -2214,7 +2240,7 @@ you replace it with
2214 2240
2215it's loaded when it's needed. 2241it's loaded when it's needed.
2216 2242
2217@node [9.2] 2243@node FAQ 9-2
2218@subsubheading Question 9.2 2244@subsubheading Question 9.2
2219 2245
2220How to speed up the process of entering a group? 2246How to speed up the process of entering a group?
@@ -2258,7 +2284,7 @@ buffer generation, you definitely should update to
22585.10 since there quite some work on improving it has 22845.10 since there quite some work on improving it has
2259been done. 2285been done.
2260 2286
2261@node [9.3] 2287@node FAQ 9-3
2262@subsubheading Question 9.3 2288@subsubheading Question 9.3
2263 2289
2264Sending mail becomes slower and slower, what's up? 2290Sending mail becomes slower and slower, what's up?
diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi
index 1f354e387ae..f1d57236355 100644
--- a/doc/misc/gnus.texi
+++ b/doc/misc/gnus.texi
@@ -4398,9 +4398,9 @@ bound to mairix searches and are automatically updated.
4398* nnmairix caveats:: Some more stuff you might want to know 4398* nnmairix caveats:: Some more stuff you might want to know
4399@end menu 4399@end menu
4400 4400
4401@c FIXME: The markup in this section needs improvement. E.g. add 4401@c FIXME: The markup in this section might need improvement.
4402@c @sample{...}, maybe remove some @strong{...}, convert ` - ' to `---`, 4402@c E.g. adding @samp, @var, @file, @command, etc.
4403@c ... 4403@c Cf. (info "(texinfo)Indicating")
4404 4404
4405@node About mairix 4405@node About mairix
4406@subsubsection About mairix 4406@subsubsection About mairix
@@ -4436,16 +4436,15 @@ but much faster.
4436@node nnmairix requirements 4436@node nnmairix requirements
4437@subsubsection nnmairix requirements 4437@subsubsection nnmairix requirements
4438 4438
4439Mairix searches local mail - that means, mairix absolutely must have 4439Mairix searches local mail---that means, mairix absolutely must have
4440direct access to your mail folders. If your mail resides on another 4440direct access to your mail folders. If your mail resides on another
4441server (e.g. an @acronym{IMAP} server) and you happen to have shell 4441server (e.g. an @acronym{IMAP} server) and you happen to have shell
4442access, @code{nnmairix} supports running mairix remotely, e.g. via ssh. 4442access, @code{nnmairix} supports running mairix remotely, e.g. via ssh.
4443 4443
4444Additionally, @code{nnmairix} only supports the following Gnus back 4444Additionally, @code{nnmairix} only supports the following Gnus back
4445ends: @code{nnml}, @code{nnmaildir}, and @code{nnimap}. You 4445ends: @code{nnml}, @code{nnmaildir}, and @code{nnimap}. You must use
4446@strong{must} use one of these back ends for using 4446one of these back ends for using @code{nnmairix}. Other back ends, like
4447@code{nnmairix}. Other back ends, like @code{nnmbox}, @code{nnfolder} or 4447@code{nnmbox}, @code{nnfolder} or @code{nnmh}, won't work.
4448@code{nnmh}, won't work.
4449 4448
4450If you absolutely must use mbox and still want to use @code{nnmairix}, 4449If you absolutely must use mbox and still want to use @code{nnmairix},
4451you can set up a local @acronym{IMAP} server, which you then access via 4450you can set up a local @acronym{IMAP} server, which you then access via
@@ -4473,7 +4472,7 @@ automatically update themselves by calling mairix.
4473You might ask why you need @code{nnmairix} at all, since mairix already 4472You might ask why you need @code{nnmairix} at all, since mairix already
4474creates the group, populates it with links to the mails so that you can 4473creates the group, populates it with links to the mails so that you can
4475then access it with Gnus, right? Well, this @emph{might} work, but often 4474then access it with Gnus, right? Well, this @emph{might} work, but often
4476does not - at least not without problems. Most probably you will get 4475does not---at least not without problems. Most probably you will get
4477strange article counts, and sometimes you might see mails which Gnus 4476strange article counts, and sometimes you might see mails which Gnus
4478claims have already been canceled and are inaccessible. This is due to 4477claims have already been canceled and are inaccessible. This is due to
4479the fact that Gnus isn't really amused when things are happening behind 4478the fact that Gnus isn't really amused when things are happening behind
@@ -4482,7 +4481,7 @@ use mairix with an @acronym{IMAP} server (I had Dovecot complaining
4482about corrupt index files when mairix changed the contents of the search 4481about corrupt index files when mairix changed the contents of the search
4483group). Using @code{nnmairix} should circumvent these problems. 4482group). Using @code{nnmairix} should circumvent these problems.
4484 4483
4485@code{nnmairix} is not really a mail back end - it's actually more like a 4484@code{nnmairix} is not really a mail back end---it's actually more like a
4486wrapper, sitting between a ``real'' mail back end where mairix stores the 4485wrapper, sitting between a ``real'' mail back end where mairix stores the
4487searches and the Gnus front end. You can choose between three different 4486searches and the Gnus front end. You can choose between three different
4488mail back ends for the mairix folders: @code{nnml}, @code{nnmaildir} or 4487mail back ends for the mairix folders: @code{nnml}, @code{nnmaildir} or
@@ -4495,7 +4494,7 @@ if you're uncomfortable with @code{nnmairix} creating new mail groups
4495alongside your other mail, you can also create e.g. a new 4494alongside your other mail, you can also create e.g. a new
4496@code{nnmaildir} server exclusively for mairix. However, a special case 4495@code{nnmaildir} server exclusively for mairix. However, a special case
4497exists if you want to use mairix remotely on an IMAP server with 4496exists if you want to use mairix remotely on an IMAP server with
4498@code{nnimap} - here the mairix folders and your other mail must be on 4497@code{nnimap}---here the mairix folders and your other mail must be on
4499the same @code{nnimap} back end. 4498the same @code{nnimap} back end.
4500 4499
4501@node Setting up mairix 4500@node Setting up mairix
@@ -4511,12 +4510,11 @@ Setting up mairix is easy: simply create a @file{.mairixrc} file with
4511base=~/Maildir 4510base=~/Maildir
4512@end example 4511@end example
4513 4512
4514This is the base folder for your mails. All the following paths are 4513This is the base folder for your mails. All the following directories
4515relative to this base folder. If you want to use @code{nnmairix} with 4514are relative to this base folder. If you want to use @code{nnmairix}
4516@code{nnimap}, this base path has to point to the mail path where the 4515with @code{nnimap}, this base directory has to point to the mail
4517@acronym{IMAP} server stores the mail folders! 4516directory where the @acronym{IMAP} server stores the mail folders!
4518 4517
4519@c FIXME: Add typical examples?
4520@example 4518@example
4521maildir= ... your maildir folders which should be indexed ... 4519maildir= ... your maildir folders which should be indexed ...
4522mh= ... your nnml/mh folders which should be indexed ... 4520mh= ... your nnml/mh folders which should be indexed ...
@@ -4524,7 +4522,7 @@ mbox = ... your mbox files which should be indexed ...
4524@end example 4522@end example
4525 4523
4526Specify all your maildir/nnml folders and mbox files (relative to the 4524Specify all your maildir/nnml folders and mbox files (relative to the
4527base path!) you want to index with mairix. See the man-page for 4525base directory!) you want to index with mairix. See the man-page for
4528mairixrc for details. 4526mairixrc for details.
4529 4527
4530@example 4528@example
@@ -4536,7 +4534,6 @@ This should make sure that you don't accidentally index the mairix
4536search results. You can change the prefix of these folders with the 4534search results. You can change the prefix of these folders with the
4537variable @code{nnmairix-group-prefix}. 4535variable @code{nnmairix-group-prefix}.
4538 4536
4539@c FIXME: Add typical examples?
4540@example 4537@example
4541mformat= ... 'maildir' or 'mh' ... 4538mformat= ... 'maildir' or 'mh' ...
4542database= ... location of database file ... 4539database= ... location of database file ...
@@ -4546,8 +4543,38 @@ The @code{format} setting specifies the output format for the mairix
4546search folder. Set this to @code{mh} if you want to access search results 4543search folder. Set this to @code{mh} if you want to access search results
4547with @code{nnml}. Otherwise choose @code{maildir}. 4544with @code{nnml}. Otherwise choose @code{maildir}.
4548 4545
4549See the man pages for mairix and mairixrc for further options. Now 4546To summarize, here is my shortened @file{.mairixrc} file as an example:
4550simply call @code{mairix} to create the index for the first time. 4547
4548@example
4549base=~/Maildir
4550maildir=.personal:.work:.logcheck:.sent
4551mh=../Mail/nnml/*...
4552mbox=../mboxmail/mailarchive_year*
4553mformat=maildir
4554omit=zz_mairix-*
4555database=~/.mairixdatabase
4556@end example
4557
4558In this case, the base directory is @file{~/Maildir}, where all my Maildir
4559folders are stored. As you can see, the folders are separated by
4560colons. If you wonder why every folder begins with a dot: this is
4561because I use Dovecot as @acronym{IMAP} server, which again uses
4562@code{Maildir++} folders. For testing nnmairix, I also have some
4563@code{nnml} mail, which is saved in @file{~/Mail/nnml}. Since this has
4564to be specified relative to the @code{base} directory, the @code{../Mail}
4565notation is needed. Note that the line ends in @code{*...}, which means
4566to recursively scan all files under this directory. Without the three
4567dots, the wildcard @code{*} will not work recursively. I also have some
4568old mbox files with archived mail lying around in @file{~/mboxmail}.
4569The other lines should be obvious.
4570
4571See the man page for @code{mairixrc} for details and further options,
4572especially regarding wildcard usage, which may be a little different
4573than you are used to.
4574
4575Now simply call @code{mairix} to create the index for the first time.
4576Note that this may take a few minutes, but every following index will do
4577the updates incrementally and hence is very fast.
4551 4578
4552@node Configuring nnmairix 4579@node Configuring nnmairix
4553@subsubsection Configuring nnmairix 4580@subsubsection Configuring nnmairix
@@ -4560,7 +4587,7 @@ server. You will have to specify the following:
4560@itemize @bullet 4587@itemize @bullet
4561 4588
4562@item 4589@item
4563The @strong{name} of the @code{nnmairix} server - choose whatever you 4590The @strong{name} of the @code{nnmairix} server---choose whatever you
4564want. 4591want.
4565 4592
4566@item 4593@item
@@ -4743,7 +4770,7 @@ originally came from and displays the article in this group, so that
4743e.g. replying to this article the correct posting styles/group 4770e.g. replying to this article the correct posting styles/group
4744parameters are applied (@code{nnmairix-goto-original-article}). This 4771parameters are applied (@code{nnmairix-goto-original-article}). This
4745function will use the registry if available, but can also parse the 4772function will use the registry if available, but can also parse the
4746article file path as a fallback method. 4773article file name as a fallback method.
4747 4774
4748@item $ u 4775@item $ u
4749@kindex $ u (Summary) 4776@kindex $ u (Summary)
@@ -4781,11 +4808,11 @@ implies that you will usually read your mails in the @code{nnmairix}
4781groups instead of your ``real'' mail groups. 4808groups instead of your ``real'' mail groups.
4782 4809
4783There is one problem, though: say you got a new mail from 4810There is one problem, though: say you got a new mail from
4784@samp{david@@foobar.com} - it will now show up in two groups, the 4811@samp{david@@foobar.com}; it will now show up in two groups, the
4785``real'' group (your INBOX, for example) and in the @code{nnmairix} 4812``real'' group (your INBOX, for example) and in the @code{nnmairix}
4786search group (provided you have updated the mairix database). Now you 4813search group (provided you have updated the mairix database). Now you
4787enter the @code{nnmairix} group and read the mail. The mail will be 4814enter the @code{nnmairix} group and read the mail. The mail will be
4788marked as read, but only in the @code{nnmairix} group - in the ``real'' 4815marked as read, but only in the @code{nnmairix} group---in the ``real''
4789mail group it will be still shown as unread. 4816mail group it will be still shown as unread.
4790 4817
4791You could now catch up the mail group (@pxref{Group Data}), but this is 4818You could now catch up the mail group (@pxref{Group Data}), but this is
@@ -4832,11 +4859,11 @@ the safe side, choose roughly the amount of mails you index with mairix.
4832 4859
4833@vindex nnmairix-only-use-registry 4860@vindex nnmairix-only-use-registry
4834If you don't want to use the registry or the registry hasn't seen the 4861If you don't want to use the registry or the registry hasn't seen the
4835original article yet, @code{nnmairix} will use an additional mairix search 4862original article yet, @code{nnmairix} will use an additional mairix
4836for determining the file path of the article. This, of course, is way 4863search for determining the file name of the article. This, of course, is
4837slower than the registry - if you set hundreds or even thousands of 4864way slower than the registry---if you set hundreds or even thousands of
4838marks this way, it might take some time. You can avoid this situation 4865marks this way, it might take some time. You can avoid this situation by
4839by setting @code{nnmairix-only-use-registry} to t. 4866setting @code{nnmairix-only-use-registry} to t.
4840 4867
4841Maybe you also want to propagate marks the other way round, i.e. if you 4868Maybe you also want to propagate marks the other way round, i.e. if you
4842tick an article in a "real" mail group, you'd like to have the same 4869tick an article in a "real" mail group, you'd like to have the same
@@ -4898,7 +4925,7 @@ Hit @kbd{G b g}, enter group name (e.g. @samp{important}), use
4898Now activate marks propagation for this group by using @kbd{G b p}. Then 4925Now activate marks propagation for this group by using @kbd{G b p}. Then
4899activate the always-unread feature by using @kbd{G b r} twice. 4926activate the always-unread feature by using @kbd{G b r} twice.
4900 4927
4901So far so good - but how do you remove the tick marks in the @code{nnmairix} 4928So far so good---but how do you remove the tick marks in the @code{nnmairix}
4902group? There are two options: You may simply use 4929group? There are two options: You may simply use
4903@code{nnmairix-remove-tick-mark-original-article} (bound to @kbd{$ u}) to remove 4930@code{nnmairix-remove-tick-mark-original-article} (bound to @kbd{$ u}) to remove
4904tick marks from the original article. The other possibility is to set 4931tick marks from the original article. The other possibility is to set
@@ -4920,7 +4947,7 @@ As described before, all @code{nnmairix} groups are in fact stored on
4920the mail back end in the form @samp{zz_mairix-<NAME>-<NUMBER>}. You can 4947the mail back end in the form @samp{zz_mairix-<NAME>-<NUMBER>}. You can
4921see them when you enter the back end server in the server buffer. You 4948see them when you enter the back end server in the server buffer. You
4922should not subscribe these groups! Unfortunately, these groups will 4949should not subscribe these groups! Unfortunately, these groups will
4923usually get @strong{auto-subscribed} when you use @code{nnmaildir} or 4950usually get @emph{auto-subscribed} when you use @code{nnmaildir} or
4924@code{nnml}, i.e. you will suddenly see groups of the form 4951@code{nnml}, i.e. you will suddenly see groups of the form
4925@samp{zz_mairix*} pop up in your group buffer. If this happens to you, 4952@samp{zz_mairix*} pop up in your group buffer. If this happens to you,
4926simply kill these groups with C-k. For avoiding this, turn off 4953simply kill these groups with C-k. For avoiding this, turn off
@@ -4947,13 +4974,13 @@ If you use the Gnus agent (@pxref{Gnus Unplugged}): don't agentize
4947@item 4974@item
4948If you use the Gnus registry: don't use the registry with 4975If you use the Gnus registry: don't use the registry with
4949@code{nnmairix} groups (put them in 4976@code{nnmairix} groups (put them in
4950@code{gnus-registry-unfollowed-groups}). Be @strong{extra careful} if 4977@code{gnus-registry-unfollowed-groups}). Be @emph{extra careful} if
4951you use @code{gnus-registry-split-fancy-with-parent} - mails which are 4978you use @code{gnus-registry-split-fancy-with-parent}; mails which are
4952split into @code{nnmairix} groups are usually gone for good as soon as 4979split into @code{nnmairix} groups are usually gone for good as soon as
4953you check the group for new mail (yes, it has happened to me...). 4980you check the group for new mail (yes, it has happened to me...).
4954 4981
4955@item 4982@item
4956Therefore: @strong{Never ever} put ``real'' mails into @code{nnmairix} 4983Therefore: @emph{Never ever} put ``real'' mails into @code{nnmairix}
4957groups (you shouldn't be able to, anyway). 4984groups (you shouldn't be able to, anyway).
4958 4985
4959@item 4986@item
@@ -4962,7 +4989,7 @@ mairix does only support us-ascii characters.
4962@item 4989@item
4963@code{nnmairix} uses a rather brute force method to force Gnus to 4990@code{nnmairix} uses a rather brute force method to force Gnus to
4964completely reread the group on the mail back end after mairix was 4991completely reread the group on the mail back end after mairix was
4965called - it simply deletes and re-creates the group on the mail 4992called---it simply deletes and re-creates the group on the mail
4966back end. So far, this has worked for me without any problems, and I 4993back end. So far, this has worked for me without any problems, and I
4967don't see how @code{nnmairix} could delete other mail groups than its 4994don't see how @code{nnmairix} could delete other mail groups than its
4968own, but anyway: you really should have a backup of your mail 4995own, but anyway: you really should have a backup of your mail
@@ -4986,7 +5013,7 @@ save any ``real'' mail in folders of the form
4986@code{nnmairix-group-prefix}. 5013@code{nnmairix-group-prefix}.
4987 5014
4988@item 5015@item
4989The following only applies if you @strong{don't} use the mentioned patch 5016The following only applies if you @emph{don't} use the mentioned patch
4990for mairix (@pxref{Propagating marks}): 5017for mairix (@pxref{Propagating marks}):
4991 5018
4992A problem can occur when using @code{nnmairix} with maildir folders and 5019A problem can occur when using @code{nnmairix} with maildir folders and
@@ -15382,8 +15409,8 @@ files. If a positive number, delete files older than number of days
15382(the deletion will only happen when receiving new mail). You may also 15409(the deletion will only happen when receiving new mail). You may also
15383set @code{mail-source-delete-incoming} to @code{nil} and call 15410set @code{mail-source-delete-incoming} to @code{nil} and call
15384@code{mail-source-delete-old-incoming} from a hook or interactively. 15411@code{mail-source-delete-old-incoming} from a hook or interactively.
15385@code{mail-source-delete-incoming} defaults to @code{2} in alpha Gnusae 15412@code{mail-source-delete-incoming} defaults to @code{10} in alpha Gnusae
15386and @code{10} in released Gnusae. @xref{Gnus Development}. 15413and @code{2} in released Gnusae. @xref{Gnus Development}.
15387 15414
15388@item mail-source-delete-old-incoming-confirm 15415@item mail-source-delete-old-incoming-confirm
15389@vindex mail-source-delete-old-incoming-confirm 15416@vindex mail-source-delete-old-incoming-confirm
@@ -28604,7 +28631,7 @@ controls this.
28604@item You can now drag and drop attachments to the Message buffer. 28631@item You can now drag and drop attachments to the Message buffer.
28605See @code{mml-dnd-protocol-alist} and @code{mml-dnd-attach-options}. 28632See @code{mml-dnd-protocol-alist} and @code{mml-dnd-attach-options}.
28606@xref{MIME, ,MIME, message, Message Manual}. 28633@xref{MIME, ,MIME, message, Message Manual}.
28607@c New in 5.10.9 / 5.11 (Emacs 21.1) 28634@c New in 5.10.9 / 5.11 (Emacs 22.1)
28608 28635
28609@item @code{auto-fill-mode} is enabled by default in Message mode. 28636@item @code{auto-fill-mode} is enabled by default in Message mode.
28610See @code{message-fill-column}. @xref{Various Message Variables, , 28637See @code{message-fill-column}. @xref{Various Message Variables, ,
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 2edb93538b4..ffe56dc742f 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,77 @@
12008-06-16 Katsumi Yamaoka <yamaoka@jpl.org>
2
3 * dgnushack.el: Autoload get-display-table and put-display-table for
4 XEmacs 21.5.
5
6 * lpath.el: Fbind get-display-table and put-display-table for XEmacs
7 21.4 and SXEmacs.
8
92008-06-15 David Engster <dengste@eml.cc>
10
11 * nnimap.el (nnimap-request-delete-group): Unselect group if necessary.
12
132008-06-14 Aidan Kehoe <kehoea@parhasard.net>
14
15 * gnus-util.el (gnus-put-display-table, gnus-get-display-table): New
16 macros that expand to an `aset'/`aref' call under Emacs, and to a
17 runtime choice under XEmacs.
18
19 * gnus-sum.el (gnus-summary-set-display-table): Use
20 `gnus-put-display-table', `gnus-get-display-table',
21 `gnus-set-display-table' for the display table, instead of `aset'.
22
23 * gnus-xmas.el (gnus-xmas-summary-set-display-table): Use
24 `gnus-put-display-table', `gnus-get-display-table',
25 `gnus-set-display-table' for the display table.
26
272008-06-14 Reiner Steib <Reiner.Steib@gmx.de>
28
29 * nnmairix.el: Add autoloads.
30
312008-06-14 Reiner Steib <Reiner.Steib@gmx.de>
32
33 * nnmairix.el (nnmairix-delete-recreate-group)
34 (nnmairix-update-and-clear-marks): Fix error messages.
35
362008-06-14 David Engster <dengste@eml.cc>
37
38 * nnmairix.el: Upgrade to version 0.6.
39 (nnmairix-group-toggle-propmarks-this-group)
40 (nnmairix-group-toggle-readmarks-this-group)
41 (nnmairix-group-delete-recreate-this-group)
42 (nnmairix-group-toggle-allowfast-this-group, nnmairix-propagate-marks)
43 (nnmairix-remove-tick-mark-original-article): New commands.
44 (nnmairix-mairix-search-options, nnmairix-propagate-marks-upon-close)
45 (nnmairix-propagate-marks-to-nnmairix-groups)
46 (nnmairix-only-use-registry, nnmairix-allowfast-default)
47 (nnmairix-marks-cache, nnmairix-version-output): New variables.
48 (nnmairix-request-set-mark, nnmairix-request-update-info): New back end
49 functions needed for marks propagation and manipulation of read marks.
50 (nnmairix-update-groups): New function.
51 (nnmairix-get-groups-from-server, nnmairix-delete-recreate-group)
52 (nnmairix-determine-original-group-from-registry)
53 (nnmairix-determine-original-group-from-path)
54 (nnmairix-get-group-from-file-path, nnmairix-map-range)
55 (nnmairix-check-mairix-version, nnmairix-group-toggle-parameter): New
56 helper functions.
57 (nnmairix-group-mode-hook, nnmairix-summary-mode-hook): Inserted new
58 keystrokes for new commands.
59 (nnmairix-delete-and-create-on-change): Doc string cleanup.
60 (nnmairix-request-group): Check allow-fast group parameter.
61 (nnmairix-request-create-group): Set allow-fast group parameter if
62 nnmairix-allowfast-default is set.
63 (nnmairix-close-group): Propagate marks upon closing if needed.
64 (nnmairix-group-toggle-threads-this-group): Use new.
65 nnmairix-group-toggle-parameter helper function.
66 (nnmairix-search): Better check for empty search result.
67 (nnmairix-goto-original-article): Use new helper functions for
68 determining original article.
69 (nnmairix-show-original-article): Make sure message-id is in brackets.
70 (nnmairix-call-mairix-binary): Change variable name.
71 (nnmairix-update-and-clear-marks): Use nnmairix-delete-recreate-group
72 helper function.
73 (nnmairix-widget-toggle-activate): Fix doc string.
74
12008-06-11 Katsumi Yamaoka <yamaoka@jpl.org> 752008-06-11 Katsumi Yamaoka <yamaoka@jpl.org>
2 76
3 * nnir.el: Require edmacro when compiling with XEmacs. 77 * nnir.el: Require edmacro when compiling with XEmacs.
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el
index 276b2050125..ba29ba6bc15 100644
--- a/lisp/gnus/gnus-sum.el
+++ b/lisp/gnus/gnus-sum.el
@@ -3420,13 +3420,13 @@ display only a single character."
3420 (i 32)) 3420 (i 32))
3421 ;; Nix out all the control chars... 3421 ;; Nix out all the control chars...
3422 (while (>= (setq i (1- i)) 0) 3422 (while (>= (setq i (1- i)) 0)
3423 (aset table i [??])) 3423 (gnus-put-display-table i [??] table))
3424 ;; ... but not newline and cr, of course. (cr is necessary for the 3424 ;; ... but not newline and cr, of course. (cr is necessary for the
3425 ;; selective display). 3425 ;; selective display).
3426 (aset table ?\n nil) 3426 (gnus-put-display-table ?\n nil table)
3427 (aset table ?\r nil) 3427 (gnus-put-display-table ?\r nil table)
3428 ;; We keep TAB as well. 3428 ;; We keep TAB as well.
3429 (aset table ?\t nil) 3429 (gnus-put-display-table ?\t nil table)
3430 ;; We nix out any glyphs 127 through 255, or 127 through 159 in 3430 ;; We nix out any glyphs 127 through 255, or 127 through 159 in
3431 ;; Emacs 23 (unicode), that are not set already. 3431 ;; Emacs 23 (unicode), that are not set already.
3432 (let ((i (if (ignore-errors (= (make-char 'latin-iso8859-1 160) 160)) 3432 (let ((i (if (ignore-errors (= (make-char 'latin-iso8859-1 160) 160))
@@ -3434,8 +3434,8 @@ display only a single character."
3434 256))) 3434 256)))
3435 (while (>= (setq i (1- i)) 127) 3435 (while (>= (setq i (1- i)) 127)
3436 ;; Only modify if the entry is nil. 3436 ;; Only modify if the entry is nil.
3437 (unless (aref table i) 3437 (unless (gnus-get-display-table i table)
3438 (aset table i [??])))) 3438 (gnus-put-display-table i [??] table))))
3439 (setq buffer-display-table table))) 3439 (setq buffer-display-table table)))
3440 3440
3441(defun gnus-summary-set-article-display-arrow (pos) 3441(defun gnus-summary-set-article-display-arrow (pos)
diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el
index 110e2e038d1..8d86c36dbe9 100644
--- a/lisp/gnus/gnus-util.el
+++ b/lisp/gnus/gnus-util.el
@@ -1801,6 +1801,27 @@ is allowed once again. (Immediately, if `inhibit-quit' is nil.)"
1801(defalias 'gnus-read-shell-command 1801(defalias 'gnus-read-shell-command
1802 (if (fboundp 'read-shell-command) 'read-shell-command 'read-string)) 1802 (if (fboundp 'read-shell-command) 'read-shell-command 'read-string))
1803 1803
1804(defmacro gnus-put-display-table (range value display-table)
1805 "Set the value for char RANGE to VALUE in DISPLAY-TABLE. "
1806 (if (featurep 'xemacs)
1807 (progn
1808 `(if (fboundp 'put-display-table)
1809 (put-display-table ,range ,value ,display-table)
1810 (if (sequencep ,display-table)
1811 (aset ,display-table ,range ,value)
1812 (put-char-table ,range ,value ,display-table))))
1813 `(aset ,display-table ,range ,value)))
1814
1815(defmacro gnus-get-display-table (character display-table)
1816 "Find value for CHARACTER in DISPLAY-TABLE. "
1817 (if (featurep 'xemacs)
1818 `(if (fboundp 'get-display-table)
1819 (get-display-table ,character ,display-table)
1820 (if (sequencep ,display-table)
1821 (aref ,display-table ,character)
1822 (get-char-table ,character ,display-table)))
1823 `(aref ,display-table ,character)))
1824
1804(provide 'gnus-util) 1825(provide 'gnus-util)
1805 1826
1806;; arch-tag: f94991af-d32b-4c97-8c26-ca12a934de49 1827;; arch-tag: f94991af-d32b-4c97-8c26-ca12a934de49
diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el
index 9d4966246dc..8a9d5c706fe 100644
--- a/lisp/gnus/nnimap.el
+++ b/lisp/gnus/nnimap.el
@@ -1608,6 +1608,8 @@ function is generally only called when Gnus is shutting down."
1608 1608
1609(deffoo nnimap-request-delete-group (group force &optional server) 1609(deffoo nnimap-request-delete-group (group force &optional server)
1610 (when (nnimap-possibly-change-server server) 1610 (when (nnimap-possibly-change-server server)
1611 (when (string= group (imap-current-mailbox nnimap-server-buffer))
1612 (imap-mailbox-unselect nnimap-server-buffer))
1611 (with-current-buffer nnimap-server-buffer 1613 (with-current-buffer nnimap-server-buffer
1612 (if force 1614 (if force
1613 (or (null (imap-mailbox-status group 'uidvalidity)) 1615 (or (null (imap-mailbox-status group 'uidvalidity))
diff --git a/lisp/gnus/nnmairix.el b/lisp/gnus/nnmairix.el
index 13c862365f2..dbc0a55e1f2 100644
--- a/lisp/gnus/nnmairix.el
+++ b/lisp/gnus/nnmairix.el
@@ -4,7 +4,7 @@
4 4
5;; Author: David Engster <dengste@eml.cc> 5;; Author: David Engster <dengste@eml.cc>
6;; Keywords: mail searching 6;; Keywords: mail searching
7;; Version: 0.5 7;; Version: 0.6
8 8
9;; This file is part of GNU Emacs. 9;; This file is part of GNU Emacs.
10 10
@@ -83,21 +83,33 @@
83;; I thought it would be a "nice to have feature"... 83;; I thought it would be a "nice to have feature"...
84 84
85;; KNOWN BUGS: 85;; KNOWN BUGS:
86;; * When using Maildir: path and filename of a mail can change due to
87;; reading/replying/etc. This can lead to dangling symlinks in
88;; nnmairix groups and it depends on the back end how well it deals
89;; with that (some IMAP servers out there may not be amused). Update the
90;; database ('G b u') and the group to fix it.
91;; * Mairix does only support us-ascii characters. 86;; * Mairix does only support us-ascii characters.
92 87
93;; TODO/MISSING FEATURES: 88;; TODO/MISSING FEATURES:
94;; * Possibility to propagate flags like seen, replied, ticked
95;; to original message
96;; * Support of more back ends (nnmh, nnfolder, nnmbox...)? 89;; * Support of more back ends (nnmh, nnfolder, nnmbox...)?
97;; * Maybe use an active file instead of group parameters? 90;; * Maybe use an active file instead of group parameters?
98;; * Use "-a" when updating groups which are not newly created 91;; * Maybe use "-a" when updating groups which are not newly created?
99 92
100;;; Changelog: 93;;; Changelog:
94;; 05/30/2008 - version 0.6
95;;
96;; * It is now possible to propagate marks from the nnmairix groups
97;; to the original messages (and for maildir also vice versa). See
98;; the docs for details on this feature - it's pretty delicate
99;; and currently needs a patched mairix binary to work smoothly.
100;;
101;; * Keep messages in nnmairix groups always read/unread
102;; (bound to 'G b r').
103;;
104;; * Recreate back end folder for nnmairix groups in case you
105;; somehow get wrong article counts (bound to 'G b d').
106;;
107;; * New group parameter 'allow-fast'. Toggling of parameter bound
108;; to 'G b a'. The default is nil, meaning that the group will
109;; always be updated with a mairix search, even when only entered.
110;;
111;; * More/Better use of the registry (if available). Can now also
112;; deal with duplicate messages in different groups.
101;; 113;;
102;; 02/06/2008 - version 0.5 114;; 02/06/2008 - version 0.5
103;; 115;;
@@ -115,7 +127,7 @@
115;; 127;;
116;; * New/fixed doc strings and code cleanup. 128;; * New/fixed doc strings and code cleanup.
117;; 129;;
118;; 18/11/2007 - version 0.3 130;; 11/18/2007 - version 0.3
119;; 131;;
120;; * Fixed bugs when dealing with nnml and native servers 132;; * Fixed bugs when dealing with nnml and native servers
121;; 133;;
@@ -124,15 +136,15 @@
124;; 10/10/2007 - version 0.2 136;; 10/10/2007 - version 0.2
125;; 137;;
126;; * Use nnml-directory/directory server variables for nnml and 138;; * Use nnml-directory/directory server variables for nnml and
127;; nnmaildir backends as path for search folders. This way it 139;; nnmaildir back ends as path for search folders. This way it
128;; becomes independent of 'base' setting in .mairixirc (but not for 140;; becomes independent of 'base' setting in .mairixirc (but not for
129;; nnimap). 141;; nnimap).
130;; 142;;
131;; * As a result: Changed nnmairix-backend-to-server so that user 143;; * As a result: Changed nnmairix-backend-to-server so that user
132;; is asked when more than one nnmairix server exists and we do not 144;; is asked when more than one nnmairix server exists and we do not
133;; know which one is responsible for current backend. 145;; know which one is responsible for current back end.
134;; 146;;
135;; * Rename files when using nnml backends so that there are no 147;; * Rename files when using nnml back ends so that there are no
136;; holes in article numbers. This should fix all problems regarding 148;; holes in article numbers. This should fix all problems regarding
137;; wrong article counts with nnml. 149;; wrong article counts with nnml.
138;; 150;;
@@ -187,7 +199,17 @@
187 (define-key gnus-group-mode-map 199 (define-key gnus-group-mode-map
188 (kbd "G b i") 'nnmairix-search-interactive) 200 (kbd "G b i") 'nnmairix-search-interactive)
189 (define-key gnus-group-mode-map 201 (define-key gnus-group-mode-map
190 (kbd "G b m") 'nnmairix-widget-search)) 202 (kbd "G b m") 'nnmairix-widget-search)
203 (define-key gnus-group-mode-map
204 (kbd "G b p") 'nnmairix-group-toggle-propmarks-this-group)
205 (define-key gnus-group-mode-map
206 (kbd "G b r") 'nnmairix-group-toggle-readmarks-this-group)
207 (define-key gnus-group-mode-map
208 (kbd "G b d") 'nnmairix-group-delete-recreate-this-group)
209 (define-key gnus-group-mode-map
210 (kbd "G b a") 'nnmairix-group-toggle-allowfast-this-group)
211 (define-key gnus-group-mode-map
212 (kbd "G b o") 'nnmairix-propagate-marks))
191 213
192;; Summary mode 214;; Summary mode
193(defun nnmairix-summary-mode-hook () 215(defun nnmairix-summary-mode-hook ()
@@ -201,16 +223,26 @@
201 (define-key gnus-summary-mode-map 223 (define-key gnus-summary-mode-map
202 (kbd "$ g") 'nnmairix-create-search-group-from-message) 224 (kbd "$ g") 'nnmairix-create-search-group-from-message)
203 (define-key gnus-summary-mode-map 225 (define-key gnus-summary-mode-map
204 (kbd "$ o") 'nnmairix-goto-original-article)) 226 (kbd "$ o") 'nnmairix-goto-original-article)
227 (define-key gnus-summary-mode-map
228 (kbd "$ u") 'nnmairix-remove-tick-mark-original-article))
205 229
206(add-hook 'gnus-group-mode-hook 'nnmairix-group-mode-hook) 230(add-hook 'gnus-group-mode-hook 'nnmairix-group-mode-hook)
207(add-hook 'gnus-summary-mode-hook 'nnmairix-summary-mode-hook) 231(add-hook 'gnus-summary-mode-hook 'nnmairix-summary-mode-hook)
208 232
233;; ;;;###autoload
234;; (defun nnmairix-initalize (&optional force)
235;; (interactive "P")
236;; (if (not (or (file-readable-p "~/.mairixrc")
237;; force))
238;; (message "No file `~/.mairixrc', skipping nnmairix setup")
239;; (add-hook 'gnus-group-mode-hook 'nnmairix-group-mode-hook)
240;; (add-hook 'gnus-summary-mode-hook 'nnmairix-summary-mode-hook)))
209 241
210;; Customizable stuff 242;; Customizable stuff
211 243
212(defgroup nnmairix nil 244(defgroup nnmairix nil
213 "Backend for the Mairix mail search engine." 245 "Back end for the Mairix mail search engine."
214 :group 'gnus) 246 :group 'gnus)
215 247
216(defcustom nnmairix-group-prefix "zz_mairix" 248(defcustom nnmairix-group-prefix "zz_mairix"
@@ -245,6 +277,13 @@ time (e.g. via cron job)."
245 :type '(repeat string) 277 :type '(repeat string)
246 :group 'nnmairix) 278 :group 'nnmairix)
247 279
280(defcustom nnmairix-mairix-search-options '("-Q")
281 "Options when calling mairix for searching.
282The default is '-Q' for making searching faster."
283 :version "23.1"
284 :type '(repeat string)
285 :group 'nnmairix)
286
248(defcustom nnmairix-mairix-synchronous-update nil 287(defcustom nnmairix-mairix-synchronous-update nil
249 "Set this to t if you want Emacs to wait for mairix updating the database." 288 "Set this to t if you want Emacs to wait for mairix updating the database."
250 :version "23.1" 289 :version "23.1"
@@ -253,7 +292,7 @@ time (e.g. via cron job)."
253 292
254(defcustom nnmairix-rename-files-for-nnml t 293(defcustom nnmairix-rename-files-for-nnml t
255 "Rename nnml mail files so that they are consecutively numbered. 294 "Rename nnml mail files so that they are consecutively numbered.
256When using nnml as backend, mairix might produce holes in the 295When using nnml as back end, mairix might produce holes in the
257article numbers which will produce wrong article counts by 296article numbers which will produce wrong article counts by
258Gnus. This option controls whether nnmairix should rename the 297Gnus. This option controls whether nnmairix should rename the
259files consecutively." 298files consecutively."
@@ -294,6 +333,48 @@ The default chooses the largest window in the current frame."
294 :type 'function 333 :type 'function
295 :group 'nnmairix) 334 :group 'nnmairix)
296 335
336(defcustom nnmairix-propagate-marks-upon-close t
337 "Flag if marks should be propagated upon closing a group.
338The default of this variable is t. If set to 'ask, the
339user will be asked if the flags should be propagated when the
340group is closed. If set to nil, the user will have to manually
341call 'nnmairix-propagate-marks'."
342 :version "23.1"
343 :type '(choice (const :tag "always" t)
344 (const :tag "ask" 'ask)
345 (const :tag "never" nil))
346 :group 'nnmairix)
347
348(defcustom nnmairix-propagate-marks-to-nnmairix-groups nil
349 "Flag if marks from original articles should be seen in nnmairix groups.
350The default is nil since it will only work if the articles are in
351maildir format and NOT managed by the nnmaildir back end but
352e.g. an IMAP server (which stores the marks in the maildir file
353name). You may safely set this to t for testing - the worst that
354can happen are wrong marks in nnmairix groups."
355 :version "23.1"
356 :type 'boolean
357 :group 'nnmairix)
358
359(defcustom nnmairix-only-use-registry nil
360 "Use only the registry for determining original group(s).
361If set to t, nnmairix will only use the registry for determining
362the original group(s) of an article (which is also necessary for
363propapagting marks). If set to nil, it will also try to determine
364the group from an additional mairix search which might be slow
365when propagating lots of marks."
366 :version "23.1"
367 :type 'boolean
368 :group 'nnmairix)
369
370(defcustom nnmairix-allowfast-default nil
371 "Whether fast entering should be the default for nnmairix groups.
372You may set this to t to make entering the group faster, but note that
373this might lead to problems, especially when used with marks propagation."
374 :version "23.1"
375 :type 'boolean
376 :group 'nnmairix)
377
297;; ==== Other variables 378;; ==== Other variables
298 379
299(defvar nnmairix-widget-other 380(defvar nnmairix-widget-other
@@ -310,20 +391,18 @@ Every list element consists of the following entries: Keystroke,
310message field (if any), mairix command and description.") 391message field (if any), mairix command and description.")
311 392
312(defvar nnmairix-delete-and-create-on-change '(nnimap nnmaildir nnml) 393(defvar nnmairix-delete-and-create-on-change '(nnimap nnmaildir nnml)
313 "Controls on which backends groups should be deleted and re-created. 394 "Controls on which back ends groups should be deleted and re-created.
314This variable is a list of back ends where the search group should 395This variable is a list of back ends where the search group
315be completely deleted and re-created when the query or thread 396should be completely deleted and re-created when the query or
316parameter changes. I know this is rather \"brute force\" and maybe 397thread parameter changes. The default is to this for all
317even dangerous (you have backups, right?), but it should be used at 398currently supported back ends. It usually also corrects the
318least for nnimap since some IMAP servers are really not amused when 399problem of \"holes\" in the article numbers which often lead to a
319mailbox content changes behind their back. It usually also corrects
320the problem of \"holes\" in the article numbers which often lead to a
321wrong count of total articles shown by Gnus.") 400wrong count of total articles shown by Gnus.")
322 401
323;;; === Server variables 402;;; === Server variables
324 403
325(defvoo nnmairix-backend nil 404(defvoo nnmairix-backend nil
326 "Backend where mairix stores its searches.") 405 "Back end where mairix stores its searches.")
327 406
328(defvoo nnmairix-backend-server nil 407(defvoo nnmairix-backend-server nil
329 "Name of the server where mairix stores its searches.") 408 "Name of the server where mairix stores its searches.")
@@ -346,8 +425,8 @@ temporary searches, e.g. nnmairix-search.")
346 "Regexp for mairix groups on back end.") 425 "Regexp for mairix groups on back end.")
347 426
348(defconst nnmairix-valid-backends '(nnimap nnml nnmaildir) 427(defconst nnmairix-valid-backends '(nnimap nnml nnmaildir)
349 "Backends supported by nnmairix. 428 "Back ends supported by nnmairix.
350Other backends might or might not work.") 429Other back ends might or might not work.")
351 430
352(defvar nnmairix-last-server nil 431(defvar nnmairix-last-server nil
353 "Last chosen server.") 432 "Last chosen server.")
@@ -355,7 +434,13 @@ Other backends might or might not work.")
355(defvar nnmairix-current-server nil 434(defvar nnmairix-current-server nil
356 "Current server.") 435 "Current server.")
357 436
358;;; === Gnus backend functions 437(defvar nnmairix-marks-cache nil
438 "Cache for marks which should be set upon closing current group.")
439
440(defvar nnmairix-version-output nil
441 "Version string of mairix binary.")
442
443;;; === Gnus back end functions
359 444
360(nnoo-define-basics nnmairix) 445(nnoo-define-basics nnmairix)
361 446
@@ -372,13 +457,14 @@ Other backends might or might not work.")
372 (let* ((qualgroup (if server 457 (let* ((qualgroup (if server
373 (gnus-group-prefixed-name group (list 'nnmairix server)) 458 (gnus-group-prefixed-name group (list 'nnmairix server))
374 group)) 459 group))
460 (folder (gnus-group-get-parameter qualgroup 'folder))
461 (allowfast (gnus-group-get-parameter qualgroup 'allow-fast))
375 (query (gnus-group-get-parameter qualgroup 'query t)) 462 (query (gnus-group-get-parameter qualgroup 'query t))
376 (folder (gnus-group-get-parameter qualgroup 'folder)) 463 (threads (gnus-group-get-parameter qualgroup 'threads))
377 (threads (gnus-group-get-parameter qualgroup 'threads)) 464 (backendmethod (gnus-server-to-method
378 (backendmethod (gnus-server-to-method 465 (format "%s:%s" (symbol-name nnmairix-backend)
379 (format "%s:%s" (symbol-name nnmairix-backend) 466 nnmairix-backend-server)))
380 nnmairix-backend-server))) 467 rval mfolder folderpath args)
381 rval mfolder folderpath)
382 (cond 468 (cond
383 ((not folder) 469 ((not folder)
384 ;; No folder parameter -> error 470 ;; No folder parameter -> error
@@ -416,8 +502,10 @@ Other backends might or might not work.")
416 folderpath)) 502 folderpath))
417 mfolder))) 503 mfolder)))
418 ;; If (not fast), call Mairix binary 504 ;; If (not fast), call Mairix binary
505 ;; recreate underlying folder on the back end
419 (setq rval 506 (setq rval
420 (if fast 0 507 (if (and fast allowfast)
508 0
421 (nnmairix-call-mairix-binary 509 (nnmairix-call-mairix-binary
422 (split-string nnmairix-mairix-command) 510 (split-string nnmairix-mairix-command)
423 mfolder query threads))) 511 mfolder query threads)))
@@ -435,7 +523,7 @@ Other backends might or might not work.")
435 (nnml-generate-nov-databases-directory mfolder)) 523 (nnml-generate-nov-databases-directory mfolder))
436 (nnmairix-call-backend 524 (nnmairix-call-backend
437 "request-scan" folder nnmairix-backend-server) 525 "request-scan" folder nnmairix-backend-server)
438 (if fast 526 (if (and fast allowfast)
439 t 527 t
440 (nnmairix-request-group-with-article-number-correction 528 (nnmairix-request-group-with-article-number-correction
441 folder qualgroup))) 529 folder qualgroup)))
@@ -475,6 +563,8 @@ Other backends might or might not work.")
475 (nnmairix-call-backend 563 (nnmairix-call-backend
476 "request-create-group" groupname nnmairix-backend-server) 564 "request-create-group" groupname nnmairix-backend-server)
477 (gnus-group-add-parameter qualgroup '(folder . nil)) 565 (gnus-group-add-parameter qualgroup '(folder . nil))
566 (when nnmairix-allowfast-default
567 (gnus-group-add-parameter qualgroup '(allow-fast . t)))
478 (gnus-group-set-parameter qualgroup 'folder groupname)) 568 (gnus-group-set-parameter qualgroup 'folder groupname))
479 t) 569 t)
480 570
@@ -512,11 +602,6 @@ Other backends might or might not work.")
512 "request-article" article folder nnmairix-backend-server to-buffer)) 602 "request-article" article folder nnmairix-backend-server to-buffer))
513 t) 603 t)
514 604
515(deffoo nnmairix-close-group (group &optional server)
516 ;; Should we do something here?
517 nil)
518
519
520(deffoo nnmairix-request-list (&optional server) 605(deffoo nnmairix-request-list (&optional server)
521 (when server (nnmairix-open-server server)) 606 (when server (nnmairix-open-server server))
522 (if (nnmairix-call-backend "request-list" nnmairix-backend-server) 607 (if (nnmairix-call-backend "request-list" nnmairix-backend-server)
@@ -542,6 +627,156 @@ Other backends might or might not work.")
542 t) 627 t)
543 nil)) 628 nil))
544 629
630;; Silence byte-compiler.
631(defvar gnus-registry-install)
632(autoload 'gnus-registry-fetch-group "gnus-registry")
633(autoload 'gnus-registry-fetch-groups "gnus-registry")
634(autoload 'gnus-registry-add-group "gnus-registry")
635
636(deffoo nnmairix-request-set-mark (group actions &optional server)
637 (when server
638 (nnmairix-open-server server))
639 (let* ((qualgroup (gnus-group-prefixed-name group (list 'nnmairix nnmairix-current-server)))
640 (propmarks (gnus-group-get-parameter qualgroup 'propmarks))
641 (propto (gnus-group-get-parameter qualgroup 'propto t))
642 (corr (nnmairix-get-numcorr group server))
643 (folder (nnmairix-get-backend-folder group server)))
644 (save-excursion
645 (dolist (cur actions)
646 (let ((type (nth 1 cur))
647 (cmdmarks (nth 2 cur))
648 (range (gnus-uncompress-range (nth 0 cur)))
649 mid ogroup number method temp)
650 (when (and corr
651 (not (zerop (cadr corr))))
652 (setq range (mapcar (lambda (arg)
653 (- arg (cadr corr)))
654 range)))
655 (when propmarks
656 (nnheader-message 7 "nnmairix: Setting marks...")
657 (dolist (article range)
658 ;; get article (header) and extract message id
659 ;; we try to determine as many original articles as possible
660 (catch 'problem
661 (nnmairix-call-backend "open-server" nnmairix-backend-server)
662 (unless (gnus-request-head
663 article
664 (gnus-group-prefixed-name
665 folder
666 (list nnmairix-backend nnmairix-backend-server)))
667 (nnheader-message
668 3 "Unable to set mark: couldn't fetch article header for article number %d"
669 article)
670 (throw 'problem nil))
671 (set-buffer nntp-server-buffer)
672 (goto-char (point-min))
673 (let ((case-fold-search t))
674 (re-search-forward "^message-id:.*\\(<.+>\\)" nil t))
675 (setq mid (match-string 1))
676 (unless mid
677 (nnheader-message
678 3 "Unable to set mark: article number %d has no message-id header"
679 article)
680 (throw 'problem nil))
681 ;; get original group. First try registry, then file path
682 (setq ogroup
683 (nnmairix-determine-original-group-from-registry mid))
684 (unless (or ogroup
685 nnmairix-only-use-registry)
686 (setq ogroup
687 (nnmairix-determine-original-group-from-path
688 mid nnmairix-current-server))
689 ;; if available and allowed, add this entry to the registry
690 (when (and (boundp 'gnus-registry-install)
691 gnus-registry-install)
692 (dolist (cur ogroup)
693 (unless (gnus-parameter-registry-ignore cur)
694 (gnus-registry-add-group mid cur)))))
695 (unless ogroup
696 (nnheader-message
697 3 "Unable to set mark: couldn't find original group for %s" mid)
698 (throw 'problem nil))
699 ;; store original groups with mid's. We cannot get
700 ;; the article number immediately since this would
701 ;; generate problems with maildir (articles might
702 ;; get moved from /new to /cur and further marks
703 ;; could then not be set)
704 (dolist (cur ogroup)
705 (setq temp (assoc cur
706 nnmairix-marks-cache))
707 (if temp
708 (nconc temp (list (list mid type cmdmarks)))
709 (push (list cur (list mid type cmdmarks))
710 nnmairix-marks-cache)))))
711 (nnheader-message 7 "nnmairix: Setting marks... done")))))))
712
713(deffoo nnmairix-close-group (group &optional server)
714 (when server
715 (nnmairix-open-server server))
716 (let* ((qualgroup (gnus-group-prefixed-name group (list 'nnmairix nnmairix-current-server)))
717 (propmarks (gnus-group-get-parameter qualgroup 'propmarks))
718 method)
719 (when (and propmarks
720 nnmairix-marks-cache)
721 (when (or (eq nnmairix-propagate-marks-upon-close t)
722 (and (eq nnmairix-propagate-marks-upon-close 'ask)
723 (y-or-n-p "Propagate marks to original articles? ")))
724 (save-excursion
725 (set-buffer gnus-group-buffer)
726 (nnmairix-propagate-marks)
727 ;; update mairix group
728 (gnus-group-jump-to-group qualgroup)
729 (gnus-group-get-new-news-this-group))))))
730
731(autoload 'nnimap-request-update-info-internal "nnimap")
732
733(deffoo nnmairix-request-update-info (group info &optional server)
734;; propagate info from underlying IMAP folder to nnmairix group
735;; This is currently experimental and must be explicitly activated
736;; with nnmairix-propagate-marks-to-nnmairix-group
737 (when server
738 (nnmairix-open-server server))
739 (let* ((qualgroup (gnus-group-prefixed-name
740 group
741 (list 'nnmairix nnmairix-current-server)))
742 (readmarks (gnus-group-get-parameter qualgroup 'readmarks))
743 (propmarks (gnus-group-get-parameter qualgroup 'propmarks))
744 (folder (nnmairix-get-backend-folder group server))
745 (corr (nnmairix-get-numcorr group server))
746 (docorr (and corr (not (zerop (cadr corr)))))
747 (folderinfo `(,group 1 ((1 . 1))))
748 readrange marks)
749 (when (and propmarks
750 nnmairix-propagate-marks-to-nnmairix-groups)
751 ;; these groups are not subscribed, so we have to ask the back end directly
752 (if (eq nnmairix-backend 'nnimap)
753 (nnimap-request-update-info-internal folder folderinfo nnmairix-backend-server)
754 (nnmairix-call-backend "request-update-info" folder folderinfo nnmairix-backend-server))
755 ;; set range of read articles
756 (gnus-info-set-read
757 info
758 (if docorr
759 (nnmairix-map-range
760 `(lambda (x) (+ x ,(cadr corr)))
761 (gnus-info-read folderinfo))
762 (gnus-info-read folderinfo)))
763 ;; set other marks
764 (gnus-info-set-marks
765 info
766 (if docorr
767 (mapcar (lambda (cur)
768 (cons
769 (car cur)
770 (nnmairix-map-range
771 `(lambda (x) (+ x ,(cadr corr)))
772 (list (cadr cur)))))
773 (gnus-info-marks folderinfo))
774 (gnus-info-marks folderinfo))))
775 (when (eq readmarks 'unread)
776 (gnus-info-set-read info nil))
777 (when (eq readmarks 'read)
778 (gnus-info-set-read info (gnus-active qualgroup))))
779 t)
545 780
546(nnoo-define-skeleton nnmairix) 781(nnoo-define-skeleton nnmairix)
547 782
@@ -664,7 +899,6 @@ All necessary information will be queried from the user."
664 (list 'nnmairix-hidden-folders hidden) 899 (list 'nnmairix-hidden-folders hidden)
665 (list 'nnmairix-default-group defaultgroup))))) 900 (list 'nnmairix-default-group defaultgroup)))))
666 901
667
668(defun nnmairix-group-change-query-this-group (&optional query) 902(defun nnmairix-group-change-query-this-group (&optional query)
669 "Set QUERY for group under cursor." 903 "Set QUERY for group under cursor."
670 (interactive) 904 (interactive)
@@ -690,19 +924,59 @@ All necessary information will be queried from the user."
690If THREADS is a positive number, set threads parameter to t. 924If THREADS is a positive number, set threads parameter to t.
691If THREADS is a negative number, set it to nil." 925If THREADS is a negative number, set it to nil."
692 (interactive) 926 (interactive)
693 (let* ((group (gnus-group-group-name)) 927 (let ((group (gnus-group-group-name)))
694 (method (gnus-find-method-for-group group)) 928 (when (nnmairix-group-toggle-parameter
695 (getthreads (or threads 929 group 'threads "Threads" threads)
696 (not (gnus-group-get-parameter group 'threads))))) 930 (nnmairix-update-and-clear-marks group))))
931
932(defun nnmairix-group-toggle-propmarks-this-group (&optional propmarks)
933 "Toggle marks propagation for this group.
934If PROPMARKS is a positive number, set parameter to t.
935If PROPMARKS is a negative number, set it to nil."
936 (interactive)
937 (unless (nnmairix-check-mairix-version "maildirpatch")
938 (error "You need a mairix binary with maildir patch to use this feature. See docs for details"))
939 (let ((group (gnus-group-group-name)))
940 (when (or (not (string= (gnus-group-short-name group)
941 (cadr (assoc 'nnmairix-default-group
942 (gnus-find-method-for-group group)))))
943 (y-or-n-p "You should not activate marks propagation for the default \
944search group. Are you sure? "))
945 (nnmairix-group-toggle-parameter
946 group 'propmarks "Marks propagation" propmarks))))
947
948(defun nnmairix-group-toggle-allowfast-this-group (&optional allowfast)
949 "Toggle fast entering for this group.
950If ALLOWFAST is a positive number, set parameter to t.
951If ALLOWFAST is a negative number, set it to nil."
952 (interactive)
953 (nnmairix-group-toggle-parameter
954 (gnus-group-group-name) 'allow-fast "Fast entering" allowfast))
955
956
957(defun nnmairix-group-toggle-readmarks-this-group (&optional readmarks)
958 "Toggle read/unread marks for this group.
959If READMARKS is a positive number, articles will always be read.
960If READMARKS is a negative number, articles will always be unread.
961If READMARKS is t or zero, marks will stay unchanged."
962 (interactive)
963 (let* ((group (gnus-group-group-name))
964 (method (gnus-find-method-for-group group))
965 (readmarks (or readmarks
966 (gnus-group-get-parameter group 'readmarks))))
697 (if (eq (car method) 'nnmairix) 967 (if (eq (car method) 'nnmairix)
698 (progn 968 (cond
699 (when (numberp getthreads) 969 ((or (and (numberp readmarks) (< readmarks 0))
700 (setq getthreads (> getthreads 0))) 970 (eq readmarks 'read))
701 (gnus-group-set-parameter group 'threads getthreads) 971 (gnus-group-set-parameter group 'readmarks 'unread)
702 (if getthreads 972 (nnheader-message 3 "Articles in %s always unread." group))
703 (message "Threads activated for group %s" group) 973 ((or (and (numberp readmarks) (> readmarks 0))
704 (message "Threads deacitavted for group %s" group)) 974 (not readmarks))
705 (nnmairix-update-and-clear-marks group)) 975 (gnus-group-set-parameter group 'readmarks 'read)
976 (nnheader-message 3 "Articles in %s always read." group))
977 (t
978 (gnus-group-set-parameter group 'readmarks nil)
979 (nnheader-message 3 "Read marks in %s stay unchanged." group)))
706 (error "This is no nnmairix group")))) 980 (error "This is no nnmairix group"))))
707 981
708 982
@@ -732,7 +1006,7 @@ Otherwise, leave threads parameter as it is."
732 (when (< threads 0) 1006 (when (< threads 0)
733 (gnus-group-set-parameter qualgroup 'threads nil))) 1007 (gnus-group-set-parameter qualgroup 'threads nil)))
734 (nnmairix-update-and-clear-marks qualgroup) 1008 (nnmairix-update-and-clear-marks qualgroup)
735 (when (not (zerop (gnus-group-unread qualgroup))) 1009 (unless (equal (gnus-active qualgroup) '(1 . 0))
736 (gnus-group-read-group nil t qualgroup)))) 1010 (gnus-group-read-group nil t qualgroup))))
737 1011
738(defun nnmairix-search-thread-this-article () 1012(defun nnmairix-search-thread-this-article ()
@@ -850,139 +1124,130 @@ with `nnmairix-mairix-update-options'."
850 (set-process-sentinel (apply 'start-process args) 1124 (set-process-sentinel (apply 'start-process args)
851 'nnmairix-sentinel-mairix-update-finished)))))) 1125 'nnmairix-sentinel-mairix-update-finished))))))
852 1126
853;; Silence byte-compiler. 1127(defun nnmairix-group-delete-recreate-this-group ()
854(defvar gnus-registry-install) 1128 "Deletes and recreates group on the back end.
855(autoload 'gnus-registry-fetch-group "gnus-registry") 1129You can use this function on nnmairix groups which continously
856 1130show wrong article counts."
857(defun nnmairix-goto-original-article (&optional no-registry) 1131 (interactive)
858 "Jump to the original group and display article. 1132 (let* ((group (gnus-group-group-name))
859The original group of the article is first determined with the 1133 (method (gnus-find-method-for-group group)))
860registry (if enabled). If the registry is not enabled or did not 1134 (unless (eq (car method) 'nnmairix)
861find the article or the prefix NO-REGISTRY is non-nil, this 1135 (error "This is not a nnmairix group"))
862function will try to determine the original group form the path 1136 (when (y-or-n-p
863of the mail file. The path is obtained through another mairix 1137 (format "Really recreate group %s on the back end? " group))
864search in raw mode." 1138 (nnmairix-delete-recreate-group group)
865 (interactive "P") 1139 (gnus-group-get-new-news-this-group))))
866 (when (not (eq (car gnus-current-select-method) 'nnmairix)) 1140
867 (let ((method (gnus-find-method-for-group gnus-newsgroup-name))) 1141(defun nnmairix-propagate-marks (&optional server)
868 (if (eq (car method) 'nnmairix) 1142 "Propagate marks from nnmairix group to original articles.
869 (nnmairix-open-server (nth 1 method)) 1143Unless SERVER is explicitly specified, will use the last opened
870 (error "Not in a nnmairix group")))) 1144nnmairix server. Only marks from current session will be set."
871 (when (not (gnus-buffer-live-p gnus-article-buffer)) 1145 (interactive)
872 (error "No article buffer available")) 1146 (if server
873 (let ((server (nth 1 gnus-current-select-method)) 1147 (nnmairix-open-server server)
874 mid rval group allgroups) 1148 (unless (eq (car gnus-current-select-method) 'nnmairix)
875 ;; get message id 1149 (if nnmairix-current-server
876 (save-excursion 1150 (nnmairix-open-server nnmairix-current-server)
877 (set-buffer gnus-article-buffer) 1151 (error "No opened nnmairix server"))))
878 (gnus-summary-toggle-header 1) 1152 (if nnmairix-marks-cache
879 (setq mid (message-fetch-field "Message-ID")) 1153 (let (number ogroup number-cache method mid-marks temp)
880 ;; first check the registry (if available) 1154 ;; first we get the article numbers
881 (when (and (boundp 'gnus-registry-install) 1155 (catch 'problem
882 gnus-registry-install 1156 (while (setq ogroup (pop nnmairix-marks-cache))
883 (not no-registry)) 1157 (while (setq mid-marks (pop (cdr ogroup)))
884 (setq group (gnus-registry-fetch-group mid))) 1158 (setq number
885 (while (string-match "[<>]" mid) 1159 (cdr
886 (setq mid (replace-match "" t t mid))) 1160 (gnus-request-head (car mid-marks) (car ogroup))))
887 (unless group 1161 (unless number
888 ;; registry was not available or did not find article 1162 (nnheader-message
889 ;; so we search again with mairix in raw mode to get filename 1163 3 "Unable to set mark: couldn't determine article number for %s in %s"
890 (nnmairix-open-server server) 1164 (car mid-marks) (car ogroup))
891 (setq rval 1165 (throw 'problem nil))
892 (nnmairix-call-mairix-binary-raw 1166 (setq temp (assoc (car ogroup) number-cache))
893 (split-string nnmairix-mairix-command) 1167 (if temp
894 (list (concat "m:" mid)))) 1168 (catch 'done
895 (if (zerop rval) 1169 (dolist (cur (cdr temp))
896 ;; determine original group(s) from filename 1170 (when (equal (cdr cur) (list (nth 1 mid-marks) (nth 2 mid-marks)))
897 (save-excursion 1171 (nconc (car cur) (list number))
898 (set-buffer nnmairix-mairix-output-buffer) 1172 (throw 'done nil)))
899 (goto-char (point-min)) 1173 (nconc temp (list (list (list number) (nth 1 mid-marks) (nth 2 mid-marks)))))
900 (while (looking-at "/") 1174 (push (list (car ogroup) (list (list number) (nth 1 mid-marks) (nth 2 mid-marks)))
901 (push (nnmairix-determine-original-group) 1175 number-cache)))))
902 allgroups) 1176 ;; now we set the marks
903 (forward-line 1)) 1177 (save-excursion
904 (if (> (length allgroups) 1) 1178 (set-buffer gnus-group-buffer)
905 (setq group 1179 (nnheader-message 5 "nnmairix: Propagating marks...")
906 (completing-read 1180 (dolist (cur number-cache)
907 "Message exists in more than one group. Choose: " 1181 (setq method (gnus-find-method-for-group (car cur)))
908 allgroups nil t)) 1182 (apply (intern (format "%s-%s"
909 (setq group (car allgroups)))) 1183 (symbol-name (car method))
910 (error "Mairix could not find original article. See buffer %s for details" 1184 "request-set-mark"))
911 nnmairix-mairix-output-buffer)))) 1185 (gnus-group-short-name (car cur))
912 (if group 1186 (cdr cur)
913 ;; show article in summary buffer 1187 (list (nth 1 method)))
914 (nnmairix-show-original-article group mid) 1188 (gnus-group-jump-to-group (car cur))
915 (message "Couldn't find original article")))) 1189 (gnus-group-get-new-news-this-group)))
916 1190 (nnheader-message 5 "nnmairix: Propagating marks... done"))
917(defun nnmairix-determine-original-group () 1191 (nnheader-message 3 "No marks to propagate.")))
918 "Try to determine to original group from the file path." 1192
919 (let (path filename serverbase group maildirflag allgroups) 1193(defun nnmairix-update-groups (servername &optional skipdefault updatedb)
920 (re-search-forward "^\\(.*\\)/\\(.*?\\)$") 1194 "Update all search groups on SERVERNAME.
921 (setq path (expand-file-name (match-string 1))) 1195If SKIPDEFAULT is t, the default search group will not be
922 (setq filename (match-string 2)) 1196updated.
923 ;; when we deal with maildir, remove cur/new/tmp from path 1197If UPDATEDB is t, database for SERVERNAME will be updated first."
924 (setq maildirflag (string-match ".+\\..+\\..+" filename)) 1198 (interactive (list (completing-read "Update groups on server: "
925 (when maildirflag 1199 (nnmairix-get-nnmairix-servers))))
926 (setq path 1200 (save-excursion
927 (replace-regexp-in-string 1201 (when (string-match ".*:\\(.*\\)" servername)
928 ".*\\(/cur\\|/new\\|/tmp\\)$" "" path t t 1))) 1202 (setq servername (match-string 1 servername)))
929 ;; we first check nnml and nnmaildir servers 1203 (if (not (assoc (format "nnmairix:%s" servername)
930 (setq 1204 (nnmairix-get-nnmairix-servers)))
931 group 1205 (nnheader-message 3 "Server %s not opened" servername)
932 (catch 'found 1206 (when updatedb
933 (dolist (cur gnus-opened-servers) 1207 (let ((nnmairix-mairix-synchronous-update t))
934 (when (or (and (not maildirflag) 1208 (nnmairix-update-database
935 (eq (caar cur) 'nnml)) 1209 (list (list (format "nnmairix:%s" servername))))))
936 (and maildirflag 1210 (let ((groups (nnmairix-get-groups-from-server servername))
937 (eq (caar cur) 'nnmaildir))) 1211 default)
938 ;; get base path from server 1212 (when skipdefault
939 (if maildirflag 1213 (setq default
940 (setq serverbase (cadr (assoc 'directory (car cur)))) 1214 (format "nnmairix+%s:%s"
941 (setq serverbase (cadr (assoc 'nnml-directory (car cur)))) 1215 servername
942 (when (not serverbase) 1216 (cadr
943 (setq serverbase nnml-directory))) 1217 (assoc 'nnmairix-default-group
944 (setq serverbase (file-name-as-directory 1218 (gnus-server-to-method
945 (expand-file-name serverbase))) 1219 (format "nnmairix:%s" servername)))))))
946 (when (string-match (concat serverbase "\\(.*\\)") path) 1220 (dolist (cur groups)
947 ;; looks good - rest of the path should be the group 1221 (unless (and skipdefault
948 (setq group (match-string 1 path)) 1222 (string= (car cur) default))
949 (when (string-match "/$" group) 1223 (gnus-group-jump-to-group (car cur))
950 (setq group (replace-match "" t t group))) 1224 (gnus-group-get-new-news-this-group)))))))
951 (when (not maildirflag) 1225
952 ;; for nnml: convert slashes to dots 1226(defun nnmairix-remove-tick-mark-original-article ()
953 (while (string-match "/" group) 1227 "Remove tick mark from original article.
954 (setq group (replace-match "." t t group)))) 1228Marks propagation has to be enabled for this to work."
955 (setq group (gnus-group-prefixed-name group (car cur))) 1229 (interactive)
956 ;; check whether this group actually exists 1230 (unless (eq (car gnus-current-select-method) 'nnmairix)
957 (when (gnus-group-entry group) 1231 (error "Not in a nnmairix group"))
958 (throw 'found group))))))) 1232 (save-excursion
959 (unless group 1233 (let ((mid (mail-header-message-id (gnus-summary-article-header)))
960 ;; we haven't found it yet --> look for nnimap groups 1234 groups cur)
961 ;; assume last element of the path is the group 1235 (when mid
962 (string-match "^.*/\\.?\\(.*\\)$" path) 1236 (setq groups (nnmairix-determine-original-group-from-registry mid))
963 (setq group (match-string 1 path)) 1237 (unless (or groups
964 ;; convert dots to slashes (nested group) 1238 nnmairix-only-use-registry)
965 (while (string-match "\\." group) 1239 (setq groups
966 (setq group (replace-match "/" t t group))) 1240 (nnmairix-determine-original-group-from-path mid nnmairix-current-server)))
967 (dolist (cur gnus-opened-servers) 1241 (unless groups
968 (when (eq (caar cur) 'nnimap) 1242 (error "Couldn't find original article"))
969 (when (gnus-group-entry 1243 (dolist (cur groups)
970 (gnus-group-prefixed-name group (car cur))) 1244 (push `(,cur (,mid del (tick))) nnmairix-marks-cache))
971 (push 1245 (nnheader-message 5 "Will remove tick mark for %s upon closing." mid)))))
972 (gnus-group-prefixed-name group (car cur))
973 allgroups))))
974 (if (> (length allgroups) 1)
975 (setq group (completing-read
976 "Group %s exists on more than one IMAP server. Choose: "
977 allgroups nil t))
978 (setq group (car allgroups))))
979 group))
980
981 1246
982;;; ==== Helper functions 1247;;; ==== Helper functions
983 1248
984(defun nnmairix-request-group-with-article-number-correction (folder qualgroup) 1249(defun nnmairix-request-group-with-article-number-correction (folder qualgroup)
985 "Request FOLDER on backend for nnmairix QUALGROUP and article number correction." 1250 "Request FOLDER on back end for nnmairix QUALGROUP and article number correction."
986 (save-excursion 1251 (save-excursion
987 (nnmairix-call-backend "request-group" folder nnmairix-backend-server) 1252 (nnmairix-call-backend "request-group" folder nnmairix-backend-server)
988 (set-buffer nnmairix-mairix-output-buffer) 1253 (set-buffer nnmairix-mairix-output-buffer)
@@ -1024,8 +1289,8 @@ search in raw mode."
1024 'nnmairix "Error calling back end on group %s" folder) 1289 'nnmairix "Error calling back end on group %s" folder)
1025 nil))))) 1290 nil)))))
1026 1291
1027(defun nnmairix-call-mairix-binary (command folder query threads) 1292(defun nnmairix-call-mairix-binary (command folder searchquery threads)
1028 "Call mairix binary with COMMAND, using FOLDER and QUERY. 1293 "Call mairix binary with COMMAND, using FOLDER and SEARCHQUERY.
1029If THREADS is non-nil, enable full threads." 1294If THREADS is non-nil, enable full threads."
1030 (let ((args (cons (car command) '(nil t nil)))) 1295 (let ((args (cons (car command) '(nil t nil))))
1031 (save-excursion 1296 (save-excursion
@@ -1034,10 +1299,15 @@ If THREADS is non-nil, enable full threads."
1034 (erase-buffer) 1299 (erase-buffer)
1035 (when (> (length command) 1) 1300 (when (> (length command) 1)
1036 (setq args (append args (cdr command)))) 1301 (setq args (append args (cdr command))))
1302 (when nnmairix-mairix-search-options
1303 (setq args (append args nnmairix-mairix-search-options)))
1304 ;; If we have a patched mairix binary, call it with "-c"
1305 (when (nnmairix-check-mairix-version "maildirpatch")
1306 (setq args (append args '("-c"))))
1037 (when threads 1307 (when threads
1038 (setq args (append args '("-t")))) 1308 (setq args (append args '("-t"))))
1039 (apply 'call-process 1309 (apply 'call-process
1040 (append args (list "-o" folder) query))))) 1310 (append args (list "-o" folder) searchquery)))))
1041 1311
1042(defun nnmairix-call-mairix-binary-raw (command query) 1312(defun nnmairix-call-mairix-binary-raw (command query)
1043 "Call mairix binary with COMMAND and QUERY in raw mode." 1313 "Call mairix binary with COMMAND and QUERY in raw mode."
@@ -1086,9 +1356,8 @@ If ALL is t, return also the unopened/failed ones."
1086 (push (list server) openedserver))) 1356 (push (list server) openedserver)))
1087 openedserver)) 1357 openedserver))
1088 1358
1089
1090(defun nnmairix-get-valid-servers () 1359(defun nnmairix-get-valid-servers ()
1091 "Return list of valid backend servers for nnmairix groups." 1360 "Return list of valid back end servers for nnmairix groups."
1092 (let ((alist gnus-opened-servers) 1361 (let ((alist gnus-opened-servers)
1093 (mairixservers (nnmairix-get-nnmairix-servers t)) 1362 (mairixservers (nnmairix-get-nnmairix-servers t))
1094 server mserver openedserver occ cur) 1363 server mserver openedserver occ cur)
@@ -1123,6 +1392,16 @@ If ALL is t, return also the unopened/failed ones."
1123 openedserver))) 1392 openedserver)))
1124 openedserver)) 1393 openedserver))
1125 1394
1395(defun nnmairix-get-groups-from-server (servername)
1396 "Return all groups for nnmairix server SERVERNAME."
1397 (let ((searchstring (format "nnmairix\\+%s:" servername))
1398 groups)
1399 (dolist (cur gnus-newsrc-alist)
1400 (when (string-match searchstring
1401 (car cur))
1402 (push (list (car cur)) groups)))
1403 groups))
1404
1126(defun nnmairix-call-backend (func &rest args) 1405(defun nnmairix-call-backend (func &rest args)
1127 "Call a function FUNC on backend with ARGS." 1406 "Call a function FUNC on backend with ARGS."
1128 (apply (intern (format "%s-%s" (symbol-name nnmairix-backend) func)) args)) 1407 (apply (intern (format "%s-%s" (symbol-name nnmairix-backend) func)) args))
@@ -1250,43 +1529,50 @@ group."
1250 ;; If there is just one (or none) nnmairix server: 1529 ;; If there is just one (or none) nnmairix server:
1251 (gnus-server-to-method (caar allservers))))) 1530 (gnus-server-to-method (caar allservers)))))
1252 1531
1532
1533(defun nnmairix-delete-recreate-group (group)
1534 "Delete and recreate folder from GROUP on the back end."
1535 (when (member nnmairix-backend nnmairix-delete-and-create-on-change)
1536 (let ((folder (gnus-group-get-parameter group 'folder)))
1537 (if (string-match nnmairix-group-regexp folder)
1538 (progn
1539 (nnmairix-call-backend "open-server"
1540 nnmairix-backend-server)
1541 (nnmairix-call-backend "request-delete-group"
1542 folder t nnmairix-backend-server)
1543 (nnmairix-call-backend "request-create-group"
1544 folder nnmairix-backend-server))
1545 (error "`nnmairix-delete-recreate-group' called on \
1546non-mairix group. Check folder parameter")))))
1547
1253(defun nnmairix-update-and-clear-marks (group &optional method) 1548(defun nnmairix-update-and-clear-marks (group &optional method)
1254 "Update group and clear all marks from GROUP using METHOD." 1549 "Update group and clear all marks from GROUP using METHOD."
1255 (when method
1256 (setq group (gnus-group-prefixed-name group method)))
1257 (let ((method (or method 1550 (let ((method (or method
1258 (gnus-find-method-for-group group))) 1551 (gnus-find-method-for-group group)))
1259 (folder (gnus-group-get-parameter group 'folder))
1260 (corr (gnus-group-get-parameter group 'numcorr t)) 1552 (corr (gnus-group-get-parameter group 'numcorr t))
1261 info) 1553 info)
1554 (unless (or (gnus-group-prefixed-p group)
1555 (not method))
1556 (setq group (gnus-group-prefixed-name group method)))
1262 (if (eq (nth 0 method) 'nnmairix) 1557 (if (eq (nth 0 method) 'nnmairix)
1263 (save-excursion 1558 (save-excursion
1264 (nnmairix-open-server (nth 1 method)) 1559 (nnmairix-open-server (nth 1 method))
1265 (set-buffer gnus-group-buffer) 1560 (set-buffer gnus-group-buffer)
1561 ;; (gnus-group-set-parameter group 'propmarks nil)
1266 (setq info (gnus-get-info group)) 1562 (setq info (gnus-get-info group))
1267 ;; Clear active and info 1563 ;; Clear active and info
1268 (gnus-set-active group nil) 1564 (gnus-set-active group nil)
1269 (gnus-info-clear-data info) 1565 (gnus-info-clear-data info)
1270 ;; Delete and re-create group if needed 1566 ;; Delete and re-create group if needed
1567 (nnmairix-delete-recreate-group group)
1568 ;; set flag that group has changed for article number correction
1271 (when (member nnmairix-backend nnmairix-delete-and-create-on-change) 1569 (when (member nnmairix-backend nnmairix-delete-and-create-on-change)
1272 (if (string-match nnmairix-group-regexp folder) 1570 (when corr
1273 (progn 1571 (setcar corr t)
1274 (nnmairix-call-backend "open-server" 1572 (gnus-group-set-parameter group 'numcorr corr)))
1275 nnmairix-backend-server) 1573 (gnus-group-jump-to-group group)
1276 (nnmairix-call-backend "request-delete-group" 1574 (gnus-group-get-new-news-this-group))
1277 folder t nnmairix-backend-server) 1575 (error "`nnmairix-update-and-clear-marks' called with non-nnmairix group"))))
1278 (nnmairix-call-backend "request-create-group"
1279 folder nnmairix-backend-server)
1280 ;; set flag that group has changed for article number correction
1281 (when corr
1282 (setcar corr t)
1283 (gnus-group-set-parameter group 'numcorr corr)))
1284 (error "Nnmairix-update-and-clear-marks - delete/create with\
1285 non-mairix group!! - check folder parameter")))
1286 (when (gnus-group-jump-to-group group)
1287 (gnus-group-get-new-news-this-group)))
1288 (error "Nnmairix-update-and-clear-marks - Called with non-nnmairix group"))))
1289
1290 1576
1291(defun nnmairix-sentinel-mairix-update-finished (proc status) 1577(defun nnmairix-sentinel-mairix-update-finished (proc status)
1292 "Sentinel for mairix update process PROC with STATUS." 1578 "Sentinel for mairix update process PROC with STATUS."
@@ -1315,20 +1601,240 @@ See %s for details" proc nnmairix-mairix-output-buffer)))
1315 (setq header (replace-match "," t t header))) 1601 (setq header (replace-match "," t t header)))
1316 header)) 1602 header))
1317 1603
1604(defun nnmairix-group-toggle-parameter (group parameter description &optional par)
1605 "Toggle on GROUP a certain PARAMETER.
1606DESCRIPTION will be shown to the user with the activation
1607status. If PAR is a positive number, the group parameter will be
1608set to t and to nil otherwise."
1609 (let* ((method (gnus-find-method-for-group group))
1610 (par (or par
1611 (not (gnus-group-get-parameter group parameter)))))
1612 (if (eq (car method) 'nnmairix)
1613 (progn
1614 (when (numberp par)
1615 (setq par (> par 0)))
1616 (gnus-group-set-parameter group parameter par)
1617 (if par
1618 (message "%s activated for group %s" description group)
1619 (message "%s deactivated for group %s" description group))
1620 t)
1621 (error "This is no nnmairix group")
1622 nil)))
1623
1624;; Search for original article helper functions
1625
1626(defun nnmairix-goto-original-article (&optional no-registry)
1627 "Jump to the original group and display article.
1628The original group of the article is first determined with the
1629registry (if enabled). If the registry is not enabled or did not
1630find the article or the prefix NO-REGISTRY is non-nil, this
1631function will try to determine the original group form the path
1632of the mail file. The path is obtained through another mairix
1633search in raw mode."
1634 (interactive "P")
1635 (when (not (eq (car gnus-current-select-method) 'nnmairix))
1636 (let ((method (gnus-find-method-for-group gnus-newsgroup-name)))
1637 (if (eq (car method) 'nnmairix)
1638 (nnmairix-open-server (nth 1 method))
1639 (error "Not in a nnmairix group"))))
1640 (when (not (gnus-buffer-live-p gnus-article-buffer))
1641 (error "No article buffer available"))
1642 (let ((server (nth 1 gnus-current-select-method))
1643 mid rval group allgroups)
1644 ;; get message id
1645 (save-excursion
1646 (set-buffer gnus-article-buffer)
1647 (gnus-summary-toggle-header 1)
1648 (setq mid (message-fetch-field "Message-ID"))
1649 ;; first check the registry (if available)
1650 (unless no-registry
1651 (setq allgroups (nnmairix-determine-original-group-from-registry mid)))
1652 (unless (or allgroups
1653 nnmairix-only-use-registry)
1654 ;; registry was not available or did not find article
1655 ;; so we search again with mairix in raw mode to get filename
1656 (setq allgroups
1657 (nnmairix-determine-original-group-from-path mid server))
1658 ;; if available and allowed, add this entry to the registry
1659 (when (and (not no-registry)
1660 (boundp 'gnus-registry-install)
1661 gnus-registry-install)
1662 (dolist (cur allgroups)
1663 (unless (gnus-parameter-registry-ignore cur)
1664 (gnus-registry-add-group mid cur)))))
1665 (if (> (length allgroups) 1)
1666 (setq group
1667 (completing-read
1668 "Message exists in more than one group. Choose: "
1669 allgroups nil t))
1670 (setq group (car allgroups))))
1671 (if group
1672 ;; show article in summary buffer
1673 (nnmairix-show-original-article group mid)
1674 (nnheader-message 3 "Couldn't find original article"))))
1675
1676(defun nnmairix-determine-original-group-from-registry (mid)
1677 "Try to determinale original group for message-id MID from the registry."
1678 (when (and (boundp 'gnus-registry-install)
1679 gnus-registry-install)
1680 (unless (string-match "^<" mid)
1681 (set mid (concat "<" mid)))
1682 (unless (string-match ">$" mid)
1683 (set mid (concat mid ">")))
1684 (gnus-registry-fetch-groups mid)))
1685
1686(defun nnmairix-determine-original-group-from-path (mid server)
1687 "Determine original group(s) for message-id MID from the file path.
1688The file path is obtained through a mairix search for the id on
1689SERVER."
1690 (nnmairix-open-server server)
1691 (while (string-match "[<>]" mid)
1692 (setq mid (replace-match "" t t mid)))
1693 (let (allgroups)
1694 (if (zerop (nnmairix-call-mairix-binary-raw
1695 (split-string nnmairix-mairix-command)
1696 (list (concat "m:" mid))))
1697 (save-excursion
1698 (set-buffer nnmairix-mairix-output-buffer)
1699 (goto-char (point-min))
1700 (while (re-search-forward "^/.*$" nil t)
1701 (push (nnmairix-get-group-from-file-path (match-string 0))
1702 allgroups)
1703 (forward-line 1)))
1704 (error "Mairix could not find original article. See buffer %s for details"
1705 nnmairix-mairix-output-buffer))
1706 allgroups))
1707
1708(defun nnmairix-get-group-from-file-path (file)
1709 "Get group by parsing the message location FILE."
1710 (let (path filename serverbase group maildirflag allgroups)
1711 (string-match "^\\(.*\\)/\\(.*?\\)$" file)
1712 (setq path (expand-file-name (match-string 1 file)))
1713 (setq filename (match-string 2 file))
1714 ;; when we deal with maildir, remove cur/new/tmp from path
1715 (setq maildirflag (string-match ".+\\..+\\..+" filename))
1716 (when maildirflag
1717 (setq path
1718 (replace-regexp-in-string
1719 ".*\\(/cur\\|/new\\|/tmp\\)$" "" path t t 1)))
1720 ;; we first check nnml and nnmaildir servers
1721 (setq
1722 group
1723 (catch 'found
1724 (dolist (cur gnus-opened-servers)
1725 (when (or (and (not maildirflag)
1726 (eq (caar cur) 'nnml))
1727 (and maildirflag
1728 (eq (caar cur) 'nnmaildir)))
1729 ;; get base path from server
1730 (if maildirflag
1731 (setq serverbase (cadr (assoc 'directory (car cur))))
1732 (setq serverbase (cadr (assoc 'nnml-directory (car cur))))
1733 (unless serverbase
1734 (setq serverbase nnml-directory)))
1735 (setq serverbase (file-name-as-directory
1736 (expand-file-name serverbase)))
1737 (when (string-match (concat serverbase "\\(.*\\)") path)
1738 ;; looks good - rest of the path should be the group
1739 (setq group (match-string 1 path))
1740 (when (string-match "/$" group)
1741 (setq group (replace-match "" t t group)))
1742 (unless maildirflag
1743 ;; for nnml: convert slashes to dots
1744 (while (string-match "/" group)
1745 (setq group (replace-match "." t t group))))
1746 (setq group (gnus-group-prefixed-name group (car cur)))
1747 ;; check whether this group actually exists
1748 (when (gnus-group-entry group)
1749 (throw 'found group)))))))
1750 (unless group
1751 ;; we haven't found it yet --> look for nnimap groups. Assume
1752 ;; last element of the path is the group. This might fail since
1753 ;; IMAP servers may present groups to the client in arbitrary
1754 ;; ways...
1755 (string-match "^.*/\\.?\\(.*\\)$" path)
1756 (setq group (match-string 1 path))
1757 ;; convert dots to slashes (nested group)
1758 (while (string-match "\\." group)
1759 (setq group (replace-match "/" t t group)))
1760 (dolist (cur gnus-opened-servers)
1761 (when (eq (caar cur) 'nnimap)
1762 (when (gnus-group-entry
1763 (gnus-group-prefixed-name group (car cur)))
1764 (push
1765 (gnus-group-prefixed-name group (car cur))
1766 allgroups))))
1767 (if (> (length allgroups) 1)
1768 (setq group (completing-read
1769 "Group %s exists on more than one IMAP server. Choose: "
1770 allgroups nil t))
1771 (setq group (car allgroups))))
1772 group))
1773
1318(defun nnmairix-show-original-article (group mid) 1774(defun nnmairix-show-original-article (group mid)
1319 "Switch to GROUP and display Article with message-id MID." 1775 "Switch to GROUP and display Article with message-id MID."
1776 (unless (string-match "^<" mid)
1777 (set mid (concat "<" mid)))
1778 (unless (string-match ">$" mid)
1779 (set mid (concat mid ">")))
1320 (when (string-match "Summary" (buffer-name (current-buffer))) 1780 (when (string-match "Summary" (buffer-name (current-buffer)))
1321 (gnus-summary-exit)) 1781 (gnus-summary-exit))
1322 (pop-to-buffer gnus-group-buffer) 1782 (pop-to-buffer gnus-group-buffer)
1323 (gnus-group-jump-to-group group) 1783 (gnus-group-jump-to-group group)
1324 (gnus-summary-read-group group 1 t) 1784 (gnus-summary-read-group group 1 t)
1325 (gnus-summary-refer-article mid) 1785 (gnus-summary-refer-article mid)
1326 (gnus-summary-limit-to-headers (format "message-id: <%s>" mid)) 1786 (gnus-summary-limit-to-headers (format "message-id: %s" mid))
1327 (gnus-summary-select-article) 1787 (gnus-summary-select-article)
1328 ;; Force redisplay 1788 ;; Force redisplay
1329 (gnus-summary-show-article) 1789 (gnus-summary-show-article)
1330 (nnheader-message 5 "Switched to group %s." group)) 1790 (nnheader-message 5 "Switched to group %s." group))
1331 1791
1792(defun nnmairix-map-range (func range)
1793 "Map function FUNC on all members of RANGE."
1794 (cond
1795 ((numberp range)
1796 (funcall func range))
1797 (t
1798 (mapcar (lambda (cur)
1799 (cond
1800 ((listp cur)
1801 (cons
1802 (funcall func (car cur))
1803 (funcall func (cdr cur))))
1804 ((numberp cur)
1805 (funcall func cur))))
1806 range))))
1807
1808(defun nnmairix-check-mairix-version (version &optional server)
1809 "Check mairix VERSION on SERVER.
1810If VERSION is a number: specifies the minimum version.
1811If VERSION is a string: must be contained in mairix version output."
1812 (unless server
1813 (setq server nnmairix-current-server))
1814 (let ((versionstring (cadr (assoc server nnmairix-version-output))))
1815 (unless versionstring
1816 ;; call "mairix -V" to get the version string
1817 (with-temp-buffer
1818 (setq versionstring
1819 (let* ((commandsplit (split-string nnmairix-mairix-command))
1820 (args (append (list (car commandsplit))
1821 `(nil t nil) (cdr commandsplit) '("-V"))))
1822 (apply 'call-process args)
1823 (goto-char (point-min))
1824 (re-search-forward "mairix.*")
1825 (match-string 0))))
1826 ;; save version string for current session
1827 (setq nnmairix-version-output
1828 (append nnmairix-version-output
1829 (list (list server versionstring)))))
1830 (cond
1831 ((stringp version)
1832 (string-match version versionstring))
1833 ((numberp version)
1834 (<= version (string-to-number
1835 (progn
1836 (string-match "mairix \\([0-9\\.]+\\)" versionstring)
1837 (match-string 1 versionstring))))))))
1332 1838
1333;; ==== Widget stuff 1839;; ==== Widget stuff
1334 1840
@@ -1341,7 +1847,6 @@ See %s for details" proc nnmairix-mairix-output-buffer)))
1341 (nnmairix-widget-search 1847 (nnmairix-widget-search
1342 (nnmairix-widget-get-values))) 1848 (nnmairix-widget-get-values)))
1343 1849
1344
1345(defun nnmairix-widget-get-values () 1850(defun nnmairix-widget-get-values ()
1346 "Create values for editable fields from current article." 1851 "Create values for editable fields from current article."
1347 (if (not (gnus-buffer-live-p gnus-article-buffer)) 1852 (if (not (gnus-buffer-live-p gnus-article-buffer))
@@ -1499,7 +2004,6 @@ Fill in VALUES if based on an article."
1499 (nnmairix-widget-add "Threads" 'checkbox nil)) 2004 (nnmairix-widget-add "Threads" 'checkbox nil))
1500 (widget-insert " Show full threads\n\n"))) 2005 (widget-insert " Show full threads\n\n")))
1501 2006
1502
1503(defun nnmairix-widget-build-editable-fields (values) 2007(defun nnmairix-widget-build-editable-fields (values)
1504 "Build editable field widgets in `nnmairix-widget-fields-list'. 2008 "Build editable field widgets in `nnmairix-widget-fields-list'.
1505VALUES may contain values for editable fields from current article." 2009VALUES may contain values for editable fields from current article."
@@ -1543,7 +2047,7 @@ VALUES may contain values for editable fields from current article."
1543 nnmairix-widgets)) 2047 nnmairix-widgets))
1544 2048
1545(defun nnmairix-widget-toggle-activate (widget) 2049(defun nnmairix-widget-toggle-activate (widget)
1546 "Toggle activation status of WIDGET dependent on corresponding checkbox value." 2050 "Toggle activation status of WIDGET depending on corresponding checkbox value."
1547 (let ((field (widget-get widget :tag))) 2051 (let ((field (widget-get widget :tag)))
1548 (if (widget-value widget) 2052 (if (widget-value widget)
1549 (widget-apply 2053 (widget-apply