Gnus development mailing list
 help / color / mirror / Atom feed
From: Raymond Scholz <ray-2002@zonix.de>
Cc: larsi@gnus.org
Subject: Re: Cry for help: deuglify.el - moving stuff in the Article Buffer
Date: Tue, 31 Dec 2002 01:11:16 +0100	[thread overview]
Message-ID: <gd.8765tbxd23.fsf@mde1.zonix.de> (raw)
In-Reply-To: <m3ptrl7oy0.fsf@quimbies.gnus.org>

* Lars Magne Ingebrigtsen <larsi@gnus.org> wrote:

> Raymond Scholz <ray-2002@zonix.de> 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 <john.doe@some.domain> 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  <ray-2002@zonix.de>

	* 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!



  parent reply	other threads:[~2002-12-31  0:11 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-16 19:37 Raymond Scholz
2002-12-28 22:34 ` Lars Magne Ingebrigtsen
2002-12-29  0:24   ` Raymond Scholz
2002-12-29 14:33     ` Lars Magne Ingebrigtsen
2002-12-29 20:26       ` Raymond Scholz
2002-12-29 22:56         ` Lars Magne Ingebrigtsen
2002-12-29 23:35           ` Raymond Scholz
2003-01-01 18:54             ` Lars Magne Ingebrigtsen
2003-01-02 10:32               ` Raymond Scholz
2002-12-30 12:33           ` Raymond Scholz
2002-12-30 12:53           ` Raymond Scholz
2002-12-31  0:11   ` Raymond Scholz [this message]
2002-12-31  0:37     ` Lars Magne Ingebrigtsen
2002-12-31 16:38       ` Raymond Scholz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=gd.8765tbxd23.fsf@mde1.zonix.de \
    --to=ray-2002@zonix.de \
    --cc=larsi@gnus.org \
    --cc=rscholz@zonix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).