unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#27857: add gnus-mail-avoid-redundancy
       [not found] <87inid9vi6.fsf@jidanni.org>
@ 2018-04-11 21:55 ` Lars Ingebrigtsen
  2018-04-12  8:30   ` Robert Pluim
  0 siblings, 1 reply; 4+ messages in thread
From: Lars Ingebrigtsen @ 2018-04-11 21:55 UTC (permalink / raw)
  To: 積丹尼 Dan Jacobson; +Cc: 27857

積丹尼 Dan Jacobson <jidanni@jidanni.org> writes:

> User receives a mail containing
>
>    Cc: "tagging@openstreetmap.org" <tagging@openstreetmap.org>
>
> User types
>  S W runs the command gnus-article-wide-reply-with-original
>  S W runs the command gnus-summary-wide-reply-with-original
>
> which puts the same silly line into the proposed response.
>
> Wouldn't it look better just   Cc: tagging@openstreetmap.org ?

Hm...  it would.  Does anybody object to me adding this (and defaulting
the feature to "on")?

The proposal is to remove the "name" part of an address in To/Cc etc
headers if and only if it is identical to the "address" part of an
address.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#27857: add gnus-mail-avoid-redundancy
  2018-04-11 21:55 ` bug#27857: add gnus-mail-avoid-redundancy Lars Ingebrigtsen
@ 2018-04-12  8:30   ` Robert Pluim
  2018-04-12 12:31     ` Lars Ingebrigtsen
  2018-04-12 12:58     ` Lars Ingebrigtsen
  0 siblings, 2 replies; 4+ messages in thread
From: Robert Pluim @ 2018-04-12  8:30 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 27857, 積丹尼 Dan Jacobson

Lars Ingebrigtsen <larsi@gnus.org> writes:

> 積丹尼 Dan Jacobson <jidanni@jidanni.org> writes:
>
>> User receives a mail containing
>>
>>    Cc: "tagging@openstreetmap.org" <tagging@openstreetmap.org>
>>
>> User types
>>  S W runs the command gnus-article-wide-reply-with-original
>>  S W runs the command gnus-summary-wide-reply-with-original
>>
>> which puts the same silly line into the proposed response.
>>
>> Wouldn't it look better just   Cc: tagging@openstreetmap.org ?
>
> Hm...  it would.  Does anybody object to me adding this (and defaulting
> the feature to "on")?

No objection from me, thereʼs zero information loss. Vigorous
applause, more like.

> The proposal is to remove the "name" part of an address in To/Cc etc
> headers if and only if it is identical to the "address" part of an
> address.

Yes. From memory, various versions of outlook were pretty good (bad?)
at generating this kind of header, sometimes with a liberal sprinkling
of ' and/or "

Robert





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#27857: add gnus-mail-avoid-redundancy
  2018-04-12  8:30   ` Robert Pluim
@ 2018-04-12 12:31     ` Lars Ingebrigtsen
  2018-04-12 12:58     ` Lars Ingebrigtsen
  1 sibling, 0 replies; 4+ messages in thread
From: Lars Ingebrigtsen @ 2018-04-12 12:31 UTC (permalink / raw)
  To: 積丹尼 Dan Jacobson; +Cc: 27857

I see that there's already kinda-sorta this feature in Message already,
but it only reacts to an explicit list of addresses.  And it's an
interactive command.  But this means that somebody was annoyed enough a
long time ago by the ugliness that a solution was attempted.  :-)

(defcustom message-recipients-without-full-name
  (list "ding@gnus.org"
	"bugs@gnus.org"
	"emacs-devel@gnu.org"
	"emacs-pretest-bug@gnu.org"
	"bug-gnu-emacs@gnu.org")
  "Mail addresses that have no full name.
Used in `message-simplify-recipients'."
  ;; Maybe the addresses could be extracted from
  ;; `gnus-parameter-to-list-alist'?
  :type '(choice (const :tag "None" nil)
		 (repeat string))
  :version "23.1" ;; No Gnus
  :group 'message-headers)

(defun message-simplify-recipients ()
  (interactive)
  (dolist (hdr '("Cc" "To"))
    (message-replace-header
     hdr
     (mapconcat
      (lambda (addrcomp)
	(if (and message-recipients-without-full-name
		 (string-match
		  (regexp-opt message-recipients-without-full-name)
		  (cadr addrcomp)))
	    (cadr addrcomp)
	  (if (car addrcomp)
	      (message-make-from (car addrcomp) (cadr addrcomp))
	    (cadr addrcomp))))
      (when (message-fetch-field hdr)
	(mail-extract-address-components
	 (message-fetch-field hdr) t))
      ", "))))

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no






^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#27857: add gnus-mail-avoid-redundancy
  2018-04-12  8:30   ` Robert Pluim
  2018-04-12 12:31     ` Lars Ingebrigtsen
@ 2018-04-12 12:58     ` Lars Ingebrigtsen
  1 sibling, 0 replies; 4+ messages in thread
From: Lars Ingebrigtsen @ 2018-04-12 12:58 UTC (permalink / raw)
  To: 27857; +Cc: 積丹尼 Dan Jacobson

Robert Pluim <rpluim@gmail.com> writes:

> No objection from me, thereʼs zero information loss. Vigorous
> applause, more like.

OK; I've now implemented this.  But without a way to switch it off,
because I can't really imagine anybody wanting to...

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-04-12 12:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <87inid9vi6.fsf@jidanni.org>
2018-04-11 21:55 ` bug#27857: add gnus-mail-avoid-redundancy Lars Ingebrigtsen
2018-04-12  8:30   ` Robert Pluim
2018-04-12 12:31     ` Lars Ingebrigtsen
2018-04-12 12:58     ` Lars Ingebrigtsen

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).