Re: Trimming email replies in gnus/message-mode

Jean Louis <[email protected]>
Newsgroups gmane.emacs.help
Organization GNU Support
Message-ID <[email protected]>
On 2026-04-22 11:58, Martin Kjær Jørgensen wrote:
> Hey,
> 
> To those of you who uses gnus+message-mode in your daily lives; how do 
> you
> trim quoted text when replying (posting) emails?
> 
> Do you manually remove excess reply level texts, or do you have some 
> function
> or enabled variables that takes care of it automatically? Especially 
> when
> dealing with "large" replies.

When replying to e-mails, I use this one to kill all lines up to 
signature:

(defun rcd-kill-to-signature (arg)
   "Kill all text up to the signature that begins with -- ."
   (interactive "P")
   (save-excursion
     (save-restriction
       (let ((point (point)))
	(narrow-to-region point (point-max))
	(push-mark)
	(goto-char (point-min))
	(if (re-search-forward "^-- $" nil t)
	    (forward-line 1)
	  (goto-char (point-max)))
	(unless (eobp)
	  (if (and arg (numberp arg))
	      (forward-line (- -1 arg))
	    (end-of-line -1)))
	(unless (= point (point))
	  (kill-region point (point))
	  (unless (bolp)
	    (insert "\n")))))))

And I bind it to C-c o

-- 
Jean Louis
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.