External Editors

Hello.

I use Igor for compiling while editing in vim.
When modifing procedures with an external editor I have to press the "Reload" Button on the bottom of every Procedure that was modified. Therfore first I have to open every Procedure-Window in Menu->Windows->Procedures for reloading them. When there are quite a view Procedures in the list and you have to check which one was modified, it's not a quick step to do.

A better way is already implemented in igor7:
when the files were both modified, a dialog box opens where I can reload all files. See
DisplayHelpTopic "A Plain Text File Has Been Modified Externally"


My quickest way for loading all files from disk is at the moment: I modifiy one procedure in both editors for triggering the reload panel. Then I can press the button.

Can I somehow trigger this Panel with a command or Reload all Files From Disk with a single Command?

any ideas?
Choose Misc->Miscellaneous Settings. Click the Text Editing icon. Click the External Editor tab. Click Reload Automatically.

This appears to be the default setting so I'm not sure why it did not just work that way for you.
ukos wrote:
A better way is already implemented in igor7:
when the files were both modified, a dialog box opens where I can reload all files. See
DisplayHelpTopic "A Plain Text File Has Been Modified Externally"

The ability to edit procedure files using an external editor, and the dialog you mention, are new features in Igor 7.

John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
Thank you for pointing to the Miscellaneous Settings Dialog.
under "Text Editing" "Reload Automatically" --> "Only When Igor Application is Activated" seems to be the default setting. This was probably the reason why I had to press the reload button.
I am now reloading "as soon as modifications are detected".
"Ask Before Reloading" would trigger the dialog box in the upper right corner - which is also a good thing.

Is there a Function I could call to resolve all conflicts?
ukos wrote:
under "Text Editing" "Reload Automatically" --> "Only When Igor Application is Activated" seems to be the default setting.

That is correct.
Quote:
This was probably the reason why I had to press the reload button.

It shouldn't be. It should update any changed files automatically as soon as Igor becomes the active application.
Quote:
I am now reloading "as soon as modifications are detected".

That should cause Igor to re-load the file any time you save the file from your external editor. It will not following typing in the external editor.
Quote:
"Ask Before Reloading" would trigger the dialog box in the upper right corner - which is also a good thing.

If you have selected Reload Automatically, with either sub-option, you will see the alert window only if there is a conflict- that is, if you have unsaved changes to a procedure inside Igor, and you have modified and saved the same file in your external editor.
Quote:
Is there a Function I could call to resolve all conflicts?

No.

John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
Now with the autoload option I still have to search for exactly the one file that was modified/changed and hit compile there. Because on all other windows the compile button does not appear. Only in the changed file.
This is quite about the same problem as with the reload button before.
Luckyly there is a Function Call for solving this one:
execute/p/z/q "COMPILEPROCEDURES "
ukos wrote:
Now with the autoload option I still have to search for exactly the one file that was modified/changed and hit compile there. Because on all other windows the compile button does not appear. Only in the changed file.
This is quite about the same problem as with the reload button before.

That would be a bug. I will investigate.

John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
still not working properly from time to time.
I can not properly reproduce it:
When i get a compilation error, I make a (git) rebase to fix that error in the corresponding commit.
When I return to igor after that rebase to hit compile again, sometimes no reload is happening anymore. Even though the file definitely has changed. It stays at the content from the file the rebase was made to. I have to quit igor and start it again to reload that file.