Function: gnus-summary-show-article

gnus-summary-show-article is an interactive and byte-compiled function defined in gnus-sum.el.gz.

Signature

(gnus-summary-show-article &optional ARG)

Documentation

Force redisplaying of the current article.

If ARG (the prefix) is a number, show the article with the charset defined in gnus-summary-show-article-charset-alist, or the charset input.If ARG (the prefix) is non-nil and not a number, show the article, but without running any of the article treatment functions article. Normally, the keystroke is C-u (universal-argument) g (gnus-summary-show-article). When using C-u (universal-argument) C-u (universal-argument) g (gnus-summary-show-article), show the raw article.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/gnus/gnus-sum.el.gz
(defun gnus-summary-show-article (&optional arg)
  "Force redisplaying of the current article.
If ARG (the prefix) is a number, show the article with the charset
defined in `gnus-summary-show-article-charset-alist', or the charset
input.\\<gnus-summary-mode-map>
If ARG (the prefix) is non-nil and not a number, show the article,
but without running any of the article treatment functions
article.  Normally, the keystroke is `\\[universal-argument] \\[gnus-summary-show-article]'.  When using `\\[universal-argument]
\\[universal-argument] \\[gnus-summary-show-article]', show the raw article."
  (interactive "P" gnus-summary-mode)
  (cond
   ((numberp arg)
    (gnus-summary-show-article t)
    (let ((gnus-newsgroup-charset
	   (or (cdr (assq arg gnus-summary-show-article-charset-alist))
	       (read-coding-system
		"View as charset: " ;; actually it is coding system.
		(with-current-buffer gnus-article-buffer
		  (mm-detect-coding-region (point) (point-max))))))
	  (gnus-newsgroup-ignored-charsets 'gnus-all))
      (gnus-summary-select-article nil 'force)
      (let ((deps gnus-newsgroup-dependencies)
	    head header lines)
	(with-current-buffer gnus-original-article-buffer
	  (save-restriction
	    (message-narrow-to-head)
	    (setq head (buffer-string))
	    (goto-char (point-min))
	    (unless (re-search-forward "^lines:[ \t]\\([0-9]+\\)" nil t)
	      (goto-char (point-max))
	      (widen)
	      (setq lines (1- (count-lines (point) (point-max))))))
	  (with-temp-buffer
	    (insert (format "211 %d Article retrieved.\n"
			    (cdr gnus-article-current)))
	    (insert head)
	    (if lines (insert (format "Lines: %d\n" lines)))
	    (insert ".\n")
	    (let ((nntp-server-buffer (current-buffer)))
	      (setq header (car (gnus-get-newsgroup-headers deps t))))))
	(setf (gnus-data-header
	       (gnus-data-find (cdr gnus-article-current)))
	      header)
	(gnus-summary-update-article-line
	 (cdr gnus-article-current) header)
	(when (gnus-summary-goto-subject (cdr gnus-article-current) nil t)
	  (gnus-summary-update-secondary-mark (cdr gnus-article-current))))))
   ((not arg)
    ;; Select the article the normal way.
    (if (eq mm-text-html-renderer 'shr)
	(progn
	  (require 'shr)
	  (let ((shr-ignore-cache t))
	    (gnus-summary-select-article nil 'force)))
      (gnus-summary-select-article nil 'force)))
   ((equal arg '(16))
    ;; C-u C-u g
    (let ((gnus-inhibit-article-treatments t))
      (gnus-summary-select-article nil 'force)))
   (t
    ;; We have to require this here to make sure that the following
    ;; dynamic binding isn't shadowed by autoloading.
    (require 'gnus-async)
    (require 'gnus-art)
    ;; Bind the article treatment functions to nil.
    (let ((gnus-have-all-headers t)
	  gnus-article-prepare-hook
	  gnus-article-decode-hook
	  gnus-display-mime-function
	  gnus-break-pages)
      ;; Destroy any MIME parts.
      (when (gnus-buffer-live-p gnus-article-buffer)
	(with-current-buffer gnus-article-buffer
	  (gnus-stop-downloads)
	  (mm-destroy-parts gnus-article-mime-handles)
	  ;; Set it to nil for safety reason.
	  (setq gnus-article-mime-handle-alist nil)
	  (setq gnus-article-mime-handles nil)))
      (gnus-summary-select-article nil 'force))))
  (gnus-summary-goto-subject gnus-current-article)
  (gnus-summary-position-point))