From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/48460 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 17:38:36 +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: multipart/mixed; boundary="=-=-=" X-Trace: main.gmane.org 1041352854 6035 80.91.224.249 (31 Dec 2002 16:40:54 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 31 Dec 2002 16:40:54 +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 18TPRk-0001Yx-00 for ; Tue, 31 Dec 2002 17:40:52 +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 18TPRu-00027U-00; Tue, 31 Dec 2002 10:41:02 -0600 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Tue, 31 Dec 2002 10:41:56 -0600 (CST) Original-Received: from sclp3.sclp.com (sclp3.sclp.com [66.230.238.2]) by sina.hpc.uh.edu (8.9.3/8.9.3) with SMTP id KAA17537 for ; Tue, 31 Dec 2002 10:41:40 -0600 (CST) Original-Received: (qmail 80309 invoked by alias); 31 Dec 2002 16:40:43 -0000 Original-Received: (qmail 80304 invoked from network); 31 Dec 2002 16:40:42 -0000 Original-Received: from quimby.gnus.org (80.91.224.244) by 66.230.238.6 with SMTP; 31 Dec 2002 16:40:42 -0000 Original-Received: from news by quimby.gnus.org with local (Exim 3.12 #1 (Debian)) id 18TPRx-0003hB-00 for ; Tue, 31 Dec 2002 17:41:05 +0100 Original-To: ding@gnus.org Original-Path: mde1.zonix.de!not-for-mail Original-Newsgroups: gnus.ding Original-Lines: 105 Original-NNTP-Posting-Host: acb9732e.ipt.aol.com Original-X-Trace: quimby.gnus.org 1041352865 14206 172.185.115.46 (31 Dec 2002 16:41:05 GMT) Original-X-Complaints-To: usenet@quimby.gnus.org Original-NNTP-Posting-Date: 31 Dec 2002 16:41:05 GMT X-Now-Playing: Nothing X-Face: %.!RBc`e*wW)84O*\)VdkC}mU5c2Zh$y~ZRA3K594g/jp_&5bx\Oyes!/jK~4<<%KlaPn^\ 0 wrote: > Thanks for the patch; I've applied it to Oort Gnus v0.08 (i. e., CVS). Did you? I can't see this. Hm. Anyway, here is an improved patch against CVS, which is really worth being applied to CVS :-) 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 -- Q: What have american beer and sex in a canoe in common? A: Both are fucking close to water. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=deuglify.el.patch 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 16:34:07 @@ -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,19 +310,18 @@ (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." (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")))))) + (article-goto-body) + ;; attribution out of place? + (unless (= (point) from-where) + (gnus-kill-all-overlays) + (transpose-regions (point) (+ from-where 1) + (+ from-where 1) (point-max))))))) ;; John Doe wrote in message ;; news:a87usw8$dklsssa$2@some.news.server... @@ -343,6 +341,7 @@ "\\(" gnus-outlook-deuglify-attrib-end-regexp "\\)$") nil t) (progn + (gnus-kill-all-overlays) (replace-match "\\1\\2\\4") (match-beginning 0))))))) @@ -369,6 +368,7 @@ "[^\n]+: [^\n]+$") nil t) (progn + (gnus-kill-all-overlays) (replace-match "\\1 wrote:") (match-beginning 0))))))) @@ -389,6 +389,7 @@ "\\(" gnus-outlook-deuglify-attrib-end-regexp "\\)$") nil t) (progn + (gnus-kill-all-overlays) (replace-match "\\4 \\5\\6\\7") (match-beginning 0))))))) @@ -425,7 +426,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) --=-=-=--