I added added the code to the openWithTempFilePath function within the mod_tempfname plugin to provide three objectives when exporting a Leo node to and external editor; Vim in my case.
Use case: -------------- Multiple Leo nodes have been exported to Vim for project work that will last for a significantly long period of time (hours, days). Supporting functionality: ---------------------------------- 1. To keep track of which Leo node I'm editing in Vim, the name of each temporary file is the node's headline with any characters in the headline not allowed in file names converted to an underscore. 2. To enable Vim to apply the proper syntax highlighting for exported sub-nodes of an @file type node, the file extension in the headline of the node's parent @file type node is used as the temporary file's extension. 3. To more easily determine which Leo node is being edited in Vim, the directory path used to store the temporary file exported to Vim contains the node's ancestor nodes. Since Vim displays the directory path of the file being edited, the user can easily find the node being edited in Leo. Assessment: ------------------- Objectives 1 and 2 provide important functionality that should be retained. Objective 3 could be eliminated without undo hardship. However, if multiple Leo nodes containing the same headline have been exported to an external editor then there will be no way to identify which node is being edited. Things to consider: ------------------- Users must currently opt in to use these features. They must enable the mod_tempfname plugin and, if they want the above mentioned functionality instead of the original mod_tempfname functionality, they must enable them through configuration settings. If there is no way to provide unicode support for these features then inform the user of this restriction and let them decide. It is important that external file names reflect the node's headline (#1 above). If file names can be derived from headlines then directories in the temporary file's path can also be derived from headlines (#3 above). TL -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en.
