Wed 23 Oct 2013 07:01:50 PM UTC, comment #30:
Works for me!
|
Wed 23 Oct 2013 06:57:15 PM UTC, comment #29:
Fixed with changeset
http://hg.savannah.gnu.org/hgweb/octave/rev/d3bb7f1e3971
The only drawback is that I had to install a custom message in order to get rid of the messages, that the poller engine is used instead of the native one.
Ben, I would be glad if you could test if everything is working as expected before I close the report.
|
Wed 23 Oct 2013 05:27:34 PM UTC, comment #28:
The changetset below allows foo.txt to be created when "edit foo.txt" is executed and "foo.txt" does not exist.
http://hg.savannah.gnu.org/hgweb/octave/rev/6a2e483125dd
|
Wed 23 Oct 2013 04:44:56 PM UTC, comment #27:
Yes. the watcher does work if I modify foo.m outside of Octave.
|
Wed 23 Oct 2013 04:27:17 PM UTC, comment #26:
I am preparing a changeset that asks for creating the file and an option in the settings that files are always created without dialog.
Does the watcher with the other non-native engine work for you when you really modify a file outside octave?
|
Wed 23 Oct 2013 11:44:48 AM UTC, comment #25:
The "edit" command in Matlab behaves the same for all extensions (at least on MacOSX). The one instance where m-file are treated differently is that "edit foo" and "edit foo.m" are equivalent.
Has the subject of creating new file with types that are not .m or .cc been discussed?
If not, might the current dialog be modified to say; `File "foo.txt" does no exist. Would you like to create a new file?" ( Yes ) ( No )
|
Wed 23 Oct 2013 04:50:04 AM UTC, comment #24:
Then I will have a look how to get rid of the "engine" warning.
The "no such directory" issue isn't a Mac only problem (see comment #12). When in GUI mode "edit" only creates non existing .m or .cc files. Non existing files with other extensions are not created but still the editor is called.
|
Tue 22 Oct 2013 09:07:14 PM UTC, comment #23:
Patch 05 eliminates the modified warning.
However, "edit foo.txt" still results in a dialog with
"Could not open file foo.txt for read: No such file or directory." ( OK )
Is that a MacOS X only problem?
|
Tue 22 Oct 2013 08:53:04 PM UTC, comment #22:
For patch 04, I encountered the error below.
|
Tue 22 Oct 2013 08:29:57 PM UTC, comment #21:
The MacOSX file system may be cacheing files in some manner. I am also using Apple's TimeMachine backup feature, but that shouldn't be changing the modification date.
I'll try each patch are report back in separate comments.
|
Tue 22 Oct 2013 07:46:07 PM UTC, comment #20:
The results are looking reasonable. At least we know now that the file watcher triggers the signal some time after the file was added to the tracking-list (in set_file_name) and not at the same moment. This looks like the files are written to the disc with a delay or something changes some file attributes after the file was written.
Do you have tools running that might cause this? Does a virus scanner set file attributes after checking the file during the write process?
To test if it is a timing issue, could you please test the attached patch 04?
The second patch 05 configures an alternative engine of the watcher. Please use the patches separately.
Sorry for flooding you with patches but I still have no specific clue.
(file #29445, file #29446)
|
Tue 22 Oct 2013 01:06:09 PM UTC, comment #19:
Regarding changes, I had troubles building the gui over the last year. Each time this occurred a solution was quickly provided.
Unfortunately, that makes bisecting difficult.
|
Tue 22 Oct 2013 12:24:14 PM UTC, comment #18:
If I then modify foo.m and save it,
|
Tue 22 Oct 2013 07:26:10 AM UTC, comment #17:
Please find attach a patch that prints several infos into the console. Could you please send me the printed information for the two cases
1. edit foo.m
2. saving a modified editor file?
(file #29439)
|
Tue 22 Oct 2013 04:44:32 AM UTC, comment #16:
Were there any changes on your system that may be related to the problem during this time?
|
Tue 22 Oct 2013 02:16:07 AM UTC, comment #15:
The furthest back I've been able to build the gui is 16638:3c2e457eeb72. Unfortunately, I encounter the same problem.
|
Tue 22 Oct 2013 01:02:29 AM UTC, comment #14:
I should mention that this problem wasn't present a few months back. Unfortunately, I haven't tested the GUI often enough to give an estimate more accurate than that.
I suppose I should attempt a bisect.
|
Mon 21 Oct 2013 08:07:20 PM UTC, comment #13:
The 3rd patch also has no effect on the warnings :-(
I get the modified-waring when saving an edited file and when creating a new file with "edit foo.m". But not when I load a file via the open file dialog.
As you wrote, "edit foo.m" creates the file in the current directory. If the docs indicate otherwise, my understanding is that they are wrong for the GUI. If my memory is correct, this had been discussed on the list and we agreed that the file should be created in the pwd(). I do not recall what was decided should be done for the CLI version of Octave.
In any event, I have the following line in my octaverc file.
Thus, non-existant files are created for me in the pwd() when running the CLI version as well.
|
Mon 21 Oct 2013 07:53:50 PM UTC, comment #12:
Well, I am running out of ideas. Here is another patch that completely resets the file-watcher when saving or loading a file. Are there any changes with it?
To summarize: You get the modified-waring when saving an edited file and when creating a new file with "edit foo.m".
But not when you a re loading a file via the open file dialog?
The "edit foo.txt" issue also shows up for me. When in gui-mode edit.m does apparently not create the file in the home directory as indicated in the docs but only calls the editor with its filename. I will file another bug report for this later.
Btw: the file foo.m is created by "edit foo.m" but in the current directory instead of the home directory (as indicated in the docs, too). Can you confirm this on your system?
(file #29437)
|
Mon 21 Oct 2013 01:18:56 PM UTC, comment #11:
With the patch applied, "edit foo.m" (non-existing foo.m) still results in the modified-warning.
And "edit foo.txt" (also non-existing foo.txt) still results in file-not-found warning.
|
Mon 21 Oct 2013 02:53:15 AM UTC, comment #10:
Ben, could you please test another patch (attached)?
(file #29433)
|
Sun 20 Oct 2013 08:16:33 PM UTC, comment #9:
The file "foo.m" does not exist with I try "edit foo.m". I assume the modified-warning occurs when the file is initially created.
|
Sun 20 Oct 2013 07:25:20 PM UTC, comment #8:
Ben, you get this modified-warning with "edit foo.m" and not only when saving a file in the editor?
Does foo.m already exist when "edit foo.m" is evaluated (or is maybe already opened in the editor)?
|
Sun 20 Oct 2013 06:39:06 PM UTC, comment #7:
With "97ed9dd479ab tip @" I see no change in behavior.
"edit foo.m" results in a dialog with
"It seems that `foo.m' has been modified by another application. Do you want to reload it?"
"edit foo.txt" results in a dialog with
"Could not open file foo.txt for read: No such file or directory"
|
Sun 20 Oct 2013 06:26:38 PM UTC, comment #6:
Maybe related: When a file in the actual directory was created by
its entry in the mru-menu only has the file name without path. This leads to en error if the menu is used within another directory or when the editor session is restored at next startup.
I have pushed changeset
http://hg.savannah.gnu.org/hgweb/octave/rev/97ed9dd479ab
that ensures absolute paths in the mru menu and in the file watcher.
Ben, could you please check what happens on your system after this changeset?
In the case
I suppose no file is created (in contrast to *.m files) and the editor tries to load an non-existing file. Therefore, this is the expected behavior.
|
Sun 20 Oct 2013 03:17:43 PM UTC, comment #5:
Opps. You are correct. "edit foo.txt" does not work, but "edit foo.m" does work.
In the latter case, creating the new file produces a dialog containing
"It seems that `/Users/<snip>...</snip>/the_file_name.m' has been modified by another application. Do you want to reload it?"
|
Sun 20 Oct 2013 01:41:48 PM UTC, comment #4:
Strange, the patch should not affect the problem editing a new file ...
|
Sun 20 Oct 2013 01:27:22 PM UTC, comment #3:
I can now edit a new file, but the original problem persists.
"It seems that `/Users/<snip>...</snip>/the_file_name.m' has been modified by another application. Do you want to reload it?"
|
Sun 20 Oct 2013 01:07:18 PM UTC, comment #2:
Ben, could you please try the attached patch?
(file #29428)
|
Sun 20 Oct 2013 12:58:31 PM UTC, comment #1:
If a file does not exist, the edit command produces a dialog containing the error message below
|
Sun 20 Oct 2013 12:39:06 PM UTC, original submission:
When I (1) edit a file (m-file, text file, etc) in the GUI, (2) modify the file, (3) save the file, I'm asked
|