+2003-01-07 Teodor Zlatanov <tzz@lifelogs.com>
+
+ * spam.el (spam-check-ifile): fixed the spam-ifile-all-categories
+ logic, finally
+
+2003-01-08 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * gnus-spec.el (gnus-parse-format): %C is a complex format.
+ (gnus-parse-format): Change to %~.
+
+ * message.el (message-generate-headers): Don't generate optional
+ empty headers.
+
2003-01-07 Reiner Steib <Reiner.Steib@gmx.de>
* message.el (message-cross-post-default)
;; them will have the balloon-help text property.
(let ((case-fold-search nil))
(if (string-match
- "\\`\\(.*\\)%[0-9]?[{(«]\\(.*\\)%[0-9]?[»})]\\(.*\n?\\)\\'\\|%[-0-9]*="
+ "\\`\\(.*\\)%[0-9]?[{(«]\\(.*\\)%[0-9]?[»})]\\(.*\n?\\)\\'\\|%[-0-9]*=\\|%[-0-9]*~"
format)
(gnus-parse-complex-format format spec-alist)
;; This is a simple format.
(gnus-parse-simple-format format spec-alist insert))))
(defun gnus-parse-complex-format (format spec-alist)
- (let (found-C)
+ (let ((cursor-spec nil))
(save-excursion
(gnus-set-work-buffer)
(insert format)
;; Convert point position commands.
(goto-char (point-min))
(let ((case-fold-search nil))
- (while (re-search-forward "%\\([-0-9]+\\)?C" nil t)
+ (while (re-search-forward "%\\([-0-9]+\\)?~" nil t)
(replace-match "\"(point)\"" t t)
- (setq found-C t)))
+ (setq cursor-spec t)))
;; Convert TAB commands.
(goto-char (point-min))
(while (re-search-forward "%\\([-0-9]+\\)=" nil t)
;; Convert the buffer into the spec.
(goto-char (point-min))
(let ((form (read (current-buffer))))
- (if found-C
+ (if cursor-spec
`(let (gnus-position)
,@(gnus-complex-form-to-spec form spec-alist)
(if gnus-position
(User-Agent (message-make-user-agent))
(Expires (message-make-expires))
(case-fold-search t)
+ (optionalp nil)
header value elem)
;; First we remove any old generated headers.
(let ((headers message-deletable-headers))
(setq elem (pop headers))
(if (consp elem)
(if (eq (car elem) 'optional)
- (setq header (cdr elem))
+ (setq header (cdr elem)
+ optionalp t)
(setq header (car elem)))
(setq header elem))
(when (or (not (re-search-forward
;; The header was found. We insert a space after the
;; colon, if there is none.
(if (/= (char-after) ? ) (insert " ") (forward-char 1))
- ;; Find out whether the header is empty...
+ ;; Find out whether the header is empty.
(looking-at "[ \t]*\n[^ \t]")))
;; So we find out what value we should insert.
(setq value
;; The value of this header was empty, so we clear
;; totally and insert the new value.
(delete-region (point) (gnus-point-at-eol))
- (insert value)
- (when (bolp)
- (delete-char -1)))
+ ;; If the header is optional, and the header was
+ ;; empty, we can't insert it anyway.
+ (unless optionalp
+ (insert value)
+ (when (bolp)
+ (delete-char -1))))
;; Add the deletable property to the headers that require it.
(and (memq header message-deletable-headers)
(progn (beginning-of-line) (looking-at "[^:]+: "))
(if (not (eobp))
(setq category (buffer-substring (point) (spam-point-at-eol))))
(when (not (zerop (length category))) ; we need a category here
- (unless spam-ifile-all-categories
+ (if spam-ifile-all-categories
+ (setq return category)
+ ;; else, if spam-ifile-all-categories is not set...
(when (string-equal spam-ifile-spam-category category)
- (setq return spam-split-group))
- (setq return category))))) ; always accept the ifile category
+ (setq return spam-split-group)))))) ; always accept the ifile category
return))
(defun spam-ifile-register-with-ifile (article-string category)
+2003-01-08 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * gnus.texi (Optional Back End Functions): Addition.
+ (Positioning Point): Changed to %~.
+
2003-01-08 Simon Josefsson <jas@extundo.com>
* gnus.texi (MIME Commands): Add.
\e$B$-$^$9!#$=$N4X?t$O\e(B @code{gnus-goto-colon} \e$B$H8F$P$l$F$$$^$9!#\e(B
\e$B$G$b!"$b$7$"$J$?$,9T$K%3%m%s$r4^$a$?$/$J$$$J$i$P!"$3$l$r07$&$?$a$N$*$=$i\e(B
-\e$B$/:G$b<j$4$m$JJ}K!$O\e(B @samp{%C} \e$B;X<(;R$r;H$&$3$H$G$9!#$"$J$?$N9T$N=qK!;E\e(B
-\e$BMM$NDj5A$K\e(B @samp{%C} \e$B$rF~$l$F$*$1$P!"\e(Bgnus \e$B$O$=$3$K%]%$%s%H$rCV$-$^$9!#\e(B
+\e$B$/:G$b<j$4$m$JJ}K!$O\e(B @samp{%~} \e$B;X<(;R$r;H$&$3$H$G$9!#$"$J$?$N9T$N=qK!;E\e(B
+\e$BMM$NDj5A$K\e(B @samp{%~} \e$B$rF~$l$F$*$1$P!"\e(Bgnus \e$B$O$=$3$K%]%$%s%H$rCV$-$^$9!#\e(B
@node Tabulation
@subsection \e$B@0Ns\e(B
\e$B$3$N4X?t$O!"%0%k!<%WL>$,\e(B @code{car} \e$B$G!"$=$N5-;v$N0\F0@h$N5-;vHV9f$,\e(B
@code{cdr} \e$B$G$"$k\e(B cons \e$B%;%k$rJV$7$^$9!#\e(B
+\e$B$=$N%0%k!<%W$O!"%P%C%/%(%s%I$,$=$N%0%k!<%W$X$N5-;v$N<}G<$rMW5a$9$kA0$KB8\e(B
+\e$B:_$7$J$1$l$^$J$j$^$;$s!#\e(B
+
\e$BJV$5$l$k7k2L$N%G!<%?$O$"$j$^$;$s!#\e(B
@item (nnchoke-request-accept-article GROUP &optional SERVER LAST)
function is called @code{gnus-goto-colon}.
But perhaps the most convenient way to deal with this, if you don't want
-to have a colon in your line, is to use the @samp{%C} specifier. If you
-put a @samp{%C} somewhere in your format line definition, Gnus will
+to have a colon in your line, is to use the @samp{%~} specifier. If you
+put a @samp{%~} somewhere in your format line definition, Gnus will
place point there.
The function should return a cons where the @code{car} is the group name and
the @code{cdr} is the article number that the article was entered as.
+The group should exist before the backend is asked to accept the
+article for that group.
+
There should be no data returned.