Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Editor

Notices

Reply
 
Thread Tools Search this Thread
Old 03-27-2020, 08:19 AM   #1
jiembe
Zealot
jiembe began at the beginning.
 
Posts: 145
Karma: 10
Join Date: Sep 2016
Location: Montréal Québec
Device: Kobo Glo; Kobo Libra
Last Modification in the Editor

I have to say that I dislike the last modification in the editor or don't understand it :
Quote:
have spaces in the search expression match multiple spaces and line breaks in the text.
Now when I cut a line including the line break I got an empty line instead as before: no line and the rest of the text moving up.
Is there a way to remove that new behaviour.
jiembe is offline   Reply With Quote
Old 03-27-2020, 09:53 AM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,345
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
I dont follow, this is search and replace it has nothing to do with cutting and pasting.
kovidgoyal is offline   Reply With Quote
Old 03-27-2020, 10:02 AM   #3
jiembe
Zealot
jiembe began at the beginning.
 
Posts: 145
Karma: 10
Join Date: Sep 2016
Location: Montréal Québec
Device: Kobo Glo; Kobo Libra
Sorry. English is not my first language.

What I mean is that when I do a search and replace with 'nothing' (as replace) I get blank lines rather than no line at all.
For ex:
a
b
c

searching and replacing b with its line break I got
a

c

instead of
a
c
jiembe is offline   Reply With Quote
Old 03-27-2020, 10:07 AM   #4
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,345
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
I still dont quite follow, how are you searching for b with its line break? Can you post an example search and replace expression
kovidgoyal is offline   Reply With Quote
Old 03-27-2020, 10:10 AM   #5
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,743
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by jiembe View Post
Sorry. English is not my first language.

What I mean is that when I do a search and replace with 'nothing' (as replace) I get blank lines rather than no line at all.
For ex:
a
b
c

searching and replacing b with its line break I got
a

c

instead of
a
c
You need to search for b including the line ending and then you will get rid of the line. when you replace with nothing.
JSWolf is offline   Reply With Quote
Old 03-27-2020, 10:41 AM   #6
jiembe
Zealot
jiembe began at the beginning.
 
Posts: 145
Karma: 10
Join Date: Sep 2016
Location: Montréal Québec
Device: Kobo Glo; Kobo Libra
Yes. I forgot to mention it in my second post. My search include the line break.
jiembe is offline   Reply With Quote
Old 03-27-2020, 12:14 PM   #7
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,345
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Then use regex mode like this

some text$
kovidgoyal is offline   Reply With Quote
Old 03-27-2020, 12:28 PM   #8
jiembe
Zealot
jiembe began at the beginning.
 
Posts: 145
Karma: 10
Join Date: Sep 2016
Location: Montréal Québec
Device: Kobo Glo; Kobo Libra
You have broken the normal search and replace behavior found in an editor. I think you have tried to help one person but at the expense of others. He's the one who should use regex not all the others.
You should correct it and go back to the normal behaviour.
jiembe is offline   Reply With Quote
Old 03-27-2020, 01:49 PM   #9
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,743
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by kovidgoyal View Post
Then use regex mode like this

some text$
I agree. 4.13 has broken normal search/replace

If I have

Code:
	a
	b
	c
And I select the b line including the line ending and do a replace all, I end up removing all of the letter b. So yes it is broken. Can you please remove this new broken feature?

I am going to have to go back to 4.12 because I use this sort of search/replace.
JSWolf is offline   Reply With Quote
Old 03-27-2020, 03:12 PM   #10
MerlinMama
Evangelist
MerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beauty
 
MerlinMama's Avatar
 
Posts: 498
Karma: 32554
Join Date: May 2014
Location: Canada
Device: Kobo Sage
I really dislike the new search & replace. I have some double spaces in my text, so I did as usual and searched for 2 spaces, replaced with 1 space. In my entire document, each letter was now separated by a space. There was an extra space between an ellipsis and the next word, I searched for the ellipsis and space to replace with just the ellipsis, and it didn't change anything.

Also: I search for </p> with a space in front of it to remove the space, and it finds all of the </p> even if there are no spaces in front of it

Last edited by MerlinMama; 03-27-2020 at 03:18 PM. Reason: Added example with Also
MerlinMama is offline   Reply With Quote
Old 03-27-2020, 03:15 PM   #11
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,743
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by MerlinMama View Post
I really dislike the new search & replace. I have some double spaces in my text, so I did as usual and searched for 2 spaces, replaced with 1 space. In my entire document, each letter was now separated by a space. There was an extra space between an ellipsis and the next word, I searched for the ellipsis and space to replace with just the ellipsis, and it didn't change anything.
Because searching is now broken, I've gone back to 4.12. I'm waiting for the fixed version as this is a serious issue.
JSWolf is offline   Reply With Quote
Old 03-27-2020, 05:16 PM   #12
Quoth
Still reading
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 14,016
Karma: 105092227
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
I read the "what's new" and when I read that
Quote:
Edit book: When searching in normal mode, have spaces in the search expression match multiple spaces and line breaks in the text.
I decided not to install/upgrade. That alone seemed weird. It seemed like totally broken behaviour. If I want to find more than one space, I'll search for that.

If a program is actually doing what I want, I only upgrade if there is a major reason to do so and other people haven't seen a problem. I always read change logs and similar.
It's part of the reason I don't "auto update" anything ever and run Linux Mint and don't apply kernel updates too quickly.

One of the things really good about Calibre (there are many), is that it doesn't autoupdate.

One day the entire Internet and commerce will fail because of increased Cloud dependence for Mobile Billing, Point of Sale, ATMs, Wholesale stock reordering and many other things due to "Elastic Computing" auto-updates on Datacentre /Cloud /ISP Routers and webservers and someone pushing out a badly tested patch on a Friday night.

A fable about it: 'No Silver Lining'
Quoth is offline   Reply With Quote
Old 03-27-2020, 11:04 PM   #13
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,345
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
No worries, I will simply move it off to a separate fuzzy mode for the next release. That can do other things like match curly quotes with straight ones and similar.
kovidgoyal is offline   Reply With Quote
Old 03-28-2020, 03:00 AM   #14
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
I'm not sure what "fuzzy" search you are going to use, or why it would help. The problem I have with the change to the "normal" search, is that when I use it, I expect it to only find exact matches for the search term. That is how it works in every editor I have ever used. Now, if there is any white space involved, it probably won't be an exact match. Any leading or trailing white space is being removed. And white space in the middle is being reduced to "one or more".

For example, if I search for:

Code:
 abc  def
(space at the start and end, two spaces in the middle)

It will match, "xyzabc defghi", which is not the string I am looking for.

The problem in the first post is because the last character in the search term is the line-end character and is removed with the current search. Changing to a regex using a $ to get the end of the line won't help as that doesn't include the line-end character in the match, so it won't get replaced.
davidfor is offline   Reply With Quote
Old 03-28-2020, 03:12 AM   #15
Sirtel
Grand Sorcerer
Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.
 
Sirtel's Avatar
 
Posts: 13,466
Karma: 239219453
Join Date: Jan 2014
Location: Estonia
Device: Kobo Sage & Libra 2
Quote:
Originally Posted by JSWolf View Post
Because searching is now broken, I've gone back to 4.12. I'm waiting for the fixed version as this is a serious issue.
I agree and am doing the same. I often search for characters with redundant spaces in the editor, or even spaces only, to remove them. Now I would be unable to do so, if I updated.
Sirtel is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Request- NY Times Modification Re iloveredbull Recipes 0 08-24-2015 09:27 PM
Jutoh - toc modification cabpp ePub 0 05-23-2014 09:35 PM
Library modification plugin anthony.burton4 Plugins 1 10-09-2012 10:58 PM
MOBI to EPUB without modification Caleb666 Conversion 3 08-08-2011 04:37 PM
Please help on modification of key mapping howdypda Sony Reader Dev Corner 0 08-03-2009 09:30 PM


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


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