Comments (10)
Copying @jackbaty because from the commit messages, I believe that he might be heavily using the renaming feature.
from denote.
I feel like it will break all the inter-linked notes
This is true with the existing backlinking facility. Though the proof-of-concept denote-link-backlinks
uses only the identifier to conduct its search. So it should work properly.
Taking a step back, only the identifier should be constant. If we hardcode file paths, we will get into trouble.
I don't have a solution except a vague idea that when the files are renamed in dired, there should be a search/replace operation
Yes, I think the renaming facility will eventually be expanded to operate on file contents as well. It is why I created denote-retrieve.el, so that both denote-dired.el and denote-link.el can share the code.
from denote.
To test what I just noted about the proof-of-concept backlinking.
I had a sample note that I created links to from four other notes. I then renamed it:
Rename 20220611T130907--my-new-test-for-backlinks__denote_testing.org to 20220611T130907--my-renamed-test-for-backlinks__denote_testing.org?
Visited the newly named file and M-x denote-link-backlinks
: it worked!
from denote.
What I just noticed about the renaming is that it should also update the buffer-name to avoid possible confusiton. But let's keep using it for a while to be sure.
from denote.
This is true with the existing backlinking facility.
I was referring to just the inserting links. This issue would be there even if the backlinking isn't used.
I have pushed a quick test repo here: https://gitlab.com/kaushalmodi/denote-test
From that repo, the 20220612T102752--linking-to-other-notes__link_test.org
note points to the other note 20220611T113742--denote__note_org.org
. If 20220611T113742--denote__note_org.org
is renamed, we would need to update the links to that file in the whole denote-directory
.
:PROPERTIES:
:ID: 20220612T102752
:END:
#+title: Linking to other notes
#+date: [2022-06-12 Sun 10:27]
#+filetags: link test
[[file:20220611T113742--denote__note_org.org][denote (20220611T113742)]]
from denote.
Indeed, those are part of the problem with the current design. I think the solution is to use an identifier-based link. Anything else cannot be relied upon.
I have been thinking about how best to do this. What you shared before in issue 8 with org-id
is one option. Maybe there is scope for another that does not depend on anything Org-specific.
While still fuzzy in my mind, the file-name-completion
is already something that is used in denote-link.el, so there is at least one way to expand a file name given a known variable.
from denote.
To explain what I am saying about ID-only links (however we go about implementing them).
I created two new .txt
notes. The one has only the front matter. The other is this:
title: Just to demo the identifier as a link in itself
date: 2022-06-12
tags: denote testing
identifier: 20220612T180602
---------------------------
Place point over the following identifier and type C-x C-f (find-file)
followed by M-n:
20220612T180621
If the identifier matches a file in the current directory,, it will be
expanded.
from denote.
@jerm-the-wyrm From your comment in #8 (comment):
I was thinking that instead of having the link be like [[denote:20220606T164519]] we could instead have it show up as [[denote:20220612T144708--test-note__testing.org:20220612T144708][Test Note]] allowing the identifier after the filename to be used in a similar manner to =org-id= which will help with #13
I didn't understand how that suggestion will solve this issue with renaming. Your suggestion instead hard-codes the file names in links which are prone to being renamed.
@protesilaos About denote:
links, are we re-inventing what org-id
already does? I understand that org-id
will work only with Org files. But I think that if denote implements a denote:
type link, that will be a faction in the id:
links that many users are already familiar with. Instead, can denote extend the id:
links to work with Markdown and plain text as well? I see from the introduction text that denote does not want to rely on other libraries. So I don't know what's the right way forward for this.
from denote.
@protesilaos About denote: links, are we re-inventing what org-id
already does? I understand that org-id will work only with Org
files. But I think that if denote implements a denote: type link, that
will be a faction in the id: links that many users are already
familiar with. Instead, can denote extend the id: links to work with
Markdown and plain text as well? I see from the introduction text that
denote does not want to rely on other libraries. So I don't know
what's the right way forward for this.
In that case we do not want to re-invent it: we will use org-id. And
yes, finding a smart way to extend it to other file types is the way
forward. I just put the suggestion out there to discuss its merits.
I didn't understand how that suggestion will solve this issue with
renaming. Your suggestion instead hard-codes the file names in links
which are prone to being renamed.
I also think that will complicate things. In general, we should assume
that anything other than the identifier is an unknown and subject to
change. It is important to have robust links, as this will determine
the overall usability of the package once the user starts accumulating
hundreds of notes.
from denote.
I am closing this to consolidate the discussion here: #8 (comment)
from denote.
Related Issues (20)
- denote-link shows backup files HOT 3
- denote-rename-buffer-mode option produces error HOT 4
- Allow users to custom `denote-org-dblock--get-file-contents`? HOT 1
- denote-rename-file: renamed file disappears from dired-buffer. Need to refresh HOT 3
- Some issues/inconsistencies wrt renaming an existing denote entry HOT 6
- Suggestion: Merge `denote-link-*` commands and other improvements to the linking commands HOT 2
- `denote-link` issue with intervening directory starting with a dot HOT 3
- Weird buffer name for a denote file
- Use RET to answer yes-or-no prompts (was: Defaults for denote-sort-dired) HOT 1
- `denote-silo-extras` manual addition HOT 2
- In silo, reference to variable "default-directory" doesn't work, jamming all denote-related commands for note creation etc. HOT 6
- Wrong behavior of the letter casing of file names HOT 1
- Denote link with direct jump to an Org heading (plus `denote-org-extras.el`) HOT 10
- Links to files not in denote-directory HOT 5
- `denote-rename-buffer-mode` and `nov.el` HOT 3
- A denote tag 'Identifier' is different from the id in the filename occasionally HOT 1
- Include full file name in the links HOT 4
- Hide `denote-directory` Part in Path for `denote-open-or-create` HOT 9
- denote-journal feature proposal: `denote-journal-extras-link-or-create-entry` HOT 5
- denote requires links to be inserted in notes HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from denote.