File locking

Dmitry Semyonov Dmitry.Semyonov at oktet.ru
Thu Jan 15 17:37:32 UTC 2004


Hello!

File locking is one more undocumented new feature in mc.
I think it should be mentioned in the NEWS file.
Also locking mechanism should be described in man pages or/and
editor help.

The more so, sometimes it behaves in unexpected manner.
Here is an example:

Create a file named test.txt
Open mc on two consoles --> mc1 and mc2.
mc1: select test.txt, F4 (edit), type "mc1", F2 (save).
mc2: select test.txt, F4 (edit), type "mc2", F2 (save).
mc1: type " rules", F2 (save).
mc1: F10 (exit from editor).
mc2: F10 (exit from editor).

Note that mc does not warn me that test.txt is modified by by both
mc1's and mc2's editor. So I may expect that test.txt contains "mc2"
text rather than "mc1 rules" one. If there is a file locking scheme, it
should be clear.

What I would like to get in the above example:
Either mc1 automatically reloads test.txt after it had been saved by
mc2, or mc1 warns me that the file was modified by someone else (mc2)
and provides a way to reload it if necessary.


Another thing: I don't understand the real meaning of "Grab lock" and
"Ignore lock" buttons of "File locked" dialog without experiments.
And then after a few weeks I'm forgetting the meaning, and have to
experiment again. F1 (help) does not show anything useful.
By the way, what if I press Esc+Esc for the dialog?


...Bye..Dmitry.




More information about the mc-devel mailing list