From: Kim-Minh Kaplan <KimMinh.Kaplan@utopia.eunet.fr>
Subject: Re: PATCH: Don't quote signature (was: Re: GNKSA and Gnus)
Date: 18 Jan 1998 14:16:17 +0100 [thread overview]
Message-ID: <yg467nhq5we.fsf@lombric.s-ip.eunet.fr> (raw)
In-Reply-To: <kig1zya4mp7.fsf@jagor.srce.hr>
[-- Attachment #1: Type: text/plain, Size: 857 bytes --]
Hrvoje Niksic <hniksic@srce.hr> writes:
> Kim-Minh Kaplan <KimMinh.Kaplan@utopia.eunet.fr> writes:
>
> > Gnus can put the quoted signature in the kill ring.
>
> I don't think it's a good idea to push things to the kill ring without
> user being aware of them.
Hmm, I get your point. But if we don't do something, to cite a
signature one has to do:
C-x b * A r t i c l e * RET M-> C-u C-r ^ - - SPC RET C-> M-w
C-x b RET C-y C-x C-x C-x r t > SPC RET
Ugly ! And it may be even worse if you have a different citation leader.
The attached code will provide `message-yank-cited-signatures' to
fetch the quoted signature.
> "Beware of bugs in the above code; I have only proved it correct,
> not tried it." -- Donald Knuth
Well... Beware of features in the code below: I have only tried it :-)
Kim-Minh.
[-- Attachment #2: Type: text/plain, Size: 2375 bytes --]
--- /usr/local/lib/xemacs/gnus/lisp/message.el Tue Jan 6 07:48:40 1998
+++ /usr/tmp/message.el Sun Jan 18 14:01:10 1998
@@ -814,6 +814,7 @@
(defvar message-this-is-news nil)
(defvar message-this-is-mail nil)
(defvar message-draft-article nil)
+(defvar message-cite-signatures nil)
;; Byte-compiler warning
(defvar gnus-active-hashtb)
@@ -1170,6 +1171,7 @@
(define-key message-mode-map "\C-c\C-n" 'message-insert-newsgroups)
(define-key message-mode-map "\C-c\C-y" 'message-yank-original)
+ (define-key message-mode-map "\C-cy" 'message-yank-cited-signatures)
(define-key message-mode-map "\C-c\C-q" 'message-fill-yanked-message)
(define-key message-mode-map "\C-c\C-w" 'message-insert-signature)
(define-key message-mode-map "\C-c\C-r" 'message-caesar-buffer-body)
@@ -1689,24 +1691,43 @@
(defun message-cite-original ()
"Cite function in the standard Message manner."
+ (unless (local-variable-p 'message-cite-signatures (current-buffer))
+ (make-local-variable 'message-cite-signatures)
+ (setq message-cite-signatures nil))
(let ((start (point))
+ (end (mark t))
+ sig-start
(functions
(when message-indent-citation-function
(if (listp message-indent-citation-function)
message-indent-citation-function
(list message-indent-citation-function)))))
+ (goto-char end)
+ (when (re-search-backward "^-- $" start t)
+ (setq sig-start (point-marker)))
(goto-char start)
(while functions
(funcall (pop functions)))
(when message-citation-line-function
(unless (bolp)
(insert "\n"))
- (funcall message-citation-line-function))))
+ (funcall message-citation-line-function))
+ (when sig-start
+ (setq message-cite-signatures
+ (append message-cite-signatures
+ (list (buffer-substring sig-start (mark t)))))
+ (delete-region sig-start (mark t))
+ (set-marker sig-start nil))))
(defun message-insert-citation-line ()
"Function that inserts a simple citation line."
(when message-reply-headers
(insert (mail-header-from message-reply-headers) " writes:\n\n")))
+
+(defun message-yank-cited-signatures ()
+ "Insert quoted signatures that where elided by the citation function."
+ (interactive)
+ (mapc 'insert message-cite-signatures))
(defun message-position-on-field (header &rest afters)
(let ((case-fold-search t))
next prev parent reply other threads:[~1998-01-18 13:16 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <199712280107.UAA02498@mail.interpath.net>
1998-01-05 19:54 ` GNKSA and Gnus Per Abrahamsen
1998-01-05 20:31 ` Russ Allbery
1998-01-05 21:29 ` Selective quoting (was: Re: GNKSA and Gnus) Per Abrahamsen
1998-01-12 22:15 ` GNKSA and Gnus Lars Magne Ingebrigtsen
1998-01-12 22:45 ` Russ Allbery
1998-02-02 18:25 ` Lars Magne Ingebrigtsen
1998-01-12 22:48 ` Hrvoje Niksic
1998-01-13 15:58 ` PATCH: Don't quote signature (was: Re: GNKSA and Gnus) Per Abrahamsen
1998-01-14 23:57 ` Kim-Minh Kaplan
1998-01-15 0:15 ` Hrvoje Niksic
1998-01-15 8:52 ` Stig Sandbeck Mathisen
1998-01-15 13:55 ` Per Abrahamsen
1998-01-15 14:16 ` Lars Balker Rasmussen
1998-01-15 14:42 ` Per Abrahamsen
1998-01-15 14:49 ` Lars Balker Rasmussen
1998-01-15 15:36 ` Per Abrahamsen
1998-01-18 13:16 ` Kim-Minh Kaplan [this message]
1998-02-08 15:18 ` Lars Magne Ingebrigtsen
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=yg467nhq5we.fsf@lombric.s-ip.eunet.fr \
--to=kimminh.kaplan@utopia.eunet.fr \
/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).