On 3/10/20 9:24 PM, Allen Barker wrote: > On 6/25/19 12:42 PM, Richard Kimberly Heck wrote: >> Thanks for these ideas. I'm not an R user myself, though, so it would be >> helpful to me if you could explain what it is you are trying to achieve. >> It's best when thinking through issues like this one to separate the >> problem from the solution. What's below seems to be a mix between those. >> >> One reason I ask about this is that LyX 2.3.3 has added the ability to >> edit the LaTeX preamble or the contents of an ERT inset using some >> external editor. LyX 2.4.0 will extend that to 'collapsible' insets >> generally, controlled by a layout tag EditExternal. So by activating >> this tag for the appropriate kind of inset, you can edit its contents in >> whatever editor you define for its format. That seems, if I'm reading >> you right, to give you much of what you want---and to use your editor of >> choice. > > I'm very interested to hear about the new 2.4.0 editable insets. As I > mentioned in my other recent posting in a related thread, I ran into this > same problem a few years back when I implemented my Lyx Notebook project. > I had to resort to an ugly kludge to get the inset text. > > Is this new feature already implemented in the 2.4.0 code in the git > repo? Does it work for Flex insets, too? If so, how do you enable it > for a Flex inset?
Yes. Just do: EditExternal 1 in the inset layout to enable it. The inset should then have a context menu item allowing it to be edited, as ERT insets do. > I assume this uses the inset-edit LFUN, which opens an editor on the > text. I'm not sure how to set the particular editor to use, though. This uses the editor defined in Preferences for the document's output format. > It would be nice to have an option to have the LFUN just return the > filename rather than running an editor process on the file. > Sometimes users might want to edit the inset text and sometimes you > might want to process the text with your already-running program > (Lyx Notebook uses Lyx server pipes). There must be some reasonable way to do that. Can't be too hard. > I also had a few other wish-list LFUNs from back when I implemented > that program (such as "goto the next inset of a given type"). Perhaps > I'll post them for discussion in a new thread at some point. There > might already be ways to do some of them. OK! Riki -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel