Hi Meik, On Thu, 04 Oct 2018 20:50:58 +0200 meik michalke <meik.micha...@uni-duesseldorf.de> wrote: > in sort.xml i see > > <connect governor="current_dataframe" client="object.available"/> > > is that what you were referring to?
Yes. The "same" should now be possible with "current_filename", and "browser.selection". > > We may or may not want to limit the visibility of a "Render" plugin > > to script windows, but that is something to worry about later. > > good point. i imagine that RKWard will kind of detect whether files > are markdown (or at least a script) so that the save/export plugin > can omit most of that detection magic. so we probably won't need all > the "object has changed" JavaScript targeted at files, right? Well, the logic is really very simple, here: Whenever a script editor window is "active", while starting the plugin, current_filename will be set to the filename. Otherwise it's an empty string. Which may not even have to be a show-stopper, as in that case the user could still select some .Rmd file in the <browser>. Note that for the sort plugin, there is a variant "sort2.xml" (available as a "plugin under development"), which will additionally hide the object selector, if current_dataframe is non-empty. After experimenting with that, I chose to make sort.xml the default after all, as it shows what's going to happen more clearly (object selector always visible). No special logic should be needed for changing filenames in the rendering plugin. You _might_ want to check for an .Rmd-filename extension, and give a warning, if it's something else. Regards Thomas
pgpbP5FGPeihu.pgp
Description: OpenPGP digital signature