Page 1 of 1

New Left/Right File/Dir arguments in User Menu in 2.5 RC1

Posted: 28 Apr 2006, 10:55
by Thierry
Hi,
I just tried this exciting new feature, very useful for me since I use Beyond Compare for advance file/directory comparison. I ended up a bit disappointed because:

1. You have to choose FileToCompareLeft OR DirToCompareLeft in the arguments: as a result, I need 2 menu items: one that says "bc2.exe FileToCompareLeft FileToCompareRight", and one that says "bc2.exe DirToCompareLeft DirToCompareRight". I have to remember clicking the right button depending on whether I selected directories or files. It would be easier for me to have only one menu entry "bc2.exe SelectedLeft SelectedRight".

2. It did make sense to have the difference between the two if "DirToCompareLeft" and "DirToCompareRight" where referring to the directory displayed in the panels, whatever the focused file: the second menu entry would therefore mean "compare the two displayed directories, not the files". Maybe you could add "DirDisplayedLeft" and "DirDisplayedRight"?

3. I have to select what I want to compare. This is a waste of time: I just compare two files or 2 directories, so what I'd like is to be able to compare the focused files or directories in each panel (e.g., FocusedItemLeft and FocusedItemRight). To be really convenient, this would require that the focused file or directory in the inactive panel be highlighted, but with a different highlight (in the same way the focused node background changes in the tree of the Configuration dialog box, depending on whether the tree itself is focused or not).

Finally, the possibility to pass the list of selected items is great, but... not available for the Editors configuration! :(
I'd like to be able to invoke for instance "TextPad.exe $(ListOfSelectedNames)" so that when I press F4, I open all selected files in TextPad...

I know, the users are always complaining...
So to finish on a better note: you do great jobs, guys. And I could not work without Salamander!

Solution for WinMerge

Posted: 28 Apr 2006, 13:10
by KNUT
Here's my solution for WinMerge:

Code: Select all

Command: [YourPathToWinMerge]WinMerge.exe
Arguments: "$(FileToCompareLeft)" "$(FileToCompareRight)"
Initial directory: $(FullPath)
You could take a look here :D

Re: New Left/Right File/Dir arguments in User Menu in 2.5 RC

Posted: 28 Apr 2006, 13:15
by Petr Solin
Thierry wrote:1. You have to choose FileToCompareLeft OR DirToCompareLeft in the arguments: as a result, I need 2 menu items: one that says "bc2.exe FileToCompareLeft FileToCompareRight", and one that says "bc2.exe DirToCompareLeft DirToCompareRight". I have to remember clicking the right button depending on whether I selected directories or files. It would be easier for me to have only one menu entry "bc2.exe SelectedLeft SelectedRight".
OK, it seems that I can easily add four more variables for "File or Directory To Compare". Exactly: two files or two directories to compare, but I expect it's not problem, is it? Or do you need also to pass combination of one file and one directory to your comparation utility?
Thierry wrote:2. It did make sense to have the difference between the two if "DirToCompareLeft" and "DirToCompareRight" where referring to the directory displayed in the panels, whatever the focused file: the second menu entry would therefore mean "compare the two displayed directories, not the files". Maybe you could add "DirDisplayedLeft" and "DirDisplayedRight"?
You can probably use FullPathInLeft and FullPathInRight variables.
Thierry wrote:3. I have to select what I want to compare. This is a waste of time: I just compare two files or 2 directories, so what I'd like is to be able to compare the focused files or directories in each panel (e.g., FocusedItemLeft and FocusedItemRight). To be really convenient, this would require that the focused file or directory in the inactive panel be highlighted, but with a different highlight (in the same way the focused node background changes in the tree of the Configuration dialog box, depending on whether the tree itself is focused or not).
If names are the same, you need not to select anyhing. If names are different, you need to select them -- this is preciselly for the reason that focus in inactive panel is not highlighted (and I think it's nonsense to add it only for this reason). I expect that you mostly compare files/directories with the same name (in opposite panels), so this should not be problem.
Thierry wrote:Finally, the possibility to pass the list of selected items is great, but... not available for the Editors configuration! :(
I'd like to be able to invoke for instance "TextPad.exe $(ListOfSelectedNames)" so that when I press F4, I open all selected files in TextPad...
If there is more requests, we can consider it (but Edit (F4) is command for focus, so this is not fitting to this well). For now you can use user-menu command to open your editor.
Thierry wrote:I know, the users are always complaining...
So to finish on a better note: you do great jobs, guys. And I could not work without Salamander!
This is new feature, so I have expected some suggestions. :)

Posted: 28 Apr 2006, 16:21
by SvA
Thierry wrote:Finally, the possibility to pass the list of selected items is great, but... not available for the Editors configuration!
I'd like to be able to invoke for instance "TextPad.exe $(ListOfSelectedNames)" so that when I press F4, I open all selected files in TextPad...
Yes, I'd like to see this. I often had to work around this limitation by loading the focused item into my editor, then deselect it in SS and drag the rest to the now open editor.

Re: New Left/Right File/Dir arguments in User Menu in 2.5 RC

Posted: 28 Apr 2006, 17:10
by Guest
Petr Solin wrote:OK, it seems that I can easily add four more variables for "File or Directory To Compare". Exactly: two files or two directories to compare, but I expect it's not problem, is it? Or do you need also to pass combination of one file and one directory to your comparation utility?
I'm not sure I understand exactly what you mean... I'll give an example: on the left, I have the content of a folder "C:\Foo\Bar", containing 1 subfolder "BarDir" and 1 file "BarFile.txt". On the right, I have the content of a folder "C:\Yup\Yop", with 1 subfolder "YopDir" and 1 file "YopFile.txt".

I would have as template: "bc2.exe $(LeftSelectedItem) $(RightSelectedItem)"

If I select BarDir and YopDir, then it would resolve to
"bc2.exe C:\Foo\Bar\BarDir C:\Yup\Yop\YopDir"

If I select BarFile.txt and YopFile.txt, then it would resolve to
"bc2.exe C:\Foo\Bar\BarFile.txt C:\Yup\Yop\YopFile.txt"

If I select BarDir and YopFile.txt, then it would resolve to
"bc2.exe C:\Foo\Bar\BarDir C:\Yup\Yop\YopFile.txt"

The last example is a bit silly, because it does not make much sense to compare a directory with a file, but it's my responsibility as a user to select comparable items.

Is this what you had understood?
Petr Solin wrote:You can probably use FullPathInLeft and FullPathInRight variables.
You're prefectly right, my mistake... :oops:
Petr Solin wrote:If names are the same, you need not to select anyhing.
If I compare 2 folders, I do expect that the comparison will match files inside them by name (but the names of the folders are likely to be different). If I compare 2 files, the chances are great that they do not have the same name: I use to version files when I work, inside the same folder (like Toto v1.txt, Toto v2.txt, etc.). Or, I receive a file with a different name from what I have, but I want to check whether they have the same content. So whether I compare 2 folders or 2 files, they generally do not have the same name.
Petr Solin wrote:If names are different, you need to select them -- this is preciselly for the reason that focus in inactive panel is not highlighted (and I think it's nonsense to add it only for this reason).
Well, I can give you another usage case: I generally work in "Brief" display mode, and I make use of the status bar at the bottom of each panel when I want to see file details. Say I look at a file that has the focus in the left panel, and notice its last modification date is not what I expected. So I go to the right panel, to see another file, and check its date. I compare the 2 status bar information... But wait... Is the focus on the right file in the other (inactive) panel? Only way to check: use Tab key to see who's got the focus...

It may sound a bit peculiar, but I do often miss the trace of the focus in the inactive panel. But if I'm the only one, just drop it... ;)
Petr Solin wrote:If there is more requests, we can consider it (but Edit (F4) is command for focus, so this is not fitting to this well). For now you can use user-menu command to open your editor.
I can live with that, but the fact that F4 was for the focused file, not all the selected ones, always seemed counter-intuitive for me: if I select 10 files and press F5, F6, F8, the action is on all files. But if I press F4, it edits only 1 file, and F3 views only 1 file. Not consistent, in my view: I often forget it, press F4 or F3 to edit/view all files, and then think: "oh, right, it does not work this way..."

Again, thanks for the good work anyway! :D

Posted: 28 Apr 2006, 17:25
by Thierry
Forgot to login to post the previous message, sorry... :oops:

I just thought that in fact, what I would need regarding the "focused item" story would be that if there are not enough selected items for the compare (be them files or folders), then the missing one(s) default to the focused one(s). For instance: if nothing is selected, then compare focused in left & focused in right. If only 1 selected, then compare selected (as left) to focused (as right).

Yeah: what if the #@ยค$ user has the focus on the only selected item? Well, let him/her compare a file/folder to itself! You're not responsible for dumb users... ;)

Re: New Left/Right File/Dir arguments in User Menu in 2.5 RC

Posted: 02 May 2006, 12:08
by Petr Solin
Anonymous wrote:The last example is a bit silly, because it does not make much sense to compare a directory with a file, but it's my responsibility as a user to select comparable items.
I also think that it has no sense, so we do not support it (to compare file with directory).
Anonymous wrote:If I compare 2 folders, I do expect that the comparison will match files inside them by name (but the names of the folders are likely to be different). If I compare 2 files, the chances are great that they do not have the same name: I use to version files when I work, inside the same folder (like Toto v1.txt, Toto v2.txt, etc.). Or, I receive a file with a different name from what I have, but I want to check whether they have the same content. So whether I compare 2 folders or 2 files, they generally do not have the same name.
We would have to add another variables if we wanted to prefer focused name in target panel (instead of the same name in target panel). We will wait for more user requests before adding these new variables.
Anonymous wrote:I can live with that, but the fact that F4 was for the focused file, not all the selected ones, always seemed counter-intuitive for me: if I select 10 files and press F5, F6, F8, the action is on all files. But if I press F4, it edits only 1 file, and F3 views only 1 file. Not consistent, in my view: I often forget it, press F4 or F3 to edit/view all files, and then think: "oh, right, it does not work this way..."
It's standard behaviour (since Norton Commander), we can't (and don't want) to change it. We can add command Edit All and View All, but there is only few requests for them.

Re: New Left/Right File/Dir arguments in User Menu in 2.5 RC

Posted: 02 May 2006, 17:03
by SvA
Petr Solin wrote:
Anonymous wrote:I can live with that, but the fact that F4 was for the focused file, not all the selected ones, always seemed counter-intuitive for me: if I select 10 files and press F5, F6, F8, the action is on all files. But if I press F4, it edits only 1 file, and F3 views only 1 file. Not consistent, in my view: I often forget it, press F4 or F3 to edit/view all files, and then think: "oh, right, it does not work this way..."
It's standard behaviour (since Norton Commander), we can't (and don't want) to change it. We can add command Edit All ind Wiew All, but there is only few requests for them.
Yes, I agree, you should not change this standard behaviour. But providing a way to change this behaviour was great. I stated already above, that I could well use an Edit Selected command.

On the other hand, it was great to be able to opperate copy, move and delete on the focused item only, even when selections are made.

E.g. I often use Salamander to 'syncronise' directories. I first use directory compare. I then need to look over the selected items and delete some and copy others, some to the directory compared to, some to a different one. This is a task which is rather tedious as it is now, but could be simplified a lot with alternate workings of these operations.

Posted: 18 May 2006, 14:36
by Petr Solin
I have added user menu variables for compare of two files or two directories: FileOrDirToCompareLeft & FileOrDirToCompareRight, FileOrDirToCompareActive & FileOrDirToCompareInactive.

Posted: 18 May 2006, 17:49
by Thierry
Petr Solin wrote:I have added user menu variables for compare of two files or two directories: FileOrDirToCompareLeft & FileOrDirToCompareRight, FileOrDirToCompareActive & FileOrDirToCompareInactive.
Great ! :D
Thanks.