From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/45159 Path: main.gmane.org!not-for-mail From: Sean Rima Newsgroups: gmane.emacs.gnus.general Subject: Grabbing single name user names for this elisp don't work in GNUS/Oort Date: Sat, 08 Jun 2002 11:37:49 +0100 Organization: TCOB1 a Fidonet BBS in Ireland Sender: owner-ding@hpc.uh.edu Message-ID: NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1023532892 1499 127.0.0.1 (8 Jun 2002 10:41:32 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sat, 8 Jun 2002 10:41:32 +0000 (UTC) Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 17Gdf1-0000O3-00 for ; Sat, 08 Jun 2002 12:41:32 +0200 Original-Received: from sina.hpc.uh.edu ([129.7.128.10] ident=lists) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 17GdcJ-0002TB-00; Sat, 08 Jun 2002 05:38:43 -0500 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Sat, 08 Jun 2002 05:38:59 -0500 (CDT) Original-Received: from sclp3.sclp.com (qmailr@sclp3.sclp.com [209.196.61.66]) by sina.hpc.uh.edu (8.9.3/8.9.3) with SMTP id FAA12272 for ; Sat, 8 Jun 2002 05:38:44 -0500 (CDT) Original-Received: (qmail 16380 invoked by alias); 8 Jun 2002 10:38:22 -0000 Original-Received: (qmail 16375 invoked from network); 8 Jun 2002 10:38:21 -0000 Original-Received: from mail.uklinux.net (HELO s1.uklinux.net) (80.84.72.21) by gnus.org with SMTP; 8 Jun 2002 10:38:21 -0000 Original-Received: from tcob1.net ([194.165.169.195]) (authenticated) by s1.uklinux.net (8.11.6/8.11.6) with ESMTP id g58Ac5229450 for ; Sat, 8 Jun 2002 11:38:05 +0100 Original-Received: from tcob1.net ([192.168.0.1]) by tcob1.net with esmtp (Exim 4.04) id 17Gdbg-0002RW-00 for ding@gnus.org; Sat, 08 Jun 2002 11:38:04 +0100 Original-Received: from sean by tcob1.net with local (Exim 4.02) id 17Gdba-0005wK-00 for ding@gnus.org; Sat, 08 Jun 2002 11:37:58 +0100 Original-To: ding@gnus.org X-GnuPG-Keyid: 9669DC4F X-GnuPG-Fingerprint: 1974 09D0 6539 2399 A4CF 9B71 791F CBD9 9669 DC4F X-Attribution: SR X-Url: X-Operating-System: i586-pc-linux-gnu Mail-Folloup-To: ding@gnus.org X-Face: Tr`5dV#p:=3L$zY|xiI@)Z2Za*_U[B3) Original-Lines: 71 User-Agent: Gnus/5.090007 (Oort Gnus v0.07) Emacs/21.2 (i586-pc-linux-gnu) X-Delivery-Agent: TMDA/0.54 X-Scanner: exiscan for exim4 (http://duncanthrax.net/exiscan/) *17Gdbg-0002RW-00*5fChaNjq25I* Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:45159 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:45159 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I use Gnus Oort, CVS version along with Ifmail for Fidonet use. I have a function that reads the from name and makes an X-Comment-To header for selected NGs which works fine as long as the original poster has two or more words in his name, but if he/she only has one then it fails. The script is: ,----[ gnus_xcom.el ] | (require `sendmail) | (require `mail-utils) | (require `mail-extr) | (require `message) | (provide `fido-message-header-setup) | | (defvar fido-ftn-address-regexp "fido\|ger\.sub\.de" | "A regexp matching FTN addresses.") | | (defvar fido-ftn-newsgroup-regexp "fido\\|ln\\|adv\\|micronet" | "A regexp matching FTN newsgroups.") | | (defun fido-is-fido-mail () | "Returns t if the current message is sent to an FTN address." | (and | (message-fetch-field "To") | (string-match fido-ftn-address-regexp (message-fetch-field "To")))) | | (defun fido-is-fido-news () | "Returns t if the current message is sent to a FTN newsgroup." | (and | (message-fetch-field "Newsgroups") | (string-match | fido-ftn-newsgroup-regexp (message-fetch-field "Newsgroups")))) | | (defun fido-get-name () | "Get the name of the author of the original message." | (car (mail-extract-address-components | (message-fetch-reply-field "from")))) | | (defun fido-message-header-setup () | "Inserts the appropriate headers." | (if (fido-is-fido-mail) | (progn | (mail-position-on-field "to") | (insert ""))) | (and | (fido-is-fido-news) | (progn | (mail-position-on-field "newsgroups") | (insert "") | t) | (fido-get-name) | (progn | (insert (concat "\nX-Comment-To: " (fido-get-name) ""))))) | | (add-hook `message-setup-hook `fido-message-header-setup) `---- - -- Sean Rima http://www.tcob1.net Linux User: 231986 Jabber: tcobone@jabber.org THE VIEWS EXPRESSED HERE ARE NOT NECESSARILY THOSE OF MY WIFE. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (GNU/Linux) Comment: Use GPG for Secure Mail iD8DBQE9Ad59eR/L2ZZp3E8RAiRxAKC/3yDPOdc/CFiN8QgaeLlasUJWcgCfc8gh x+LML423WpmUlRl/nnloeM8= =MQLO -----END PGP SIGNATURE-----