From: Egor Pervuninski <egor.pervuninski@gmail.com>
Subject: Re: Citation at the end of the message
Date: Thu, 22 Jun 2006 09:32:00 +1000 [thread overview]
Message-ID: <ulkrq6q6n.fsf@gmail.com> (raw)
In-Reply-To: <v93bdyodft.fsf@marauder.physik.uni-ulm.de> (Reiner Steib's message of "Wed, 21 Jun 2006 15:17:42 +0200")
Hello Reiner,
Reiner Steib <reinersteib+from-uce@imap.cc> 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 <name>," 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
next prev parent reply other threads:[~2006-06-21 23:32 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <uverf8yaf.fsf@gmail.com>
2006-06-21 13:17 ` Reiner Steib
2006-06-21 23:32 ` Egor Pervuninski [this message]
2006-06-22 8:41 ` Adding "Hello <name>," in replies (was: Citation at the end of the message) Reiner Steib
2006-06-25 23:20 ` Adding "Hello <name>," in replies Egor Pervuninski
2006-06-26 7:25 ` Reiner Steib
2006-06-26 23:00 ` Supercite (was: Adding "Hello <name>," in replies) Egor Pervuninski
2006-06-27 8:19 ` Supercite Reiner Steib
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=ulkrq6q6n.fsf@gmail.com \
--to=egor.pervuninski@gmail.com \
/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).