BUG: Task Comments, Simple Text mode, cut-n-paste errors

130 views
Skip to first unread message

Jonathan G.

unread,
Oct 5, 2015, 7:20:14 PM10/5/15
to abstractspoon-t...@googlegroups.com
From the git issues page:  (https://github.com/abstractspoon/ToDoList_Wiki/issues/33#issuecomment-145440676)

##Background:

I use the "Task Comments" feature extensively, and have been vexed my this issue for quite some time.
I use "Simple Text" mode, and anything I cut-n-paste into this area is intended to be text-only, no fonts or formats and hyperlinks, etc..

##The problem is this:

Most of the text I cut-n-paste does come from other places that are rich-text, or HTML, etc.. And instead of stripping the format, like Notepad or Sublime would do, I get weird little artifacts, like "( about:blank )" instead of the text I expect.

##Desired outcome:

I would like when cut-n-paste'ing into the Task Comment, while in Simple Text mode, for the pure text to remain, and all formatting and artifacts be removed. I don't need links or fonts or pictures in Simple Text mode, and I don't believe anyone else does either.

##Example:

My company uses an instant messenger program (MS Office Communicator 2007R2), and my co-workers and I frequently resolve issues using this program. I would like to cut-n-paste snippets of text from there to ToDoList, so I can reference it. 
Instead, I get this ( about:blank ), and nothing else. This is one of many programs that leave these artifacts and/or lose text. 
So, I usually Ctrl+V, Ctrl+A, Ctrl+X in Notepad to get only the text (Notepad & Sublime paste the text only) and then paste the output from Notepad into ToDoList, which will now work as intend, with only the text appearing.



.dan.g.

unread,
Oct 6, 2015, 2:06:13 AM10/6/15
to ToDoList (AbstractSpoon) Support
Hi Jonathan

Can you reproduce this issue pasting from a program other than MS Office Communicator 2007R2, or is it restricted to that one app?

.dan.g.

Martin Lemburg

unread,
Oct 7, 2015, 6:08:14 AM10/7/15
to ToDoList (AbstractSpoon) Support
Hi,

I tested with our Communicator 2007R2 installation and ... yes <Ctrl-v> inserts "( about:blank )".

But ... <Ctrl-Insert> inserts the correct and expected plain text!

So, what's the difference between <Ctrl-V> and <Ctrl-Insert>?

Kind regards,

Martin

.dan.g.

unread,
Oct 7, 2015, 8:16:04 PM10/7/15
to ToDoList (AbstractSpoon) Support
>> But ... <Ctrl-Insert> inserts the correct and expected plain text!

That's good news!

For the record, <Ctrl+Insert> is not explicitly handled within TDL and as expected in my tests it does nothing when pasting plain text on my machine.

This leads to two thoughts:

1) Communicator 2007R2 globally hooks <Ctrl+Insert> to do its thing.
2) 'Text' copied to the Windows clipboard is not actually copied to the clipboard but produced by Communicator on demand.

If you could run something like Michael Dunn's ClipSpy we might get a better idea about these possibilities.

Dan

.dan.g.

unread,
Oct 7, 2015, 9:53:33 PM10/7/15
to ToDoList (AbstractSpoon) Support
See Martin Lemburg's <Ctrl+Insert> comments below.


On Tuesday, 6 October 2015 10:20:14 UTC+11, Jonathan G. wrote:

Martin Lemburg

unread,
Oct 8, 2015, 7:57:47 AM10/8/15
to ToDoList (AbstractSpoon) Support
Hi Dan,

here two screen shots of the "FreeClipboardViewer" with content copied from a chat via Communicator 2007R2:



As you can see, the pasted part via <Ctrl+V> is the "msSourceUrl"!

But, why is ToDoList pasting "msSourceUrl" instead of one of the text clipboard types?

Best regards,

Martin

Martin Lemburg

unread,
Oct 8, 2015, 8:10:05 AM10/8/15
to ToDoList (AbstractSpoon) Support
Hi Dan,

some additional thoughts or questions.

Does your application defines implicitly ID_EDIT_PASTE? Or do you use a kind of framework defining <Ctrl-Insert> with ID_EDIT_PASTE, while your <Ctrl+V> uses an own, specific command ID?
If so, than the application framework could be responsible for handling <Ctrl+Insert> and pasting the "correct" content type from the clipboard!

Currently there is now defined "global" hotkey <Ctrl+Insert> on my system:


So, I think, ToDoList handles this accelerator implicitly!

Best regards,

Martin

Am Donnerstag, 8. Oktober 2015 02:16:04 UTC+2 schrieb .dan.g.:
A>> But ... <Ctrl-Insert> inserts the correct and expected plain text!

.dan.g.

unread,
Oct 8, 2015, 8:27:15 PM10/8/15
to ToDoList (AbstractSpoon) Support
Thx Martin, I shall definitely be investigating the possible implicit handling of Ctrl+Insert.

When you have time could you still send me your log file (-g switch) as this tells me what OS dlls get loaded with TDL and can help with my investigations?

Rgds

Dan

.dan.g.

unread,
Oct 8, 2015, 8:30:40 PM10/8/15
to ToDoList (AbstractSpoon) Support
@ Tony: Martin Lemburg has discovered that <Ctrl+Insert> solves the problem when pasting text from MS Office Communicator 2007R2 so this is valuable workaround while I investigate further.


On Tuesday, 6 October 2015 10:20:14 UTC+11, Jonathan G. wrote:

Martin Lemburg

unread,
Oct 9, 2015, 7:01:20 AM10/9/15
to ToDoList (AbstractSpoon) Support
Hi Dan,

here attached the log file from starting ToDoList.

Best regards,

Martin
ToDoList.log

Tony G

unread,
Oct 10, 2015, 4:23:05 PM10/10/15
to ToDoList (AbstractSpoon) Support
got it

.dan.g.

unread,
Oct 14, 2015, 12:00:31 AM10/14/15
to ToDoList (AbstractSpoon) Support
Hi Martin.

I've been trying to install Office Communicator on a VM but ultimately without success (I'm no network server guru).

Could you therefore use Free Clipboard Viewer to save some typical (but not confidential) text out of Communicator and send it to me pls?

This will allow me to at least debug how that content gets processed by TDL.

Many thx.

.dan.g.

unread,
Oct 14, 2015, 12:03:27 AM10/14/15
to ToDoList (AbstractSpoon) Support
ps. I've only just noticed that your log file is dated 12/02/15. Have you got something more recent?

Martin Lemburg

unread,
Oct 14, 2015, 5:23:54 AM10/14/15
to ToDoList (AbstractSpoon) Support
Hi Dan,


Now open Internet Explorer, visit a web page, then copy a mix of text and graphics to the clipboard. You still get plain and Unicode text copies, but this time there are Rich Text Format and HTML versions, with embedded graphics. An "msSourceUrl" gives you the address of the copied page, and again you can view any of these by double-clicking, or by choosing a specific option from the right-click menu ("View as binary", "View as text", and so on).

 So - copying from the Internet Explorer gives the same resoult with pasting in ToDoList using <Ctrl,v>.

I attached two FreeClipboardViewer files. One from the Communicator, the other from the Internet Explorer.
Additionally I attached the requested log file from ToDoList, which was "recorded" today!!!

And as bonus ... ;) ... I attached the log file from Spy++ showing that something in ToDoList ask several times with "EM_CANPASTE" if a specific format can be pasted.
At least one formats can be pasted 49327.

I hope I could have helped a bit!

Best regards,

Martin
ToDoList.log
MSIEPageContent.cl7
MSOC2007R2.cl7
Spy++-ToDoList-Comment-Paste-From_IE.log

Martin Lemburg

unread,
Oct 14, 2015, 5:32:56 AM10/14/15
to ToDoList (AbstractSpoon) Support
Here the attached different Spy++ log for pressing <Shift,Insert>!


Am Mittwoch, 14. Oktober 2015 06:00:31 UTC+2 schrieb .dan.g.:
Spy++-ToDoList-Comment-Paste-From_IE_Shift+Insert.log

.dan.g.

unread,
Oct 14, 2015, 7:45:19 PM10/14/15
to ToDoList (AbstractSpoon) Support
Thx Martin, I can reproduce the issue now and should have a fix for 7.0.6.

.dan.g.

unread,
Oct 20, 2015, 7:35:41 PM10/20/15
to ToDoList (AbstractSpoon) Support
Hi Martin

Can you see if this is adequately fixed in 7.0.6 pls?

Dan

Martin Lemburg

unread,
Oct 22, 2015, 3:59:28 AM10/22/15
to abstractspoon-t...@googlegroups.com
Good morning Dan,

sorry for the delayed answer.

Yes, it's fixed in the way, that the contents of the clipboard appear in the comment control.

But it's more than just the clipboard text content, and there is still quiet a difference to <Ctrl,Insert>!

Screenshot 1 - the original IExplore content:


Screenshot 1 - pasted using <Ctrl,Insert>:



Screenshot 2 - pasted using <Ctrl,v>:



The "msSourceUrl" clipboard format content is added, too! And the formatting is lost, while the correct clipboard format to keep the formatting is available, isn't it?

Best regards,

Martin

.dan.g.

unread,
Oct 27, 2015, 9:21:24 PM10/27/15
to ToDoList (AbstractSpoon) Support
Hi Martin

Can you tell me if the formatting is restored when pasting HTML content?

ps. I still can't make Ctrl+Insert do anything so I'm concentrating solely on Ctrl+V for now.

Dan

Martin Lemburg

unread,
Oct 28, 2015, 5:06:36 AM10/28/15
to abstractspoon-t...@googlegroups.com, abstractspoon-t...@googlegroups.com
Hi Dan,

Out of order - broken left wrist, aster a bicycle accident.

So, this has to wait or someone else has to help you.

Just a suggestion, why not re-posting the CTRL-Insert event to your rich edit control?
A SendMessage with WM_KEYDOWN for CTRL-insert could eventually help!

Best regards,

Martin Lemburg
Berlin / Deutschland

martin....@gmx.net
http://about.me/Martin0815

------- Original message -------
> From: .dan.g. <daniel...@gmail.com>
> To: abstractspoon-t...@googlegroups.com
> Sent: 28.10.'15, 2:21
>
> Hi Martin
>
> Can you tell me if the formatting is restored when pasting HTML content?
>
> ps. I still can't make Ctrl+Insert do anything so I'm concentrating solely on Ctrl+V for now.
>
> Dan
>
> On Thursday, 22 October 2015 18:59:28 UTC+11, Martin Lemburg wrote:
>> Good morning Dan,
>>
>> sorry for the delayed answer.
>>
>> Yes, it's fixed in the way, that the contents of the clipboard appear in the comment control.
>>
>> But it's more than just the clipboard text content, and there is still quiet a difference to <Ctrl,Insert>!
>>
>> Screenshot 1 - the original IExplore content:
>>
>>
>>
>> Screenshot 1 - pasted using <Ctrl,Insert>:
>>
>>
>>
>>
>>
>> Screenshot 2 - pasted using <Ctrl,v>:
>>
>>
>>
>>
>>
> --
> Download Latest Version: http://abstractspoon.pbworks.com/f/todolist_exe.zip
> Wiki and other resources: https://github.com/abstractspoon/ToDoList_Wiki/wiki
> ---
> You received this message because you are subscribed to a topic in the Google Groups "ToDoList (AbstractSpoon) Support" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/abstractspoon-todolist-support/xRYqogZ2x64/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to abstractspoon-todolis...@googlegroups.com.
> To post to this group, send email to abstractspoon-t...@googlegroups.com.
> Visit this group at http://groups.google.com/group/abstractspoon-todolist-support.
> To view this discussion on the web, visit https://groups.google.com/d/msgid/abstractspoon-todolist-support/28ae3b08-515e-4933-a024-5abdacc945bb%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

.dan.g.

unread,
Oct 28, 2015, 8:48:16 PM10/28/15
to ToDoList (AbstractSpoon) Support
>> Out of order - broken left wrist, aster a bicycle accident. 

I hope it heals quickly.

ps. 'Right-click > Paste' should mimic the same behaviour as 'Ctrl+V' 


On Wednesday, 28 October 2015 20:06:36 UTC+11, Martin Lemburg wrote:
Hi Dan,

.dan.g.

unread,
Oct 29, 2015, 3:05:31 AM10/29/15
to ToDoList (AbstractSpoon) Support
Hi Martin

I've just been reading about richedit keyboard shortcuts and it says 'Shift+Insert' is an alias for 'Ctrl+V', rather than 'Ctrl+Insert' as you first wrote.

I've tested it and it is true, so I'm just following up to ask if that is what you originally meant: Shift+Insert?

Either way, I'll add support for Shift+Insert in the next update.

Dan


On Wednesday, 28 October 2015 20:06:36 UTC+11, Martin Lemburg wrote:
Hi Dan,

Martin Lemburg

unread,
Oct 29, 2015, 4:50:23 AM10/29/15
to abstractspoon-t...@googlegroups.com, abstractspoon-t...@googlegroups.com
Hi Dan,

yes, I hope too!

Did you associate your ctrl-V with the resource ID ID_EDIT_PASTE?
Wasn't that ID a "standard" ID?

One thought, why handle at all - for the edit ctrl?
The edit ctrl can and will handle the standard paste ID.
If the ctrl-insert command ID, isn't ID_EDIT_PASTE, than Spy++ may help on a debug build to find the used command ID.

If it can't handle ctrl-v, than associate it with the command ID the edit ctrl uses. And change the context menu item to have the same command ID.

Now you have to handle this command ID at those places, not related to the comment edit ctrl.

If you have and will keep your own resource ID for the accelerator or the context menu, than try to to use SendMessage for the WM_COMMAND event with the paste command ID of the edit ctrl to the edit ctrl.

Does all the crap above sound reasonable, or is the medicine against pain mashing my head turn round?

Basic thought - no own event handing, if another one can handle it! No re-invention, no mimicry.

So to summarize my thoughts:
1. ID_EDIT_PASTE should few handled by all edit controls, no later if simple or richtext ones
2. Missing accelerators for pasting should be defined with ID_EDIT_PASTE..
3. If an own command ID is needed, than delegating to ID_EDIT_PASTE via SendMessage and WM_COMMAND should work

I how the pain stoppers didn't prevent some understandable words.

Best regards,

Martin Lemburg
Berlin / Germany
> --
> Download Latest Version: http://abstractspoon.pbworks.com/f/todolist_exe.zip
> Wiki and other resources: https://github.com/abstractspoon/ToDoList_Wiki/wiki
> ---
> You received this message because you are subscribed to a topic in the Google Groups "ToDoList (AbstractSpoon) Support" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/abstractspoon-todolist-support/xRYqogZ2x64/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to abstractspoon-todolis...@googlegroups.com.
> To post to this group, send email to abstractspoon-t...@googlegroups.com.
> Visit this group at http://groups.google.com/group/abstractspoon-todolist-support.
> To view this discussion on the web, visit https://groups.google.com/d/msgid/abstractspoon-todolist-support/49420831-de59-416e-aa55-fd090841f959%40googlegroups.com.

Martin Lemburg

unread,
Oct 29, 2015, 5:53:32 AM10/29/15
to abstractspoon-t...@googlegroups.com, abstractspoon-t...@googlegroups.com
Hi Dan,

Sorry, yes I meant shift-insert.

Why do you need your special handling for pasting?
Why not letting the in-place/RichEdit controls do their work on receiving
the command ID ID_EDIT_PASTE?

Best regards,

Martin Lemburg
Berlin / Germany
> --
> Download Latest Version:
> http://abstractspoon.pbworks.com/f/todolist_exe.zip
> Wiki and other resources:
> https://github.com/abstractspoon/ToDoList_Wiki/wiki
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "ToDoList (AbstractSpoon) Support" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/abstractspoon-todolist-support/xRYqogZ2x6
> 4/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> abstractspoon-todolis...@googlegroups.com.
> To post to this group, send email to
> abstractspoon-t...@googlegroups.com.
> Visit this group at
> http://groups.google.com/group/abstractspoon-todolist-support.
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/abstractspoon-todolist-support/5638d376-1
> b07-4852-93f7-a278060db71e%40googlegroups.com.

.dan.g.

unread,
Oct 29, 2015, 8:06:01 PM10/29/15
to ToDoList (AbstractSpoon) Support
>> Why not letting the in-place/RichEdit controls do their work on receiving the command ID ID_EDIT_PASTE? 

1. RichEdit does not support pasting HTML, and only IE copies HTML as RTF to the clipboard.
2. I need to support 'Paste Simple' in the rich text comments which RichEdit can't do by itself.
3. I need to display a dialog box when pasting files in the rich text comments

Dan

On Thursday, 29 October 2015 20:53:32 UTC+11, Martin Lemburg wrote:
Hi Dan,

Tony G

unread,
Dec 24, 2015, 4:41:57 PM12/24/15
to ToDoList (AbstractSpoon) Support
Dan, shift+insert solves the problem described here. Ctrl-insert does nothing on my instance.

Are we stilll dealing with a problem or should I be documenting alternatives to use shift-insert in plain text and ctrl-insert in RTF?
Perhaps suffice to say that if one method doesn't work correctly, try the others?
T


.dan.g.

unread,
Dec 26, 2015, 8:27:43 AM12/26/15
to ToDoList (AbstractSpoon) Support
Shift+Insert==Ctrl+V
Reply all
Reply to author
Forward
0 new messages