From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/63390 Path: news.gmane.org!not-for-mail From: Egor Pervuninski Newsgroups: gmane.emacs.gnus.general Subject: Re: Citation at the end of the message Date: Thu, 22 Jun 2006 09:32:00 +1000 Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1150933505 30432 80.91.229.2 (21 Jun 2006 23:45:05 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 21 Jun 2006 23:45:05 +0000 (UTC) Original-X-From: ding-owner+m11917@lists.math.uh.edu Thu Jun 22 01:44:56 2006 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FtCNK-0007Rz-So for ding-account@gmane.org; Thu, 22 Jun 2006 01:44:47 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu ident=lists) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 1FtCMy-0000Vs-00; Wed, 21 Jun 2006 18:44:24 -0500 Original-Received: from nas02.math.uh.edu ([129.7.128.40]) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1FtCBB-0000Vm-00 for ding@lists.math.uh.edu; Wed, 21 Jun 2006 18:32:13 -0500 Original-Received: from quimby.gnus.org ([80.91.224.244]) by nas02.math.uh.edu with esmtp (Exim 4.52) id 1FtCB6-0007yp-5W for ding@lists.math.uh.edu; Wed, 21 Jun 2006 18:32:13 -0500 Original-Received: from [203.16.237.3] (helo=pie.customware.net) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1FtCB4-0004Ex-00 for ; Thu, 22 Jun 2006 01:32:07 +0200 Original-Received: from CW-EPERVUNINSKI ([203.16.237.6]) (authenticated user epervuninski@customware.net) by pie.customware.net (using TLSv1/SSLv3 with cipher AES256-SHA (256 bits)) for ding@gnus.org; Thu, 22 Jun 2006 09:39:18 +1000 Original-To: ding@gnus.org X-Url: In-Reply-To: (Reiner Steib's message of "Wed, 21 Jun 2006 15:17:42 +0200") User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.50 (windows-nt) X-Spam-Score: -2.6 (--) Precedence: bulk Original-Sender: ding-owner@lists.math.uh.edu Xref: news.gmane.org gmane.emacs.gnus.general:63390 Archived-At: Hello Reiner, Reiner Steib wrote: >> How to put citation at the end of a message, after a signature? I >> know, it's ugly but anyway. > As this has been requested a couple of times, I've added > `message-cite-reply-above' in current CVS. This is my solution. It also automatically adds a "Hello ," in the beginning of the message. Another problem with Supercite is that it is adding attribution for empty lines then sc-cite-blank-lines-p is set to t even if nested citation is used. The solution is also included. ,----[ dotgnus.el ] | | ... | | (require 'supercite) | | (defun specmurt/citation-header-work () | "Format citation header for work emails" | (let ((sc-mumble "") | (whofrom (sc-whofrom))) | (if whofrom | (insert | "Hello " | (sc-mail-field "sc-firstname") | ",\n\n\n@cite-start@" | whofrom | " wrote:\n")))) | | (defun specmurt/clear-attribution () | "Clear attribution for blank lines" | (setq attribution "") | (setq citation ">") | ) | ... | | (defun specmurt/move-citation () | "Moves citation to the end of the message" | (beginning-of-buffer) | (search-forward "@cite-start@") | (beginning-of-line) | (delete-char 12) | (let ((begin (point))) | (goto-char (point-max)) | (re-search-backward "^.*>.*$") | (next-line) | (let ((cite-text (delete-and-extract-region begin (point)))) | (end-of-buffer) | (insert "\n") | (insert cite-text) | (beginning-of-buffer) | (search-forward "--text follows this line--") | (next-line 3) | )) | ) | | ... | | (add-hook 'sc-post-hook 'specmurt/move-citation) | (add-hook 'sc-attribs-postselect-hook 'specmurt/clear-attribution) | ... | (setq sc-rewrite-header-list '((specmurt/citation-header-work)))) | (setq sc-preferred-header-style 0) | `---- Regards, Egor Pervuninski