Re: is the rename plugin broken?

On Fri, 5 Dec 2008 12:50:48 +1100
<tpgww@xxxxxxxxxxx> wrote:

> On Thu, 4 Dec 2008 12:15:00 +0100
> Walther Maldonado <walther.md@xxxxxxxxx> wrote:
> 
> > Good day,
> > 
> > I've been trying to no avail to use the rename plugin and I give up. I 
> > wonder if I am doing something wrong or there's a bug in here somewhere.
> > 
> > Let's say I have a directory with files named like "S1.01.log", 
> > "S1.02.log", "S1.03.log" and so on, and I want to change the leading S1 
> > into S2.
> > 
> > On the rename plugin window I would use the options:
> > 
> > Search for items: in active directory
> > Match regular expression, Current name like this: S1(.*)
> > New name like this: S2\1
> > 
> > When confirming, this only shows "renaming file name S1.01.log into  , 
> > proceed?" (yes, the new name is blank!). Actually, I tried using the 
> > wildcard (.*) (all files) with the replacement chain \1 (first group), and 
> > this also yields blank files... however, if I use \0 I do get the whole 
> > filename back. 
> > 
> > Also, on the confirmation dialog, if I press "omit" or "cancel", in both 
> > cases the renaming process ends after one entry, even though more entries 
> > should be matched... 
> > 
> > Any idea of what's going on? There are no clues on the stdout/stderr 
> > streams from the app.
> 
> Chances are, it's broken now.
> 
> To assist investigation, can you advise whether escaping the brackets 
> S1\(.*\) makes any difference.
> 
> Regards
> Tom

It does seem severely broken... using \(.*\) to match files makes no 
difference. Other details I've noticed:

- when confirming to rename, no matter if you press rename, skip or cancel, the 
process stops after one operation.
- the "current name like this" combo box appears disabled when you invoke the 
plugin, even if the "match exact/wildcard" or "match regular expression" 
options are already pre-selected from last time. 
- using "match exact/wildcard" seems to match correctly, but it only works if I 
do not try to confirm before each rename. If I confirm, the file does not get 
renamed after confirming.
- Attempting to use regex replacement without confirming just leads to 100% CPU 
usage and no renaming takes place.
- If I choose "match exact/wildcard" or "match regexp", only the selected items 
are actually matched against (despite there being a third choice which is 
"selected items"). I actually like this behaviour, so I'd recommend turning 
that option into a checkbox.


The only messages I sometimes see on the stderr are this:

(emelfm2:6945): GLib-CRITICAL **: g_strsplit: assertion `string != NULL' failed
(emelfm2:6945): GLib-CRITICAL **: g_strjoinv: assertion `str_array != NULL' 
failed

However they might not be related as they do not happen all the time, and only 
when first popping up the rename dialog, not when attempting to rename.

It does sound like this plugin is quite outdated now...

Walther.


-- 
Users can unsubscribe from the list by sending email to 
emelfm2-request@xxxxxxxxxxxxx with 'unsubscribe' in the subject field or by 
logging into the web interface.

Other related posts: