Thanks for posting at gist, I'll take a look. Rob.........
On Wednesday, January 4, 2017 at 3:11:43 PM UTC-5, Terry Brown wrote: > > Here's one I was using with coffeescript / R code, can't find the one that > was markdown focused. Basically it updates all nodes to have their > headline as the first line of the body like this: > > ### <headline> ############################ > > updating / inserting as needed, also puts exactly two newlines at the end > of each body, I think that was so the external file looked better. > > For markdown you'd have to track depth to control the number of # at the > start, and put none at the end. > > Depth of a position is p.level(), so you probably need > > nd.level() - p.level() + 1 > > hashes at the start of the line > > Code: https://gist.github.com/tbnorth/eb913fcab82f6a4b37734b5156543308 > > Cheers -Terry > > > > ------------------------------ > *From:* Largo84 <[email protected] <javascript:>> > *To:* leo-editor <[email protected] <javascript:>> > *Cc:* [email protected] <javascript:> > *Sent:* Wednesday, January 4, 2017 10:58 AM > *Subject:* Re: Hybrid @<file> type? > > Sounds like that would be useful. Do you mind sharing the script? > > Rob......... > > On Wednesday, January 4, 2017 at 11:48:25 AM UTC-5, Terry Brown wrote: > > Something I've done as a workaround is a script button to push headlines > into body text when using @clean. So for a node "Discussion", if the first > line of the body starts with "# ", make it be "# Discussion", otherwise > insert a line like that. > > Cheers -Terry > > > ------------------------------ > *From:* Largo84 <[email protected]> > *To:* leo-editor <[email protected]> > *Sent:* Wednesday, January 4, 2017 9:18 AM > *Subject:* Hybrid @<file> type? > > Over the last year or so, I have used @auto-x more and more (in > particular, @auto-md) because I like the 'clean' external files that > replicate the organization of the nodes in Leo. However, more recently as I > began relying on tagging, back links and clones, I am running into major > limitations with @auto-x (and to a lesser extent with @clean). (See also > the recent post on uA storage.) > > What would be really beneficial would be a 'hybrid' @<file> type that > writes and maintains org structure (node headline text) in the external > file based on @language (md, org-mode, rst, etc.) while also utilizing the > tagging, linking and cloning features of Leo. As I see it (please correct > me if this assumptions are wrong): > > - @file maintains all of the Leo features described, but the external > file includes sentinels. > - @clean keeps uA information (tags, links, etc), but loses cloning > information. Also, @clean *does not* write node headline text to external > files. > - @auto-x loses both uA and cloning information, but *does* write node > headline text into external files (based on type). > > > Thoughts or ideas? > > Rob.......... > -- > 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 leo-editor+...@ googlegroups.com. > To post to this group, send email to [email protected]. > > Visit this group at https://groups.google.com/ group/leo-editor > <https://groups.google.com/group/leo-editor>. > For more options, visit https://groups.google.com/d/ optout > <https://groups.google.com/d/optout>. > > > -- > 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] <javascript:>. > To post to this group, send email to [email protected] > <javascript:>. > Visit this group at https://groups.google.com/group/leo-editor. > For more options, visit https://groups.google.com/d/optout. > > > -- 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 post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/leo-editor. For more options, visit https://groups.google.com/d/optout.
