+2004-05-19 Ben Menasha <bmenasha@benmenasha.net>
+
+ * nnmh.el (nnmh-request-list-1): Don't check the link count
+ before descending. (small patch)
+
+2004-05-19 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * gnus-msg.el (gnus-inews-make-draft-meta-information): Fix quote
+ stuff.
+
+ * gnus-start.el (gnus-subscribe-hierarchical-interactive): Match
+ on real group name.
+
+ * gnus-art.el (gnus-signature-limit): Doc fix.
+
+ * gnus-msg.el (gnus-inews-make-draft): Quote list.
+
+ * pgg-pgp.el (pgg-pgp-verify-region): Clean up.
+
+2004-05-19 Michael Schierl <schierlm-usenet@gmx.de>
+
+ * pgg-pgp.el (pgg-pgp-verify-region): Default when signature
+ isn't a string.
+
+2004-05-19 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * gnus-draft.el (gnus-draft-send): Bind
+ rfc2047-encode-encoded-words.
+
+ * rfc2047.el (rfc2047-encode-region): Encode =? strings.
+ (rfc2047-encodable-p): Say that =? needs encoding.
+ (rfc2047-encode-encoded-words): New variable.
+
+ * gnus-group.el (gnus-group-select-group): Doc fix.
+
+ * gnus-draft.el (gnus-draft-setup): Mark all replied as replied.
+
+ * gnus-group.el (gnus-group-mode): Set show-trailing-whitespace
+ to nil.
+
+ * gnus-cache.el (gnus-cache-possibly-enter-article): Use it.
+
+ * nnheader.el (nnheader-get-lines-and-char): New function.
+
2004-05-19 Reiner Steib <Reiner.Steib@gmx.de>
* gnus-msg.el (gnus-summary-followup-with-original): Document
longer (in lines) than that number. If it is a function, the function
will be called without any parameters, and if it returns nil, there is
no signature in the buffer. If it is a string, it will be used as a
-regexp. If it matches, the text in question is not a signature."
+regexp. If it matches, the text in question is not a signature.
+
+This can also be a list of the above values."
:type '(choice (integer :value 200)
(number :value 4.0)
(function :value fun)
(make-local-variable 'gnus-article-ignored-charsets)
(gnus-set-default-directory)
(buffer-disable-undo)
- (setq buffer-read-only t)
+ (setq buffer-read-only t
+ show-trailing-whitespace nil)
(set-syntax-table gnus-article-mode-syntax-table)
(gnus-run-hooks 'gnus-article-mode-hook))
(overview-file (gnus-cache-file-name
(car gnus-cache-buffer) ".overview")))
;; write the overview only if it was modified
- (when (and (buffer-live-p buffer) (buffer-modified-p buffer))
+ (when (and (buffer-live-p buffer)
+ (buffer-modified-p buffer))
(with-current-buffer buffer
(if (> (buffer-size) 0)
;; Non-empty overview, write it to a file.
(delete-directory (file-name-directory overview-file))
(error)))
- (gnus-cache-update-overview-total-fetched-for (car gnus-cache-buffer)
- overview-file)))
+ (gnus-cache-update-overview-total-fetched-for
+ (car gnus-cache-buffer) overview-file)))
;; Kill the buffer -- it's either unmodified or saved.
(gnus-kill-buffer buffer)
(setq gnus-cache-buffer nil))))
(numberp article)
(> article 0) ; This might be a dummy article.
(vectorp headers))
- (let ((number article) file)
+ (let ((number article)
+ file lines-chars)
;; If this is a virtual group, we find the real group.
(when (gnus-virtual-group-p group)
(let ((result (nnvirtual-find-group-art
(gnus-write-buffer-as-coding-system
gnus-cache-write-file-coding-system file)
(gnus-cache-update-file-total-fetched-for group file)
+ (setq lines-chars (nnheader-get-lines-and-char))
(nnheader-remove-body)
(setq headers (nnheader-parse-naked-head))
(mail-header-set-number headers number)
+ (mail-header-set-lines headers (car lines-chars))
+ (mail-header-set-chars headers (cadr lines-chars))
(gnus-cache-change-buffer group)
(set-buffer (cdr gnus-cache-buffer))
(goto-char (point-max))
message-setup-hook))
(gnus-agent-queue-mail (and (not is-queue)
gnus-agent-queue-mail))
+ (rfc2047-encode-encoded-words nil)
type method move-to)
(gnus-draft-setup article (or group "nndraft:queue"))
;; We read the meta-information that says how and where
`(lambda (arg)
(gnus-post-method arg ,(car ga))))
(unless (equal (cadr ga) "")
- (message-add-action
- `(progn
- (gnus-add-mark ,(car ga) 'replied ,(cadr ga))
- (gnus-request-set-mark ,(car ga) (list (list (list ,(cadr ga))
- 'add '(reply)))))
- 'send)))))
+ (dolist (article (cdr ga))
+ (message-add-action
+ `(progn
+ (gnus-add-mark ,(car ga) 'replied ,article)
+ (gnus-request-set-mark ,(car ga) (list (list (list ,article)
+ 'add '(reply)))))
+ 'send))))))
(defun gnus-draft-article-sendable-p (article)
"Say whether ARTICLE is sendable."
(use-local-map gnus-group-mode-map)
(buffer-disable-undo)
(setq truncate-lines t)
- (setq buffer-read-only t)
+ (setq buffer-read-only t
+ show-trailing-whitespace nil)
(gnus-set-default-directory)
(gnus-update-format-specifications nil 'group 'group-mode)
(gnus-update-group-mark-positions)
No article is selected automatically.
If the group is opened, just switch the summary buffer.
If ALL is non-nil, already read articles become readable.
-If ALL is a number, fetch this number of articles."
+If ALL is a positive number, fetch this number of the latest
+articles in the group.
+If ALL is a negative number, fetch this number of the earliest
+articles in the group."
(interactive "P")
(when (and (eobp) (not (gnus-group-group-name)))
(forward-line -1))
;;; Internal functions.
-(defun gnus-inews-make-draft ()
+(defun gnus-inews-make-draft (articles)
`(lambda ()
(gnus-inews-make-draft-meta-information
- ,gnus-newsgroup-name ',gnus-article-reply)))
+ ,gnus-newsgroup-name ',@articles)))
(defvar gnus-article-reply nil)
(defmacro gnus-setup-message (config &rest forms)
(not (string= ,group "")))
(push (cons
(intern gnus-draft-meta-information-header)
- (gnus-inews-make-draft))
+ (gnus-inews-make-draft ,yanked))
message-required-headers))
(unwind-protect
(progn
(run-hooks 'post-command-hook)
(set-buffer-modified-p nil))))
-(defun gnus-inews-make-draft-meta-information (group article)
+(defun gnus-inews-make-draft-meta-information (group &rest articles)
(concat "(\"" group "\" "
- (if article (number-to-string
- (if (listp article)
- (car article)
- article)) "\"\"")
+ (if articles (mapconcat
+ (lambda (elem)
+ (if (consp elem)
+ (car elem)
+ elem))
+ articles " "))
")"))
;;;###autoload
(defun gnus-subscribe-hierarchical-interactive (groups)
(let ((groups (sort groups 'string<))
- prefixes prefix start ans group starts)
+ prefixes prefix start ans group starts real-group)
(while groups
(setq prefixes (list "^"))
(while (and groups prefixes)
- (while (not (string-match (car prefixes) (car groups)))
+ (while (not (string-match (car prefixes)
+ (gnus-group-real-name (car groups))))
(setq prefixes (cdr prefixes)))
(setq prefix (car prefixes))
(setq start (1- (length prefix)))
- (if (and (string-match "[^\\.]\\." (car groups) start)
+ (if (and (string-match "[^\\.]\\." (gnus-group-real-name (car groups))
+ start)
(cdr groups)
(setq prefix
- (concat "^" (substring (car groups) 0 (match-end 0))))
- (string-match prefix (cadr groups)))
+ (concat "^" (substring
+ (gnus-group-real-name (car groups))
+ 0 (match-end 0))))
+ (string-match prefix (gnus-group-real-name (cadr groups))))
(progn
(push prefix prefixes)
(message "Descend hierarchy %s? ([y]nsq): "
(substring prefix 1 (1- (length prefix)))))
(cond ((= ans ?n)
(while (and groups
- (string-match prefix
- (setq group (car groups))))
+ (setq group (car groups)
+ real-group (gnus-group-real-name group))
+ (string-match prefix real-group))
(push group gnus-killed-list)
(gnus-sethash group group gnus-killed-hashtb)
(setq groups (cdr groups)))
(setq starts (cdr starts)))
((= ans ?s)
(while (and groups
- (string-match prefix
- (setq group (car groups))))
+ (setq group (car groups)
+ real-group (gnus-group-real-name group))
+ (string-match prefix real-group))
(gnus-sethash group group gnus-killed-hashtb)
(gnus-subscribe-alphabetically (car groups))
(setq groups (cdr groups)))
(tool-bar-add-item-from-menu
'gnus-uu-post-news "uu-post" gnus-summary-mode-map)
(tool-bar-add-item-from-menu
+ 'gnus-uu-post-news "uu-post" gnus-summary-mode-map)
+ (tool-bar-add-item-from-menu
'gnus-summary-catchup "catchup" gnus-summary-mode-map)
(tool-bar-add-item-from-menu
'gnus-summary-catchup-and-exit "cu-exit" gnus-summary-mode-map)
(make-local-variable 'minor-mode-alist)
(use-local-map gnus-summary-mode-map)
(buffer-disable-undo)
- (setq buffer-read-only t) ;Disable modification
+ (setq buffer-read-only t ;Disable modification
+ show-trailing-whitespace nil)
(setq truncate-lines t)
(setq selective-display t)
(setq selective-display-ellipses t) ;Display `...'
(point-max)))
(goto-char (point-min)))
+(defun nnheader-get-lines-and-char ()
+ "Return the number of lines and chars in the article body."
+ (goto-char (point-min))
+ (if (not (re-search-forward "\n\r?\n" nil t))
+ (list 0 0)
+ (list (count-lines (point) (point-max))
+ (- (point-max) (point)))))
+
(defun nnheader-remove-body ()
"Remove the body from an article in this current buffer."
(goto-char (point-min))
(setq dir (expand-file-name dir))
;; Recurse down all directories.
(let ((dirs (and (file-readable-p dir)
- (> (nth 1 (file-attributes (file-chase-links dir))) 2)
(nnheader-directory-files dir t nil t)))
rdir)
;; Recurse down directories.
(nil . ignore))
"Alist of RFC2047 encodings to encoding functions.")
+(defvar rfc2047-encode-encoded-words t
+ "Whether encoded words should be encoded again.")
+
;;;
;;; Functions for encoding RFC2047 messages
;;;
(require 'message) ; for message-posting-charset
(let ((charsets
(mm-find-mime-charset-region (point-min) (point-max))))
- (and charsets
- (not (equal charsets (list (car message-posting-charset)))))))
+ (goto-char (point-min))
+ (or (and rfc2047-encode-encoded-words
+ (search-forward "=?" nil t))
+ (and charsets
+ (not (equal charsets (list (car message-posting-charset))))))))
;; Use this syntax table when parsing into regions that may need
;; encoding. Double quotes are string delimiters, backslash is
;; is relevant for instance in Subject headers with `Re:' for
;; interoperability with non-MIME clients, and we might as
;; well avoid the tail too.
- (progn
+ (let ((encodable-regexp
+ (if rfc2047-encode-encoded-words
+ "[^\000-\177]\\|=\\?"
+ "[^\000-\177]")))
(goto-char (point-min))
;; Does it need encoding?
- (skip-chars-forward "\000-\177")
+ (re-search-forward encodable-regexp (point-max) 'move)
(unless (eobp)
(skip-chars-backward "^ \n") ; beginning of space-delimited word
- (rfc2047-encode (point) (progn
- (goto-char e)
- (skip-chars-backward "\000-\177")
- (skip-chars-forward "^ \n")
- ;; end of space-delimited word
- (point)))))
+ (rfc2047-encode
+ (point)
+ (progn
+ (goto-char e)
+ (re-search-backward encodable-regexp (point-max) 'move)
+ (skip-chars-forward "^ \n")
+ ;; end of space-delimited word
+ (point)))))
;; `address-mime' case -- take care of quoted words, comments.
(with-syntax-table rfc2047-syntax-table
(let ((start) ; start of current token
"Encode the word(s) in the region B to E.
By default, the region is treated as containing addresses (see
`rfc2047-encoding-type')."
- (let* ((mime-charset (mm-find-mime-charset-region b e))
+ (let* ((mime-charset (or (mm-find-mime-charset-region b e) (list 'us-ascii)))
(cs (if (> (length mime-charset) 1)
;; Fixme: Instead of this, try to break region into
;; parts that can be encoded separately.
+2004-05-19 Andre Srinivasan <andre@e2open.com>
+
+ * gnus.texi (Group Parameters): Added more on hooks. (Small
+ change.)
+
2004-05-19 Reiner Steib <Reiner.Steib@gmx.de>
* gnus.texi (Oort Gnus): Mention new behavior of `F' and `R' when
\e$B$3$l$O$b$7I,MW$G$"$l$P!"%0%k!<%WKh$N%U%C%/4X?t$H$7$F$b;HMQ$G$-$^$9!#$b$7\e(B
\e$B$"$k%0%k!<%W$KF~$C$?$H$-$K%S!<%W2;$rLD$i$7$?$1$l$P!"$=$N%0%k!<%W$N%Q%i%a!<\e(B
\e$B%?$K\e(B @code{(dummy-variable (ding))} \e$B$_$?$$$J$b$N$r=q$$$F$*$/$3$H$b$G$-$^\e(B
-\e$B$9!#\e(B@code{dummy-variable} \e$B$H$$$&JQ?t$K\e(B @code{(ding)} \e$B$NI>2A7k2L$,@_Dj$5\e(B
-\e$B$l$^$9$,!"$^$"!"C/$b5$$K$7$J$$$G$7$g\e(B?
+\e$B$9!#\e(B@code{dummy-variable} \e$B$H$$$&JQ?t$K\e(B (\e$BL50UL#$J\e(B) @code{(ding)} \e$B$NI>2A7k\e(B
+\e$B2L$,@_Dj$5$l$^$9!#\e(B
+
+\e$B$"$k$$$O!"\e(B@var{variable} \e$B$O$=$N%0%k!<%W$KBP$7$F%m!<%+%k$K$J$k$N$G!"$3$N\e(B
+\e$BMM<0$O0l;~E*$K%U%C%/$rJQ99$9$k$?$a$K;H$&$3$H$,$G$-$^$9!#Nc$($P!"0J2<$N$b\e(B
+\e$B$N$,%0%k!<%W%Q%i%a!<%?$KDI2C$5$l$k$H!"\e(B
+
+@lisp
+(gnus-summary-prepared-hook
+ '(lambda nil (local-set-key "d" (local-key-binding "n"))))
+@end lisp
+
+\e$B$=$N%0%k!<%W$KF~$C$?$H$-$K\e(B @kbd{d} \e$B%-!<$O5-;v$K4|8B@Z$l>C5n$N0u$rIU$1$J\e(B
+\e$B$$$h$&$K$J$j$^$9!#\e(B
@end table
\e$B%0%k!<%W%Q%i%a!<%?$N=$@5$K$O\e(B @kbd{G p} \e$B$+\e(B @kbd{G c} \e$BL?Na$r;H$C$F$/$@$5\e(B
the group by putting @code{(gnus-list-identifiers "DOCBOOK-APPS:")}
into the group parameters for the group.
-This can also be used as a group-specific hook function, if you'd like.
-If you want to hear a beep when you enter a group, you could put
-something like @code{(dummy-variable (ding))} in the parameters of that
-group. @code{dummy-variable} will be set to the result of the
-@code{(ding)} form, but who cares?
+This can also be used as a group-specific hook function. If you want to
+hear a beep when you enter a group, you could put something like
+@code{(dummy-variable (ding))} in the parameters of that group.
+@code{dummy-variable} will be set to the (meaningless) result of the
+@code{(ding)} form.
+
+Alternatively, since the VARIABLE becomes local to the group, this
+pattern can be used to temporarily change a hook. For example, if the
+following is added to a group parameter
+
+@lisp
+(gnus-summary-prepared-hook
+ '(lambda nil (local-set-key "d" (local-key-binding "n"))))
+@end lisp
+
+when the group is entered, the 'd' key will not mark the article as
+expired.
@end table