[DONE] Link to other document

Link to other document(heading entry) is planned, will be added soon.

Document link is done in version 1.2

Hello, Ian!

Here are some document links-related comments:

  • x3Note is a paragraph based app and I was hoping to see links to work on a paragraph (heading) level, so I can link to paragraph inside a document. It’s interesting, that you already all have the functionality: if you add a tag to paragraph header, the tag works almost as a link to this paragraph when you click on it in a Dashboard. Why not implement something like this as a documents link?
  • renaming the document breaks all the links pointing to this document (this does not happens with tags, why not implement links in the same way?)
  • there is no backlinks functionality

Well, first thanks for the thorough thinking about this idea, really appreciate that, and the reason why the document link is implemented with a document instead of headings, (for now at least) is because, it is more stable than the document heading, which you actually mentioned in the second point, that user changed it then it will be broken.

And why the tags can be linked without breaking, is because those are dynamically generated, but links are written into the document, need to put something in the document as anchor for the link place to locate to. For that, the best is not to add any anchor in it, because it can be edited by the user, then the link will be broken, and no way to recover if the link is broken, especially deep in the document. And about link to document not to headings, sure it is possible to choose the heading to link to, actually there is such kind of function to choose an heading in document (such as refile in ideas) , which seems make more sense than link to the whole document, but it has potential performance issue, even we ignore the potential performance issue (assume user won’t write very long document), it is also very easy to break, but document is not that frequently renamed, and quite easy to fix the link if the file is relocated or renamed.

About backlinks, seems it is a quite important function, so could you please add some use case for the backlinks, so I can find a better way to add it, thanks.

Backlinks are like mentions. So if there are some documents linking to the current document, the current document might have a special “backlinks” section which lists passages which reference a given file.
For example, this section might get added to Sample document :

## Backlinks
* [[Some document that links here]]
    * The block of text in the referencing document which contains the link to [[Sample document]].
    * Another block in that same document which links to [[Sample document]].
* [[A different document that links here]]
    * This is a paragraph from another document which links to [[Sample document]].

So if I have a document ‘Great Ideas’ and have put a link to ‘Great Ideas’ in many other documents describing my great ideas:

[[Great Ideas]] : save the world
Write a new song [[Great Ideas]]
Read your [[Great Ideas]] from time to time
Implement one of your [[Great Ideas]] etc

Then I can open the document ‘Great Ideas’ and see backlinks to all of the four documents, that were referencing it.

Does it make sense?

Additional question. Sorry, what does this means exactly?

  • Adding link now bring the selected text as default title

The selected text seems to be ignored when you are using command ‘Add link’…

So I have one case in mine, maybe when open a document, you could see there’s are some little text at the top corner, shows ‘x references to this file’, tap on that shows a list, and chose one you can jump to that file, like this kind of uses?

It should be work like this:

when you have some text in editor, you want to convert it to a link, so first select that text, tap on the ‘+’ button from toolbar, choose link, then the selected text should be in the title field, and leave link for you to fill in, after that, the text should be replaced with a link.

Ah! Sorry, this is my mistake: I was (mistakenly) thinking this is all about the document link… :))) Everything works well, thanks!

Sounds great and efficient!

1 Like

Hey, hey, found a bug… If there is a document link and a backspace at the end of the line, adding a plain link will replace the document link, instead of adding a link. The same happens when there is a link at the end of the line and you try to add a document link: the previous link gets replaced… Can you reproduce this?

Update: looks like the links are actually added, but just are not displayed. Here are the sources:

x3 note use *Markdown* like syntax,supports rich text marks, list, checkbox, quote block, code block, multiple types of attachments. [[x3://Start Writing.ice][Start Writing]] [[https://apple.com][test]] [[x3://Start Writing.ice][Start Writing]] [[https://apple.com][test]] [[x3://Start Writing.ice][Start Writing]] 

And another one enhancement. So the document link is just a plain link with an x3: url-scheme, why can’t we edit it like the plain link?

Снимок экрана 2020-08-11 в 19.40.17

Please, add ‘Edit link’ menu item to document links so we can change the title of the link and/or the target file…

hmm, sounds like my parser got confused, thanks man.

Interesting, able to change the name can be useful, but I’m afraid the name mismatch the document name will cause confusion to the user? In the meanwhile, it add more freedom to user, I’m not very sure for this one now, seems like two kinds of design philosophy (kind of like iOS and Android, don’t u think?) maybe I keep a one note for now.

I will be pretty happy with editing just a title of the document link, not the file name.

Seems I made my self a little confusing. The meaning of ‘name’, actually I mean the name of the link, that’s the title, document name is not going to be changed here.

Ah… Changing the title of the link may be useful when the links are inline. So you can link any useful words to a specific document, instead of using [DONE] Link to other document: document name does not always fit well in a context of the line.

Make sense :smile: seems you are right, I should give this choice to user.