girzel / ebdb

An EIEIO port of BBDB, Emacs' contact-management package
67 stars 12 forks source link

Change person's name in my replies? #115

Closed davidpiano closed 5 months ago

davidpiano commented 5 months ago

This is just a help request, not a bug.

One of my frequent corresponders has email headers that name him Office, because his address is office@.... When I reply to him, the citation line therefore says "Office wrote...", which I find irritating. He shouldn't change what he's sending, for good reasons. Is there an automated way I can get his real name from EBDB and put that into my citation line, in place of "Office"?

I forgot to say I'm using Gnus and Message for mail.

girzel commented 5 months ago

No, there currently isn't a mechanism for doing this. Message-mode provides the ability to alter the citation line, using the message-citation-line-format option. But the format-spec escapes in there are hard-coded, there's no way to put your own function in. I just spent a little bit of time playing with it, and it wouldn't be too hard to add a custom option specifying a function to filter the value of "from". Then you could set that option to a EBDB-specific function that tried to look up the "from" and replace it with a contact's representation, or just passed the value through if the lookup failed.

I could propose that in an Emacs patch, though it could potentially be a while before it became available to you!

davidpiano commented 5 months ago

Thanks! Only propose a patch if you think it's a great idea and simple to do. There's enough to be done, without wasting effort on marginal or silly stuff.

girzel commented 5 months ago

Emacs and Gnus in particular already has a ridiculous amount of customization possible for patently silly stuff, so that's no reason not to do it! I'll put it on a medium-length list of things to do, and close this in the meantime.