Closed andrewebdev closed 1 month ago
Okay, thanks. Ideally, I would expect the writer to deal with such edge cases so that the AST doesn't have any assumptions. I'm using #+name:
in some of my documents to store variables for macro expansion later. So this slightly gets in my way. I'm wondering if it's not better to just keep it as a normal keyword, but as part of the node it's attached to, rather than the current section.
I'm not complaining however, It's your project, so your decisions ;) ...
I'm not 100% ready to share my project yet, but I'm aiming to open source that soon, but in short I built an app that can generate multiple types of document formats, from one org file. From one file, you can generate, Markdown, Html, Typst (for simple PDF generation), and more ... So you can see why I'm making these suggestions.
Not sure I follow, could you expand on why this is a problem for your use case? A lot of org constructs are currently implemented in this "wrapper-node" fashion (e.g. Emphasis, NodeWithMeta) and this didn't feel out of place. As said, currently the only use case is lookup (i.e. document.NamedNodes is enough, we don't have to create NodeWithName wrappers).
I'm not convinced it's adding assumptions to the AST though... Happy to talk more :)
Feel free to re-open if you get back to this
Hi, I'm building an application that depends on go-org. I'm wondering what the purpose of the
NodeWithName
[1] struct is.I looked through org-mode syntax documentation, but could not find anything regarding this keyword usage. Are you using this for something internal to go-org only?
[1] https://github.com/niklasfasching/go-org/blob/master/org/keyword.go#L17