On Sep 28, 6:07 am, Frank McIngvale <
fmcingv...@gmail.com> wrote:
What do you think of this idea.
If the filename extension is ".txt",
then its processed exactly like WikklyText.
If the extension is anything else,
then only text within funky markers is processed.
> b. The splitting apart/selective editing/putting back together is a neat
> idea but it also sounds like a lot of work for something I can't see myself
> using that much. In other words, I'm ALWAYS going to edit "foo.c" or any
> source code file inside my regular editor. I would NEVER edit source inside
> a wiki environment on a regular basis.
Yes, I agree.
I can't see myself changing source code this way either,
at least not now and not with my current projects.
Editing source via the Wiki might be useful in the future
for some projects. I'm attempting to look into my crystal
ball and envision what might be useful. The objective is
to avoid design decisions that might hinder evolution.
> c. However, the "pulling out wiki content" is worth doing I think. But again
> this is sounding better to implement as a plugin, not creating a new store
> type. To give you an idea, the Python docs plugin defines a macro <<pydoc>>
> where ...
I trust your instinct as to what should be a plugin
versus what requires a new store... for me, these
distinctions blur together because of my ignorance
on this topic.
> <<pydoc name>> -- produce documentation for entire module 'name'
> <<pydoc name func>> -- produce documentation for function 'func' inside
> module 'name'
> <<pydoc name class>> -- produce documentation for class 'class' inside
> module 'name'
>
> So (from what I understand) by using ctags you could accomplish the same
> sort of lookups with C, C++, etc. code. So then you could make a general
> <<srcdoc>> macro that does ...
The ctags concept is independent of funky markup
within source code... neither is dependent upon the other.
Yes, something like a general <<srcdoc foo.c>> may be appropriate.
Question: can <<srcdoc ...>> markup result in a link?
When I was exploring TiddlyWiki functionality, a reply by Eric
suggested that [[<<srcdoc ...>>]] was not valid syntax
(if I understood him correctly) and the output from a macro
was not Wikified further (i.e. if the macro output "[[something]]",
it would not result in a link).
>
> <<srcdoc foo.c>> -- make docs for entire foo.c
> <<srcdoc lib/foo/bar.cpp myfunc>> -- make docs for function myfunc inside
> bar.cpp
>
Yes.
The <<srcdoc lib/foo/bar.cpp myfunc>> case may require that the
myfunc portion of the documentation be identified by the
funky markup in the source, i.e.
!!!{{{func myfunc| Documentation for myfunc}}}!!!
or
!!!{{{class myclass| Documentation for myclass}}}!!!
The general <<srcdoc ...>> and funky markup should be language
independent to whatever extent possible, otherwise the
Wiki-engine/plugin will have to understand the language
syntax... which is possible and could provide richer
documentation (but would require parsing the language,
source code preprocessing, and other difficulties).
> This seems like the cleanest way to implement it -- no new store type or
> deep URL magic, just a regular plugin like any other.
>
> Would vim be able to understand the "foo.c" inside a macro call, or would it
> only work inside a [[link]]?
Vim works either way.
>
> frank