Lets discuss new and or custom namespaces

Folks,

Arrising from a discussion I wanted to start a discussion focused on the possibility of using additional namespaces in TiddlyWiki.

  • Note: There is already plenty of opportunities to "create your “own namespaces” simply by using a naming standard, typicaly under $:/ to hide from search and include in is[system], but you could have tiddlers with a prefix like ‘Journal date

Most are familular with the different treatment between tiddlers (non-system) and system tiddlers, and know tiddlers can be either or both tiddlers/shadow tiddlers.

  • other comon “names spaces” are within the system namespace such as $:/plugins $:/info etc…
  • There are supporting operators such as is[tiddler], !is[system] or all[system] etc… but !prefix[$:/] or prefix[$:/] are an alternate approach.

What would different Namspaces look like?

  • Remember you can just choose to name one or more tiddlers with a prefix, of any sort $:/ $:/#/ #:/ Journal ? etc…
    • Don’t forget we can also do this for suffixes if we wanted.
  • Now think about what you want to be the consequence of tiddlers with this namespace? ie what is the result of using this namespace?
    • Don’t appear in search like system tiddlers?
    • Use a different view and edit template (use view templates or cascades)?
    • Are excluded from recent and other lists.
      • Either start with $:/ for is system, or add filter to exclude in the various lists. eg modify recent (timeline macro) to exclude prefix eg; #:/
  • Otherwise it is our WikiScript that treats the various namespaces differently.
    • It would mearly be convience if we could also configure additional is and all filter operators.
  • One could also use message or event catchers etc… to first test navigation to a tiddler in given namespaces, for example clicking a link to tiddlers with the namespace prefix #:/ could log the navigation then navigate conditionaly.

Idea;

  • Perhaps developing a set of Venn diagrams showing how different namespaces relate to each other would help?

What else can you imagin as part of using namespaces?

So, in TW, a namespace fuctions like a ‘folder’ or a ‘tag’?

@garnet Well, we certainly already have tags serving the purpose of tags…

My sense is that different “neighborhoods” in the namespace landscape are doing something quite different from tags — usually, something that functions structurally, behind the scenes, not directly related to content that is being “served up” for daily use.

@TW_Tones: I do notice myself using the $:/ prefix a great deal in order to quickly mark something as inappropriate for ordinary search results, but at the same time, these really are not system tiddlers in any strict sense. They’re more like “backstage” tiddlers.

Perhaps the need for a “backstage” namespace (ideally something not so awkwardly inconvenient to touch-type as $:/ is!) is especially important for people whose wiki projects involve a distinction between author and reader modes.

It would not be too hard to figure out a systematic way to make some other prefix (like _ or •), function in a similar way (in terms of reader visibility… but perhaps easily opened to search with some toggle-switch accessible in author mode).

Alas, I just keep postponing the particular task of working out a clean and systematic solution…

-Springer

@garnet less so like a tag but common witrhin the system namespace is the use of / which is a folder delimiter of sorts.

  • I think we can take a lead from this and concider this / as an indicator in itself and that is we can build compound or heirachical titles in any namespace that has / but others as well.

@Springer I do concider them mostly as system tiddlers because I try and keep my regular tiddlers as plan language titles, but yes I know what you want. Too me a system tiddlers is one that makes it work but is not present to general use.

  • Regular tiddlers can be given subtiddlers t1/s1
  • What if we used $ on its own to say not in defaut search?
    • It looks like an S for search with vertical strike out, the default being search
    • Actual dollars $ are not likely to be tiddler titles because a value is often an attribute of something, not the something in itself.
  • Yes, I hope this thread raises some of the possible uses, and I can make some demos.
    • Let us identify “real world examples” using our different namespaces.
  • This makes me wonder if we could choose which modes result in different behaviours, such as Author/Desginer/debug mode

Perhaps we need to keep in mind;

  • Tiddlers can also be defined by their type field and/or other fields, I use object-type and system-object as well.
    • Perhas these should be used to exclude from search as well.
  • I made an alt-title tool, and mascurade tools to actualy bring some system tiddlers into search eg “Control panel” that transcludes $:/ControlPanel
    • The tiddlers title need not be the one displayed to users, for example the caption can be used, just as in lists.
  • The relink and its additional plugins help a lot here, see how you can now rename a tiddler like $:/name and it will also rename $:/name/subtiddler correctly

So brainstorming this;

$:/

  • $ is search suppressed
  • $:/ system tiddler with subtiddlers
  • $: system tiddlers not from system root ?
    • Treat as system tiddler
    • Suppress from standard search
    • remove $: when displaying title.

$ and /

  • $tiddlername, is search suppressed but not a system tiddler ?
  • / root tiddler of subtiddlers (searchable)
  • /tiddlername 1 below root tiddler (searchable)
  • /tiddlername/subtiddler (searchable)
  • tiddlername/subtiddler (searchable)
  • See the // case below

In the above only those with ? are not currently implemented.

Underscore _

  • Is already used by some, but does to me imply not listed in search, but what else could/does it mean?
  • Removing $ or _ from the front of a title is an easy way to restore searchability, but it does change the name (use relink)

Incidently we can keep these names spaces in mind; In effect it has and uses a subtitle not the full title.

  • http://
  • https://
  • file://
  • mailto:// etc…

In these cases we could take // to mean it is a protocol namespace, which it is anyway, thus any tiddler containing // has a protocol before it, and a value after it.

  • These are created if you drop such a link into a new tiddler field like in projectify todo items
  • I have a solution that instead displays the title only with all after the // but could make it “clickable”, with a synthetic target window name value.
    • Perhaps we could override this with a target field, or another delimiter?
  • Imagin a tiddler anything//tiddlername would appear as “tiddlername”, any thing could be a number eg 01//tiddlername 02//tiddlername both displayed as tiddlername.

To demonstrate I have implemented the following changes here namespaces site

  • To define a system tiddler as any tiddler with the prefix $: which includes the existing $:/
    • Includes the is[system] operator
  • To also suppress from standard search tiddlers begining with $
    • System tiddlers are already excluded
    • Non-system tiddlers with a $ prefix so we need to build a new Advanced search tab to find these
      • Until then you can use a filter or list of [all[tiddlers]prefix[$]!prefix[$:]] or variation there of to find them.

I will continue to implement ideas from this thread at the namespaces site if you want to test them.

I may update thos specific reply with more from above

I have added the _ tiddler prefix to hide tiddlers from the story, standard search, open and recent features see this @Scott_Sauyet re: Simplest way to make missing tiddlers display:none or visibility:invisible? - #36 by TW_Tones

  • At the same time I abstracted the exception filters in use so we can customise later without re-touching the core tiddlers. I include a macro toggle.

See also Expanding the is system namespace