Gnus development mailing list
 help / color / mirror / Atom feed
From: Daniel Pittman <daniel@rimspace.net>
To: ding@gnus.org
Subject: Re: How to strip names out of To: and CC:
Date: Sun, 21 Oct 2007 15:54:14 +1000	[thread overview]
Message-ID: <87prz9nhbt.fsf@krosp.pangaean.net> (raw)
In-Reply-To: <87hckl4m95.fsf@jidanni.org>

jidanni@jidanni.org writes:

> Well here's how far I got:
> (defun jidanni-message-to-cc-no-names ()
>   "Strip the names out of To: and Cc:,
>  leaving just the addresses, for a more spartan style."
>   (let
>   (mapcar
>    (lambda(X)
>       ((X-content
> 	(mapcar
> 	 (lambda(x)(cadr x))
> 	 (mail-extract-address-components x t))))
>       (message-fetch-field "X"))
>    (message-goto-X)(message-delete-line);OR (message-remove-header X)?
>    (insert (concat "X: " X-content "\n")) (list to cc))))
>
> (add-hook 'message-header-setup-hook
> 	  'jidanni-message-to-cc-no-names)
>
> Of course it is just a jumble of Lisp Concepts in no special order
> that took several hours for me to amass.
>
> Or maybe I would be smarter to just hack the definition of
> mail-extract-address-components and gnus-extract-address-components to
> cause them to lose the names, but that would be like painting the
> traffic light green.

You might do better setting the value of the variable
`gnus-extract-address-components' to something that called an existing
method, expunged the name part, then returned the result.

Like others I /really/ don't think this is a good idea, but that
involves no hacking and minimal writing of code for your purposes.

Regards,
        Daniel
-- 
Daniel Pittman <daniel@cybersource.com.au>           Phone: 03 9621 2377
Level 4, 10 Queen St, Melbourne             Web: http://www.cyber.com.au
Cybersource: Australia's Leading Linux and Open Source Solutions Company




  reply	other threads:[~2007-10-21  5:54 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-18 17:42 jidanni
2007-10-18 18:53 ` Reiner Steib
2007-10-20 19:30   ` jidanni
2007-10-21  5:54     ` Daniel Pittman [this message]
2007-10-24 18:52       ` jidanni
2007-10-24 20:03         ` Reiner Steib
2007-10-24 22:06           ` jidanni
2007-10-24 23:16             ` Bastien
2007-10-24 23:25               ` jidanni
2007-11-09  3:26 jidanni
2007-11-09 17:54 ` jidanni
2008-03-19 16:46 ` Reiner Steib
2008-03-21  3:16   ` jidanni
2008-03-21  7:35     ` Reiner Steib
2010-02-03  3:02       ` jidanni
2010-02-03 19:25         ` jidanni
2010-02-03 19:48           ` Reiner Steib
2010-02-03 20:15             ` jidanni

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=87prz9nhbt.fsf@krosp.pangaean.net \
    --to=daniel@rimspace.net \
    --cc=ding@gnus.org \
    /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).