@c Copyright (C) 1995, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
@c 2009, 2010 Free Software Foundation, Inc.
@c
-@c Do not modify this file, it was generated from gnus-faq.xml, available from
-@c <URL:http://my.gnus.org/FAQ/>.
-@c
@setfilename gnus-faq.info
@settitle Frequently Asked Questions
@c %**end of header
@subheading Abstract
This is the new Gnus Frequently Asked Questions list.
-If you have a Web browser, the official hypertext version is at
-@uref{http://my.gnus.org/FAQ/},
-the Docbook source is available from
-@uref{http://sourceforge.net/projects/gnus/, http://sourceforge.net}.
Please submit features and suggestions to the
-@email{faq-discuss@@my.gnus.org, FAQ discussion list}.
-The list is protected against junk mail with
-@uref{http://smarden.org/qconfirm/index.html, qconfirm}. As
-a subscriber, your submissions will automatically pass. You can
-also subscribe to the list by sending a blank email to
-@email{faq-discuss-subscribe@@my.gnus.org, faq-discuss-subscribe@@my.gnus.org}
-and @uref{http://mail1.kens.com/cgi-bin/ezmlm-browse?command=monthbythread%26list=faq-discuss, browse
-the archive (BROKEN)}.
+@email{ding@@gnus.org, ding list}.
@node FAQ - Changes
@subheading Changes
job with this FAQ before him. We would like to do the same - thanks,
Justin!
-If you have a Web browser, the official hypertext version is at:
-@uref{http://my.gnus.org/FAQ/}.
This version is much nicer than the unofficial hypertext
versions that are archived at Utrecht, Oxford, Smart Pages, Ohio
State, and other FAQ archives. See the resources question below
The information contained here was compiled with the assistance
of the Gnus development mailing list, and any errors or
-misprints are the my.gnus.org team's fault, sorry.
+misprints are the Gnus team's fault, sorry.
@node FAQ 1 - Installation FAQ
@subsection Installation FAQ
make faces (specifications of how summary-line shall look
like) for those postings, then we'll give them some
special score and finally we'll tell Gnus to use the new
-faces. You can find detailed instructions on how to do it on
-@uref{http://my.gnus.org/node/view/224, my.gnus.org}
+faces.
@node FAQ 4-12
@subsubheading Question 4.12
installed and in your Path. Then you need
@uref{http://www.kdstevens.com/~stevens/ispell-page.html, ispell.el}
and for on-the-fly spell-checking
-@uref{http://www-sop.inria.fr/mimosa/personnel/Manuel.Serrano/flyspell/flyspell.html, flyspell.el}.
+@uref{http://www-sop.inria.fr/members/Manuel.Serrano/flyspell/flyspell.html, flyspell.el}.
Ispell.el is shipped with Emacs and available through the XEmacs package system,
flyspell.el is shipped with Emacs and part of XEmacs text-modes package which is
available through the package system, so there should be no need to install them
@uref{http://www.isc.org/products/INN/, inn}.
Then you want to fetch your Mail, popular choices
are @uref{http://www.catb.org/~esr/fetchmail/, fetchmail}
-and @uref{http://www.qcc.ca/~charlesc/software/getmail-3.0/, getmail}.
+and @uref{http://pyropus.ca/software/getmail/, getmail}.
You should tell those to write the mail to your disk and
Gnus to read it from there. Last but not least the mail
sending part: This can be done with every MTA like
@subsubheading Answer
-The two most important ones are the
+The most important one is the
@uref{http://www.gnus.org, official Gnus website}.
-and it's sister site
-@uref{http://my.gnus.org, my.gnus.org (MGO)},
-hosting an archive of lisp snippets, howtos, a (not
-really finished) tutorial and this FAQ.
Tell me about other sites which are interesting.
This is used for cid: URLs, and the function is called with the
cid: URL as the argument.")
+(defvar shr-width 70
+ "Frame width to use for rendering.")
+
+;;; Internal variables.
+
(defvar shr-folding-mode nil)
(defvar shr-state nil)
(defvar shr-start nil)
(defvar shr-indentation 0)
(defvar shr-inhibit-images nil)
-
-(defvar shr-width 70)
+(defvar shr-list-mode nil)
(defvar shr-map
(let ((map (make-sparse-keymap)))
(define-key map "\r" 'shr-browse-url)
map))
+;; Public functions and commands.
+
+;;;###autoload
+(defun shr-insert-document (dom)
+ (let ((shr-state nil)
+ (shr-start nil))
+ (shr-descend (shr-transform-dom dom))))
+
+(defun shr-copy-url ()
+ "Copy the URL under point to the kill ring.
+If called twice, then try to fetch the URL and see whether it
+redirects somewhere else."
+ (interactive)
+ (let ((url (get-text-property (point) 'shr-url)))
+ (cond
+ ((not url)
+ (message "No URL under point"))
+ ;; Resolve redirected URLs.
+ ((equal url (car kill-ring))
+ (url-retrieve
+ url
+ (lambda (a)
+ (when (and (consp a)
+ (eq (car a) :redirect))
+ (with-temp-buffer
+ (insert (cadr a))
+ (goto-char (point-min))
+ ;; Remove common tracking junk from the URL.
+ (when (re-search-forward ".utm_.*" nil t)
+ (replace-match "" t t))
+ (message "Copied %s" (buffer-string))
+ (copy-region-as-kill (point-min) (point-max)))))))
+ ;; Copy the URL to the kill ring.
+ (t
+ (with-temp-buffer
+ (insert url)
+ (copy-region-as-kill (point-min) (point-max))
+ (message "Copied %s" url))))))
+
+(defun shr-show-alt-text ()
+ "Show the ALT text of the image under point."
+ (interactive)
+ (let ((text (get-text-property (point) 'shr-alt)))
+ (if (not text)
+ (message "No image under point")
+ (message "%s" text))))
+
+(defun shr-browse-image ()
+ "Browse the image under point."
+ (interactive)
+ (let ((url (get-text-property (point) 'shr-image)))
+ (if (not url)
+ (message "No image under point")
+ (message "Browsing %s..." url)
+ (browse-url url))))
+
+;;; Utility functions.
+
(defun shr-transform-dom (dom)
(let ((result (list (pop dom))))
(dolist (arg (pop dom))
(push (shr-transform-dom sub) result)))
(nreverse result)))
-;;;###autoload
-(defun shr-insert-document (dom)
- (let ((shr-state nil)
- (shr-start nil))
- (shr-descend (shr-transform-dom dom))))
-
(defun shr-descend (dom)
(let ((function (intern (concat "shr-tag-" (symbol-name (car dom))) obarray)))
(if (fboundp function)
((listp (cdr sub))
(shr-descend sub)))))
-(defun shr-tag-p (cont)
- (shr-ensure-paragraph)
- (shr-generic cont)
- (shr-ensure-paragraph))
+(defun shr-insert (text)
+ (when (eq shr-state 'image)
+ (insert "\n")
+ (setq shr-state nil))
+ (cond
+ ((eq shr-folding-mode 'none)
+ (insert text))
+ (t
+ (let ((first t)
+ column)
+ (when (and (string-match "\\`[ \t\n]" text)
+ (not (bolp)))
+ (insert " ")
+ (setq shr-state 'space))
+ (dolist (elem (split-string text))
+ (setq column (current-column))
+ (when (> column 0)
+ (cond
+ ((and (or (not first)
+ (eq shr-state 'space))
+ (> (+ column (length elem) 1) shr-width))
+ (insert "\n"))
+ ((not first)
+ (insert " "))))
+ (setq first nil)
+ (when (and (bolp)
+ (> shr-indentation 0))
+ (shr-indent))
+ ;; The shr-start is a special variable that is used to pass
+ ;; upwards the first point in the buffer where the text really
+ ;; starts.
+ (unless shr-start
+ (setq shr-start (point)))
+ (insert elem))
+ (setq shr-state nil)
+ (when (and (string-match "[ \t\n]\\'" text)
+ (not (bolp)))
+ (insert " ")
+ (setq shr-state 'space))))))
+
+(defun shr-ensure-newline ()
+ (unless (zerop (current-column))
+ (insert "\n")))
(defun shr-ensure-paragraph ()
(unless (bobp)
(insert "\n")
(insert "\n\n")))))
-(defun shr-tag-b (cont)
- (shr-fontize-cont cont 'bold))
-
-(defun shr-tag-i (cont)
- (shr-fontize-cont cont 'italic))
-
-(defun shr-tag-em (cont)
- (shr-fontize-cont cont 'bold))
-
-(defun shr-tag-u (cont)
- (shr-fontize-cont cont 'underline))
-
-(defun shr-tag-s (cont)
- (shr-fontize-cont cont 'strike-through))
+(defun shr-indent ()
+ (insert (make-string shr-indentation ? )))
(defun shr-fontize-cont (cont &rest types)
(let (shr-start)
(let ((overlay (make-overlay start end)))
(overlay-put overlay 'face type)))
-(defun shr-tag-a (cont)
- (let ((url (cdr (assq :href cont)))
- (start (point))
- shr-start)
- (shr-generic cont)
- (widget-convert-button
- 'link (or shr-start start) (point)
- :help-echo url)
- (put-text-property (or shr-start start) (point) 'keymap shr-map)
- (put-text-property (or shr-start start) (point) 'shr-url url)))
-
(defun shr-browse-url ()
"Browse the URL under point."
(interactive)
(message "No link under point")
(browse-url url))))
-(defun shr-copy-url ()
- "Copy the URL under point to the kill ring.
-If called twice, then try to fetch the URL and see whether it
-redirects somewhere else."
- (interactive)
- (let ((url (get-text-property (point) 'shr-url)))
- (cond
- ((not url)
- (message "No URL under point"))
- ;; Resolve redirected URLs.
- ((equal url (car kill-ring))
- (url-retrieve
- url
- (lambda (a)
- (when (and (consp a)
- (eq (car a) :redirect))
- (with-temp-buffer
- (insert (cadr a))
- (goto-char (point-min))
- ;; Remove common tracking junk from the URL.
- (when (re-search-forward ".utm_.*" nil t)
- (replace-match "" t t))
- (message "Copied %s" (buffer-string))
- (copy-region-as-kill (point-min) (point-max)))))))
- ;; Copy the URL to the kill ring.
- (t
- (with-temp-buffer
- (insert url)
- (copy-region-as-kill (point-min) (point-max))
- (message "Copied %s" url))))))
-
-(defun shr-tag-img (cont)
- (when (and (> (current-column) 0)
- (not (eq shr-state 'image)))
- (insert "\n"))
- (let ((start (point-marker)))
- (let ((alt (cdr (assq :alt cont)))
- (url (cdr (assq :src cont))))
- (when (zerop (length alt))
- (setq alt "[img]"))
- (cond
- ((and (not shr-inhibit-images)
- (string-match "\\`cid:" url))
- (let ((url (substring url (match-end 0)))
- image)
- (if (or (not shr-content-function)
- (not (setq image (funcall shr-content-function url))))
- (insert alt)
- (shr-put-image image (point) alt))))
- ((or shr-inhibit-images
- (and shr-blocked-images
- (string-match shr-blocked-images url)))
- (setq shr-start (point))
- (let ((shr-state 'space))
- (if (> (length alt) 8)
- (shr-insert (substring alt 0 8))
- (shr-insert alt))))
- ((url-is-cached (browse-url-url-encode-chars url "[&)$ ]"))
- (shr-put-image (shr-get-image-data url) (point) alt))
- (t
- (insert alt)
- (ignore-errors
- (url-retrieve url 'shr-image-fetched
- (list (current-buffer) start (point-marker))
- t))))
- (insert " ")
- (put-text-property start (point) 'keymap shr-map)
- (put-text-property start (point) 'shr-alt alt)
- (put-text-property start (point) 'shr-image url)
- (setq shr-state 'image))))
-
-(defun shr-show-alt-text ()
- "Show the ALT text of the image under point."
- (interactive)
- (let ((text (get-text-property (point) 'shr-alt)))
- (if (not text)
- (message "No image under point")
- (message "%s" text))))
-
-(defun shr-browse-image ()
- "Browse the image under point."
- (interactive)
- (let ((url (get-text-property (point) 'shr-image)))
- (if (not url)
- (message "No image under point")
- (message "Browsing %s..." url)
- (browse-url url))))
-
(defun shr-image-fetched (status buffer start end)
(when (and (buffer-name buffer)
(not (plist-get status :error)))
image)))
image)))
-(defun shr-tag-pre (cont)
- (let ((shr-folding-mode 'none))
- (shr-ensure-newline)
- (shr-generic cont)
- (shr-ensure-newline)))
-
-(defun shr-tag-blockquote (cont)
- (shr-ensure-paragraph)
- (let ((shr-indentation (+ shr-indentation 4)))
- (shr-generic cont))
- (shr-ensure-paragraph))
-
-(defun shr-ensure-newline ()
- (unless (zerop (current-column))
- (insert "\n")))
-
-(defun shr-insert (text)
- (when (eq shr-state 'image)
- (insert "\n")
- (setq shr-state nil))
- (cond
- ((eq shr-folding-mode 'none)
- (insert text))
- (t
- (let ((first t)
- column)
- (when (and (string-match "\\`[ \t\n]" text)
- (not (bolp)))
- (insert " "))
- (dolist (elem (split-string text))
- (setq column (current-column))
- (when (> column 0)
- (cond
- ((and (or (not first)
- (eq shr-state 'space))
- (> (+ column (length elem) 1) shr-width))
- (insert "\n"))
- ((not first)
- (insert " "))))
- (setq first nil)
- (when (and (bolp)
- (> shr-indentation 0))
- (shr-indent))
- ;; The shr-start is a special variable that is used to pass
- ;; upwards the first point in the buffer where the text really
- ;; starts.
- (unless shr-start
- (setq shr-start (point)))
- (insert elem))
- (setq shr-state nil)
- (when (and (string-match "[ \t\n]\\'" text)
- (not (bolp)))
- (insert " ")
- (setq shr-state 'space))))))
-
-(defun shr-indent ()
- (insert (make-string shr-indentation ? )))
-
(defun shr-get-image-data (url)
"Get image data for URL.
Return a string with image data."
(search-forward "\r\n\r\n" nil t))
(buffer-substring (point) (point-max))))))
-(defvar shr-list-mode nil)
+(defun shr-heading (cont &rest types)
+ (shr-ensure-paragraph)
+ (apply #'shr-fontize-cont cont types)
+ (shr-ensure-paragraph))
+
+;;; Tag-specific rendering rules.
+
+(defun shr-tag-p (cont)
+ (shr-ensure-paragraph)
+ (shr-generic cont)
+ (shr-ensure-paragraph))
+
+(defun shr-tag-b (cont)
+ (shr-fontize-cont cont 'bold))
+
+(defun shr-tag-i (cont)
+ (shr-fontize-cont cont 'italic))
+
+(defun shr-tag-em (cont)
+ (shr-fontize-cont cont 'bold))
+
+(defun shr-tag-u (cont)
+ (shr-fontize-cont cont 'underline))
+
+(defun shr-tag-s (cont)
+ (shr-fontize-cont cont 'strike-through))
+
+(defun shr-tag-a (cont)
+ (let ((url (cdr (assq :href cont)))
+ (start (point))
+ shr-start)
+ (shr-generic cont)
+ (widget-convert-button
+ 'link (or shr-start start) (point)
+ :help-echo url)
+ (put-text-property (or shr-start start) (point) 'keymap shr-map)
+ (put-text-property (or shr-start start) (point) 'shr-url url)))
+
+(defun shr-tag-img (cont)
+ (when (and (> (current-column) 0)
+ (not (eq shr-state 'image)))
+ (insert "\n"))
+ (let ((start (point-marker)))
+ (let ((alt (cdr (assq :alt cont)))
+ (url (cdr (assq :src cont))))
+ (when (zerop (length alt))
+ (setq alt "[img]"))
+ (cond
+ ((and (not shr-inhibit-images)
+ (string-match "\\`cid:" url))
+ (let ((url (substring url (match-end 0)))
+ image)
+ (if (or (not shr-content-function)
+ (not (setq image (funcall shr-content-function url))))
+ (insert alt)
+ (shr-put-image image (point) alt))))
+ ((or shr-inhibit-images
+ (and shr-blocked-images
+ (string-match shr-blocked-images url)))
+ (setq shr-start (point))
+ (let ((shr-state 'space))
+ (if (> (length alt) 8)
+ (shr-insert (substring alt 0 8))
+ (shr-insert alt))))
+ ((url-is-cached (browse-url-url-encode-chars url "[&)$ ]"))
+ (shr-put-image (shr-get-image-data url) (point) alt))
+ (t
+ (insert alt)
+ (ignore-errors
+ (url-retrieve url 'shr-image-fetched
+ (list (current-buffer) start (point-marker))
+ t))))
+ (insert " ")
+ (put-text-property start (point) 'keymap shr-map)
+ (put-text-property start (point) 'shr-alt alt)
+ (put-text-property start (point) 'shr-image url)
+ (setq shr-state 'image))))
+
+(defun shr-tag-pre (cont)
+ (let ((shr-folding-mode 'none))
+ (shr-ensure-newline)
+ (shr-generic cont)
+ (shr-ensure-newline)))
+
+(defun shr-tag-blockquote (cont)
+ (shr-ensure-paragraph)
+ (let ((shr-indentation (+ shr-indentation 4)))
+ (shr-generic cont))
+ (shr-ensure-paragraph))
(defun shr-tag-ul (cont)
(shr-ensure-paragraph)
(defun shr-tag-h6 (cont)
(shr-heading cont))
-(defun shr-heading (cont &rest types)
- (shr-ensure-paragraph)
- (apply #'shr-fontize-cont cont types)
- (shr-ensure-paragraph))
+;;; Table rendering algorithm.
;; Table rendering is the only complicated thing here. We do this by
;; first counting how many TDs there are in each TR, and registering