Gnus development mailing list
 help / color / mirror / Atom feed
* [Patch] New interactive functions in deuglify.el
@ 2003-01-10 20:55 Reiner Steib
  2003-01-11 21:09 ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 4+ messages in thread
From: Reiner Steib @ 2003-01-10 20:55 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 2003 bytes --]

Hi,

the attached patch makes the following functions in `deuglify.el'
interactive and adds appropriate menu entries and key bindings.
Additions for texi/gnus.texi are included.

Some questions/remarks related to this:

Is there a convention, that such function names should start with
`gnus-article-'?  Then they should be renamed (`gnus-outlook-' -->
`gnus-article-outlook-').

It's very hard to find unoccupied bindings, so I choose `W Y' (`y' as
in deuglif*y*) as a prefix:

`W Y u' gnus-outlook-unwrap-lines
`W Y a' gnus-outlook-repair-attribution
`W Y c' gnus-outlook-rearrange-citation
`W Y f' gnus-article-outlook-deuglify-article (*f*ull deuglify)

One could use `W Y k' -- outloo*k* deuglif*y* -- as in `W k' instead
of `W Y f'.

IMHO, the old `W k' binding should be removed (we have `W Y f' or `W Y
k' instead), because there are not many keys left.  But maybe to many
people will complain.  Opinions?

lisp/ChangeLog:
--8<---------------cut here---------------start------------->8---
2003-01-10  Reiner Steib  <Reiner.Steib@gmx.de>

	* deuglify.el (gnus-outlook-deuglify-attrib-verb-regexp): Added
	castellano.
	(gnus-outlook-display-hook): New variable.
	(gnus-outlook-display-article-buffer): New function.
	(gnus-outlook-unwrap-lines, gnus-outlook-repair-attribution)
	(gnus-outlook-deuglify-article): Made them interactive and added
	optional arg.  Use `g-o-d-a-b'.
	(gnus-article-outlook-deuglify-article): Use `g-o-d-a-b'.

	* gnus-sum.el: Added autoloads.
	(gnus-summary-mode-map): Added gnus-summary-wash-deuglify-map.
	(gnus-summary-make-menu-bar): Added "(Outlook) Deuglify" menu.

--8<---------------cut here---------------end--------------->8---

texi/ChangeLog:
--8<---------------cut here---------------start------------->8---
2003-01-10  Reiner Steib  <Reiner.Steib@gmx.de>

	* gnus.texi (Article Washing): Added gnus-outlook-unwrap-lines,
	gnus-outlook-repair-attribution, gnus-outlook-rearrange-citation.

--8<---------------cut here---------------end--------------->8---


[-- Attachment #2: deuglify.05.patch --]
[-- Type: text/x-patch, Size: 9101 bytes --]

Index: lisp/deuglify.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/deuglify.el,v
retrieving revision 6.7
diff -u -r6.7 deuglify.el
--- lisp/deuglify.el	2003/01/02 22:16:11	6.7
+++ lisp/deuglify.el	2003/01/10 20:45:53
@@ -266,7 +266,7 @@
   :group 'gnus-outlook-deuglify)
 
 (defcustom gnus-outlook-deuglify-attrib-verb-regexp
-  "wrote\\|writes\\|says\\|schrieb\\|schreibt\\|meinte\\|skrev\\|a écrit\\|schreef"
+  "wrote\\|writes\\|says\\|schrieb\\|schreibt\\|meinte\\|skrev\\|a écrit\\|schreef\\|escribió"
   "Regular expression matching the verb used in an attribution line."
   :type 'string
   :group 'gnus-outlook-deuglify)
@@ -277,17 +277,35 @@
   :type 'string
   :group 'gnus-outlook-deuglify)
 
+;;;###autoload
+(defcustom gnus-outlook-display-hook nil
+  "A hook called after an deuglified article has been prepared.
+It is run after `gnus-article-prepare-hook'."
+  :type 'hook
+  :group 'gnus-outlook-deuglify)
 
 ;; Functions
 
+(defun gnus-outlook-display-article-buffer ()
+  "Redisplay current buffer or article buffer."
+  (with-current-buffer (or gnus-article-buffer (current-buffer))
+    ;; "Emulate" `gnus-article-prepare-display' without calling
+    ;; it. Calling `gnus-article-prepare-display' on an already
+    ;; prepared article removes all MIME parts.  I'm unsure whether
+    ;; this is a bug or not.
+    (gnus-article-highlight t)
+    (gnus-treat-article nil)
+    (gnus-run-hooks 'gnus-article-prepare-hook
+		    'gnus-outlook-display-hook)))
+
 ;;;###autoload
-(defun gnus-outlook-unwrap-lines ()
-  "Unwrap lines that appear to be wrapped citation lines.
+(defun gnus-outlook-unwrap-lines (&optional nodisplay)
+  "Unwrap lines that appear to be wrapped citation lines.  
 You can control what lines will be unwrapped by frobbing
-`gnus-outlook-deuglify-unwrap-min' and
-`gnus-outlook-deuglify-unwrap-max', indicating the miminum and maximum
-length of an unwrapped citation line."
-  (interactive)
+`gnus-outlook-deuglify-unwrap-min' and `gnus-outlook-deuglify-unwrap-max',
+indicating the miminum and maximum length of an unwrapped citation line.  If
+NODISPLAY is non-nil, don't redisplay the article buffer."
+  (interactive "P")
   (save-excursion
     (let ((case-fold-search nil)
 	  (inhibit-read-only t)
@@ -308,7 +326,8 @@
 		     (< (+ len12 len3) gnus-outlook-deuglify-unwrap-max))
 		(progn 
 		  (replace-match "\\1\\2 \\3")
-		  (goto-char (match-beginning 0))))))))))
+		  (goto-char (match-beginning 0)))))))))
+  (unless nodisplay (gnus-outlook-display-article-buffer)))
 
 (defun gnus-outlook-rearrange-article (attr-start)
   "Put the text from `attr-start' to the end of buffer at the top of the article buffer."
@@ -400,45 +419,46 @@
 	      (match-beginning 0)))))))
 
 ;;;###autoload
-(defun gnus-outlook-repair-attribution ()
-  "Repair a broken attribution line."
-  (interactive)
-  (or
-   (gnus-outlook-repair-attribution-other)
-   (gnus-outlook-repair-attribution-block)
-   (gnus-outlook-repair-attribution-outlook)))
-
-(defun gnus-outlook-rearrange-citation ()
-  "Repair broken citations."
-  (let ((attrib-start (gnus-outlook-repair-attribution)))
+(defun gnus-outlook-repair-attribution (&optional nodisplay)
+  "Repair a broken attribution line.
+If NODISPLAY is non-nil, don't redisplay the article buffer."
+  (interactive "P")
+  (let ((attrib-start
+	 (or
+	  (gnus-outlook-repair-attribution-other)
+	  (gnus-outlook-repair-attribution-block)
+	  (gnus-outlook-repair-attribution-outlook))))
+    (unless nodisplay (gnus-outlook-display-article-buffer))
+    attrib-start))
+
+(defun gnus-outlook-rearrange-citation (&optional nodisplay)
+  "Repair broken citations.
+If NODISPLAY is non-nil, don't redisplay the article buffer."
+  (interactive "P")
+  (let ((attrib-start (gnus-outlook-repair-attribution 'nodisplay)))
     ;; rearrange citations if an attribution line has been recognized
     (if attrib-start
-	(gnus-outlook-rearrange-article attrib-start))))
+	(gnus-outlook-rearrange-article attrib-start)))
+  (unless nodisplay (gnus-outlook-display-article-buffer)))
 
 ;;;###autoload
-(defun gnus-outlook-deuglify-article ()
-  "Deuglify broken Outlook (Express) articles."
-  (interactive)
+(defun gnus-outlook-deuglify-article (&optional nodisplay)
+  "Deuglify broken Outlook (Express) articles.
+If NODISPLAY is non-nil, don't redisplay the article buffer."
+  (interactive "P")
   ;; apply treatment of dumb quotes
   (gnus-article-treat-dumbquotes)
   ;; repair wrapped cited lines
-  (gnus-outlook-unwrap-lines)
+  (gnus-outlook-unwrap-lines 'nodisplay)
   ;; repair attribution line
-  (gnus-outlook-rearrange-citation))
+  (gnus-outlook-rearrange-citation 'nodisplay)
+  (unless nodisplay (gnus-outlook-display-article-buffer)))
 
 ;;;###autoload
 (defun gnus-article-outlook-deuglify-article ()
   "Deuglify broken Outlook (Express) articles and redisplay."
   (interactive)
-  (gnus-outlook-deuglify-article)
-  (with-current-buffer (or gnus-article-buffer (current-buffer))
-    ;; "Emulate" `gnus-article-prepare-display' without calling
-    ;; it. Calling `gnus-article-prepare-display' on an already
-    ;; prepared article removes all MIME parts.  I'm unsure whether
-    ;; this is a bug or not.
-    (gnus-article-highlight t)
-    (gnus-treat-article nil)
-    (gnus-run-hooks 'gnus-article-prepare-hook)))
+  (gnus-outlook-deuglify-article nil))
 
 (provide 'deuglify)
 
Index: lisp/gnus-sum.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/gnus-sum.el,v
retrieving revision 6.277
diff -u -r6.277 gnus-sum.el
--- lisp/gnus-sum.el	2003/01/10 07:53:32	6.277
+++ lisp/gnus-sum.el	2003/01/10 20:45:53
@@ -46,6 +46,9 @@
 (autoload 'gnus-article-outlook-deuglify-article "deuglify"
   "Deuglify broken Outlook (Express) articles and redisplay."
   t)
+(autoload 'gnus-outlook-unwrap-lines "deuglify" nil t)
+(autoload 'gnus-outlook-repair-attribution "deuglify" nil t)
+(autoload 'gnus-outlook-rearrange-citation "deuglify" nil t)
 
 (defcustom gnus-kill-summary-on-exit t
   "*If non-nil, kill the summary buffer when you exit from it.
@@ -1785,8 +1788,15 @@
     "a" gnus-article-strip-headers-in-body ;; mnemonic: wash archive
     "p" gnus-article-verify-x-pgp-sig
     "d" gnus-article-treat-dumbquotes
-    "k" gnus-article-outlook-deuglify-article)
+    "k" gnus-article-outlook-deuglify-article) ;; mnemonic: outloo*k*
 
+  (gnus-define-keys (gnus-summary-wash-deuglify-map "Y" gnus-summary-wash-map)
+    ;; mnemonic: deuglif*Y*
+    "u" gnus-outlook-unwrap-lines
+    "a" gnus-outlook-repair-attribution
+    "c" gnus-outlook-rearrange-citation
+    "f" gnus-article-outlook-deuglify-article) ;; mnemonic: full deuglify
+
   (gnus-define-keys (gnus-summary-wash-hide-map "W" gnus-summary-wash-map)
     "a" gnus-article-hide
     "h" gnus-article-hide-headers
@@ -2099,7 +2109,12 @@
 	      ["URLs" gnus-article-unsplit-urls t]
 	      ["Verify X-PGP-Sig" gnus-article-verify-x-pgp-sig t]
 	      ["HZ" gnus-article-decode-HZ t]
-	      ["OutlooK deuglify" gnus-article-outlook-deuglify-article t]
+	      ("(Outlook) Deuglify"
+	       ["Unwrap lines" gnus-outlook-unwrap-lines t]
+	       ["Repair attribution" gnus-outlook-repair-attribution t]
+	       ["Rearrange citation" gnus-outlook-rearrange-citation t]
+	       ["Full (Outlook) deuglify"
+		gnus-article-outlook-deuglify-article t])
 	      )
 	     ("Output"
 	      ["Save in default format" gnus-summary-save-article
Index: texi/gnus.texi
===================================================================
RCS file: /usr/local/cvsroot/gnus/texi/gnus.texi,v
retrieving revision 6.376
diff -u -r6.376 gnus.texi
--- texi/gnus.texi	2003/01/10 15:11:39	6.376
+++ texi/gnus.texi	2003/01/10 20:45:54
@@ -8297,10 +8297,33 @@
 
 @item W k
 @kindex W k (Summary)
+@kindex W Y f (Summary)
 @findex gnus-article-outlook-deuglify-article
 @cindex Outlook Express
-Deuglify broken Outlook (Express) articles and redisplay
+Deuglify broken Outlook (Express) articles.
 (@code{gnus-article-outlook-deuglify-article}).
+
+@item W Y u
+@kindex W Y u (Summary)
+@findex gnus-outlook-unwrap-lines
+Unwrap lines that appear to be wrapped citation lines.  You can control
+what lines will be unwrapped by frobbing
+@code{gnus-outlook-deuglify-unwrap-min} and
+@code{gnus-outlook-deuglify-unwrap-max}, indicating the miminum and
+maximum length of an unwrapped citation line.
+(@code{gnus-outlook-deuglify-article}).
+
+@item W Y a
+@kindex W Y a (Summary)
+@findex gnus-outlook-repair-attribution
+Repair a broken attribution line
+(@code{gnus-outlook-repair-attribution}).
+
+@item W Y c
+@kindex W Y c (Summary)
+@findex gnus-outlook-rearrange-citation
+Repair broken citations by rearranging the text.
+(@code{gnus-outlook-rearrange-citation}).
 
 @item W w
 @kindex W w (Summary)

[-- Attachment #3: Type: text/plain, Size: 116 bytes --]


Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo--- PGP key available via WWW   http://rsteib.home.pages.de/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Patch] New interactive functions in deuglify.el
  2003-01-10 20:55 [Patch] New interactive functions in deuglify.el Reiner Steib
@ 2003-01-11 21:09 ` Lars Magne Ingebrigtsen
  0 siblings, 0 replies; 4+ messages in thread
From: Lars Magne Ingebrigtsen @ 2003-01-11 21:09 UTC (permalink / raw)


Reiner Steib <4uce.02.r.steib@gmx.net> writes:

> Is there a convention, that such function names should start with
> `gnus-article-'?  Then they should be renamed (`gnus-outlook-' -->
> `gnus-article-outlook-').

Yes, I think so.

> It's very hard to find unoccupied bindings, so I choose `W Y' (`y' as
> in deuglif*y*) as a prefix:
>
> `W Y u' gnus-outlook-unwrap-lines
> `W Y a' gnus-outlook-repair-attribution
> `W Y c' gnus-outlook-rearrange-citation
> `W Y f' gnus-article-outlook-deuglify-article (*f*ull deuglify)
>
> One could use `W Y k' -- outloo*k* deuglif*y* -- as in `W k' instead
> of `W Y f'.
>
> IMHO, the old `W k' binding should be removed (we have `W Y f' or `W Y
> k' instead), because there are not many keys left.  But maybe to many
> people will complain.  Opinions?

Sounds OK to me.

> 	* deuglify.el (gnus-outlook-deuglify-attrib-verb-regexp): Added
> 	castellano.
> 	(gnus-outlook-display-hook): New variable.
> 	(gnus-outlook-display-article-buffer): New function.
> 	(gnus-outlook-unwrap-lines, gnus-outlook-repair-attribution)
> 	(gnus-outlook-deuglify-article): Made them interactive and added
> 	optional arg.  Use `g-o-d-a-b'.
> 	(gnus-article-outlook-deuglify-article): Use `g-o-d-a-b'.
>
> 	* gnus-sum.el: Added autoloads.
> 	(gnus-summary-mode-map): Added gnus-summary-wash-deuglify-map.
> 	(gnus-summary-make-menu-bar): Added "(Outlook) Deuglify" menu.

Thanks for the patch; I've applied it to Oort Gnus v0.11 (i. e., CVS).

-- 
(domestic pets only, the antidote for overdose, milk.)
   larsi@gnus.org * Lars Magne Ingebrigtsen



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Patch] New interactive functions in deuglify.el
  2003-01-13 15:46 Reiner Steib
@ 2003-01-13 18:33 ` Lars Magne Ingebrigtsen
  0 siblings, 0 replies; 4+ messages in thread
From: Lars Magne Ingebrigtsen @ 2003-01-13 18:33 UTC (permalink / raw)


Reiner Steib <4uce.02.r.steib@gmx.net> writes:

> I removed the `W k' binding.

Thanks for the patch; I've applied it to Oort Gnus v0.13 (i. e., CVS).

-- 
(domestic pets only, the antidote for overdose, milk.)
   larsi@gnus.org * Lars Magne Ingebrigtsen



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Patch] New interactive functions in deuglify.el
@ 2003-01-13 15:46 Reiner Steib
  2003-01-13 18:33 ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 4+ messages in thread
From: Reiner Steib @ 2003-01-13 15:46 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 1426 bytes --]

On Sat, Jan 11 2003, Lars Magne Ingebrigtsen wrote:

> Reiner Steib <4uce.02.r.steib@gmx.net> writes:
>
>> Is there a convention, that such function names should start with
>> `gnus-article-'?  Then they should be renamed (`gnus-outlook-' -->
>> `gnus-article-outlook-').
>
> Yes, I think so.

Done.

>> IMHO, the old `W k' binding should be removed (we have `W Y f' or `W Y
>> k' instead), because there are not many keys left.  But maybe to many
>> people will complain.  Opinions?
>
> Sounds OK to me.

I removed the `W k' binding.

lisp/ChangeLog:
--8<---------------cut here---------------start------------->8---
2003-01-13  Reiner Steib  <Reiner.Steib@gmx.de>

	* deuglify.el (gnus-article-outlook-unwrap-lines)
	(gnus-article-outlook-repair-attribution)
	(gnus-article-outlook-rearrange-citation): New function names,
	renamed from "gnus-outlook-" to "gnus-article-outlook-".  Changed
	doc-string.

	* gnus-sum.el (gnus-summary-mode-map): Use new function names,
	removed `W k' key binding (use `W Y f' instead).
	(gnus-summary-make-menu-bar): Use new function names.

--8<---------------cut here---------------end--------------->8---

texi/ChangeLog:
--8<---------------cut here---------------start------------->8---
2003-01-13  Reiner Steib  <Reiner.Steib@gmx.de>

	* gnus.texi (Article Washing): Use new function names in
	`deuglify.el'.  Addition.
--8<---------------cut here---------------end--------------->8---


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: deuglify.06.patch --]
[-- Type: text/x-patch, Size: 10355 bytes --]

Index: texi/gnus.texi
===================================================================
RCS file: /usr/local/cvsroot/gnus/texi/gnus.texi,v
retrieving revision 6.384
diff -u -u -r6.384 gnus.texi
--- texi/gnus.texi	2003/01/13 04:36:00	6.384
+++ texi/gnus.texi	2003/01/13 14:12:49
@@ -8296,17 +8296,17 @@
 like @code{\222} or @code{\264} where you're expecting some kind of
 apostrophe or quotation mark, then try this wash.
 
-@item W k
-@kindex W k (Summary)
+@item W Y f
 @kindex W Y f (Summary)
 @findex gnus-article-outlook-deuglify-article
 @cindex Outlook Express
-Deuglify broken Outlook (Express) articles.
+Full deuglify of broken Outlook (Express) articles: Treat dumbquotes,
+unwrap lines, repair attribution and rearrange citation.
 (@code{gnus-article-outlook-deuglify-article}).
 
 @item W Y u
 @kindex W Y u (Summary)
-@findex gnus-outlook-unwrap-lines
+@findex gnus-article-outlook-unwrap-lines
 Unwrap lines that appear to be wrapped citation lines.  You can control
 what lines will be unwrapped by frobbing
 @code{gnus-outlook-deuglify-unwrap-min} and
@@ -8316,15 +8316,15 @@
 
 @item W Y a
 @kindex W Y a (Summary)
-@findex gnus-outlook-repair-attribution
-Repair a broken attribution line
-(@code{gnus-outlook-repair-attribution}).
+@findex gnus-article-outlook-repair-attribution
+Repair a broken attribution line.
+(@code{gnus-article-outlook-repair-attribution}).
 
 @item W Y c
 @kindex W Y c (Summary)
-@findex gnus-outlook-rearrange-citation
+@findex gnus-article-outlook-rearrange-citation
 Repair broken citations by rearranging the text.
-(@code{gnus-outlook-rearrange-citation}).
+(@code{gnus-article-outlook-rearrange-citation}).
 
 @item W w
 @kindex W w (Summary)
Index: lisp/deuglify.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/deuglify.el,v
retrieving revision 6.8
diff -u -u -r6.8 deuglify.el
--- lisp/deuglify.el	2003/01/11 21:47:00	6.8
+++ lisp/deuglify.el	2003/01/13 14:12:49
@@ -47,7 +47,7 @@
 ;; > verb.  This sentence no verb.  This sentence no verb.  This
 ;; > sentence no verb.
 ;;
-;; The function `gnus-outlook-unwrap-lines' tries to recognize those
+;; The function `gnus-article-outlook-unwrap-lines' tries to recognize those
 ;; erroneously wrapped lines and will unwrap them.  I.e. putting the
 ;; wrapped parts ("no" in this example) back where they belong (at the
 ;; end of the cited line above).
@@ -70,7 +70,7 @@
 ;;
 ;; Unwrapping "You forgot in all your sentences." would be illegal as
 ;; this part wasn't intended to be cited text.
-;; `gnus-outlook-unwrap-lines' will only unwrap lines if the resulting
+;; `gnus-article-outlook-unwrap-lines' will only unwrap lines if the resulting
 ;; citation line will be of a certain maximum length.  You can control
 ;; this by adjusting `gnus-outlook-deuglify-unwrap-max'.  Also
 ;; unwrapping will only be done if the line above the (possibly)
@@ -113,7 +113,7 @@
 ;; > Bye, John
 ;;
 ;; Repairing the attribution line will be done by function
-;; `gnus-outlook-repair-attribution' which calls other function that
+;; `gnus-article-outlook-repair-attribution which calls other function that
 ;; try to recognize and repair broken attribution lines.  See variable
 ;; `gnus-outlook-deuglify-attrib-cut-regexp' for stuff that should be
 ;; cut off from the beginning of an attribution line and variable
@@ -123,8 +123,8 @@
 ;;
 ;; Rearranging the article so that the cited text appears above the
 ;; new text will be done by function
-;; `gnus-outlook-rearrange-citation'.  This function calls
-;; `gnus-outlook-repair-attribution' to find and repair an attribution
+;; `gnus-article-outlook-rearrange-citation'.  This function calls
+;; `gnus-article-outlook-repair-attribution to find and repair an attribution
 ;; line.
 ;;
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -158,15 +158,15 @@
 ;; To automatically invoke deuglification on every article you read,
 ;; put something like that in your .gnus:
 ;;
-;; (add-hook 'gnus-article-decode-hook 'gnus-outlook-unwrap-lines)
+;; (add-hook 'gnus-article-decode-hook 'gnus-article-outlook-unwrap-lines)
 ;;
 ;; or _one_ of the following lines:
 ;;
 ;; ;; repair broken attribution lines
-;; (add-hook 'gnus-article-decode-hook 'gnus-outlook-repair-attribution)
+;; (add-hook 'gnus-article-decode-hook 'gnus-article-outlook-repair-attribution)
 ;;
 ;; ;; repair broken attribution lines and citations
-;; (add-hook 'gnus-article-decode-hook 'gnus-outlook-rearrange-citation)
+;; (add-hook 'gnus-article-decode-hook 'gnus-article-outlook-rearrange-citation)
 ;;
 ;; Note that there always may be some false positives, so I suggest
 ;; using the manual invocation.  After deuglification you may want to
@@ -178,16 +178,16 @@
 ;; -----------
 ;;
 ;; As I said before there may (or will) be a few false positives on
-;; unwrapping cited lines with `gnus-outlook-unwrap-lines'.
+;; unwrapping cited lines with `gnus-article-outlook-unwrap-lines'.
 ;;
-;; `gnus-outlook-repair-attribution' will only fix the first
+;; `gnus-article-outlook-repair-attribution will only fix the first
 ;; attribution line found in the article.  Furthermore it fixed to
 ;; certain kinds of attributions.  And there may be horribly many
 ;; false positives, vanishing lines and so on -- so don't trust your
 ;; eyes.  Again I recommend manual invocation.
 ;;
-;; `gnus-outlook-rearrange-citation' carries all the limitations of
-;; `gnus-outlook-repair-attribution'.
+;; `gnus-article-outlook-rearrange-citation' carries all the limitations of
+;; `gnus-article-outlook-repair-attribution.
 ;;
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;
@@ -299,7 +299,7 @@
 		    'gnus-outlook-display-hook)))
 
 ;;;###autoload
-(defun gnus-outlook-unwrap-lines (&optional nodisplay)
+(defun gnus-article-outlook-unwrap-lines (&optional nodisplay)
   "Unwrap lines that appear to be wrapped citation lines.  
 You can control what lines will be unwrapped by frobbing
 `gnus-outlook-deuglify-unwrap-min' and `gnus-outlook-deuglify-unwrap-max',
@@ -419,7 +419,7 @@
 	      (match-beginning 0)))))))
 
 ;;;###autoload
-(defun gnus-outlook-repair-attribution (&optional nodisplay)
+(defun gnus-article-outlook-repair-attribution (&optional nodisplay)
   "Repair a broken attribution line.
 If NODISPLAY is non-nil, don't redisplay the article buffer."
   (interactive "P")
@@ -431,11 +431,11 @@
     (unless nodisplay (gnus-outlook-display-article-buffer))
     attrib-start))
 
-(defun gnus-outlook-rearrange-citation (&optional nodisplay)
+(defun gnus-article-outlook-rearrange-citation (&optional nodisplay)
   "Repair broken citations.
 If NODISPLAY is non-nil, don't redisplay the article buffer."
   (interactive "P")
-  (let ((attrib-start (gnus-outlook-repair-attribution 'nodisplay)))
+  (let ((attrib-start (gnus-article-outlook-repair-attribution 'nodisplay)))
     ;; rearrange citations if an attribution line has been recognized
     (if attrib-start
 	(gnus-outlook-rearrange-article attrib-start)))
@@ -443,15 +443,16 @@
 
 ;;;###autoload
 (defun gnus-outlook-deuglify-article (&optional nodisplay)
-  "Deuglify broken Outlook (Express) articles.
-If NODISPLAY is non-nil, don't redisplay the article buffer."
+  "Full deuglify of broken Outlook (Express) articles.
+Treat dumbquotes, unwrap lines, repair attribution and rearrange citation.  If
+NODISPLAY is non-nil, don't redisplay the article buffer."
   (interactive "P")
   ;; apply treatment of dumb quotes
   (gnus-article-treat-dumbquotes)
   ;; repair wrapped cited lines
-  (gnus-outlook-unwrap-lines 'nodisplay)
-  ;; repair attribution line
-  (gnus-outlook-rearrange-citation 'nodisplay)
+  (gnus-article-outlook-unwrap-lines 'nodisplay)
+  ;; repair attribution line and rearrange citation.
+  (gnus-article-outlook-rearrange-citation 'nodisplay)
   (unless nodisplay (gnus-outlook-display-article-buffer)))
 
 ;;;###autoload
Index: lisp/gnus-sum.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/gnus-sum.el,v
retrieving revision 6.282
diff -u -u -r6.282 gnus-sum.el
--- lisp/gnus-sum.el	2003/01/13 06:13:01	6.282
+++ lisp/gnus-sum.el	2003/01/13 14:12:50
@@ -46,9 +46,9 @@
 (autoload 'gnus-article-outlook-deuglify-article "deuglify"
   "Deuglify broken Outlook (Express) articles and redisplay."
   t)
-(autoload 'gnus-outlook-unwrap-lines "deuglify" nil t)
-(autoload 'gnus-outlook-repair-attribution "deuglify" nil t)
-(autoload 'gnus-outlook-rearrange-citation "deuglify" nil t)
+(autoload 'gnus-article-outlook-unwrap-lines "deuglify" nil t)
+(autoload 'gnus-article-outlook-repair-attribution "deuglify" nil t)
+(autoload 'gnus-article-outlook-rearrange-citation "deuglify" nil t)
 
 (defcustom gnus-kill-summary-on-exit t
   "*If non-nil, kill the summary buffer when you exit from it.
@@ -1795,14 +1795,13 @@
     "v" gnus-summary-verbose-headers
     "a" gnus-article-strip-headers-in-body ;; mnemonic: wash archive
     "p" gnus-article-verify-x-pgp-sig
-    "d" gnus-article-treat-dumbquotes
-    "k" gnus-article-outlook-deuglify-article) ;; mnemonic: outloo*k*
+    "d" gnus-article-treat-dumbquotes)
 
   (gnus-define-keys (gnus-summary-wash-deuglify-map "Y" gnus-summary-wash-map)
     ;; mnemonic: deuglif*Y*
-    "u" gnus-outlook-unwrap-lines
-    "a" gnus-outlook-repair-attribution
-    "c" gnus-outlook-rearrange-citation
+    "u" gnus-article-outlook-unwrap-lines
+    "a" gnus-article-outlook-repair-attribution
+    "c" gnus-article-outlook-rearrange-citation
     "f" gnus-article-outlook-deuglify-article) ;; mnemonic: full deuglify
 
   (gnus-define-keys (gnus-summary-wash-hide-map "W" gnus-summary-wash-map)
@@ -2119,9 +2118,9 @@
 	      ["Verify X-PGP-Sig" gnus-article-verify-x-pgp-sig t]
 	      ["HZ" gnus-article-decode-HZ t]
 	      ("(Outlook) Deuglify"
-	       ["Unwrap lines" gnus-outlook-unwrap-lines t]
-	       ["Repair attribution" gnus-outlook-repair-attribution t]
-	       ["Rearrange citation" gnus-outlook-rearrange-citation t]
+	       ["Unwrap lines" gnus-article-outlook-unwrap-lines t]
+	       ["Repair attribution" gnus-article-outlook-repair-attribution t]
+	       ["Rearrange citation" gnus-article-outlook-rearrange-citation t]
 	       ["Full (Outlook) deuglify"
 		gnus-article-outlook-deuglify-article t])
 	      )

[-- Attachment #3: Type: text/plain, Size: 116 bytes --]


Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo--- PGP key available via WWW   http://rsteib.home.pages.de/

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-01-13 18:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-10 20:55 [Patch] New interactive functions in deuglify.el Reiner Steib
2003-01-11 21:09 ` Lars Magne Ingebrigtsen
2003-01-13 15:46 Reiner Steib
2003-01-13 18:33 ` Lars Magne Ingebrigtsen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).