Bug 3824 - Quotation Folding is wrongly applied to text attachments
Summary: Quotation Folding is wrongly applied to text attachments
Status: RESOLVED FIXED
Alias: None
Product: Claws Mail
Classification: Unclassified
Component: Other (show other bugs)
Version: other
Hardware: PC Linux
: P3 normal
Assignee: users
URL:
Depends on:
Blocks:
 
Reported: 2017-05-19 05:08 CEST by lbickley
Modified: 2017-06-09 00:17 CEST (History)
0 users

See Also:


Attachments
Attachment that got modified on being sent (4.85 KB, text/plain)
2017-05-19 16:23 CEST, lbickley
no flags Details
Same as txt file - but zipped (deleted)
2017-05-19 16:28 CEST, lbickley
no flags Details
mail as requested by Paul (2.35 KB, application/octet-stream)
2017-05-20 16:25 CEST, lbickley
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description lbickley 2017-05-19 05:08:41 CEST
version 3.15.0git17
GTK+ 2.24.31 / GLib 2.48.2
Locale: en_US.UTF-8 (charset: UTF-8)
Operating System: Linux 4.4.62-18.6-default (x86_64)



I attached a text file containing the following Python TensorFlow test program:
-------------------------------------------------
>>> import tensorflow as tf
>>> hello = tf.constant('Hello, TensorFlow')
>>> sess = tf.Session()
>>> print(sess.run(hello))
'Hello, TensorFlow'
-------------------------------------------------
What was actually sent was:

[...]
'Hello, TensorFlow'
-------------------------------------------------

Bug: Claws is incorrectly scanning text attachments and treating them as email thereby assuming that embedded ">" are versions of email to be bracketed.
Comment 1 Paul 2017-05-19 09:18:52 CEST
In order to help understand what you are describing, please attach an example message file.
Comment 2 lbickley 2017-05-19 16:23:53 CEST
Created attachment 1750 [details]
Attachment that got modified on being sent

When I sent this text as an attachment - the tensorflow lines with >>> got modified to [...]
Comment 3 lbickley 2017-05-19 16:28:33 CEST
Created attachment 1751 [details]
Same as txt file - but zipped

Here's a ZIP of the previously attached TXT file...
Comment 4 Paul 2017-05-19 16:51:44 CEST
The attachments are the file you attached, what I want to see is the whole message file.
Comment 5 Paul 2017-05-19 16:52:43 CEST
The content of attachment 1751 [details] has been deleted by
    Paul <paul@claws-mail.org>
who provided the following reason:

same as other attachment, but zipped

The token used to delete this attachment was generated at 2017-05-19 16:52:19 CEST.
Comment 6 lbickley 2017-05-20 04:06:32 CEST
Hi Paul,

An easy test would be to email the attachment (unzipped as txt) to yourself. You'll see the bug right away. You can look in your "send" folder or wait until you receive it. It will be obvious.

Cheers,
Lyle
Comment 7 Paul 2017-05-20 11:34:37 CEST
Works fine here. I think you have probably inserted the file rather than attached it. If you attach your message file to this bug item then that could be determined for certain, I think.
Comment 8 lbickley 2017-05-20 16:25:04 CEST
Created attachment 1752 [details]
mail as requested by Paul

I see that in the "saved" email, the "/// --source---" is correct - but when I "click" on the sent attachment to view it I get :
----

Python 3.4.5 (default, Jul 03 2016, 12:57:15) [GCC] on linux
Type "help", "copyright", "credits" or "license" for more information.
 [...]  
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'sess' is not defined
 [...]  
2017-05-18 19:30:22.772159: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and c

---

So the problem ("[...]" which should be "/// something") appears to be in the DISPLAY of the attachment as opposed to the attachment itself.
Comment 9 Paul 2017-05-20 16:53:48 CEST
That appears that it might be related to the python plugin, which I do not use. Do you have that loaded? It all works exactly as expected here.
Comment 10 Paul 2017-05-20 16:57:39 CEST
I take that back. The bit of text you pasted is just from that file.
The '[...]' you see is because you are collpasing quotations. So, if anything, the quotation collapser is being a bit over enthusiastic, in that it's collapsing part of the attached text file.
Comment 11 lbickley 2017-05-20 17:39:12 CEST
Yes, that's what I thought "an overly aggressive quotation collapser" - although I made the mistake of assuming what I was seeing when I viewed the attachment was what was actually sent ;)

BTW: The only plugins I have loaded are: "Fancy HTML Viewer", "Gdata" and "PGP/Core"
Comment 12 lbickley 2017-05-22 22:20:02 CEST
Paul - would you please mark this as unresolved/valid - as Claws is displaying "sent" emails incorrectly. Perhaps you/I should rename the bug to "Claws is compressing the display of sent messages"?
Comment 13 lbickley 2017-05-23 18:25:56 CEST
I modified the subject line to more aptly define the bug.
Comment 14 users 2017-05-31 20:40:02 CEST
Changes related to this bug have been committed.
Please check latest Git and update the bug accordingly.
You can also get the patch from:
http://git.claws-mail.org/

++ ChangeLog	2017-05-31 20:40:02.287752588 +0200
http://git.claws-mail.org/?p=claws.git;a=commitdiff;h=45cbd9a2abd3ad72a830e3a1ba0950d5bebfd738
Merge: 567b7e7 61ec4ca
Author: Colin Leroy <colin@colino.net>
Date:   Wed May 31 20:40:01 2017 +0200

    Merge branch 'master' of file:///home/git/claws

http://git.claws-mail.org/?p=claws.git;a=commitdiff;h=61ec4cae4410ebe0ecb652c7c96000301950ecc8
Author: Andrej Kacian <ticho@claws-mail.org>
Date:   Wed May 31 20:38:59 2017 +0200

    Do not try to handle quotes in text attachments.
    
    Closes Bug 3824 - Quotation Folding is wrongly applied to text
    attachments.
Comment 15 Andrej Kacian 2017-05-31 20:43:38 CEST
Fixed now in git, thanks for the report!
Comment 16 lbickley 2017-06-01 01:42:20 CEST
Just updated from git. Now at version 3.15.0git17.

Bug still present as shown in test case attachment.

Segment of txt attachment that's correct (from message source):
--
Python 3.4.5 (default, Jul 03 2016, 12:57:15) [GCC] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf
>>> hello =3D tf.constant('Hello, TensorFlow')
>>> sess - tf.Session()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'sess' is not defined
>>> sess =3D tf.Session()
2017-05-18 19:30:22.772159: W tensorflow/core/platform/cpu_feature_guard.cc=
:45] The TensorFlow library wasn't compiled to use SSE4.1 instructions, but=
 these are available on your machine and could speed up CPU computations.
2017-05-18 19:30:22.772179: W tensorflow/core/platform/cpu_feature_guard.cc
--

Same segment shown by viewing "sent":
--
Python 3.4.5 (default, Jul 03 2016, 12:57:15) [GCC] on linux
Type "help", "copyright", "credits" or "license" for more information.
 [...]  
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'sess' is not defined
 [...]  
2017-05-18 19:30:22.772159: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations.
2017-05-18 19:30:22.772179: W tensorflow/core/platform/cpu_feature_guard.cc
--

Note that in the  attachment ">>>" (part of python script) was incorrectly identified as requiring folding - when as an attachment it should not have been so  processed!
Comment 17 Paul 2017-06-01 09:29:27 CEST
This works for text attachments which have 'Content-Disposition: attachment' (this is what is fixed). Text attachments which have 'Content-Disposition: inline' are treated like inline text.
Comment 18 lbickley 2017-06-09 00:17:36 CEST
I've been trying to live with this - but it seems to me to be a bug. If this is not going to be fixed, is there a way to turn folding off and revert to:

> last
>> prior to last
>>> prior to last
>>>> etc.