From 1561725e576e0b3eba78aeff0e344cb110c5bff7 Mon Sep 17 00:00:00 2001 From: Lars Magne Ingebrigtsen Date: Sun, 31 Oct 2010 22:32:43 +0100 Subject: [PATCH] Add `C-u C-u g' for showing raw articles, and change `C-u g' to show semi-cooked articles. --- lisp/ChangeLog | 5 +++++ lisp/gnus-art.el | 3 +++ lisp/gnus-sum.el | 13 +++++++++---- texi/ChangeLog | 4 ++++ texi/gnus.texi | 5 +++-- todo | 13 ++++++------- 6 files changed, 30 insertions(+), 13 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 72f5fb627..5f45093da 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,7 +1,12 @@ 2010-10-31 Lars Magne Ingebrigtsen + * gnus-sum.el (gnus-summary-show-article): Add `C-u C-u g' for showing + the raw article, and change `C-u g' to show the article without doing + treatments. + * gnus-art.el (gnus-mime-display-alternative): Actually pass the type on to `gnus-treat-article'. + (gnus-inhibit-article-treatments): New variable. * gnus.el: Autoload gnus-article-fill-cited-long-lines. diff --git a/lisp/gnus-art.el b/lisp/gnus-art.el index f71ca24db..b1d28caf6 100644 --- a/lisp/gnus-art.el +++ b/lisp/gnus-art.el @@ -8255,6 +8255,8 @@ For example: ;;; Treatment top-level handling. ;;; +(defvar gnus-inhibit-article-treatments nil) + (defun gnus-treat-article (condition &optional part-number total-parts type) (let ((length (- (point-max) (point-min))) (alist gnus-treatment-function-alist) @@ -8277,6 +8279,7 @@ For example: (symbol-value (car elem)))) (when (and (or (consp val) treated-type) + (not gnus-inhibit-article-treatments) (gnus-treat-predicate val) (or (not (get (car elem) 'highlight)) highlightp)) diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el index b3ea8bb14..7de7a0a4a 100644 --- a/lisp/gnus-sum.el +++ b/lisp/gnus-sum.el @@ -9393,9 +9393,10 @@ article currently." 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 raw article -without any article massaging functions being run. Normally, the key -strokes are `C-u g'." +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 g'. When using `C-u +C-u g', show the raw article." (interactive "P") (cond ((numberp arg) @@ -9437,7 +9438,8 @@ strokes are `C-u g'." ((not arg) ;; Select the article the normal way. (gnus-summary-select-article nil 'force)) - (t + ((equal arg '(16)) + ;; C-u C-u g ;; We have to require this here to make sure that the following ;; dynamic binding isn't shadowed by autoloading. (require 'gnus-async) @@ -9455,6 +9457,9 @@ strokes are `C-u g'." ;; 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))) + (t + (let ((gnus-inhibit-article-treatments t)) (gnus-summary-select-article nil 'force)))) (gnus-summary-goto-subject gnus-current-article) (gnus-summary-position-point)) diff --git a/texi/ChangeLog b/texi/ChangeLog index 778d36c69..2dc66470c 100644 --- a/texi/ChangeLog +++ b/texi/ChangeLog @@ -1,3 +1,7 @@ +2010-10-31 Lars Magne Ingebrigtsen + + * gnus.texi (Paging the Article): Document C-u g/C-u C-u g. + 2010-10-29 Lars Magne Ingebrigtsen * gnus.texi (Client-Side IMAP Splitting): Mention diff --git a/texi/gnus.texi b/texi/gnus.texi index 0a0f96bcf..1ad6fd415 100644 --- a/texi/gnus.texi +++ b/texi/gnus.texi @@ -6153,8 +6153,9 @@ Scroll the current article one line backward @vindex gnus-summary-show-article-charset-alist (Re)fetch the current article (@code{gnus-summary-show-article}). If given a prefix, fetch the current article, but don't run any of the -article treatment functions. This will give you a ``raw'' article, just -the way it came from the server. +article treatment functions. If given a prefix twice (i.e., @kbd{C-u +C-u g'}), show a completely ``raw'' article, just the way it came from +the server. @cindex charset, view article with different charset If given a numerical prefix, you can do semi-manual charset stuff. diff --git a/todo b/todo index 6f17e32e9..73c54bc1d 100644 --- a/todo +++ b/todo @@ -111,9 +111,13 @@ X-Loop, and all of the other random headers that often work would be very cool. -* Agent (Can someone write some subtopics here? I don't use it myself - so I don't know what is lacking.) +* Agent: +* A better interface to the agent download scoring rules, like the one + for the other scoring rules. + +* Editing of messages in the agents cache. + * Support for encrypted folders. Even if the mail arrives unencrypted Gnus should be able to encrypt the *folder* for added safety. This should go for both Gnus' own folders and the folders Gnus reads from @@ -200,11 +204,6 @@ - meanwhile, we should still be able to associate certain mail sources with certain backends. -* A better interface to the agent download scoring rules, like the one - for the other scoring rules. - -* Editing of messages in the agents cache. - * More article marks (like '!' or '?'). Maybe user defined marks that can be displayed as any choosen charakter, so one could do things like limiting on, to do whatever one likes with -- 2.25.1