Menu

Clone to another View + Save me As effects...

2008-06-20
2012-11-13
  • Fool4UAnyway

    Fool4UAnyway - 2008-06-20

    I have a User Defined Language which I apply to some text files. I have not set the .txt extension to always use this UDF. I set the UDF manually. As soon as I save the document, marked up in this UDF, as a .txt file, I lose the UDF mark-up. I consider this a bug, because I have clearly set the desired language. I have to choose the UDF manually again.

    Now I want to create a similar document, starting with the same contents but as another file. I thought I could simply select Clone to another View and then Save me As to create a new/separate document and file. This is what happens.

    Clone to another View:
    I have two similar looks at the same document now.

    Save me As in the second view:
    I save the file as a .txt file with a different name.
    Again, I lose the UDF markup and the document is shown as plain text.
    This is also the case for the document in the primary view: it is shown as plain text again.

    As soon as I change something in the second view (the "new" document), the UDF markup in the primary view returns. Interestingly, the changes are applied to _both_ documents. I would expect them to only show in the second view, since I have separated this document from its source by Saving-it-As. But both documents are changed and marked as changed. So I could overwrite the original document and save the new document with the changes, resulting in two equal documents with different names.

    If I Save the document in the second view, both "changed" marks (red disks) disappear. So now it _looks_ like the document in the primary view hasn't changed from its last save, while in fact it has!

    If I choose to Reload from disk the document in the primary view, again, _both_ files are refreshed with the original contents.

    I thought Saving-As would separate the cloned document from its source file, allowing a manual "create-a-copy" function.

    Is the current behavior intentional?
    Does it make sense?

     
    • Fool4UAnyway

      Fool4UAnyway - 2008-06-20

      I can even choose Go to another View for the new document in the second view.

      I then have two documents, two files with their own names, both using the same buffer. Changes in either file are _still_ reflected in the other, while there is no visual feed-back why this is the case. I consider this a quite dangerous feature.

      I guess I could clone a document a number of times this way, saving it under different names, and editing only one of them to get the same changes in a number of "copies". I don't say this would make any sense, but it seems possible.

       
      • Harry

        Harry - 2008-06-20

        This is a bug in 4.9 that should be fixed in v5.0, when cloning a document, every single action or change will reflect in both views.
        Doing a save as on one view will not separate the two, both will change names, since they are of the same file.
        In 4.9, a save as would only change the title of one document.

        In v5, to save a copy of the file, use save as, then reopen the original. Or use save copy as.

         
        • Fool4UAnyway

          Fool4UAnyway - 2008-06-20

          My preference would be the two documents to be separated, once either of the clones has been saved with another name. That would allow easy creation of new versions without having to open new or renamed documents manually.