[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ebdb 94749fd 224/350: Expand gnus-user-format-function-
From: |
Eric Abrahamsen |
Subject: |
[elpa] externals/ebdb 94749fd 224/350: Expand gnus-user-format-function-%s |
Date: |
Mon, 14 Aug 2017 11:46:42 -0400 (EDT) |
branch: externals/ebdb
commit 94749fd8ce25145186e8c3b9127ffccc332198e0
Author: Eric Abrahamsen <address@hidden>
Commit: Eric Abrahamsen <address@hidden>
Expand gnus-user-format-function-%s
* ebdb-gnus.el (ebdb-insinuate-gnus): Incorporate the guts of
`gnus-summary-from-or-to-or-newsgroups', so that we get the proper
behavior in sent-message/archive groups. Essentially, make
`gnus-user-format-function-E' behave like Gnus' %f formatting code,
rather than %F. Copying code is bad, it would be nice if this could
be refactored out.
---
ebdb-gnus.el | 25 ++++++++++++++++++++++++-
1 file changed, 24 insertions(+), 1 deletion(-)
diff --git a/ebdb-gnus.el b/ebdb-gnus.el
index 4bcc463..ae4e69d 100644
--- a/ebdb-gnus.el
+++ b/ebdb-gnus.el
@@ -494,7 +494,30 @@ quoted replies."
(fset (intern (concat "gnus-user-format-function-"
ebdb-mua-summary-unify-format-letter))
(lambda (header)
- (ebdb-mua-summary-unify (mail-header-from header)))))
+ (let ((from (mail-header-from header)))
+ (or
+ (and gnus-ignored-from-addresses
+ (cond ((functionp gnus-ignored-from-addresses)
+ (funcall gnus-ignored-from-addresses
+ (mail-strip-quoted-names from)))
+ (t (string-match (gnus-ignored-from-addresses)
from)))
+ (let ((extra-headers (mail-header-extra header))
+ to
+ newsgroups)
+ (cond
+ ((setq to (cdr (assq 'To extra-headers)))
+ (concat gnus-summary-to-prefix
+ (ebdb-mua-summary-unify to)))
+ ((setq newsgroups
+ (or
+ (cdr (assq 'Newsgroups extra-headers))
+ (and
+ (memq 'Newsgroups gnus-extra-headers)
+ (eq (car (gnus-find-method-for-group
+ gnus-newsgroup-name)) 'nntp)
+ (gnus-group-real-name gnus-newsgroup-name))))
+ (concat gnus-summary-newsgroup-prefix newsgroups)))))
+ (ebdb-mua-summary-unify (mail-header-from header)))))))
;; (2) Small solution: a mark for messages whos sender is in EBDB.
(if ebdb-mua-summary-mark-format-letter
- [elpa] externals/ebdb 0cb406e 210/350: Expand ebdb-test-save-vars to save ebdb-db-list as well, (continued)
- [elpa] externals/ebdb 0cb406e 210/350: Expand ebdb-test-save-vars to save ebdb-db-list as well, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 722e2c3 211/350: Mild hack to make pop up windows work well, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 374919e 196/350: Fixes to proper name formatting, part III, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 0ccfc0a 215/350: Write generics for ebdb-db-add/remove-record, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 498a580 214/350: Allow user transformation of search strings, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 760fd91 204/350: More informative warning when deleting record fields, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 762f027 219/350: Add Makefile, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 325426e 207/350: Add ebdb-complete.el (#32), Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb ea13778 221/350: Autoload calendar-absolute-from-gregorian, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb af13080 218/350: Support sending text messages via Signal, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 94749fd 224/350: Expand gnus-user-format-function-%s,
Eric Abrahamsen <=
- [elpa] externals/ebdb c9f8f33 226/350: Be more when careful migrating timestamps, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb b7a28f3 227/350: Be more forgiving about contents of BBDB file when migrating, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb dd675a6 223/350: Revert changes to pop-up routine., Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 1096c6e 230/350: Search read transform functions needs to work for all methods, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb adfe13f 235/350: Fix stupidity, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 817414a 234/350: Drop object-print for cl-print-object, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb a629bde 236/350: Last tweak to pop-up buffers, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 444f762 231/350: Fix condition-case catch in ebdb-i18n-* methods, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 2de4f0e 241/350: Apparently I was spelling vCard wrong, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb f9d5af6 243/350: Add close parenthesis to email regexp delimiter, Eric Abrahamsen, 2017/08/14