IRC log of #maemo-ssu for Sunday, 2015-10-04

freemangordonPali: I think I found what the problem in modest is, but I am not sure how to solve it.00:03
freemangordonI lack mime-fu :)00:03
freemangordonPali: https://github.com/community-ssu/modest/blob/master/src/widgets/modest-attachments-view.c#L16800:04
freemangordonfor some reason modest checks for "multipart/alternative"00:05
freemangordonand if so, the code on https://github.com/community-ssu/modest/blob/master/src/widgets/modest-attachments-view.c#L223 is not executed00:05
freemangordonif I set is_alternate to be false, the missing attachments appear00:06
freemangordonwhat I can't get is why this check is needed00:06
freemangordonthat code was introduced by commit  354a038d69d6b9ac42b49e6c6d3751f7978c4adb ([PATCH] Show digest attachments (and other non body text parts) in attachments view)00:08
freemangordonhttps://garage.maemo.org/plugins/ggit/browse.php/?p=modest;a=patch;h=354a038d69d6b9ac42b49e6c6d3751f7978c4adb00:09
Palifreemangordon: MIME email contains (mathematical) tree00:20
Palieach node contains email data00:20
Paliand if node is marked as "multipart/alternative" then it means that all subnodes are equivalent, just represent same data in different encodings or formats00:21
Palie.g. text/plain and text/html00:21
Paliif node is marked as "multipart/mixed" or other multipart/ then its subnodes contains data00:22
freemangordonPali: but that is not the case(in that mail), as text part contains no attachments, while html part contains00:22
Paliand if missing attachment is only under some subnode of multipart/alternative node, that it could be hidden00:23
freemangordonsee http://pastebin.com/wUgr8tkB00:23
freemangordonthunderbird shows the attachments, modest does not00:24
Palifreemangordon: I will run my MIME tree parser on that email00:24
freemangordonwait, it is the header only00:24
freemangordoni'll forward it to you00:24
Palinope, this contains also body00:24
Palibody of email start after blank line00:25
Palibut please send me it as plain text attachment00:25
Paliso I can inspect original plain text file00:25
freemangordonyep, sure00:25
PaliI think I know where is problem00:26
Palibut rather I would recheck it on original email00:26
Palifirst00:26
freemangordonoh, so modest prefers the "text" part and ignores the "html" part?00:27
freemangordonPali: mail sent00:28
Paligot it00:28
Palifreemangordon: ok, it is as I expected00:32
freemangordonhmm?00:33
PaliMIME email is tree and data (text, attachments, ..) are stored only in leafs00:33
freemangordonso?00:33
Paliroot node is marked as alternative, which means that root subnodes are equivalent00:33
freemangordonsure00:33
Paliand that pdf attachment is only in one leaf00:33
freemangordonyes00:33
Paliand thats all, if you interpret that email in other way, then you miss attachment00:34
freemangordonbut, shouldn't we show the attachments no matter in which node are they?00:34
Palicorrect view of that email is also to hide attachment00:34
Palifreemangordon, no00:34
freemangordonhmm00:34
freemangordonwell, that pdf is marked as inline as well, so what you say makes sense00:35
freemangordonPali: so "freemangordon: oh, so modest prefers the "text" part and ignores the "html" part?" is what happens?00:36
Paliif some node is marked as multipart/alternative it does not matter which subnode you choose for rendering/viewing00:36
Palifreemangordon: I think that modest prefer html00:36
Palibut maybe it is not truth00:36
Palifreemangordon: it does not matter if pdf is marked as inline or as attachment00:37
freemangordonby the look of it, it prefers the text part00:37
Paliin both cases it is same00:37
freemangordonyeah, got that00:37
PaliI know that lot of multipart/alternative emails with html and text parts, modest shown me html version00:37
freemangordonmaybe it depends which one comes first00:37
Palibut important note is also that in email parts are ordered00:37
Paliand I think that RFC say something that first is more preferred as second and etc...00:38
Palino idea if some client respect this order00:38
Paliand also client is free to choose format which support00:38
freemangordonthe first node is preferred over the second?00:38
PaliI think RFC say something like that in case that client does not have some other preferences00:39
freemangordonhmm, ok00:39
PaliI think that thunderbird prefer html00:39
Paliand then plain text00:39
Palimy KMail prefer plain text00:39
freemangordonit seems thunderbird shows both :)00:40
freemangordonas I see both "Hallo someone ,some text anotherone " and "anotherone" in bold00:41
freemangordonwhich doesn;t make sense either00:41
freemangordonPali: do you see the attachments in your KMail?00:42
PaliI see Einladung.pdf00:42
Paliand image002.png00:42
*** LinuxCode has joined #maemo-ssu00:42
freemangordonwell, then there is still a problem in modest it seems00:43
freemangordonas in modest there are no attachments00:43
Palifreemangordon: this is how my MIME tree parser see that email: http://pastebin.com/ra0i1Kf000:43
Paliand my MIME viewver does not see PDF file00:43
freemangordonassuming KMail prefers the text node, I see no way for it to show 2 attachments00:44
*** LinuxCode has quit IRC00:44
*** LinuxCode has joined #maemo-ssu00:44
Palikmail has heurstic00:45
Paliand show this PDF because it does not see it in text subpart00:45
Palibut according to RFCs is correct way also to ignore that PDF part00:45
Palimy MIME viewer did it too00:46
freemangordonwell then , "but, shouldn't we show the attachments no matter in which node are they?" :)00:46
Paliapparently not00:46
freemangordonseems KMail does it00:46
freemangordonas does Thunderbird00:46
*** LinuxCode_away has joined #maemo-ssu00:47
freemangordonI won;t argue if it is RFC violation or not00:47
Paliit has some heurstic which could work sometimes, but they can damage (=show wrongly) correctly formatted emails00:47
*** LinuxCode_away has quit IRC00:47
Palibasically there is no difference between attachment or text part00:47
PaliI mean PDF or textfile00:48
freemangordonPali: yes, I understand00:48
*** LinuxCode has quit IRC00:48
Paliyou are free to compose email which is multipart/alternative and has two subnodes:00:48
Pali1) is final plain/text00:48
freemangordonPali: http://pastebin.com/xTMCdntw - that one makes modest show the attachments00:49
freemangordonjust FYI00:49
Pali2) is multipart/mixed (which means that has subnodes) and contains 3 additional html nodes00:49
freemangordonand I guess the client is free to choose which one to show00:49
Paliand if you run html2text on every 3 html nodes, join them together and put into 1) final plain/text00:49
Palithat you get normal email message00:50
Palibut which contains 4 nodes... 1 vs 1+1+100:50
Paliand you cannot exchange them, you must show either first or another 300:50
freemangordonI understand that.00:51
Paliand same it is with PDF files00:51
Palithat email which you sent me is just example of wrongly generated MIME email00:51
Paliand yes, client is free which alternative part will show00:52
Paligeneraly it chose that one which can render better :-)00:52
Palie.g. terminal text email clients (like mutt) prefer plain/text parts, because it can show just monospaced text :-)00:53
freemangordonI guess modest chooses whichever comes first00:53
Paliprobably00:53
freemangordonPali: what about showing the alternative part as an attachment?00:54
freemangordonas email attachment that is00:54
Paliif this bug is assigned to me, I would close it "as not a bug"00:55
freemangordonno, it is not assignet to you00:55
freemangordon*assigned00:55
Palishowing all other alternative parts as attachment is wrong idea00:55
Palinow maybe every email contains two alternative parts: text and html00:55
freemangordonyeah00:55
Paliso basically it show lot of useless attachments...00:55
freemangordonso, the same mail formatted correctly, should be:00:56
Palibetter option would be to switch between alternatives00:56
Palibutton for switching00:56
freemangordonhmm00:56
Palikmail as it: switch between text and html00:56
freemangordonI am not sure I can implement stuff like that in modest00:56
PaliI know it is hard, but probably only one acceptable solution... as adding heuristic in any way could damage correct emails00:57
freemangordonyeah00:57
Paliand attachment button for alternative parts just show lot of useless attachments00:57
freemangordonok, I'll post a link to our discussion on thet TMO thread01:00
freemangordonWONTFIX :)01:00
Paliyes, wontfix is also from my side... it is hard work and just for one incorrectly generated email01:04
*** Pali has quit IRC01:09
*** futpib has quit IRC02:57
*** xes has quit IRC04:59
*** xes has joined #maemo-ssu05:26
*** sparetire_ has quit IRC06:19
*** RedW has quit IRC08:27
*** RedW has joined #maemo-ssu08:29
*** Pali has joined #maemo-ssu09:30
*** futpib has joined #maemo-ssu12:09
*** NIN101 has quit IRC12:16
*** NIN101 has joined #maemo-ssu12:16
*** kerio has quit IRC14:46
freemangordonPali: https://github.com/community-ssu/modest/blob/master/src/modest-tny-msg.c#L45815:16
freemangordonafter all it seems to me that there is a problem in modest15:16
freemangordonit seems to ignore multipart/mixed when searching for a body15:16
freemangordonthat is why I see the text content instead of HTML15:17
*** kerio_ has joined #maemo-ssu15:17
*** kerio_ is now known as kerio15:18
Palifreemangordon: still yesterday problem?15:20
Palior another?15:20
freemangordonyep, the same problem15:21
freemangordonattachments not visible15:21
PaliI know and I tried to show you proof that it is valid to hide attachment15:21
freemangordonalso, according to some docs I found on the net, it is the LAST body (or whatever) that is the best representation15:21
Paliok, so last part is preferred?15:22
freemangordonalso, it is really that modest tries to always use HTML over text15:22
freemangordonyes, the last one should be preffered15:22
PaliI do not remember if first or last, it is just linear order of preferences15:22
Paliok15:22
freemangordonthe first one has lowest priority15:23
Paliok, then if modest preffer first, then behaviour could be changed15:23
freemangordonno, it seems it prefers html, but just can't find it, as it is in multipart/mixed node15:24
freemangordonbut it searches for mulipart/related15:24
*** kerio has quit IRC15:25
*** kerio has joined #maemo-ssu15:25
freemangordonPali: see what  modest_tny_msg_find_body_part_in_alternative does15:26
*** sparetire_ has joined #maemo-ssu15:45
freemangordonPali: what do you think about that patch: http://pastebin.com/DJWwVf0z16:25
freemangordonit makes HTML version of that dangled message to appear. Still no attachments though16:26
Palirelated is not same as multipart/mixed16:29
Paliso it can break other modest part16:29
Paliso first check that multipart/mixed parts do not break modest itself (where it can expect related)16:29
freemangordonany idea how to check it?16:31
freemangordonPali: also, my change affects only the functions that try to find the massage body in the wanted format (text or HTML)16:32
freemangordon*message16:32
freemangordonI'd assume those are harmless changes16:33
*** kerio has quit IRC16:39
*** kerio has joined #maemo-ssu16:39
freemangordonPali: what about http://pastebin.com/zNNdUWSe ?19:04
freemangordonit seems to fix the issue19:05
freemangordonwill show attachments only in the "preferred" part of mutipart/alternative messages19:06
freemangordonin case of modest, this is the HTML part19:06
*** xes has quit IRC20:27
*** xes has joined #maemo-ssu21:01
freemangordonPali: ping21:49
*** freemangordon1 has joined #maemo-ssu22:09
*** freemangordon has quit IRC22:09
*** brolin_empey_ has joined #maemo-ssu22:26
*** sailus_ has joined #maemo-ssu22:27
*** Raimu-X has joined #maemo-ssu22:29
*** sailus has quit IRC22:30
*** Wizzup has quit IRC22:30
*** APic has quit IRC22:30
*** kerio has quit IRC22:30
*** Wizzup has joined #maemo-ssu22:30
*** APic has joined #maemo-ssu22:31
*** panais has quit IRC22:32
*** brolin_empey has quit IRC22:32
*** Raimu has quit IRC22:32
*** panais has joined #maemo-ssu22:32
*** kerio has joined #maemo-ssu22:33
*** brolin_empey_ is now known as brolin_empey22:33
*** M4rtinK has joined #maemo-ssu22:54

Generated by irclog2html.py 2.15.1 by Marius Gedminas - find it at mg.pov.lt!