+2003-06-08 Jesper Harder <harder@ifa.au.dk>
+
+ * message.el (message-beginning-of-line): Docstring improvement.
+ Suggested by Michael R. Wolf <MichaelRunningWolf@att.net>
+
+2003-06-07 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * gnus-sum.el (gnus-summary-make-menu-bar): Removed ["Add buttons"
+ gnus-summary-display-buttonized t]
+
+2003-06-07 Kai Gro\e,A_\e(Bjohann <kai.grossjohann@gmx.net>
+
+ * nnmail.el (nnmail-split-fancy-match-partial-words): Doc string
+ fix. Reported by Johan Bockg\e,Ae\e(Brd <bojohan+news@dd.chalmers.se>.
+
+2003-06-07 Jesper Harder <harder@ifa.au.dk>
+
+ * message.el (message-beginning-of-line): Docstring improvement.
+
+2003-06-06 Jesper Harder <harder@ifa.au.dk>
+
+ * gnus-srvr.el (gnus-browse-foreign-server): Parse garbage NNTP
+ groups correctly.
+
+2003-06-06 Kai Gro\e,A_\e(Bjohann <kai.grossjohann@gmx.net>
+ From Benjamin Rutt <rutt+news@cis.ohio-state.edu>.
+
+ * message.el (message-fetch-field): Augment documentation to state
+ the narrowed-to-headers restriction.
+ (message-change-subject, message-reduce-to-to-cc)
+ (message-generate-unsubscribed-mail-followup-to)
+ (message-insert-importance-high, message-insert-importance-low)
+ (message-insert-or-toggle-importance)
+ (message-insert-disposition-notification-to): Narrow to headers
+ before calling message-fetch-field or message-remove-header.
+
+2003-06-06 Teodor Zlatanov <tzz@lifelogs.com>
+
+ * gnus-registry.el (gnus-registry-trim): fix for when
+ gnus-registry-max-entries is nil
+
2003-06-05 Lars Magne Ingebrigtsen <larsi@gnus.org>
* qp.el (quoted-printable-decode-region): Don't error out on
"Toggle subscription of the current group.
If given numerical prefix, toggle the N next groups."
(interactive "P")
- (let ((groups (gnus-group-process-prefix n))
- group)
- (while groups
- (setq group (car groups)
- groups (cdr groups))
- (gnus-group-remove-mark group)
- (gnus-group-unsubscribe-group
- group
- (cond
- ((eq do-sub 'unsubscribe)
- gnus-level-default-unsubscribed)
- ((eq do-sub 'subscribe)
- gnus-level-default-subscribed)
- ((<= (gnus-group-group-level) gnus-level-subscribed)
- gnus-level-default-unsubscribed)
- (t
- gnus-level-default-subscribed))
- t)
- (gnus-group-update-group-line))
- (gnus-group-next-group 1)))
+ (dolist (group (gnus-group-process-prefix n))
+ (gnus-group-remove-mark group)
+ (gnus-group-unsubscribe-group
+ group
+ (cond
+ ((eq do-sub 'unsubscribe)
+ gnus-level-default-unsubscribed)
+ ((eq do-sub 'subscribe)
+ gnus-level-default-subscribed)
+ ((<= (gnus-group-group-level) gnus-level-subscribed)
+ gnus-level-default-unsubscribed)
+ (t
+ gnus-level-default-subscribed))
+ t)
+ (gnus-group-update-group-line))
+ (gnus-group-next-group 1))
(defun gnus-group-unsubscribe-group (group &optional level silent)
"Toggle subscription to GROUP.
(defun gnus-registry-trim (alist)
"Trim alist to size, using gnus-registry-max-entries."
- (unless (null gnus-registry-max-entries)
+ (if (null gnus-registry-max-entries)
+ alist ; just return the alist
+ ;; else, when given max-entries, trim the alist
(let ((timehash (make-hash-table
:size 4096
:test 'equal)))
(puthash key (gnus-registry-fetch-extra key 'mtime) timehash))
gnus-registry-hashtb)
+ ;; we use the return value of this setq, which is the trimmed alist
(setq alist
(nthcdr
(- (length alist) gnus-registry-max-entries)
1 "Couldn't request list: %s" (gnus-status-message method))
nil)
(t
- (save-excursion
- (set-buffer nntp-server-buffer)
+ (with-current-buffer nntp-server-buffer
(let ((cur (current-buffer)))
(goto-char (point-min))
(unless (string= gnus-ignored-newsgroups "")
(delete-matching-lines gnus-ignored-newsgroups))
- (while (not (eobp))
- (ignore-errors
- (push (cons
- (if (eq (char-after) ?\")
- (read cur)
- (let ((p (point)) (name ""))
- (skip-chars-forward "^ \t\\\\")
- (setq name (buffer-substring p (point)))
- (while (eq (char-after) ?\\)
- (setq p (1+ (point)))
- (forward-char 2)
+ ;; We treat NNTP as a special case to avoid problems with
+ ;; garbage group names like `"foo' that appear in some badly
+ ;; managed active files. -jh.
+ (if (eq (car method) 'nntp)
+ (while (not (eobp))
+ (ignore-errors
+ (push (cons
+ (buffer-substring
+ (point)
+ (progn
+ (skip-chars-forward "^ \t")
+ (point)))
+ (let ((last (read cur)))
+ (cons (read cur) last)))
+ groups))
+ (forward-line))
+ (while (not (eobp))
+ (ignore-errors
+ (push (cons
+ (if (eq (char-after) ?\")
+ (read cur)
+ (let ((p (point)) (name ""))
(skip-chars-forward "^ \t\\\\")
- (setq name (concat name (buffer-substring
- p (point)))))
- name))
- (let ((last (read cur)))
- (cons (read cur) last)))
- groups))
- (forward-line))))
+ (setq name (buffer-substring p (point)))
+ (while (eq (char-after) ?\\)
+ (setq p (1+ (point)))
+ (forward-char 2)
+ (skip-chars-forward "^ \t\\\\")
+ (setq name (concat name (buffer-substring
+ p (point)))))
+ name))
+ (let ((last (read cur)))
+ (cons (read cur) last)))
+ groups))
+ (forward-line)))))
(setq groups (sort groups
(lambda (l1 l2)
(string< (car l1) (car l2)))))
(defun message-fetch-field (header &optional not-all)
"The same as `mail-fetch-field', only remove all newlines.
-Note that the buffer should be narrowed to the headers; see
-function `message-narrow-to-headers-or-head'."
+The buffer is expected to be narrowed to just the header of the message;
+see `message-narrow-to-headers-or-head'."
(let* ((inhibit-point-motion-hooks t)
(case-fold-search t)
(value (mail-fetch-field header nil (not not-all))))
(zerop (string-width new-subject))
(string-match "^[ \t]*$" new-subject))))
(save-excursion
- (let ((old-subject (message-fetch-field "Subject")))
+ (let ((old-subject
+ (save-restriction
+ (message-narrow-to-headers)
+ (message-fetch-field "Subject"))))
(cond ((not old-subject)
(error "No current subject"))
((not (string-match
(defun message-reduce-to-to-cc ()
"Replace contents of To: header with contents of Cc: or Bcc: header."
(interactive)
- (let ((cc-content (message-fetch-field "cc"))
+ (let ((cc-content
+ (save-restriction (message-narrow-to-headers)
+ (message-fetch-field "cc")))
(bcc nil))
(if (and (not cc-content)
- (setq cc-content (message-fetch-field "bcc")))
+ (setq cc-content
+ (save-restriction
+ (message-narrow-to-headers)
+ (message-fetch-field "bcc"))))
(setq bcc t))
(cond (cc-content
(save-excursion
(message-goto-to)
(message-delete-line)
(insert (concat "To: " cc-content "\n"))
- (message-remove-header (if bcc
- "bcc"
- "cc")))))))
+ (save-restriction
+ (message-narrow-to-headers)
+ (message-remove-header (if bcc
+ "bcc"
+ "cc"))))))))
;;; End of functions adopted from `message-utils.el'.
Cc: header are also put into the MFT."
(interactive "P")
- (message-remove-header "Mail-Followup-To")
- (let* ((cc (and include-cc (message-fetch-field "Cc")))
- (tos (if cc
- (concat (message-fetch-field "To") "," cc)
- (message-fetch-field "To"))))
+ (let* (cc tos)
+ (save-restriction
+ (message-narrow-to-headers)
+ (message-remove-header "Mail-Followup-To")
+ (setq cc (and include-cc (message-fetch-field "Cc")))
+ (setq tos (if cc
+ (concat (message-fetch-field "To") "," cc)
+ (message-fetch-field "To"))))
(message-goto-mail-followup-to)
(insert (concat tos ", " user-mail-address))))
"Insert header to mark message as important."
(interactive)
(save-excursion
- (message-remove-header "Importance")
+ (save-restriction
+ (message-narrow-to-headers)
+ (message-remove-header "Importance"))
(message-goto-eoh)
(insert "Importance: high\n")))
"Insert header to mark message as unimportant."
(interactive)
(save-excursion
- (message-remove-header "Importance")
+ (save-restriction
+ (message-narrow-to-headers)
+ (message-remove-header "Importance"))
(message-goto-eoh)
(insert "Importance: low\n")))
(let ((valid '("high" "normal" "low"))
(new "high")
cur)
- (when (setq cur (message-fetch-field "Importance"))
- (message-remove-header "Importance")
- (setq new (cond ((string= cur "high")
- "low")
- ((string= cur "low")
- "normal")
- (t
- "high"))))
+ (save-restriction
+ (message-narrow-to-headers)
+ (when (setq cur (message-fetch-field "Importance"))
+ (message-remove-header "Importance")
+ (setq new (cond ((string= cur "high")
+ "low")
+ ((string= cur "low")
+ "normal")
+ (t
+ "high")))))
(message-goto-eoh)
(insert (format "Importance: %s\n" new)))))
Note that this should not be used in newsgroups."
(interactive)
(save-excursion
- (message-remove-header "Disposition-Notification-To")
+ (save-restriction
+ (message-narrow-to-headers)
+ (message-remove-header "Disposition-Notification-To"))
(message-goto-eoh)
(insert (format "Disposition-Notification-To: %s\n"
- (or (message-fetch-field "From") (message-make-from))))))
+ (or (save-excursion
+ (save-restriction
+ (message-narrow-to-headers)
+ (message-fetch-field "From")))
+ (message-make-from))))))
(defun message-elide-region (b e)
"Elide the text in the region.
(sit-for 0)))
(defcustom message-beginning-of-line t
- "Whether C-a goes to beginning of header values."
+ "Whether \\<message-mode-map>\\[message-beginning-of-line]\
+ goes to beginning of header values."
:group 'message-buffers
:type 'boolean)
(defun message-beginning-of-line (&optional n)
- "Move point to beginning of header value or to beginning of line."
+ "Move point to beginning of header value or to beginning of line.
+The prefix argument N is passed directly to `beginning-of-line'.
+
+This command is identical to `beginning-of-line' if point is
+outside the message header or if the option `message-beginning-of-line'
+is nil.
+
+If point is in the message header and on a (non-continued) header
+line, move point to the beginning of the header value. If point
+is already there, move point to beginning of line. Therefore,
+repeated calls will toggle point between beginning of field and
+beginning of line."
(interactive "p")
(let ((zrs 'zmacs-region-stays))
(when (and (interactive-p) (boundp zrs))
(defcustom nnmail-split-fancy-match-partial-words nil
"Whether to match partial words when fancy splitting.
Normally, regexes given in `nnmail-split-fancy' are implicitly surrounded
-by \"\\<...\\>\". If this is true, they are not implicitly surrounded by
-anything."
+by \"\\=\\<...\\>\". If this variable is true, they are not implicitly\
+ surrounded
+by anything."
:group 'nnmail
:type 'boolean)
+2003-06-07 Jesper Harder <harder@ifa.au.dk>
+
+ * gnus.texi (Article Buttons, Splitting in IMAP)
+ (Category Syntax, Picons): Preemptive strike by
+ alt.possesive.its.has.no.apostrophe.
+
2003-06-03 Jesper Harder <harder@ifa.au.dk>
* gnus.texi (Fancy Mail Splitting): Explain some entries in
@code{mail}, Gnus will always assume that the string is a message ID or
a mail address, respectively. If this variable is set to the symbol
@code{ask}, always query the user what do do. If it is a function, this
-function will be called with the string as it's only argument. The
+function will be called with the string as its only argument. The
function must return @code{mid}, @code{mail}, @code{invalid} or
@code{ask}. The default value is the function
@code{gnus-button-mid-or-mail-heuristic}.
@item gnus-button-mid-or-mail-heuristic
@findex gnus-button-mid-or-mail-heuristic
-Function that guesses whether it's argument is a message ID or a mail
-address. Returns @code{mid} it's a message IDs, @code{mail} if it's a
-mail address, @code{ask} if unsure and @code{invalid} if the string is
-invalid.
+Function that guesses whether its argument is a message ID or a mail
+address. Returns @code{mid} if it's a message IDs, @code{mail} if
+it's a mail address, @code{ask} if unsure and @code{invalid} if the
+string is invalid.
@item gnus-button-mid-or-mail-heuristic-alist
@vindex gnus-button-mid-or-mail-heuristic-alist
the rest of the world is catching up. Yeah, dream on, not many
@acronym{IMAP} server has server side splitting and those that have splitting
seem to use some non-standard protocol. This means that @acronym{IMAP}
-support for Gnus has to do it's own splitting.
+support for Gnus has to do its own splitting.
And it does.
The above predicates apply to @emph{all} the groups which belong to the
category. However, if you wish to have a specific predicate for an
individual group within a category, or you're just too lazy to set up a
-new category, you can enter a group's individual predicate in it's group
+new category, you can enter a group's individual predicate in its group
parameters like so:
@lisp
@end iftex
So@dots{} You want to slow down your news reader even more! This is a
-good way to do so. Its also a great way to impress people staring
+good way to do so. It's also a great way to impress people staring
over your shoulder as you read news.
What are Picons? To quote directly from the Picons Web site: