Page 1 of 1

How do I compare files from the explorer interface using a session?

Posted: Mon Apr 11, 2022 3:43 pm
by Alexo
I would like to select 2 files in explorer to compare via the right-click menu, and have the comparison done using the settings saved in the session of my choice.

However, it seems that the files are always compared using the "unnamed default session" and I found no way of changing the session without re-entering the files to compare.

Re: How do I compare files from the explorer interface using a session?

Posted: Tue Apr 12, 2022 9:13 am
by psguru
You can actually specify command line options for Shell integration under Options | Global. You can add an /se option there if you wish.

Re: How do I compare files from the explorer interface using a session?

Posted: Tue Apr 12, 2022 9:53 am
by Alexo
Yes, but it will apply the session to *all* comparisons made from explorer. That does not help if I want to compare two files with one session, then another two files with another sesssion, etc. Basically an ad-hoc decision that I find happens quite often.

It would be helpful to switch sessions while keeping the content of the currently compared panes.
The only way I can see to switch to a different session is to open a new comparison, which does not preserve the panes.
Adding a [Keep files] button to the "new comparison" dialog (similar to [empty files]) should address the issue, or alternatively, a "switch session" option.

Aside: is there a way to switch between text/binary/table modes?

Re: How do I compare files from the explorer interface using a session?

Posted: Tue Apr 12, 2022 10:04 am
by psguru
It would be helpful to switch sessions while keeping the content of the currently compared panes.
The only way I can see to switch to a different session is to open a new comparison, which does not preserve the panes.
Adding a [Keep files] button to the "new comparison" dialog (similar to [empty files]) should address the issue, or alternatively, a "switch session" option.
Or you can use the Options dialog and import your desired options from a previously exported file.
Aside: is there a way to switch between text/binary/table modes?
Files | Compare As

Re: How do I compare files from the explorer interface using a session?

Posted: Tue Apr 12, 2022 11:31 am
by Alexo
psguru wrote: Tue Apr 12, 2022 10:04 am Or you can use the Options dialog and import your desired options from a previously exported file.
Won't it overwrite the options of the current (default) session? That would be a bad thing.

psguru wrote: Tue Apr 12, 2022 10:04 am Files | Compare As
Does not work for me.

1. Open a new comparison without files.
2. Type 11,22,33 into the left pane, and 11,--,33 into the right one.
3. All the "compare as" options are greyed out.

Re: How do I compare files from the explorer interface using a session?

Posted: Tue Apr 12, 2022 11:38 am
by psguru
Won't it overwrite the options of the current (default) session? That would not be a good thing.
It will. Unfortunately, this all I can propose. Changing sessions on the fly is unlikely to happen, mostly due to the amount of effort and lack of requests (not counting yours).

Re: How do I compare files from the explorer interface using a session?

Posted: Tue Apr 12, 2022 12:20 pm
by Alexo
Fair enough.

How about the alternative I suggested?
Alexo wrote: Tue Apr 12, 2022 9:53 am Adding a [Keep files] button to the "new comparison" dialog (similar to [empty files]) should address the issue
It could either pre-populate the new comparison dialog with the current "first" and "second" file/directory text boxes, or immediately launch a comparison with those files/directories.

Re: How do I compare files from the explorer interface using a session?

Posted: Tue Apr 12, 2022 12:23 pm
by psguru
What about the existing "Retain file/directory pair when changing session" option under Options | Global?

Re: How do I compare files from the explorer interface using a session?

Posted: Tue Apr 12, 2022 1:15 pm
by Alexo
It almost works!

To illustrate the problem:
1. In session #1 compare two files: file-1 and file-2
2. Still in session #1, compare two directories, dir-1 and dir-2
3. Open a new comparison, select session #2, and choose two different files: file-3 and file-4 (edit: fixed)
4. Set the global setting
5. Open new comparison, and select session #1 (edit: fixed)

Expected result:
The dialog is populated with file-3 and file-4

Actual result:
The dialog is populated with the directories dir-1 and dir-2
Switching to files, still uses the LRU file-1 and file-2

Re: How do I compare files from the explorer interface using a session?

Posted: Tue Apr 12, 2022 2:49 pm
by psguru
1. In session #1 compare two files: file-1 and file-2
2. Still in session #1, compare two directories, dir-1 and dir-2
3. Switch to session #2, comparing two different files, file-3 and file-4
How do you switch?
4. Set the global setting
5. Open new comparison, and select session #2
You are already in Session 2, how can you switch to it again?

Re: How do I compare files from the explorer interface using a session?

Posted: Tue Apr 12, 2022 3:50 pm
by Alexo
psguru wrote: Tue Apr 12, 2022 2:49 pm How do you switch?
Open a new comparison (description fixed)
You are already in Session 2, how can you switch to it again?
By using the mystical power of the typo! (description fixed)

Re: How do I compare files from the explorer interface using a session?

Posted: Wed Apr 13, 2022 2:30 pm
by psguru
This is actually by design. The option only works if the same comparison mode is used between sessions in question. Changing this would be complicated.

Re: How do I compare files from the explorer interface using a session?

Posted: Wed Apr 13, 2022 3:30 pm
by Alexo
Is it possible to default to the same (current) comparison mode when that setting is set?

Or alternatively, remembering the files/dirs in the current comparison and filling them in when the user switches to the same mode in the dialog (also when the setting is set)?

Re: How do I compare files from the explorer interface using a session?

Posted: Wed Apr 13, 2022 3:53 pm
by psguru
Unfortunately, none of these are easy.

Re: How do I compare files from the explorer interface using a session?

Posted: Wed Apr 13, 2022 6:58 pm
by Alexo
Oh well. Thank you regardless.