Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 10-13-2023, 07:57 AM   #61
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,736
Karma: 5446592
Join Date: Nov 2009
Device: many
I think your detective work is spot on. This probably has to do to the changes related to markdown support in calibre.

But as far as I can tell, the code Kovid wrote properly identifies the mimetypes of each data blob on the clipboard.

Using Edit->Paste looks for html markup and if it finds it, it should use that but PageEdit 2.0 is being confused and it applies the text/markdown data blob and not the text/html data blob from the clipboard.

The best I can do with Edit->Paste is test if text/html exists on the clipboard and remove other mimetypes and blobs from the clipboard if you say No to force pasting plain text.

Please try regenerating the debug log file when saying No to the popup so I can better see what is going on.
KevinH is offline   Reply With Quote
Old 10-13-2023, 08:01 AM   #62
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,610
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by KevinH View Post
Unfortunately, although the debug out shows the formats, if you select "No" in that popup it is supposed to dump the html content to that debug txt file.

Would you please try again with "No" and it should dump more.

Thanks.
Probably a separate issue... but I've found that when launching PageEdit by itself (with no content) on Windows, the edit mode doesn't always seem to "take". There's no cursor ready to accept input. Pasting again (or switching to View mode and back to Edit) seems to remedy the problem. For the purposes of debugging the current paste issue, I'd recommend making sure you have a blinking cursor, and that typed text appears before performing the Edit->Paste. I've never seen answering "No" to the prompt fail when PageEdit is ready to accept input.

Last edited by DiapDealer; 10-13-2023 at 08:33 AM.
DiapDealer is online now   Reply With Quote
Advert
Old 10-13-2023, 08:13 AM   #63
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,736
Karma: 5446592
Join Date: Nov 2009
Device: many
And to add a new variable, based on BetterRed's detective work on markdown support, i was able to search qtbugs better and as it turns out WebEngine did make some windows specific changes related to their clipboard code:

https://codereview.qt-project.org/c/...ipboard_qt.cpp

from this issue:

https://bugreports.qt.io/browse/QTBUG-100806

which indicates that Window's requires both the html and body tags on html content so that pasting html actually works on Windows.

The latest fragments from calibre do not include those pieces.

Last edited by KevinH; 10-13-2023 at 08:18 AM.
KevinH is offline   Reply With Quote
Old 10-13-2023, 08:15 AM   #64
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,736
Karma: 5446592
Join Date: Nov 2009
Device: many
Yes. Good point.

I have an empty xhtml file on my Desktop, and when testing pasting into PageEdit I always open the file in PageEdit first otherwise things could get wonky for pasting.



Quote:
Originally Posted by DiapDealer View Post
Probably a separate issue... but I've found that when launching PageEdit by itself (with no content) on Windows, the edit mode doesn't always seem to "take". There's no cursor ready to accept input. Pasting again (or switching to View mode and back to Edit seems to remedy the problem. For the purposes of debugging the current paste issue, I'd recommend making sure you have a blinking cursor, and that typed text appears before performing the Edit->Paste. I've never seen answering "No" to the prompt fail when PageEdit is ready to accept input.
KevinH is offline   Reply With Quote
Old 10-13-2023, 08:16 AM   #65
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,736
Karma: 5446592
Join Date: Nov 2009
Device: many
I wonder what exact versions of Qt calibre is using in it 6.14 vs 6.16/6.17 versions.

Can anyone tell me that?
KevinH is offline   Reply With Quote
Advert
Old 10-13-2023, 08:41 AM   #66
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,610
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by KevinH View Post
I wonder what exact versions of Qt calibre is using in it 6.14 vs 6.16/6.17 versions.

Can anyone tell me that?
Looks like 6.14.0 used Qt6.4.2, and 6.17.0 is also using Qt6.4.2. Still Qt6.4.2 in the latest calibre tagged release.

The sources.json file in the bypy folder of calibre's main github repo will tell you the various dependency versions used. I browsed the various tag trees and searched for qt in that file.

Last edited by DiapDealer; 10-13-2023 at 08:43 AM.
DiapDealer is online now   Reply With Quote
Old 10-13-2023, 09:09 AM   #67
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,680
Karma: 26966376
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by KevinH View Post
. . .

Please try regenerating the debug log file when saying No to the popup so I can better see what is going on.
Attached is the the debug log as it currently stands.

All of my tests were done on the default 'empty' EPUB Sigil creates when its started with no arguments, and I started PE thus:

Click image for larger version

Name:	Screenshot 2023-10-14 000345.jpg
Views:	46
Size:	102.5 KB
ID:	204267

Let me know if you want anything more. (e.g do tests in Safe mode to eliminate my third party gadgets)

BR
Attached Files
File Type: txt PageEdit_debug.txt (11.9 KB, 35 views)

Last edited by BetterRed; 10-13-2023 at 09:12 AM.
BetterRed is online now   Reply With Quote
Old 10-13-2023, 12:22 PM   #68
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,736
Karma: 5446592
Join Date: Nov 2009
Device: many
That debug.txt file will keep being added to every time PageEdit is run when that environment variable is set.

So there are many different debug.txt outputs mixed in that file. Unfortunately, too many to tell what is going on.

So would you please delete debug.txt to clear it Then run the case of latest calibre and latest PageEdit (debug version). Saying no at the popup. Once complete rename debug.txt to broken.txt. That will effectively clear debug.txt.

Then please try again with a working calibre version and our debug PageEdit, saying no at that popup and rename that debug,txt file to working.txt.

Then please post both broken.txt and working.txt here.

Thanks!

Last edited by KevinH; 10-13-2023 at 03:45 PM.
KevinH is offline   Reply With Quote
Old 10-13-2023, 04:11 PM   #69
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,680
Karma: 26966376
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by KevinH View Post
. . .
Then please post both broken.txt and working.txt here.
Here you go.

BR
Attached Files
File Type: txt broken.txt (1.6 KB, 34 views)
File Type: txt working.txt (2.5 KB, 33 views)
BetterRed is online now   Reply With Quote
Old 10-13-2023, 04:32 PM   #70
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,736
Karma: 5446592
Join Date: Nov 2009
Device: many
Thank you. That is exactly what I needed. The "broken" one has html code without the html and body tags that are required on Windows.

The "working" one clearly has the html and body tags needed on Windows. See the comments in this Qt bug report:

https://bugreports.qt.io/browse/QTBUG-100806

So the problem is actually Window's specific and is caused by Qt changes in qclipboard code in the qtwebengine codebase in Qt 6.4 that should be fixed in Qt 6.5.

The only workaround, I can think of is when the pop-up comes up and the user responds no to pasting plain text, we can use a quick regular expression to check for html and body tags in the html on the clipboard and create a new "fixed" clipboard entry overwriting the current clipboard so that things actually work for Window's users.

That said, I think the entire problem will just go away when Kovid/Calibre moves to Qt 6.5.3.

But I have no idea if or when that might happen.
KevinH is offline   Reply With Quote
Old 10-13-2023, 05:36 PM   #71
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,736
Karma: 5446592
Join Date: Nov 2009
Device: many
Actually, the required fix is in Qt 6.4.2. So the issue is not Qt.

That means the issue is calibre. Looking at changes from calibre 6.14.1 to 6.15.0, my **guess** is the problem change is here: "Comments editor: When copying to clipboard, copy clean HTML rather than the junk Qt produces"

See:

https://github.com/kovidgoyal/calibr...3b85faf8057089

My **guess** is he cleaned up too much ... but ...

Given the above, Sigil/PageEdit will probably not try to workaround this change. calibre users will have to workaround it by using an older PageEdit or some intermediate tool to fixup the html code on the clipboard. It is hard enough to workaround Qt bugs / unwanted changes, I do not want to start doing that for calibre as well.

Last edited by KevinH; 10-13-2023 at 05:46 PM.
KevinH is offline   Reply With Quote
Old 10-13-2023, 06:57 PM   #72
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,680
Karma: 26966376
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by KevinH View Post
My **guess** is he cleaned up too much ... but ...
... if I paste what I copy from the Normal view of the Comments editor in the latest calibre (6.28.1) into Word (or OneNote) I get a table. Ditto if I paste it into an online html editor such as this one:

Click image for larger version

Name:	Screenshot 2023-10-14 095136.jpg
Views:	40
Size:	102.2 KB
ID:	204273

The only app in which I am not seeing a table is PageEdit.

Maybe someone could do a test with LO Writer on Windows.

BR

Last edited by BetterRed; 10-13-2023 at 07:07 PM.
BetterRed is online now   Reply With Quote
Old 10-13-2023, 07:08 PM   #73
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,610
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
I get the sentiment, but it's not really fair comparing PageEdit to word processing apps (or even html editors). How many of the apps that it "works" on are based on QtWebEngine?
DiapDealer is online now   Reply With Quote
Old 10-13-2023, 07:34 PM   #74
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,680
Karma: 26966376
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by DiapDealer View Post
I get the sentiment, but it's not really fair comparing PageEdit to word processing apps (or even html editors). How many of the apps that it "works" on are based on QtWebEngine?
I can paste a table I from copy one calibre Comment normal view into another one

Is there somewhere I can see a list of Qt based applications. The other Qt apps I have (qtbittorrent and Malwarebytes) don't have any place to paste rich text from the clipboard.

BR
BetterRed is online now   Reply With Quote
Old 10-13-2023, 07:34 PM   #75
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,736
Karma: 5446592
Join Date: Nov 2009
Device: many
And it is only an issue on Windows because what is stored by calibre on Windows only does not meet the cf_html clipboard spec used/needed by Qt as it leaves out the html and body tags.

If a fix is needed, then shouldn't calibre be the one that produces the correct cf_html that Windows Qt apps relies on since calibre is a Qt app?

Or perhaps Qt on Windows should be more forgiving of fragments that do not include the html and body tags for the context part of the cf_html spec?

If on Windows copying a table from FireFox, Edge, Chrome, LibreOffice, Word, Sigil, etc and pasting it into PageEdit works then the issue really is a non-compliant clipboard implementation done by calibre and not that Qt should be more forgiving. If copying a table from those sources to PageEdit does not work, please include the debug txt output so we can see why.

If other major apps besides calibre do not work with PageEdit on Windows and for similar reasons, then I will try a Windows specific workaround.

Last edited by KevinH; 10-13-2023 at 07:39 PM.
KevinH is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PageEdit-1.7.0 Released DiapDealer Sigil 1 07-22-2021 11:44 AM
PageEdit-1.5.0 Released DiapDealer Sigil 1 03-19-2021 10:59 AM
PageEdit-1.3.0 Released DiapDealer Sigil 26 08-19-2020 04:22 PM
PageEdit-1.2.0 Released DiapDealer Sigil 13 04-02-2020 04:16 AM
PageEdit-0.9.6 Released DiapDealer Sigil 22 01-30-2020 09:00 PM


All times are GMT -4. The time now is 06:35 PM.


MobileRead.com is a privately owned, operated and funded community.