Bug 4287 - Compose: pasting (new in version 3.17.4) does not work
Summary: Compose: pasting (new in version 3.17.4) does not work
Status: RESOLVED FIXED
Alias: None
Product: Claws Mail (Windows)
Classification: Unclassified
Component: default (show other bugs)
Version: 3.17.4
Hardware: PC Windows 10
: P3 normal
Assignee: users
URL:
Depends on:
Blocks:
 
Reported: 2019-12-18 13:20 CET by Bas
Modified: 2019-12-31 11:03 CET (History)
0 users

See Also:


Attachments
Screenshot Drop onto composing window (189.11 KB, image/jpeg)
2019-12-18 18:27 CET, Bas
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bas 2019-12-18 13:20:47 CET
Compose: images and text/uri-list (files) can now be attached by
pasting into the Compose window: does *not* work

Compose: Insert file > textfile OK, no problem, you get text in the body. 
When inserting a picture (file) you get characters. 
Probably not a bug, but this should not happen!? Maybe a bit confusing.
Comment 1 Paul 2019-12-18 14:41:05 CET
inserting an image into a text widget is never going to work
Comment 2 Bas 2019-12-18 15:21:24 CET
Thanks for the quick reply:-)  I thought so, but what is the use of
"Inserting a file" (maybe just remove this function ???)


What about: See Latest > News 26th July 2019                                    
ClawsMail 3.17.4

* Compose: images and text/uri-list (files) can now be attached by
pasting into the Compose window

and 

* Compose: images and text/uri-list (files) can now be attached by
  pasting into the Compose window

The above just does *not* work. Could you check this please. Thank you.
Comment 3 Paul 2019-12-18 16:12:05 CET
The use of inserting a file is to insert a text file.
Comment 4 Bas 2019-12-18 16:49:00 CET
Hi,

In that case please text under NEWS:
I read Compose: IMAGES ....

Very, very confusing! 

**************************************

Latest News
26th July 2019                                      Claws Mail 3.17.4

		    CLAWS MAIL  RELEASE NOTES
                    http://www.claws-mail.org

Claws Mail is a GTK+ based, user-friendly, lightweight, and fast 
email client.

New in this release:
~~~~~~~~~~~~~~~~~~~~

* New HTML viewer plugin: Litehtml viewer

* Added option 'Enable keyboard shortcuts' to the 'Keyboard
  shortcuts' frame on /Configuration/Preferences/Other/Miscellaneous

>>>> * Compose: implemented copying of attached images to clipboard

>>>> * Compose: images and text/uri-list (files) can now be attached by
  pasting into the Compose window

* Python plugin: window sizes are now remembered for the Python
  console, the 'Open URLs' and the 'Set mailbox order' windows.
Comment 5 Bas 2019-12-18 18:27:01 CET
Created attachment 2033 [details]
Screenshot Drop onto composing window

Screenshot : Option does not work, no result
Comment 6 Bas 2019-12-18 18:28:31 CET
Looking forward to your answer.
Comment 7 Paul 2019-12-18 19:24:24 CET
are you saying that dropping a text file does not insert it into the message?
Comment 8 Bas 2019-12-18 19:50:54 CET
Yes, dropping a (plain) text file just does not work. 
The options on the screenshot (also) do not work! 
Nothing happens when dropping a file (Compose window) 
I tried all options with a plain .txt file....

(That is why the text under News > New in this release: > * Compose ...  is so confusing > images and text/uri-list (files) can now be attached by
pasting into the Compose window)  ?????
Comment 9 Paul 2019-12-19 00:37:03 CET
You started off talking about pasting, and cited an item from the Release Notes relating to pasting, and then went on to talking about dragging and dropping files. Which is it? Please try to be clear so that a maintainer of the windows version can test and verify.
Comment 10 Bas 2019-12-19 10:11:24 CET
  My OS:

  Windows 10 1909 build 18363.535


  Claws Mail News:
- images and text/uri-list (files) can now be ATTACHED by
  PASTING into the Compose window. Pasting does NOT work. 
  Nothing happens, when pasting. The concerning file is not attached!
- implemented copying of attached images to clipboard: does not work.
  No result.


- Screenshot:  
  Choise OPTIONS. Whatever you choose, it does not work, no 
  result.
  In other words: DROPPING files into th compose windows do not work 
  regardless of the choice you have made.


Running Claws Mail in admin compatibility mode, does not make a difference.
Comment 11 Ricardo Mones 2019-12-20 10:12:13 CET
Just tested on Linux and all of this seems to work as expected:

 - Drag and dropping text file or image file launches the dialog for
   selecting between insert or attach the file.

   The only sublety I've observed here is that when the insert button
   is selected for an image file nothing happens, which is perfectly
   ok, but perhaps this code path could be improved by just attaching
   the image and bypassing that dialog.

 - Copying an image from a graphic viewer (Ctr-C or “Edit/Copy image”)
   and pasting into compose body (Ctrl-V or “Edit/Paste” in Claws Mail)
   does also attaches the image, as announced in aforementioned release
   notes.

   Another sublety here is that pasting into compose header entries just
   reveals the URI, so perhaps this could also be improved, as it seems
   unlikely anybody really wants to use an URI string as a header content
   when doing this paste.

 - “Message/Attach” in compose does correctly attach files, regardless
   of their type.

 - “Message/Insert” works also ok for text files, but fails for images
   because it trieds to read them as text, which leads to an invalid
   encoding error. The only improvement I see here is suggesting the
   user to use the "Message/Attach" option when those fails happen.

So, to summarize, this seems a Windows-only error.
Comment 12 Bas 2019-12-20 10:40:19 CET
Thanks for taking time to sort it out, much appreciated.

"Drag and dropping text file or image file launches the dialog for
 selecting between insert or attach the file." :  In windows I don't get a dialog at all, nothing happens.

Apart from the aforementioned problems, everything else works well.

(I don't know one thing yet. Sometimes, I still see *permanently* deleted messages with my other email client (after sync). 
I will pay attention again)
Comment 13 Brian Morrison 2019-12-20 14:13:17 CET
This is broken for me on Fedora 31, drag and drop does nothing, using ctrl-C and ctrl-V shows this:

x-special/nautilus-clipboard
copy
file:///home/bdm/als.jpg

I don't know if this is something in Claws or the OS.
Comment 14 Brian Morrison 2019-12-20 15:37:40 CET
I have just tested this in Evolution, drag and drop works as expected there.

It would appear to be something in Claws, but I'm not sure what.

Tried installing nautilus-devel and rebuilding Claws, just in case this matters.
Comment 15 Brian Morrison 2019-12-20 15:55:08 CET
Looking at the --debug output shows only:

'<filename>' 

there is a space after the second quote character

No other output shows up at all related to the drag and drop.
Comment 16 Brian Morrison 2019-12-20 15:56:36 CET
Actually the '<filename>' appears on STDOUT, not from the --debug stream.
Comment 17 Paul 2019-12-31 11:03:15 CET
the problem code has been reverted (removed), perhaps to be re-added in future after more testing/fixing.