Menu

Feature Request: allow editing read-only file

2007-05-08
2012-11-13
  • Nobody/Anonymous

    A message about this was posted in the past:
    http://sourceforge.net/forum/message.php?msg_id=3424615

    By the way, (how) is it possible to get _thread( view of message)s_, instead of individual messages with only a listing of the thread messages, as (advanced) search results? It would instantly present the context of the found message.

    I would also very much like to be able to edit files that are marked read-only. I do not want to save these files again (with the same name). I want to be able to edit them and when I'm done, save them (as...) with a new name.

    I think the Clear Read Only Flag feature is nice, but this puts me at risk of accidently overwriting the original file. Being able to clear only the edit buffer's read-only flag would satisfy my wishes. Since I can't save a _file_ that is read-only, I should always get a Save File As Dialog when I want to save the edited buffer.

     
    • Nobody/Anonymous

      Perhaps you could, apart from the color indicating changes, create some alternative tab disk icon (bitmap) showing that the file's edit buffer is read-only. The state, changed or not, could be told from the icon's color then, the change-ability from the type of the bitmap. Perhaps you could show some kind of (closed or open) lock symbol on the disk.

      To go a little further, also the file's own change-ability could be shown next to the edit buffer's. But this would almost infer that also the file's own state, changed or not, should be reflected by the disk icon. Of course, files could have changed outside NP++, which NP++ does detect.

      One other improvement would be to _always_ act on CTRL+S, showing a File Save As Dialog whenever the current file itself is read only.

       
      • MMTsuchi

        MMTsuchi - 2007-10-19

        Disk icons on inactive tabs are poorly contrasted, in my opinion.

         
    • Nobody/Anonymous

      Something that also could help to prevent accidently overwriting original files, would be an option to mark a file To Be Saved As. As soon as the Save button or menu option is hit, this will make the Save File As Dialog show.

      This will avoid the need to first mark the original file itself as read only, which currently blocks the possibility to save it (as...).

       
    • Nobody/Anonymous

      It would also be more consistent if I could SET the read only flag of a file, since I _can_ also clear it from the tab menu. I can check the Read Only option in that menu, but this only marks the file's _edit buffer_ in NP++ as read only.

      So, to be complete and consistent, I would propose the next set of features:
      - Allow checking and unchecking the edit buffer's Read Only flag
      - Allow setting and clearing the Read Only attribute of the file itself

      These features would allow any combination, which would satisfy all my needs.

      There could be some dependency, but this is not necessary and could be handled with user prefence options: for instance, clearing the file's Read Only attribute could be reflected in the edit buffer's read only flag by clearing that also. Currently, when a file itself is marked as Read Only outside of NP++, NP++ will notice this and prevent any further changes to the edit buffer.

      I also noticed that a file that can be edited at first, and will be check read only later (either the buffer or the file itself), will not show this on the tab bar. The disk icon will be greyed out. I think it would be a good thing to keep showing that the edit buffer's contents have changed. You will only notice this in the current situation when closing the file. NP++ will ask if you want to save the file, because of the changes. If you click Yes, it won't do anything, when the file itself (still) is Read Only...

       
MongoDB Logo MongoDB