#81 read-only versus locked

development
closed-accepted
nobody
Program (402)
2
2001-11-25
2001-10-09
Anonymous
No

about Nedit 5.2 (RC1, i386 linux)

nedit -read <file>
nc -read <file>

Opening a file with the -read option causes nedit to open the file in 'read-only' mode, regardless of the file permissions. That's what the documentation says and that's what is does now.

However a file with write permissions should be opened in 'locked' mode instead, because in 'read-only' mode it's not possible to switch to 'edit' mode in the Preferences menu. The only way to modify the file is to close and reopen it.

Discussion

  • Eddy De Greef
    Eddy De Greef
    2001-10-09

    Logged In: YES
    user_id=73597

    This is a known issue (see bug #412236).
    I fully agree with you; I find the current behaviour
    very annoying too.
    The motivation for this change was that the user
    should be protected from unlocking the file accidentally,
    but the current solution is clearly an over-protection.
    I've suggested, as a compromise, to ask the user
    for confirmation through a dialog when (s)he tries to
    unlock a file, but not many people seemed to care.

     
  • Scott Tringali
    Scott Tringali
    2001-10-09

    Logged In: YES
    user_id=11321

    I agree with the poster and Eddy here. Forcibly
    keeping it read-only when the file is non-writable is good,
    but forcibly keeping it read-only when the users just
    invoked "read" is annoying.

     
  • Filip Bouljon
    Filip Bouljon
    2001-10-12

    Logged In: YES
    user_id=344891

    (note: I'm the original poster, but now I've got a login :)

    I think one should distinguish 3 cases:
    1. files you want to edit (-> normal edit mode)
    2. files you don't want to edit (-> locked mode)
    3. files you can't edit (-> read-only mode)

    I think there should at least be a way to invoke nedit (or nc) in locked mode from the command line, allowing to switch to edit mode without closing the window and reopening it.

     
  • Alexander Mai
    Alexander Mai
    2001-11-24

    Logged In: YES
    user_id=15180

    Don't know why one should invoke explicity
    by -read and then wants to edit that file.
    If the user doesn't know what (s)he wants to
    do we can't really help :-)

     
  • Alexander Mai
    Alexander Mai
    2001-11-24

    • priority: 5 --> 2
     
  • Eddy De Greef
    Eddy De Greef
    2001-11-24

    Logged In: YES
    user_id=73597

    This discussion was continued on the develop
    mailing list (end of October), and everyone agreed
    that the behaviour was indeed flawed.
    Steve has changed it in the mean time (in the
    development branch), and now the user can unlock
    a file again that was lock with -read.

    This bug can be closed.

     
  • Alexander Mai
    Alexander Mai
    2001-11-25

    • status: open --> closed-accepted
     
  • Alexander Mai
    Alexander Mai
    2001-11-25

    Logged In: YES
    user_id=15180

    "Everyone"? Sorry, I didn't. Actually you
    can't create a program which can deal
    perfectly with users that are changing their
    mind nearly every second ...