* 'mail-extr.el' small patch
@ 2004-09-22 12:31 Sebastien Kirche
0 siblings, 0 replies; only message in thread
From: Sebastien Kirche @ 2004-09-22 12:31 UTC (permalink / raw)
[-- Attachment #1: Type: text/plain, Size: 356 bytes --]
Hi,
I recently customized my trivial-cite attribution function
and I found that there no way of getting a name that is equal to the mailbox
name as the real name. It is stripped by mail-extr parsing function.
So i propose that little addition to give the user possibility to strip that
name or not.
Comments are welcome.
Regards,
Sébastien Kirche
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: mail-extr.el modification --]
[-- Type: text/x-patch, Size: 1512 bytes --]
--- mail-extr.el Tue Sep 21 13:33:52 2004
+++ mail-extr.el Wed Sep 22 10:42:44 2004
@@ -234,6 +234,13 @@
:version "21.4"
:group 'mail-extr)
+(defcustom mail-extr-ignore-realname-equals-mailbox-name nil
+"*Whether to ignore a name that is equal to the mailbox name.
+If true, then when the address is like \"Single <single@address.com>\"
+we will act as though we couldn't find a full name in the address."
+ :type 'boolean
+ :group 'mail-extr)
+
;; Matches a leading title that is not part of the name (does not
;; contribute to uniquely identifying the person).
(defcustom mail-extr-full-name-prefixes
@@ -694,7 +701,7 @@
"Given an RFC-822 address ADDRESS, extract full name and canonical address.
Returns a list of the form (FULL-NAME CANONICAL-ADDRESS).
If no name can be extracted, FULL-NAME will be nil. Also see
-`mail-extr-ignore-single-names'.
+`mail-extr-ignore-single-names' and `mail-extr-ignore-realname-equals-mailbox-name'.
If the optional argument ALL is non-nil, then ADDRESS can contain zero
or more recipients, separated by commas, and we return a list of
@@ -1404,8 +1411,9 @@
(setq names-match-flag nil))
(setq i (1+ i)))
(delete-region (+ (point-min) buffer-length) (point-max))
- (if names-match-flag
- (narrow-to-region (point) (point)))))
+ (and names-match-flag
+ mail-extr-ignore-realname-equals-mailbox-name
+ (narrow-to-region (point) (point)))))
;; Nuke name if it's just one word.
(goto-char (point-min))
[-- Attachment #3: Type: text/plain, Size: 142 bytes --]
_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-09-22 12:31 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-22 12:31 'mail-extr.el' small patch Sebastien Kirche
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).