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 17:38:36 +0100 [thread overview]
Message-ID: <gd.87znqmnnxv.fsf@mde1.zonix.de> (raw)
In-Reply-To: <m3y967f2g1.fsf@quimbies.gnus.org>
[-- Attachment #1: Type: text/plain, Size: 640 bytes --]
* Lars Magne Ingebrigtsen <larsi@gnus.org> 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 <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
--
Q: What have american beer and sex in a canoe in common?
A: Both are fucking close to water.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: deuglify.el.patch --]
[-- Type: text/x-patch, Size: 2236 bytes --]
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 <john.doe@some.domain> 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)
prev parent reply other threads:[~2002-12-31 16:38 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
2002-12-31 0:37 ` Lars Magne Ingebrigtsen
2002-12-31 16:38 ` Raymond Scholz [this message]
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.87znqmnnxv.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).