Community
    • Login

    Sessions Enhancement Request

    Scheduled Pinned Locked Moved General Discussion
    2 Posts 2 Posters 1.3k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Greg HeffernanG
      Greg Heffernan
      last edited by

      Hi – First, Thanks!

      Second – Can I request when a sessions is saved, it would be extremely useful/helpful if the no-named new documents be saved with the session too. That way, you could have a group of unsaved notes for a particular project and quickly save them all under a Session. Create a new Session … do the same … and return to the original Session and all its unnamed new documents will also be returned?

      Most of the time I find myself working on a project with lots of small unnamed notes that aid in the project development … but then need to work on another unrelated project … it would be nice to save all the open files under a Session, including the unnamed/unsaved temporary files … to be able to return back to them later when the Session files are reloaded?

      Currently, only the named open files are recorded in the Session file.

      Scott SumnerS 1 Reply Last reply Reply Quote 0
      • Scott SumnerS
        Scott Sumner @Greg Heffernan
        last edited by

        @Greg-Heffernan

        Who really wants a bunch of “new X” pseudo-files hanging around?

        “Let’s see, where did I put that important thing I wanted to save…was it in the new 16 file…no…maybe it was new 12…no…well…hmmm…it’s here somewhere…”

        If it is important enough to type, it’s important enough to save properly, I always say.

        Anyway, suggest you look at the Take Notes plugin as it offers up a better way than the unsaved “new X” file method. Or a few lines of Pythonscript yield the same functionality; I have this tied to an entry in my right-click context menu, I call it TempFileYyyyMmDdHhMmSs.py :

        import os
        import time
        
        def TFYMDHMS__main():
            temp_dir = os.environ['TEMP']  # or whatever...
            ymdhms = time.strftime("%Y%m%d-%H%M%S_", time.localtime())
            new_file_fullpath = temp_dir + os.sep + ymdhms + '.txt'
            notepad.new()
            editor.insertText(0, '?'); editor.deleteRange(0, 1)  # modify file so it can be saved
            notepad.saveAs(new_file_fullpath)
        
        TFYMDHMS__main()
        

        When run this script creates a new (saved) editor tab with a filename like this:

        Imgur

        And, obviously, once a file is named, it is saved along with other files making up a Session.

        1 Reply Last reply Reply Quote 0
        • Alan KilbornA Alan Kilborn referenced this topic on
        • loa111L loa111 referenced this topic on
        • First post
          Last post
        The Community of users of the Notepad++ text editor.
        Powered by NodeBB | Contributors