Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Org-mode folgezettel / uplinks fail to work #480

Closed
beandipper opened this issue Nov 26, 2020 · 2 comments
Closed

Org-mode folgezettel / uplinks fail to work #480

beandipper opened this issue Nov 26, 2020 · 2 comments
Labels
awaiting-pr documentation Improvements or additions to documentation v1

Comments

@beandipper
Copy link

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.

@srid srid added the documentation Improvements or additions to documentation label Nov 27, 2020
@srid
Copy link
Owner

srid commented Nov 27, 2020

Per #481 (comment) then we should just edit this documentation to state how linking works.

@srid srid added the v1 label Dec 23, 2020
@srid
Copy link
Owner

srid commented Feb 23, 2021

Org-mode is being revamped in v2 (could use contributions). Discussion on links should happen here: #559 (comment)

@srid srid closed this as completed Feb 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-pr documentation Improvements or additions to documentation v1
Projects
None yet
Development

No branches or pull requests

2 participants