Bug 316944 - Allow pasting URLs as text by default
Summary: Allow pasting URLs as text by default
Status: RESOLVED INTENTIONAL
Alias: None
Product: kmail2
Classification: Applications
Component: composer (show other bugs)
Version: 4.10.1
Platform: Ubuntu Linux
: NOR wishlist
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-18 05:33 UTC by Lastique
Modified: 2013-03-21 09:10 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lastique 2013-03-18 05:33:03 UTC
When I compose an email and I paste an URL into the message, a context window pops up so that I have to select whether I want to paste it as text or as attachment. This is _very_ annoying as I've never had a need to paste it as attachment yet I have to choose to paste it as text every time.

I couldn't find any parameter in kmail settings to change that behavior. Changing keyboard shortcuts to "Paste Without Formatting" on Shift+Ins (the combination I'm using to paste) doesn't help as it keeps popping up this context window. This is probably a bug of its own since selecting "Paste Without Formatting" in the composer options does what I want and, as I understand, the keyboard shortcut assigned to it should do the same.

Please, provide an option in the settings to allow to select the default pasting behavior. Or simply make it paste URLs as text without this context menu. If I want to attach a file I will probably select Attach in the menu or something like that anyway.


Reproducible: Always

Steps to Reproduce:
1. Start the composer by creating a new email.
2. Copy an URL (e.g. from a browser).
3. Paste it to the message body with Shift+Ins.
Actual Results:  
A context menu pops up offering to choose pasting behavior.

Expected Results:  
I'd like to remove this menu and always paste URLs as text.
Comment 1 Laurent Montel 2013-03-18 06:36:59 UTC
I don't understand how you can have this bug.
I dnd I paste directly as textr
I close "paste" I paste directly as text etc.

url is stored in paste element as text so I don't understand how do you have this problem.

give me an example as url that you try to paste.

how do you do ? (to select url in firefox) etc.
Comment 2 Lastique 2013-03-18 07:10:38 UTC
This basically shows with any URL I try to paste into composer. For example, I just now copied this bug's URL in Chrome address box (Ctrl+Ins), created a new email in kmail and pasted the URL to the message body and got the described popup menu.

Interestingly though, if I try to copy an URL in Firefox address box, I can paste it as text without problem. It is possible that Chrome puts the URL to clipboard differently than Firefox.
Comment 3 Lastique 2013-03-18 07:14:52 UTC
BTW, my Chrome version is 25.0.1364.172.
Comment 4 Laurent Montel 2013-03-18 08:23:16 UTC
yes chromium store html page too.
So it's normal if it store two elements to ask you if you want to paste as text or object.
Comment 5 Lastique 2013-03-18 09:26:48 UTC
I don't really understand what you mean. Is it that the URL has multiple versions in clipboard when copied by Chrome/Chromium? Is there a plain text version?

Letting the user decide is not very user-friendly, even if it seems logical from the implementation standpoint. I'm just copying an URL, after all, and I have no idea how Chrome puts it into the clipboard. Other applications (e.g. Kate) are able to paste it as plain text without me choosing it, and I'd like kmail to follow that behavior.

Adding an option in kmail settings to select the default paste behavior seems like a good compromise to eliminate this problem, IMHO. A more elaborate solution would be to paste the plain text version into the plain text email and html version into the html email, but I'm not requesting this; just always pasting the plain text is enough for me.

I'm reopening this bug and asking you to reconsider.
Comment 6 Laurent Montel 2013-03-18 10:41:04 UTC
no it's store url as text
and html file in clipboard.
so normal that it asks what you want to paste.
Comment 7 Lastique 2013-03-21 07:15:34 UTC
In that case, why reassigning the keyboard shortcut doesn't work? "Paste Without Formatting" should paste the URL without asking, right?
Comment 8 Laurent Montel 2013-03-21 07:57:05 UTC
it's right we can't assign CTRL+ins but we can use other shortcut
so it's a bug in qtextedit or other.

Will investigate but by default it's assign to paste as second shortcut.
Don't know why we can't reassign.
Comment 9 Lastique 2013-03-21 08:25:44 UTC
Should I create a separate bug for this or reopen this one?
Comment 10 Laurent Montel 2013-03-21 09:10:20 UTC
an other bug report