Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 08-23-2023, 05:32 AM   #1
repilo
Connoisseur
repilo began at the beginning.
 
Posts: 50
Karma: 10
Join Date: Apr 2021
Location: Spain
Device: Kobo Libra 2
What are the risks of drag/drop and in which cases?

I understand that with Sigil 2.0.0 the drag/drop function in text editing has been disabled and that it can be re-enabled by a certain environment variable, although there are some risks in doing so.
This function is very useful for me, because I often edit the text (not just the css) to correct mistranslations or add my own footnotes that I edit on the fly, and it is often enough for me to change the order of the elements of a sentence (the Spanish language is very flexible in this).

In short, I have activated the environment variable SIGIL_ALLOW_CODEVIEW_DROP=1
but I would like to know more specifically what risks I am taking by doing so and in which cases. As I said, my movements are always of short fragments within the same sentence, and so far I haven't noticed anything happening to me.
repilo is offline   Reply With Quote
Old 08-23-2023, 06:16 AM   #2
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,596
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Unknown. It's unsupported.The risks are yours to figure out.
DiapDealer is offline   Reply With Quote
Advert
Old 08-23-2023, 06:41 AM   #3
Sarmat89
Evangelist
Sarmat89 ought to be getting tired of karma fortunes by now.Sarmat89 ought to be getting tired of karma fortunes by now.Sarmat89 ought to be getting tired of karma fortunes by now.Sarmat89 ought to be getting tired of karma fortunes by now.Sarmat89 ought to be getting tired of karma fortunes by now.Sarmat89 ought to be getting tired of karma fortunes by now.Sarmat89 ought to be getting tired of karma fortunes by now.Sarmat89 ought to be getting tired of karma fortunes by now.Sarmat89 ought to be getting tired of karma fortunes by now.Sarmat89 ought to be getting tired of karma fortunes by now.Sarmat89 ought to be getting tired of karma fortunes by now.
 
Posts: 483
Karma: 2267928
Join Date: Nov 2015
Device: none
A programming text editor that does not allow D&D is just absurd.
Sarmat89 is offline   Reply With Quote
Old 08-23-2023, 07:19 AM   #4
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,119
Karma: 18727091
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
This one author that I read is a GREAT storyteller… but can’t figure out commas to save his life! When I clean his books I am constantly dragging commas to their proper position (in code view). This is a lot faster to do by drag-n-drop with a mouse than manually typing and deleting.

Is this the kind of drag-n-drop that is disabled, or are you only referring to dragging code from some OTHER app/window and dropping into code view??
Turtle91 is offline   Reply With Quote
Old 08-23-2023, 09:32 AM   #5
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,727
Karma: 5444398
Join Date: Nov 2009
Device: many
Drag and drop according to the official Qt docs was supposed to be disabled by default. Sigil has been around a long time, long before Qt supported drag and drop at all without crashing. So this functionality was never used or tested in Sigil's CodeView.

Then silently, without changing their official docs, Qt turned ON drag and drop by default but it still could cause crashing in Qt 5.12.x and even Qt 5.15x.

This crashing was finally reported to us, and since Sigil was never designed/tested to use drag and drop, we decided to revert to disabling it (as that was the original Qt default) as fixing internal Drag and Drop crashes deep in Qt are beyond our control.

So with an environment variable set, you can enable drag and drop again, but we will NOT be accepting bug reports related to drag and drop editing. Any backtrace or bug regarding drag and drop will be closed and any such bug reports should be directed directly to Qt as it is not something our code controls.

If you do not like that, you can of course use Sigil's OpenWith command to edit the xhtml file with whatever html/code editor you prefer.

Last edited by KevinH; 08-23-2023 at 11:13 AM.
KevinH is offline   Reply With Quote
Advert
Old 08-23-2023, 10:40 AM   #6
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,727
Karma: 5444398
Join Date: Nov 2009
Device: many
Quote:
Originally Posted by Sarmat89 View Post
A programming text editor that does not allow D&D is just absurd.
Having been a professional programmer and a user of emacs for over 45 years, I disagree.

You are of course free to use a different epub editor or to use Sigil's OpenWith to use your own code editor.

Last edited by KevinH; 08-23-2023 at 11:08 AM.
KevinH is offline   Reply With Quote
Old 08-23-2023, 11:01 AM   #7
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,119
Karma: 18727091
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
I added the environmental variable (SIGIL_ALLOW_CODEVIEW_DROP=1) and all seems to work fine. Thank you!
Turtle91 is offline   Reply With Quote
Old 08-23-2023, 11:12 AM   #8
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,727
Karma: 5444398
Join Date: Nov 2009
Device: many
@Turtle91, @repilo
If it worked well for you in the past and never crashed, that should continue. But the risks are the same as prior versions of Sigil where it worked inadvertently. That said Qt 6.5.2 may be much more stable with drag and drop than earlier versions of Qt. (or much worse! - we just do not know)

Last edited by KevinH; 08-23-2023 at 11:25 AM.
KevinH is offline   Reply With Quote
Old 08-23-2023, 02:08 PM   #9
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,596
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by Sarmat89 View Post
A programming text editor that does not allow D&D is just absurd.
*yawn*
DiapDealer is offline   Reply With Quote
Old 08-24-2023, 11:33 AM   #10
jwes
Enthusiast
jwes began at the beginning.
 
Posts: 39
Karma: 10
Join Date: Jul 2023
Device: none
Quote:
Originally Posted by repilo View Post
I understand that with Sigil 2.0.0 the drag/drop function in text editing has been disabled and that it can be re-enabled by a certain environment variable, although there are some risks in doing so.
This function is very useful for me, because I often edit the text (not just the css) to correct mistranslations or add my own footnotes that I edit on the fly, and it is often enough for me to change the order of the elements of a sentence (the Spanish language is very flexible in this).

In short, I have activated the environment variable SIGIL_ALLOW_CODEVIEW_DROP=1
but I would like to know more specifically what risks I am taking by doing so and in which cases. As I said, my movements are always of short fragments within the same sentence, and so far I haven't noticed anything happening to me.
The three things that happened when I used select and drag:
1. Generally it worked.
2. Sometimes Sigil crashed
3. Somtimes it switched to a tab with my stylesheet and changed it.
jwes is offline   Reply With Quote
Old 08-24-2023, 11:38 AM   #11
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,727
Karma: 5444398
Join Date: Nov 2009
Device: many
Which is why we disabled it in the first place as Qt's drag and drop editing has never been very stable, at least in Qt5.
KevinH is offline   Reply With Quote
Old 08-26-2023, 04:55 PM   #12
cavy
Junior Member
cavy began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Jun 2015
Location: Madrid, Spain
Device: Sony PRST2, Kindle DXG y PW2
Quote:
Originally Posted by Turtle91 View Post
I added the environmental variable (SIGIL_ALLOW_CODEVIEW_DROP=1) and all seems to work fine. Thank you!
Please tell me where and how you added it. Because I am unable to achieve it.
cavy is online now   Reply With Quote
Old 08-26-2023, 05:01 PM   #13
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,727
Karma: 5444398
Join Date: Nov 2009
Device: many
What platform? If Windows, just google how to set an environment variable in Windows.
If macOS and Linux you can set them in your login shell profile .bashrc, etc.

Last edited by KevinH; 08-26-2023 at 05:03 PM.
KevinH is offline   Reply With Quote
Old 08-26-2023, 05:06 PM   #14
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,119
Karma: 18727091
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
Quote:
Originally Posted by cavy View Post
Please tell me where and how you added it. Because I am unable to achieve it.
Welcome to MR!!

I use windows and just followed the directions posted here:

If you are on a different platform I would just try Mr. Google, or one of his cousins.


Cheers!
Turtle91 is offline   Reply With Quote
Old 08-26-2023, 05:07 PM   #15
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,119
Karma: 18727091
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
jinx
Turtle91 is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
drag and drop problem 73kmax Library Management 6 11-08-2021 09:18 PM
No more Drag and Drop? hard_boiled Library Management 14 09-29-2013 07:44 PM
Drag and drop does not work fartang Library Management 0 07-07-2012 09:34 AM
Drag 'n' Drop Perkin Calibre 17 10-06-2010 11:46 AM
Drag and Drop jjjconnon Calibre 11 02-27-2010 11:59 PM


All times are GMT -4. The time now is 10:03 AM.


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