From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/48404 Path: main.gmane.org!not-for-mail From: Raymond Scholz Newsgroups: gmane.emacs.gnus.general Subject: Re: Cry for help: deuglify.el - moving stuff in the Article Buffer Date: Tue, 31 Dec 2002 01:11:16 +0100 Organization: =?UTF-8?Q?/=CB=8C=C9=94=CB=90=C9=A1=C9=99na=C9=AA=CB=88ze=C9=AA=CA=83n/?= Sender: owner-ding@hpc.uh.edu Message-ID: References: Reply-To: Raymond Scholz NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1041293697 20918 80.91.224.249 (31 Dec 2002 00:14:57 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 31 Dec 2002 00:14:57 +0000 (UTC) Cc: larsi@gnus.org Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18TA3b-0005R7-00 for ; Tue, 31 Dec 2002 01:14:55 +0100 Original-Received: from sina.hpc.uh.edu ([129.7.128.10] ident=lists) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 18TA2z-0000t3-00; Mon, 30 Dec 2002 18:14:17 -0600 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Mon, 30 Dec 2002 18:15:10 -0600 (CST) Original-Received: from quimby.gnus.org (quimby.gnus.org [80.91.224.244]) by sina.hpc.uh.edu (8.9.3/8.9.3) with ESMTP id SAA15131 for ; Mon, 30 Dec 2002 18:14:56 -0600 (CST) Original-Received: from news by quimby.gnus.org with local (Exim 3.12 #1 (Debian)) id 18TA2n-00031v-00 for ; Tue, 31 Dec 2002 01:14:05 +0100 Original-To: ding@hpc.uh.edu Original-Path: mde1.zonix.de!not-for-mail Original-Newsgroups: gnus.ding Original-Lines: 83 Original-NNTP-Posting-Host: a9059.pppool.de Original-X-Trace: quimby.gnus.org 1041293645 11646 213.6.144.89 (31 Dec 2002 00:14:05 GMT) Original-X-Complaints-To: usenet@quimby.gnus.org Original-NNTP-Posting-Date: 31 Dec 2002 00:14:05 GMT X-Now-Playing: Gorillaz's _Gorillaz_: "Slow Country" X-Face: %.!RBc`e*wW)84O*\)VdkC}mU5c2Zh$y~ZRA3K594g/jp_&5bx\Oyes!/jK~4<<%KlaPn^\ 0 wrote: > Raymond Scholz writes: > >> If you're using `W k' to deuglify messages, you may have encountered >> the problem that messages with MIME parts (or format=flowed) >> completely disappear from the Article Buffer. This is due to the >> brain-dead implementation of `gnus-outlook-rearrange-article' > > Could you construct a message that displays this behavior? Instead of doing another try to construct such a message, I hopefully fixed some bugs in deuglify.el. Here is a diff against CVS: Index: lisp/deuglify.el =================================================================== RCS file: /usr/local/cvsroot/gnus/lisp/deuglify.el,v retrieving revision 6.4 diff -u -r6.4 deuglify.el --- lisp/deuglify.el 2002/12/28 23:54:45 6.4 +++ lisp/deuglify.el 2002/12/31 00:03:05 @@ -280,7 +280,6 @@ ;; Functions -;; TODO: don't kill MIME parts ;;;###autoload (defun gnus-outlook-unwrap-lines () "Unwrap lines that appear to be wrapped citation lines. @@ -311,20 +310,19 @@ (replace-match "\\1\\2 \\3") (goto-char (match-beginning 0)))))))))) -;; TODO: respect signatures, don't kill MIME parts (defun gnus-outlook-rearrange-article (from-where) - "Put the text from `from-where' to the end of buffer at the top of the article buffer." + "Put the text from `from-where' to the end of buffer at the top of +the article buffer." (save-excursion (let ((inhibit-read-only t) (cite-marks gnus-outlook-deuglify-cite-marks)) (gnus-with-article-buffer - (unless (search-forward-regexp - (concat "^[ \t]*[^" cite-marks "\n]") nil t) - (kill-region from-where (point-max)) - (article-goto-body) - (yank) - (insert "\n")))))) + (beginning-of-buffer) + (re-search-forward "^$") + (transpose-regions (point) (- from-where 1) + from-where (point-max) t))))) + ;; John Doe wrote in message ;; news:a87usw8$dklsssa$2@some.news.server... @@ -425,7 +423,7 @@ (interactive) (gnus-outlook-deuglify-article) (with-current-buffer (or gnus-article-buffer (current-buffer)) - (gnus-article-prepare-display))) + (gnus-article-highlight t))) (provide 'deuglify) Suggested ChangeLog: 2002-12-31 Raymond Scholz * deuglify.el (gnus-outlook-rearrange-article): Use `transpose-regions' instead of tempering the kill-ring. (gnus-article-outlook-deuglify-article): Rehighlight article instead of a complete redisplay. Cheers, Ray -- Hfr fgebat rapelcgvba!