From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/14723 Path: main.gmane.org!not-for-mail From: Hans de Graaff Newsgroups: gmane.emacs.gnus.general Subject: Re: Header dependant headers? Date: 21 Mar 1998 20:21:11 +0100 Sender: owner-ding@hpc.uh.edu Message-ID: <877m5nyhnc.fsf@graaff.xs4all.nl> References: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 (generated by tm-edit 7.108) Content-Type: text/plain; charset=US-ASCII X-Trace: main.gmane.org 1035153869 17869 80.91.224.250 (20 Oct 2002 22:44:29 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 20 Oct 2002 22:44:29 +0000 (UTC) Return-Path: Original-Received: from xemacs.org (xemacs.cs.uiuc.edu [128.174.252.16]) by altair.xemacs.org (8.8.8/8.8.8) with ESMTP id MAA13926 for ; Sat, 21 Mar 1998 12:52:47 -0800 Original-Received: from gizmo.hpc.uh.edu (gizmo.hpc.uh.edu [129.7.102.31]) by xemacs.org (8.8.5/8.8.5) with ESMTP id OAA13969 for ; Sat, 21 Mar 1998 14:53:23 -0600 (CST) Original-Received: from sina.hpc.uh.edu (sina.hpc.uh.edu [129.7.3.5]) by gizmo.hpc.uh.edu (8.7.6/8.7.3) with ESMTP id PAN07187; Sat, 21 Mar 1998 15:28:41 -0600 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Sat, 21 Mar 1998 14:52:21 -0600 (CST) Original-Received: from claymore.vcinet.com (claymore.vcinet.com [208.205.12.23]) by sina.hpc.uh.edu (8.7.3/8.7.3) with SMTP id OAA05421 for ; Sat, 21 Mar 1998 14:52:12 -0600 (CST) Original-Received: (qmail 7421 invoked by uid 504); 21 Mar 1998 20:52:01 -0000 Original-Received: (qmail 7416 invoked from network); 21 Mar 1998 20:51:47 -0000 Original-Received: from graaff.xs4all.nl (qmailr@194.109.62.76) by claymore.vcinet.com with SMTP; 21 Mar 1998 20:51:45 -0000 Original-Received: (qmail 5574 invoked by uid 1000); 21 Mar 1998 19:21:12 -0000 Original-To: ding@gnus.org X-Face: ,i^c$X{l+r}VV%(bl{^[ writes: > Works fine, yep; but that won't allow me to include custom Reply-To > header when answering mails in that group. I'd need one for my work, > so I think I just have to write a hook for that, and call it from > Group Parameters? I use the following, which kinda works but also has some problems. I originally got something like it from the newsgroup, but I forgot to save the name. Since then I've ripped it apart myself to better suit what I wanted. Comments, etc, are welcome. I'm not a lisp hacker by any standard, but I would like to see some kind of customization of all headers based on characteristics. (In my case below the group I'm in). Which reminds me: Lars, there is only an nnml-current-group, but there is no such thing for nntp groups. Shouldn't there be a gnus-current-group variable? Hans ;; JJDG: Got this off of gnu.emacs.gnus, not sure who wrote it... ;; Hacked it so that naming is more safe, ripped out signature stuff, ;; since I don't need it, and also allow outgoing mail to be customized ;; based on To: header. (setq jjdg-postspecs '(("mail.forum" . ((headers . "Reply-To: forum@graaff.xs4all.nl\nOrganization: Forum Distribution, Main Branch\n")) ) ("\\(list\\.\\(chi\\.\\|ui-patterns\\).*\\|mail\\.acm\\..*\\)" . ((headers . "From: Hans de Graaff \n"))) (t . ((headers . "From: Hans de Graaff \n"))) )) (defun jjdg-find-postspec (speclist groups) (cond ((null speclist) nil) ((null groups) (cdr-safe (assq t speclist))) (t (let ((spec (car speclist))) (if (or (eq t (car spec)) (string-match (car spec) groups)) (cdr spec) (jjdg-find-postspec (cdr speclist) groups)))) )) (defun jjdg-electric-from (header-alist) ; (let* ((groups (or (cdr-safe (assq 'Newsgroups header-alist)) ; (cdr-safe (assq 'To header-alist)))) (let* ((groups nnml-current-group) (postspec (jjdg-find-postspec jjdg-postspecs groups)) (headers (cdr-safe (assq 'headers postspec)))) (if headers (save-excursion (goto-char (point-min)) (insert headers))) )) (add-hook 'message-signature-setup-hook (lambda () (jjdg-electric-from headers)))