[Bug 312332] New: Digikam don't save rename pattern when using regex

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug 312332] New: Digikam don't save rename pattern when using regex

Philippe
https://bugs.kde.org/show_bug.cgi?id=312332

            Bug ID: 312332
           Summary: Digikam don't save rename pattern when using regex
    Classification: Unclassified
           Product: digikam
           Version: 2.8.0
          Hardware: Ubuntu Packages
                OS: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: Advanced Rename
          Assignee: [hidden email]
          Reporter: [hidden email]

In the rename file dialog, when you use regex to modify a string, the pattern
is not saved in the history of pattern used.

It's due to the presence of commas ',' (ex: [dir]{replace:"^[0-9\\-]*_","",r})
because commas are the separator used to store in the digikam config file (see
section "[AdvancedRename Input]", key "Pattern History List=")

For exemple, if you try the pattern :
[date:"yyyy-MM-dd"]_[dir]{replace:"^[0-9\\-]*_","",r}_[date:"HH-mm-ss"]_###[f].[ext]
it will be never saved.

PS : I tried to play a little with modifying directly the config file and it
seems there is also a problem with the '\' char...

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 312332] Digikam don't save rename pattern when using regex

Gilles Caulier-4
https://bugs.kde.org/show_bug.cgi?id=312332

Gilles Caulier <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]
                   |                            |, [hidden email]

--- Comment #1 from Gilles Caulier <[hidden email]> ---
Andi,

I don't take a look how to save Advance Rename settings in config file, but it
can be an encoding problem (UTF8) or a bug in KConfig API...

Gilles Caulier

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 312332] Digikam don't save rename pattern when using regex

Andi Clemens
In reply to this post by Philippe
https://bugs.kde.org/show_bug.cgi?id=312332

--- Comment #2 from Andi Clemens <[hidden email]> ---
I'll take a look at this later on...

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 312332] Digikam don't save rename pattern when using regex

Andi Clemens
In reply to this post by Philippe
https://bugs.kde.org/show_bug.cgi?id=312332

--- Comment #3 from Andi Clemens <[hidden email]> ---
Hmm for me the string you provided is saved correctly:
[date:"yyyy-MM-dd"]_[dir]{replace:"^[0-9\\-]*_","",r}_[date:"HH-mm-ss"]_###[f].[ext]

Strange...

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 312332] Digikam don't save rename pattern when using regex

Andi Clemens
In reply to this post by Philippe
https://bugs.kde.org/show_bug.cgi?id=312332

--- Comment #4 from Andi Clemens <[hidden email]> ---
After saving the pattern several times, it really seems to disappear again.
Maybe I need to encode it by myself somehow... will have a look

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 312332] Digikam don't save rename pattern when using regex

Andi Clemens
In reply to this post by Philippe
https://bugs.kde.org/show_bug.cgi?id=312332

--- Comment #5 from Andi Clemens <[hidden email]> ---
Hmm for me nothing is saved in the history list... even simple things like:
aaa_###

I guess it is broken in general, but why? Need to investigate later this
evening...

Andi

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 312332] Digikam don't save rename pattern when using regex

Andi Clemens
In reply to this post by Philippe
https://bugs.kde.org/show_bug.cgi?id=312332

--- Comment #6 from Andi Clemens <[hidden email]> ---
Git commit 3a1cf66687dbd5845e29f77970107edab9e0359b by Andi Clemens.
Committed on 30/12/2012 at 19:58.
Pushed by aclemens into branch 'master'.

Read pattern history before writing the new values.

The pattern history will not be saved correctly when the AdvancedRename tool is
used, but the pattern history in the BQM is not updated.
Therefore closing digiKam will result in an empty pattern history in the config
file because the BQM is the last instance that will be destroyed when closing
the main application.

This does not fix the problem described in this bugreport, but it is somehow
related.

M  +9    -9    utilities/advancedrename/advancedrenameinput.cpp

http://commits.kde.org/digikam/3a1cf66687dbd5845e29f77970107edab9e0359b

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 312332] Digikam don't save rename pattern when using regex

Andi Clemens
In reply to this post by Philippe
https://bugs.kde.org/show_bug.cgi?id=312332

Andi Clemens <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |FIXED

--- Comment #7 from Andi Clemens <[hidden email]> ---
Now that my config is saved correctly, I can NOT reproduce the described bug.
The string will be escaped correctly, it will store

date:"yyyy-MM-dd"]_[dir]{replace:"^[0-9\\\\\\\\-]*_"\\,""\\,r}_[date:"HH-mm-ss"]_###[f].[ext]

in the config file.

Could you please checkout master and compile digiKam yourself to verify the
bug? I will mark it as fixed, feel free to reopen if it still doesn't work.

I guess the previous patch might have fixed the issue, so it is not a character
problem but a problem of having multiple AdvancedRenameInput widgets in the
different digiKam components.

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 312332] Digikam don't save rename pattern when using regex

Gilles Caulier-4
In reply to this post by Philippe
https://bugs.kde.org/show_bug.cgi?id=312332

Gilles Caulier <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Version Fixed In|                            |3.0.0

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 312332] Digikam don't save rename pattern when using regex

Philippe
In reply to this post by Philippe
https://bugs.kde.org/show_bug.cgi?id=312332

--- Comment #8 from Philippe <[hidden email]> ---
I thank you a lot for your promptness and for fixing this bug.

But, I discovered the bug on the computer of my mother and won't be able to use
it again before quite some long time. And things appart, I could not be even
sure to know how to compile digikam too :(

I think I will wait for the next stable release and will reopen the bug if it's
not fixed...

Thanks again for all!

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 312332] Digikam don't save rename pattern when using regex

Andi Clemens
In reply to this post by Philippe
https://bugs.kde.org/show_bug.cgi?id=312332

--- Comment #9 from Andi Clemens <[hidden email]> ---
Maybe you can try the following:

Enter the rename pattern in the BQM (select some images and press CTRL+B).
Enter it in there and close digiKam. Maybe it will be saved correctly now.

Also try to enter the rename pattern in the config file like this, with
characters escaped:

date:"yyyy-MM-dd"]_[dir]{replace:"^[0-9\\\\\\\\-]*_"\\,""\\,r}_[date:"HH-mm-ss"]_###[f].[ext]


For new rename patterns that might not get saved, try the BQM method. Maybe
this helps.

Andi

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel