Menu

#422 Ability to edit Read-Only (readonly) buffers

v5.2
closed-fixed
core (195)
5
2015-08-10
2012-01-25
McV
No

Jedit must allow user to make edits in a readonly files. It is very wrong to disable this in any case: jedit is the _text editor_

Discussion

  • Matthieu Casanova

    You mean it should allow you to edit the file, but of course not save it?

    The goal is to do save as later ?

     
  • Jarek Czekalski

    Jarek Czekalski - 2012-01-25

    I know many text editors which don't allow saving read only files. This is an open question. Definitely it shouldn't be done without warning.

    Matthieu, this question probably regards files marked as read only, when it can be bypassed, by temporarily changing the flag.

    I understand this feature request, but I don't agree with neither "must" nor "very wrong".

     
  • Dale Anson

    Dale Anson - 2012-01-25

    Macros - Files - Toggle ReadOnly seems sufficient. With the MenuEditor plugin installed, this can easily be added to the "File" menu.

     
  • Jarek Czekalski

    Jarek Czekalski - 2012-01-25
    • status: open --> pending-works-for-me
     
  • McV

    McV - 2012-01-25

    Yes, sorry for "must" and "very wrong" :) but that definitely would be cool.

    The goal is to modify read only file without actually saving it.
    Use case (in common) is to explore large data file by modifying its structure. (xml, html files e.t.c).

    Macro doesnt work with files opened from URL. the alert pops up "this macro only works on local files"

     
  • McV

    McV - 2012-01-25
    • status: pending-works-for-me --> open-works-for-me
     
  • Jarek Czekalski

    Jarek Czekalski - 2012-01-25

    With this explanation I have to admit, that all the editors I know are able to edit read only files. They fail on save, but allow editing. Any ideas of how this could "work for us"?

     
  • Jarek Czekalski

    Jarek Czekalski - 2012-01-25
    • status: open-works-for-me --> open
     
  • Alan Ezust

    Alan Ezust - 2012-03-12
    • summary: Ability to edit Read-Only (readonly) files --> Ability to edit Read-Only (readonly) buffers
     
  • Alan Ezust

    Alan Ezust - 2012-03-12

    Changing the subject since it seems the initial poster wanted to be able to edit the buffer without changing the actual file.

     
  • McV

    McV - 2012-03-13

    > The goal is to do save as later ?
    Yes. And even not to save it at all: sometimes while exploring the content of a file I need to modify it's structure: indent xml, or find/replace just to count hits.. e.t.c.

    I think - something, like warn user by "unable to save readonly file" would be enough.

     
  • Dale Anson

    Dale Anson - 2015-08-08

    This is pretty straightforward to implement, and I have it working well on my local. There are 5 plugins that I have found so far, and there may be others, that might need to be adjusted: the AStylePlugin, the BeautyPlugin, the P4Plugin, the TaskList plugin, and the TextTools plugin. I don't think the P4 plugin needs to be changed. For the use cases mentioned above, at least the beautifiers and the text tools should be adjusted. I'll go ahead and commit my changed for the jEdit core code, then work on the plugins separately.

     
  • Dale Anson

    Dale Anson - 2015-08-10

    Fixed in revision 23971. Plugins are still a separate issue and will be handled outside the scope of this ticket.

     
  • Dale Anson

    Dale Anson - 2015-08-10
    • status: open --> closed-fixed
    • assigned_to: Dale Anson
     

Log in to post a comment.