compare two frontmost documents

391 views
Skip to first unread message

Luc P. Beaudoin

unread,
Jul 28, 2020, 8:38:27 PM7/28/20
to BBEdit Talk
Hi, In BBEDit 13, I  can't find "Compare Two Front Windows". I used to use "Compare Two Front Documents" a lot in and < to BBEdit 12. 

  • > "Compare Two Front Documents" has been changed to "Compare Two Front Windows". This more accurately reflects its behavior, and provides for a more predictable set of rules, specifically: this command is enabled only if there are two or more editing (or project) windows open, and a text document is active in each of the frontmost two windows, and if neither window is blocked by a modal dialog box).


and yes, the two frontmost files are .txt files... (one was a TaskPaper (text) file but I did rename it).

thanks,

Luc

Luc P. Beaudoin

unread,
Jul 28, 2020, 8:39:42 PM7/28/20
to BBEdit Talk
macOS 10.14.6 . Yes, I searched for command in BBEdit's Help menu...

Neil Faiman

unread,
Jul 28, 2020, 8:47:47 PM7/28/20
to BBEdit Talk Mailing List
Compare Two Front Windows is in the Search > Find Differences submenu.

Regards,

Neil Faiman

Sam Hathaway

unread,
Jul 28, 2020, 8:48:48 PM7/28/20
to BBEdit Talk

Luc,

On my copy of BBEdit (version 13.1.2 (414058, 64-bit, sandboxed)) on macOS (version 10.15.6 (19G73)), I see this command under Search > Find Differences > Compare Two Front Windows.

Is it possible that you’ve disabled this command under Preferences > Menus & Shortcuts?

Hope this helps.
-sam

--
This is the BBEdit Talk public discussion group. If you have a feature request or need technical support, please email "sup...@barebones.com" rather than posting here. Follow @bbedit on Twitter: <https://twitter.com/bbedit>
---
You received this message because you are subscribed to the Google Groups "BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bbedit+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bbedit/bf25e66a-e81a-468c-98eb-419870c91ac8n%40googlegroups.com.

Luc P. Beaudoin

unread,
Jul 30, 2020, 9:48:41 PM7/30/20
to BBEdit Talk
Thank you! That's it.

Interestingly, when in BBEdit > Help menu, I type `compare two`, that menu item is not revealed by BBEdit. If I type `find differences`, I can get to the menu and navigate with arrow keys from there. 

my solution will be to setup a keyboard shortcut.

Cheers,
Luc

Luc P. Beaudoin

unread,
Jul 30, 2020, 9:50:16 PM7/30/20
to BBEdit Talk

thanks for suggesting that, Sam. I hadn't revisited that pane in a while. I haven't disabled the commands, however. Per my latest comment, BBEdit does not find it via Help menu for some reason, but I can work around that.
cheers,
Luc

Patrick Woolsey

unread,
Jul 31, 2020, 10:25:21 AM7/31/20
to bbe...@googlegroups.com
On Jul 30, 2020, at 21:50, Luc P. Beaudoin <lu...@cogzest.com> wrote:

thanks for suggesting that, Sam. I hadn't revisited that pane in a while. I haven't disabled the commands, however. Per my latest comment, BBEdit does not find it via Help menu for some reason, but I can work around that.


That's a bit odd, since the Help menu's Search facility does turn it up on both my machines, and should do so consistently, provided only that the command itself is available (active).


Regards,

 Patrick Woolsey
==
Bare Bones Software, Inc.             <https://www.barebones.com/>


Gil Dawson

unread,
Mar 20, 2024, 4:01:38 PM3/20/24
to bbe...@googlegroups.com
Is there AppleScript language in BBEdit 14.6.9 equivalent to Search > Find Differences > Compare Two Front Windows?  The .sdef suggests only files and folders:

comparev : compares two files or folders

compare file : the new file/folder

against file : the old file/folder

[options Compare Options] : comparison options

[file_filter filter] : file filtering criteria (for multi-file compare)

[folder_filter filter] : folder filtering criteria (for multi-file compare)

→ Compare Results : information about the compare results

Fletcher Sandbeck

unread,
Mar 20, 2024, 4:29:04 PM3/20/24
to bbe...@googlegroups.com
You can get the "first text document", "second text document", etc. so a command like this will compare the front two windows.

tell application "BBEdit"
activate
compare first text document against second text document options {ignore RCS keywords:true, ignore all spaces:true}
end tell

[fletcher]
> --
> This is the BBEdit Talk public discussion group. If you have a feature request or need technical support, please email "sup...@barebones.com" rather than posting here. Follow @bbedit on Twitter: <https://twitter.com/bbedit>
> ---
> You received this message because you are subscribed to the Google Groups "BBEdit Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to bbedit+un...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/bbedit/245D47C8-DCE5-47A0-9920-4EEA04F00969%40GilDawson.com.

GP

unread,
Mar 20, 2024, 4:58:59 PM3/20/24
to BBEdit Talk
If you use the Script Editor to record BBEdit's Find Differences -> Compare Two Front Windows command you'll find the recording is something like:

tell application "BBEdit"
activate
compare text document id 717 against text document id 716 options {ignore blank lines:true, ignore RCS keywords:true, ignore leading spaces:true, ignore trailing spaces:true, ignore extra spaces:true}
end tell

Where the text document id's are those associated with window index 1 and window index 2 in the windows class. In my example, one of the comparison windows was for an untitled, never saved text window with no file property.

So, you don't strictly need an on disk file parameter for BBEdit's AppleScript compare command parameters.

Gil Dawson

unread,
Mar 20, 2024, 9:19:01 PM3/20/24
to bbe...@googlegroups.com
Glad to hear that BBEdit's AppleScript language is a little larger than the .sdef suggests.

I hadn't thought about looking at Script Editor's recording result.  Great idea!

Thanks, guys.

--Gil

On Mar 20, 2024, at 1:58 PM, GP <gp-bbed...@hotmail.com> wrote:

If you use the Script Editor to record BBEdit's Find Differences -> Compare Two Front Windows command you'll find the recording is something like:

tell application "BBEdit"
activate
compare text document id 717 against text document id 716 options {ignore blank lines:true, ignore RCS keywords:true, ignore leading spaces:true, ignore trailing spaces:true, ignore extra spaces:true}
end tell

Where the text document id's are those associated with window index 1 and window index 2 in the windows class. In my example, one of the comparison windows was for an untitled, never saved text window with no file property.

So, you don't strictly need an on disk file parameter for BBEdit's AppleScript compare command parameters.


On Mar 20, 2024, at 1:28 PM, Fletcher Sandbeck <flet...@cumuli.com> wrote:

You can get the "first text document", "second text document", etc. so a command like this will compare the front two windows.

tell application "BBEdit"
 activate

 compare first text document against second text document options {ignore RCS keywords:true, ignore all spaces:true}
end tell
Reply all
Reply to author
Forward
0 new messages