From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/4116 Path: main.gmane.org!not-for-mail From: "Steven L. Baur" Newsgroups: gmane.emacs.gnus.general Subject: Re: Signature in forwarded messages Date: Tue, 28 Nov 1995 18:54:21 -0800 Message-ID: <199511290254.SAA03517@miranova.com> References: <199511281709.LAA14735@galil.austnsc.tandem.com> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 (generated by tm-edit 7.27) Content-Type: text/plain; charset=US-ASCII X-Trace: main.gmane.org 1035144912 28575 80.91.224.250 (20 Oct 2002 20:15:12 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 20 Oct 2002 20:15:12 +0000 (UTC) Return-Path: ding-request@ifi.uio.no Original-Received: from ifi.uio.no (ifi.uio.no [129.240.64.2]) by miranova.com (8.6.11/8.6.9) with ESMTP id TAA03798 for ; Tue, 28 Nov 1995 19:36:57 -0800 Original-Received: from miranova.com (steve@miranova.com [204.212.162.100]) by ifi.uio.no with ESMTP (8.6.11/ifi2.4) id for ; Wed, 29 Nov 1995 03:54:16 +0100 Original-Received: (from steve@localhost) by miranova.com (8.6.11/8.6.9) id SAA03517; Tue, 28 Nov 1995 18:54:21 -0800 Original-To: ding@ifi.uio.no X-Url: http://www.miranova.com/%7Esteve/ Xref: main.gmane.org gmane.emacs.gnus.general:4116 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:4116 Lars, may I respectfully request that you put the magic ``Start of'' string into a variable so that it doesn't have to be copied by hand as below? >>>>> "Sten" == Sten Drescher writes: Sten> In Gnus 5.0.10, when I use gnus-summary-mail-forward Sten> or gnus-uu-digest-mail-forward (I don't know about other Sten> -forward commands), my signature file is put at the Sten> _beginning_ of the message. Even if this isn't broken, I'd Sten> still like the signature to be at the end of the message. Sten> How can I make this happen? Sten> Sten I don't think this is broken. At any rate, it behaves the same way in sgnus v0.16. You do have a hook available to rearrange things. Take a look at the gnus-mail-forward-hook. What you would want to do there is move all the text between the header separator line, and the ``------- Start of forwarded message -------'' line to the end of the buffer. Try this out and see if it does what you want (I'm sure that this is not the most elegant way of doing this, but it appears to work): (defun signature-to-end-of-forwarded-message () (save-excursion (goto-char (point-min)) (re-search-forward (concat "^" (regexp-quote mail-header-separator) "$") nil t) (forward-line 1) (let* ((start (point)) (end (progn (save-excursion (re-search-forward "^------- Start of forwarded message -" nil t) (beginning-of-line) (point))))) (goto-char (point-max)) (insert-buffer-substring (current-buffer) start end) (delete-region start end)))) (add-hook 'gnus-mail-forward-hook 'signature-to-end-of-forwarded-message) Regards, -- steve@miranova.com baur