Skip to content

Org-mode folgezettel / uplinks fail to work #480

@beandipper

Description

@beandipper

After testing the org format within the guide zettelkasten using the nix-shell --pure environment, I was able to determine that that the linking doesn't work as expected.

What happened was that folgezettel links were treated as normal links, as if they had the ?cf postfix.

To test this I created two org zettels.

  1. The first one is a copy of the org.md in the guide convrted to org mode org.md ~> orgTest.org, including tags and links to .md zetteln
  2. The second one, linker.org is just a simple org zettel that contains a single folgezettel link to the one created in the previous step
* Linker Org Zettel

  - A folgezettel link with label [[z:/orgTest][org test title]]
  - A folgezettel link without label [[z:/orgTest]]
  - A link without prefix [[orgTest?cf]].
  - A folgezettel link without prefix [[orgTest]].
  • From the above links none of the folgezettel links are detected as so
  • Link labels work whether specified with custom labels, or automatically detected, as in the second link displayed in HTML with the orgTest.org title
  • Links without the z: prefix aren't detected as they are in markdown mode
  • Links with other parameters such as tags aren't being tested yet. This can be done if wished

The JSON for the orgTest.org in question doesn't imply that folgezettel connections are working.

A snippet showing only partial results for one folgezettel link from:

./bin/run -d $(pwd)/guide query --uplinks-of orgTest

is

{
  "skipped": {},
  "result": [
    [
      [
        "Folgezettel",
        [
          {
            "t": "Plain",
            "c": [
              {
                "t": "Str",
                "c": "Linking by tag: "
              },
              {
                "t": "Code",
                "c": [
                  [
                    "",
                    [],
                    []
                  ],
                  "experimental"
                ]
              }
            ]
          }
        ]
      ],
      {
        "zettelTags": [],
        "zettelDate": null,
        "zettelID": "experimental",
        "zettelError": null,
        "zettelUnlisted": false,
        "zettelContent": [],
        "zettelQueries": [
          [
            [
              "ZettelQuery_ZettelsByTag",
              [
                [
                  "experimental"
                ],
                "Folgezettel",
                {
                  "zettelsViewLinkView": "LinkView_Default",
                  "zettelsViewGroupByTag": false
                }
              ]
            ],
            [
              {
                "t": "Plain",
                "c": [
                  {
                    "t": "Str",
                    "c": "Linking by tag: "
                  },
                  {
                    "t": "Code",
                    "c": [
                      [
                        "",
                        [],
                        []
                      ],
                      "experimental"
                    ]
                  }
                ]
              }
            ]
          ]
        ],
        "zettelFormat": "markdown",
        "zettelPath": "experimental.md",
        "zettelTitle": "Experimental features",
        "zettelTitleInBody": true
      }
    ]
  ],
  "query": [
    "GraphQuery_BacklinksOf",
    [
      "Folgezettel",
      "orgTest"
    ]
  ]
}

Interestingly, I noticed that by adding the experimental tag to the orgTest.org zettel results in uplinks, but directly linking doesn't. Maybe because the tag linking is still done with .md, while the direct linking is done solely between .org files

Looking at the source, I see that markdown files are parsed in a way that if the text contains [[[, an inline link is created containing the ?type=branch parameter. Adding this manually to the linker.org file does cause it to work correctly. Additionally, I saw that the org parser is simply done with readOrg from pandoc, which doesn't allow the handling of the URI parameter.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions