good news, i worked on it a bit and i was too pessimistic. not finished yet though..
Félix On Tuesday, July 14, 2020 at 7:21:22 PM UTC-4, Félix wrote: > > Greetings, Earth Leonistas! > > Thank you for bringing up this issue Edward, > > I've created issue #72 to tackle this & moved it on top of the todo pile: > https://github.com/boltex/leointeg/projects/1 > > So far I've gathered concepts to implement Leo "opening recent / context > menu / re-open from last session" functionality in that issue. Please feel > free to add (or copy) propositions in there too. > > The first brick wall to circumvent That I foresee is the fact that vscode, > itself, will *always* consider a .leo file a normal xml file, because > well, that's what it is! So for vscode, the vanilla 'open file' concept > will always be "open it as xml text in an editor". (Actually, I hope I'm > wrong and that I can just plug my OpenLeoFile to replace the 'openFile' for > .leo files! I'l revise the docs later to be sure.) > > But - nothing prevents us to define an 'openLeoFile command, taking a > string parameter (path+filename string) and assing this to a "right-click" > context menu item to normal explorer files. (which is easy to do.) That > openLeoFile(p_fileName) commandcan be reused as-is to open files that were > opened when vscode was closed, etc... > > So much more things are possible, when trying to integrate opening '.leo' > files integration and automation, in regards to the action of actually > opening a leo file with leoInteg instead of opening as an xml text file. > > Which brings me to another subject: I've got to finish a part of the body > pane filesystem provider that I forgot to even list in the issues : I've > got to 'clear' the recent files of the body's gnx fake filenames. Thing is: > Leo files will never be in your recent files list: they're not opened by > vscode! :) the body gnx's are! > > (unless you've accidentally clicked on a leo file, and stared at the xml > for a second thinking "duh that's not what I want"! hehe, then it will be > in your recent documents menu list.) > > Another idea, is that leoInteg can easily manage its own internal list of > recent files and propose a one-click list "dropdown" solution on top of the > other Ideas listed above. > > so in conclusion there's many options to help and provide the user with > the concept of opening files at startup, offereing 'recent Leo files' list > to instantly open files with a mouse click, etc. > > And I want to gather more ideas and note them in the issue (#72) to > contemplate them a little while, distill the best of it, and only then, > implement the best ones. > -- > Félix > > > > On Tuesday, July 14, 2020 at 9:47:52 AM UTC-4, Edward K. Ream wrote: >> >> At present, the only way to add a .leo file to the Open Recent menu is to >> open the file *without* using leoInteg. Alas, the running leoInteg has >> no access to the Open Recent menu. I have to give the full path to >> ekr-leoInteg.leo every. single. time. >> >> While researching this topic, I ran across vs code issue 64223 >> <https://github.com/Microsoft/vscode/issues/64223>: Extension API access >> to recent files/projects. This topic has been closed: >> >> "we are closing issues that are not going to be addressed in the >> foreseeable future." >> >> I think we should push back. I am wondering whether the vs code devs >> would be interested in a PR. I think this is a significant hole in the api >> that should be plugged. >> >> Without access to recent files, leoInteg looks like it would have to >> create its own "Recent Leo Files" menu item, along with the necessary >> machinery to make it work. Possibly a setting would work, to be updated >> when opening a .leo file. >> >> Félix, these are my first thoughts. What do you think? >> >> Edward >> > -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/leo-editor/fe205802-dbc5-4e6e-9d04-b7bd83b22619o%40googlegroups.com.
