The default bug view has changed. See this FAQ.

name should be included with email address when copying from header menu

RESOLVED FIXED in Thunderbird 45.0

Status

Thunderbird
Message Reader UI
RESOLVED FIXED
13 years ago
a year ago

People

(Reporter: Aaron Lawrence, Assigned: Jorg K (GMT+1))

Tracking

Trunk
Thunderbird 45.0
Bug Flags:
wanted-thunderbird3 +

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [relnote-thunderbird])

Attachments

(1 attachment, 2 obsolete attachments)

(Reporter)

Description

13 years ago
When reading an email message, there is no direct way to copy the name part of
From: (or any other header field). You can copy the email address from the popup
menu, but that only copies the actual address, not the name.

For example:

From: Billy Bob Johns the Second <bill@johns.org>
Right mouse and "Copy Email Address" will copy bill@johns.org to the clipboard.

Several solutions suggest themselves. The most obvious is to change "Copy Email
Address" to copy the whole thing e.g. "Billy Bob Johns the Second
<bill@johns.org>". 

Secondly, could add a different menu item "Copy Name"

Third, more generic, allow the email address widget to be selected and copied
from as a normal label. 

Fourth, my preference, but lots of work, the header area should just be another
HTML display, so the whole thing can be copied as desired.
(Reporter)

Comment 1

13 years ago
I suppose I should point out, there are workarounds.
1) Click reply. The name and email is there in plainish text.
2) View source. Ditto.
Pretty un-obvious though.
Product: Browser → Seamonkey

Updated

12 years ago
Assignee: sspitzer → mail
(Reporter)

Comment 2

9 years ago
Changing to thunderbird where the same thing applies...
Assignee: mail → nobody
Component: MailNews: Main Mail Window → Mail Window Front End
Product: Mozilla Application Suite → Thunderbird
QA Contact: esther → front-end

Comment 3

8 years ago
Not having the ability to copy any text in the FROM, TO & CC lines seem to me as really silly as we can easily copy anything in the SUBJECT or DATE. Having mixed functionality is really confusing if there is not good reason for it.

I know there are workarounds but all of those ignore the fact that people actually might want to copy and paste a name into a different window.

This applies to all operating system releases.
OS: Windows 2000 → All
I'm not excited about a separate menu for copy email address / copy name.  To me it seems like we should be copying the whole name + email when you choose copy email address.  I wonder what the use cases are that supported only wanting the email address copied without the name.
Hardware: x86 → All

Comment 5

8 years ago
If the question is simply about what is copied with the menu bar option of 'Copy email address' then you might want to take a look at 

https://bugzilla.mozilla.org/show_bug.cgi?id=99997

I'd like to steer this bug to simply being able to highlight the text as shown in the message TO,CC, FROM & REPLY-TO sections, right click and copy just like the Subject: line.
-retitling-  We're just going to do the right thing and include the name when copying the email address.  There's no need to change the menu item name, copy email address should include all the details.  The people who want just the address and not the name can trim it out after they paste it.
Component: Mail Window Front End → Message Reader UI
Flags: wanted-thunderbird3+
Keywords: polish
QA Contact: front-end → message-reader
Summary: Unable to copy NAMES when reading email → name should be included with email address when copying from header menu

Comment 7

7 years ago
(In reply to comment #0)
> Third, more generic, allow the email address widget to be selected and
> copied from as a normal label. 
> 
> Fourth, my preference, but lots of work, the header area should just be
> another HTML display, so the whole thing can be copied as desired.

Cross reference: bug #327621 should cover these two cases. I guess the user doesn't care too much whether it's a label or HTML, as long as it looks nice and is selectable and the selection can be copied.

Updated

7 years ago
Duplicate of this bug: 557813

Comment 9

7 years ago
(In reply to comment #6)
> We're just going to do the right thing and include the name when
> copying the email address.

To be clear, that's fine behavior for the "Copy Email Address" context menu item, but I hope you also fix bug 327621 so ordinary wipe-through select, Ctrl+C, Edit > Copy menu item, etc. all have the expected WYSIWYG behavior in the From header.
Duplicate of this bug: 606991
Created attachment 488095 [details] [diff] [review]
grabs the entire email address plus name instead of just the address

That was not hard to write at all.

I'm not sure if there are any tests for the CopyEmailNewsAddress() function which might mean that I have to write a new test.  I could probably get away with modifying an existing test but my search is coming up empty for existing ones.

Anyway, it would be trivial to write an add-on which makes this happen.  Just overlay the message compose window and replace the CopyEmailNewsAddress function with a function that does what I just did and you're done.
Assignee: nobody → clarkbw
Status: NEW → ASSIGNED
The only issue I can see with changing the CopyEmailNewsAddress function is when you *want* just the email address.

The most common case I could think of at the moment is if you're wanting to forward someone's address to someone else - you don't want to necessarily include their full name as well.

Comment 13

7 years ago
Maybe it would be worth having one entry for the address and one for the name+address? News does something similar: there's "Copy Newsgroup Name" and "Copy Newsgroup URL".
I shouldn't be the assignee for these bugs.  Filter against clarkbfilter to delete all these from your emails.
Assignee: clarkbw → nobody

Updated

6 years ago
Duplicate of this bug: 654753

Comment 16

6 years ago
(In reply to comment #13)
> Maybe it would be worth having one entry for the address and one for the
> name+address? News does something similar: there's "Copy Newsgroup Name" and
> "Copy Newsgroup URL".

This corresponds to the suggestion in the bug I've just duped to here:

(Quoting bug 654753)
> If I right-click on an email address in the header area of an email, I have
> "Copy E-Mail".
> Could we additionally have "Copy E-Mail with assigned Name"?

While in theory it is possible to put multiple "flavors" of the same data onto the clipboard, this might be hard to do here as both variants are "text/plain" and may also not be easy to distinguish/pick on the receiving/pasted-to end.

Switching status back to NEW per comment #14.
Status: ASSIGNED → NEW
I filed a detailed suggestion for a minimally intrusive dualbutton UI (like the dual Print menu from Firefox main button) in SM Bug 99997 Comment 34.
See Also: → bug 99997

Comment 18

5 years ago
Please compare to solution, given by ThunderPlunger Add-on.

Comment 19

5 years ago
This bug is over 8 years old and at least one patch has been proposed.
I would suggest having another context menu item "Copy name and e-mail address" that grabs both in the form of "John Smith <johnny@smith.com>" - it is one of the more annoying missing features in Thunderbird.  Why is this not built in yet?
(In reply to WBT from comment #19)
> This bug is over 8 years old and at least one patch has been proposed.
> I would suggest having another context menu item "Copy name and e-mail
> address" that grabs both in the form of "John Smith <johnny@smith.com>" - it
> is one of the more annoying missing features in Thunderbird.  Why is this
> not built in yet?

Because no-one has taken the patch attached to this bug, and tried to move it forwards.  Perhaps you can be that person, WBT!  For what it's worth, I would far rather see us just copy the name and email address, instead of adding yet another option.

Thanks,
Blake.

Comment 21

5 years ago
There are some uses for copying the e-mail address only. 
For example, it would help with creating mailto links (especially if Bug 793412 were also completed).  Personally, I see more often a use case for copying the name only - where I want to quote a person's name but it's very long and not easy to spell; copy-paste would be better.  I don't think I'd mind deleting the e-mail address portion of a copy if I could get both in one copy option; that would certainly be better than the current state.  

Also, I'm not qualified as a reviewer and don't really know the inner workings of Mozilla Messaging enough to identify who is the right reviewer, so I can't really be the one to get this patch up and into code.

Comment 22

5 years ago
Surely the simplest solution is just to make all the headers select and copyable, instead of the inconsistent mess we have now?

Comment 23

5 years ago
(In reply to Roger Lynn from comment #22)
> Surely the simplest solution is just to make all the headers select and
> copyable, instead of the inconsistent mess we have now?

That is the most elegant solution and the one I'd most favor.
It may not be the simplest in terms of code changes, but hopefully it's doable in a reasonable timeframe.
(In reply to WBT from comment #21)
> Also, I'm not qualified as a reviewer and don't really know the inner
> workings of Mozilla Messaging enough to identify who is the right reviewer,
> so I can't really be the one to get this patch up and into code.

Ludovic (who is already cc-ed) should be able to help you with that part.  Would you commit to fixing any problems the reviewers find in the patches?  (If so, I'll assign the bug to you…)

Thanks,
Blake.

Comment 25

5 years ago
I think it'd be great to help.  However, there's a pretty big "barrier to entry" in terms of getting the code repository checked out and build infrastructure set up and finding my way around the code base.  With all the other things I'm doing at present, I can't take THAT big chunk of time to get started, even if this particular bug seems like it might be easy to fix (it's just easy once you get over that mountain).  

Thanks for the invitation,
WBT
Duplicate of this bug: 1149439
In reply to Magnus, Bug 167010 Comment 54, wrt this bug:

> I think the current address only should stay, though we should figure something out for "full mailbox".

+1.

As discussion here and on the SM duplicate bug 99997 has shown, both 'email-only' and 'full email address with display name' cover everyday scenarios which are important for many users.
I think there's no doubt we'll want to present both flavors separately in the primary UI.

Somewhat going back on my dual menu proposal of Bug 99997 Comment 34, maybe the most efficient and easy solution is to have two separate context menus directly following each other:

Copy Email Address              (will copy <foo@bar.com)
Copy Name and Email Address     (will copy Peter Foo <foo@bar.com)

Plain vanilla. I think that describes it quite precisely and tersely.
(Note that the full Name and Email Address is already displayed at the top of the context menu, providing the necessary context).

Richard?
Flags: needinfo?(richard.marti)
I'm okay with two entries and also the label could be used as you propose.
Flags: needinfo?(richard.marti)
I'd lean towards "Copy Full Address" to keep things brief, but perhaps that's not clear enough.
Oh, and bonus points if you hide (or disable) that item when the address has no display name. :)
(In reply to Jim Porter (:squib) from comment #30)
> Oh, and bonus points if you hide (or disable) that item when the address has
> no display name. :)

Er, maybe that's a bad idea, actually. Then it would be harder to use a single keyboard shortcut to copy the full address.
(Assignee)

Comment 32

a year ago
Created attachment 8696354 [details] [diff] [review]
Proposed solution (v1).

Easy implementation to add an option to copy name and e-mail address as per comment #27 and comment #28. Great preparatory work by Thomas so squash this terrible nuisance not being able to copy the Name.

This should be an easy review. Aceman, can you do this quickly, so it can land soon. Thanks!
Assignee: nobody → mozilla
Attachment #488095 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #8696354 - Flags: ui-review?(richard.marti)
Attachment #8696354 - Flags: review?(acelists)
Comment on attachment 8696354 [details] [diff] [review]
Proposed solution (v1).

Review of attachment 8696354 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good, thank you.
Attachment #8696354 - Flags: ui-review?(richard.marti) → ui-review+

Comment 34

a year ago
Comment on attachment 8696354 [details] [diff] [review]
Proposed solution (v1).

Review of attachment 8696354 [details] [diff] [review]:
-----------------------------------------------------------------

::: mail/locales/en-US/chrome/messenger/messenger.dtd
@@ +854,5 @@
>  <!ENTITY SendMessageTo.accesskey "s">
>  <!ENTITY CopyEmailAddress.label "Copy Email Address">
>  <!ENTITY CopyEmailAddress.accesskey "C">
> +<!ENTITY CopyNameAndEmailAddress.label "Copy Name and Email Address">
> +<!ENTITY CopyNameAndEmailAddress.accesskey "N">

won't this collide with SubscribeToNewsgroup.accesskey?

Comment 35

a year ago
In addition / alternatively to this it could really be a "Copy Cc-Field" (if you're over a Cc address), that would copy all the Cc address nodes with full names. 

The use case for copying is likely often that you want them all anyway. But if you prefer that can be left for another bug.
(Assignee)

Comment 36

a year ago
(In reply to Magnus Melin from comment #34)
> won't this collide with SubscribeToNewsgroup.accesskey?
No, as far as I can see.

Newsgroup is in menupopup id="newsgroupPopup"
https://dxr.mozilla.org/comm-central/source/mail/base/content/messenger.xul#168
My new entry is in menupopup id="emailAddressPopup"
https://dxr.mozilla.org/comm-central/source/mail/base/content/mailWindowOverlay.xul#2142

> that would copy all the Cc address nodes with full names.
Actually, I don't see a use case for this. I'm interested in copying *one* person only to paste it's name into a text.
(Assignee)

Comment 37

a year ago
s/it's/his\/her/ ;-)

Comment 38

a year ago
(In reply to Jorg K (GMT+1) from comment #36)
> > that would copy all the Cc address nodes with full names.
That could be an interesting feature too, also for the To address label.

> Actually, I don't see a use case for this. I'm interested in copying *one*
> person only to paste it's name into a text.
... also into the To or Cc field of a new message I'm composing.

Comment 39

a year ago
Isn't this a duplicate of the older bug 99997 ?
(Assignee)

Comment 40

a year ago
(In reply to Ulf Zibis from comment #39)
> Isn't this a duplicate of the older bug 99997 ?
That's the S/M version.

Comment 41

a year ago
I don't know if I'm too late to the discussion, but I'd really like to just see the address fields function like the Subject field, where I can highlight either the entire field or any sub-portion thereof and use CTRL+C to copy (e.g. just a hard-to-spell first or last name that I intend to paste into the body of an e-mail when referring to the person) and copy just that part of it.
(Assignee)

Comment 42

a year ago
That's bug 167010 ;-)

Comment 43

a year ago
Comment on attachment 8696354 [details] [diff] [review]
Proposed solution (v1).

Review of attachment 8696354 [details] [diff] [review]:
-----------------------------------------------------------------

This works for me. Just fix the nits below. Thanks

::: mail/base/content/msgHdrViewOverlay.js
@@ +1628,5 @@
>   *
>   * @param addressNode  a node which has an "emailAddress" or "newsgroup"
>   *                     attribute
>   */
> +function CopyEmailNewsAddress(addressNode, includeName = false)

Please add documentation for the new argument. Also please use the aName argument name convention.
Attachment #8696354 - Flags: review?(acelists) → review+
(Assignee)

Comment 44

a year ago
Created attachment 8696557 [details] [diff] [review]
Proposed solution (v2).

Carrying forward Aceman's r+.
Carrying forward Richard's ui-r+.
Fixed nits. Thanks for the quick review.
Attachment #8696354 - Attachment is obsolete: true
Attachment #8696557 - Flags: ui-review+
Attachment #8696557 - Flags: review+
(Assignee)

Updated

a year ago
Keywords: polish → checkin-needed

Comment 45

a year ago
https://hg.mozilla.org/comm-central/rev/ab5577d1733d
Status: ASSIGNED → RESOLVED
Last Resolved: a year ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 45.0

Updated

a year ago
Whiteboard: [relnote-thunderbird]
You need to log in before you can comment on or make changes to this bug.