Bug 439291 - Saving "Find and replace" algorithm, doesn't save "space" character
Summary: Saving "Find and replace" algorithm, doesn't save "space" character
Status: REPORTED
Alias: None
Product: krename
Classification: Applications
Component: general (show other bugs)
Version: 5.0.1
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Heiko Becker
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-06-29 09:57 UTC by Rafael Linux User
Modified: 2023-11-21 08:49 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rafael Linux User 2021-06-29 09:57:16 UTC
SUMMARY
Krename doesn't save correctly character " " (space) in "Find and Replace" user custom searchs

STEPS TO REPRODUCE
1. From Krename, add some files
2. Click on "Filename" tab
3. Click on "Find and Replace" button
4. Click on "Add" button
5. Type a space character (" ") in "Find"
6. Type a underscore character ("_") in "Replace with"
7. Click "OK" button
8. Click on "Save settings" and give a name like "space to underscore" to this settings and save this configuration
9. Click "Cancel" button in "Find and replace" window
10. Click on "Find and Replace" button
11. Click on "Load settings" and select "space to underscore" configuration file you previously saved
12. Double click in cell below "Find" column and ... you will see "space" character is gone (cell is empty)


OBSERVED RESULT
Krename doesn't save space character on "Save settings"

EXPECTED RESULT
To respect "Find" content when saving settings

SOFTWARE/OS VERSIONS
Operating System: openSUSE Leap 15.2
KDE Plasma Version: 5.22.0
KDE Frameworks Version: 5.83.0
Qt Version: 5.15.2
Kernel Version: 5.3.18-lp152.78-default (64-bit)
Graphics Platform: X11
Processors: 8 × Intel® Core™ i7-9700K CPU @ 3.60GHz
Memory: 15.4 GiB of RAM
Graphics Processor: GeForce RTX 2060/PCIe/SSE2

ADDITIONAL INFORMATION
To replace "space character" by another one is typical. Why not to include it as option in default function "Transliteration", for example?
Comment 1 Mihai Sorin Dobrescu 2022-10-30 08:42:27 UTC
To me it looks like bug 394853, as it can't load back the space expression.

*** This bug has been marked as a duplicate of bug 394853 ***
Comment 2 Rafael Linux User 2022-10-30 19:34:54 UTC
(In reply to Mihai Sorin Dobrescu from comment #1)
> To me it looks like bug 394853, as it can't load back the space expression.
> 
> *** This bug has been marked as a duplicate of bug 394853 ***

I not agree, since related bug summary talks about "on XML" file and in my case is not related to XML files. As a user, I don't know how KFind stores searches and IMHO, any user that look for same issue will think  394853 is an specific KFind issue when searching in XML files.
Comment 3 Mihai Sorin Dobrescu 2022-10-30 20:15:42 UTC
According to your steps, at the 8th step the find and replace settings are saved to a file that has XML format.
If you open the settings file, you can check the that. At that step, the spaces are saved in an XML tag.
Then, at the 11th step the settings are loaded back, from the XML file and the bug manifests as it trims the space or spaces there.
Comment 4 Rafael Linux User 2022-11-02 00:16:41 UTC
(In reply to Mihai Sorin Dobrescu from comment #3)
> According to your steps, at the 8th step the find and replace settings are
> saved to a file that has XML format.
> If you open the settings file, you can check the that. At that step, the
> spaces are saved in an XML tag.
> Then, at the 11th step the settings are loaded back, from the XML file and
> the bug manifests as it trims the space or spaces there.

I understand your detailed explanation, thanks. However, if a user is looking for this behavior of KFind, he never will think it should search for "XML" files, cause user doesn't know what this issue is related to (in this case, underlying technology used to store parameters). So, well, the subject "Find and replace don't support space on xml file" is (I presume) the reason cause KFind is not working fine, not the issue itself.