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

id: links not working when denote has not been used before #29

Closed
jeanphilippegg opened this issue Jul 2, 2022 · 34 comments
Closed

id: links not working when denote has not been used before #29

jeanphilippegg opened this issue Jul 2, 2022 · 34 comments

Comments

@jeanphilippegg
Copy link
Contributor

jeanphilippegg commented Jul 2, 2022

This issue is actually unrelated to the subdir branch, so I created a new issue to keep things separate.

How to reproduce:

  • Open Emacs and never call a denote function.
  • Open a note containing an id: link and click on it.
  • I am prompted with "No match - create this as a new heading?".

Cause: org-id-extra-files is not set yet, because we set it in the function denote-directory which has not been called yet.

I don't know how we should fix this. Is there a clean way to make sure that org-id-extra-files is set when a note is opened?
Maybe the user should add this in their init file if they want id: links:

(setq org-id-extra-files (directory-files-recursively (denote-directory) "\.org"))

But maybe this is too much for a user. Alternatively, we could set this directly in the top-level of denote.el.

(In any case, we should append to that variable instead of overwriting it.)

UPDATE: Actually, I get the same behavior by default using id: links in org files outside of denote: they do not work as-is. I suppose the user is expected to manually set org-id-extra-files.

@jeanphilippegg
Copy link
Contributor Author

After considering what was written on the mailing list, I think I will be setting denote-link-use-org-id to nil for myself. Maybe we should make it the default again and warn the user that setting it to t comes with potiential issues and redirect them to Org's manual. They will have to set org-id-extra-files and run org-id-update-id-locations as Org requires.

@protesilaos
Copy link
Owner

Thank you @ggjp for reporting this! I copy the relevant feedback from @shrysr and my reply to it:

> From: Shreyas Ragavan <shreyas@fastmail.com>
> Date: Sat, 02 Jul 2022 17:47:03 -0700

> [... 45 lines elided]

> I was wondering that if one is using mostly Org notes with denote - as
> new notes are created, there may be a necessity to run
> org-id-update-id-locations at some point or the other. This seems
> relevant if for example one is already using org-id; outside of
> denote, in say agenda files. So depending on the number of files -
> this would create a noticeable delay before the id linked org file is
> found and opened. From the log, I think each file is opened and
> scanned for org-id links on running the command. My result was '80
> files scanned, 65 files contains IDs, and 3003 IDs found'. (There also
> were around 10 duplicate ID's in the interest of low-cost
> thoroughness). These files exclude my roughly 1.5k org-roam notes, all
> of which have org-ids, and the docstring indicates agenda files and
> archive locations are scanned by the function, and atleast 10-15 of
> those are denote files. The delay with just these handful of files was
> not pleasant.

Thank you for the detailed explanation.  I was afraid that org-id would
put us in trouble.  We should not reinvent org-roam: it already is
great.

I think we need to start a discussion about whether 'id:' links should
be removed altogether.  The 'denote:' ones should already work
everywhere.  A similar issue is reported on the GitHub mirror:
<https://github.com/protesilaos/denote/issues/29>.

https://lists.sr.ht/~protesilaos/denote/%3C8735fk4y1w.fsf%40hallac.net%3E#%3C877d4un73c.fsf@protesilaos.com%3E

@protesilaos
Copy link
Owner

I ping @kaushalmodi with whom we implemented the id: links.

@kaushalmodi
Copy link
Contributor

I suppose the user is expected to manually set org-id-extra-files.

That's what I have seen as well. People update this variable in their emacs config.

@kaushalmodi
Copy link
Contributor

Searching through GitHub, I see that people add all files from Org roam directory to this variable in their emacs config. Files from denote directory can be appended to that list the same way.

@jeanphilippegg
Copy link
Contributor Author

jeanphilippegg commented Jul 3, 2022

I don't think we need to remove the code for id: links. We can continue to use the ID: property in org files and also let users choose if they want id: or denote: links through the existing option. I would set the default to denote: though, and let users handle org id issues as they should be handled through Org if they choose id: links.

@protesilaos
Copy link
Owner

I don't think we need to remove the code for id: links. We can
continue to use the ID: property in org files and also let users
choose if they want id: or denote: links through the existing
option. I would set the default to denote: though, and let users
handle org id issues as they should be handled through Org.

Agreed! I will now change the default value of denote-link-use-org-id
to nil. Then we need to provide better documentation on what kind of
setup the non-nil value requires. Basically, we must inform the user
that opting in to that feature requires some extra configuration on
their part. I am also interested to mention the potential performance
penalty as reported by @shrysr on the mailing list.

@protesilaos
Copy link
Owner

To be clear: removing the id: integration was not my intention. I
just mention it so that we have an open discussion about it. I still
think we did the right thing to support it. We just need to make sure
we manage expectations properly by providing solid defaults.

@jeanphilippegg
Copy link
Contributor Author

jeanphilippegg commented Jul 3, 2022

Good!

Don't forget to remove the lines about org-id-extra-files from the denote-directory function. You can add this to your example documentation for id: links:

(setq org-id-extra-files (append org-id-extra-files
                                 (directory-files-recursively (denote-directory) "\.org")))

(not tested)

protesilaos added a commit that referenced this issue Jul 3, 2022
A non-nil value requires extra setup and comes with potential downsides.
We need to account for them and provide solutions where appropriate.

Read issue 29 on the GitHub mirror:
<#29>.
@protesilaos
Copy link
Owner

What I did now is to basically undo commit 2193501. Before making changes to the code, we need to have a working solution for users.

Though yes, the (denote-directory) needs to be changed.

@protesilaos
Copy link
Owner

The problem with (denote-directory) righot now is that it is used in a
lot of places so it keeps updating the org-id-extra-files. At scale,
this will lead to a performance penalty in places where it shouldn't: we
just want the function to return a normalised/appropriate path to a
directory.

@jeanphilippegg
Copy link
Contributor Author

I am not following. What would be the issue if we remove the lines about org-id-extra-files?

@protesilaos
Copy link
Owner

I am not following. What would be the issue if we remove the lines
about org-id-extra-files?

Maybe I did not explain myself properly. I think they should be
removed.

 denote.el | 2 --
 1 file changed, 2 deletions(-)

diff --git a/denote.el b/denote.el
index 909c861..50b0414 100644
--- a/denote.el
+++ b/denote.el
@@ -259,8 +259,6 @@ (defun denote-directory ()
          (path (if (or (eq val 'default-directory) (eq val 'local)) default-directory val)))
     (unless (file-directory-p path)
       (make-directory path t))
-    (when (require 'org-id nil :noerror)
-      (setq org-id-extra-files (directory-files-recursively path "\.org$")))
     (file-name-as-directory path)))
 
 (defun denote--extract (regexp str &optional group)

What we have now is not the right way to do it.

Still, we need a working solution for users who will opt-in to the
denote-link-use-org-id.

Am I now clear? Is what I am suggesting correct or did I misunderstand
something?

@jeanphilippegg
Copy link
Contributor Author

jeanphilippegg commented Jul 3, 2022

The misunderstanding might be coming from me. I was suggesting that the solution would be to not trying to provide a working solution for users of id: links as part of denote's code. Instead, they would set org-id-extra-files themselves (in their init files) using the snippet I provided. Then, clicking on id: links would just work.

@protesilaos
Copy link
Owner

protesilaos commented Jul 3, 2022

Would they not need to update org-id-extra-files each typetime they create a new note? Maybe there are more cases where such an update is required, but you get the idea.

EDIT: each "time", not "type"

@jeanphilippegg
Copy link
Contributor Author

Ah, now I see your point! Maybe denote's code could make an exception and update it for them automatically on note creation only. I don't know other cases.

@protesilaos
Copy link
Owner

I just noticed this part from the original comment of @ggjp:

UPDATE: Actually, I get the same behavior by default using id: links
in org files outside of denote: they do not work as-is. I suppose the
user is expected to manually set org-id-extra-files.

Strictly speaking, this is an Org/user problem. Though we provide the
denote-link-use-org-id option, which entails responsibility towards
the end-user. There is an implied "contract", so to speak, to do what
the option implies. Ideally, I would like us to provide something that
"just works". Simply documenting support is the plan B---and it is
suboptimal. Looking at it as a user, I would expect a package which
offers optional support for something to take care that the feature
works. Here we have to consider the non-expert user who simply toggles
the option through the Custom UI.

Constantly updating org-id-extra-files requires that we handle all
scenaria where those are changed. But we cannot guarantee that, as the
user may move the files with mv, rename the subdirectory, etc.

My understanding right now is that org-roam requires the database to
basically make this work properly. (Users of org-roam can help clarify
this point.) Otherwise things are too slow at scale and too fragile in
general. As Denote does not---and will not---have a database, are we
providing an option which is not viable long-term?

@jeanphilippegg
Copy link
Contributor Author

Otherwise things are too slow at scale and too fragile in general. As Denote does not---and will not---have a database, are we providing an option which is not viable long-term?

This is what I was implying. That we are, in fact, providing an option that is not viable long-term, but keeping the option for expert users who will be able to handle this. And we should warn about this clearly in the doc of that option.

@shrysr
Copy link

shrysr commented Jul 3, 2022

I do not know the internal workings of org-roam - but I think this understanding is correct, and can be verified from Section 6 in the org-roam manual.

There is atleast 1 other package which used org-id for hierarchical linking, and has no database driven caching as far as I can remember - org-brain. I believe it was not very performant with some key functions with a large number of notes, as even mentioned in the README, and that aligns with my experience at that time, though it has been a few years since I used org-brain and I did not have a large number of notes then. However, I also recall there were interesting elisp based optimisations proposed on some issues (Example). If I remember right, the org-brain-visualise function was the one where all the org-ids would need to be parsed - Ref.

I would not be able to judge whether these are viable in the long term and whether these solutions truly.. solved the problem. In terms of available solutions I know of - most people have taken the db or external program route. Example, Karl Voit's Memacs (driven by python iirc) and John Kitchin's org-db (sqlite indexing of org-headings during idle time).

@protesilaos
Copy link
Owner

This is what I was implying. That we are, in fact, providing an option that is not viable long-term, but keeping the option for expert users who will be able to handle this. And we should warn about this clearly in the doc of that option.

What you write here @ggjp and what @shrysr explained tells me that those expert users will need to be real experts. To put it concretely, I am an experienced Emacs user with no programming background, who has written several Emacs packages (including the modus-themes which are built into Emacs), but I have zero knowledge of using a db or of handling things with python and the like. So if I opt in to denote-link-use-org-id I will eventually run into problems that my non-existent skills will prevent me from solving. At that point, I will just use org-roam which already handles this use-case in a competent way (and has a massive community to rely on in case I need further support).

If each package needs to write its own optimisations and maintain its own cache, to me this shows that org-id is not good enough for the time being: more work needs to be done in org.git to provide a universal solution.

I wanted to support org-id by default on the premise that Denote must be a good Emacs citizen which interoperates with the rest of the wider ecosystem. But if org-id leaves something to be desired, then that goal is not worth pursuing: we add complexity to our code, offer an option that we cannot genuinely/adequately support, and make usage of it contingent on reading the docs and having a high level of expertise.

I think being a good Emacs citizen is a laudable principle. In this case, the right thing to do is to recommend the use of org-roam instead of trying to accommodate org-id. As such, I have now changed my mind and think we should remove what we previously added.


For some context here: the reason I never used org-roam is because (i) it is Org-specific whereas I write notes in different file types and (ii) I did not want to ever rely on a db or equivalent dependency.

@shrysr
Copy link

shrysr commented Jul 3, 2022

I am inclined to agree with @protesilaos in that, the core problem appears to be about optimising org-id in org.git, and that there is a large overhead in considering org-id driven links. I'm adding a comment from a slightly different point of view:

As I read through #8, it seemed to me that the main points of the discussion leading to org-id based linking are :

  1. canonical linking,
  2. non-brittle linking to other files
  3. exporter compatibility (I will add here mobile app compatibility, like Beorg, which iirc recently introduced being able to parse org-id links)
  4. Question of what is the real difference between org-id and denote's identifier.

Using org-id based linking is bound to get more complex as users start creating org-notes and linking not just atomic notes, but org headings within as well. As I recall, this was one of the key motivations between using org-id links in org-roam v2. This means not just 1 org-id per note, and even more over-head for every refresh of org-id locations.

Personally, I interpret the driving principles of Denote, to be a little different from org-roam and it does not necessarily call for the benefits of org-id like interlinking of headlines, especially since note formats can be variable (md, txt, org) as already mentioned. For example - the focus is on being able to view any note using less, increased human readability, atomic notes and imo ultimately having the least overhead in using the package itself and in processing reasonably organised notes (that can evolve) rather than headline driven massive interlinking alone and complexities of dealing with a db.

Though these notes are ideally meant to be about 'mindful note taking' - and @protesilaos has described his style as being able to compose coherent atomic notes - my mind for one - is messy and I do not always end up creating terribly informative, coherent atomic notes, and end up with a large number of short(er) notes, many of which may contain just a few lines - which may even be all I practically need on that topic. Org mode (and org-id) for such ultra-short notes is an overkill. imo, there is definitely value in being able to see that there are links between notes, create them painlessly and quickly access linked notes and ideally be able to 'link' to say, a paragraph in a note. It's worth noting that the minute things become slow-ish - the entire process is significantly hobbled.

I think denote type links provides the above, and of course we can look at ways to improve, but, by Not relying on org-id - we can also consider putting efforts into adapting and enhancing a non-db driven enhanced keywords-within-notes linking - like that employed in https://howm.osdn.jp/ , in which it seems an external grep is an optional dependency, and imo much more acceptable and easily available than a db. I'm not sure how well this would scale (perhaps @kaushalmodi and @ggjp and others would care to weigh in?) - but I keep thinking that a db is not the only answer to this purpose, and org-id need not necessarily be viewed as critical.

Canonical style linking, in my mind, is not critically important since it is not clear to me that the original intent behind org-mode envisioned backlinks and a very high degree of interlinking anyway. Denote links are not brittle like file and path based links from what I've seen, and denote links can be used to link to Org files as well, without org-id.

protesilaos added a commit that referenced this issue Jul 3, 2022
The original idea was to support the 'org-id' library on the premise
that it makes Denote a good Emacs citizen.  However, discussions on the
mailing list[0] and the GitHub mirror[1] have made it clear to me that
'org-id' is not consistent with Denote's emphasis on simplicity.

To support the way 'org-id' works, we will eventually have to develop
some caching mechanism, just how the org-roam package does it.  This is
because the variable 'org-id-extra-files' needs to be kept up-to-date
whenever an operation on a file is performed.  At scale, this sort of
monitoring requires specialised software.  Such a mechanism is outside
the scope of Denote---if you need a db, use org-roam which is already
great.

[0] <https://lists.sr.ht/~protesilaos/denote/%3C8735fk4y1w.fsf%40hallac.net%3E#%3C877d4un73c.fsf@protesilaos.com%3E>

[1] <#29>

Quote of what I wrote on the GitHub mirror issue 29:

        [ggjp] This is what I was implying.  That we are, in fact,
        providing an option that is not viable long-term, but keeping
        the option for expert users who will be able to handle this.
        And we should warn about this clearly in the doc of that option.

    [protesilaos] What you write here @ggjp and what @shrysr explained
    tells me that those expert users will need to be real experts.  To
    put it concretely, I am an experienced Emacs user with no
    programming background, who has written several Emacs
    packages (including the modus-themes which are built into Emacs),
    but I have zero knowledge of using a db or of handling things with
    python and the like.  So if I opt in to 'denote-link-use-org-id' I
    will eventually run into problems that my non-existent skills will
    prevent me from solving.  At that point, I will just use org-roam
    which already handles this use-case in a competent way (and has a
    massive community to rely on in case I need further support).

    If each package needs to write its own optimisations and maintain
    its own cache, to me this shows that 'org-id' is not good enough for
    the time being: more work needs to be done in org.git to provide a
    universal solution.

    I wanted to support 'org-id' by default on the premise that Denote
    must be a good Emacs citizen which interoperates with the rest of
    the wider ecosystem.  But if 'org-id' leaves something to be
    desired, then that goal is not worth pursuing: we add complexity to
    our code, offer an option that we cannot genuinely/adequately
    support, and make usage of it contingent on reading the docs and
    having a high level of expertise.

    I think being a good Emacs citizen is a laudable principle.  In this
    case, the right thing to do is to recommend the use of org-roam
    instead of trying to accommodate 'org-id'.  As such, I have now
    changed my mind and think we should remove what we previously added.

    For some context here: the reason I never used org-roam is
    because (i) it is Org-specific whereas I write notes in different
    file types and (ii) I did not want to ever rely on a db or
    equivalent dependency.

    <#29 (comment)>
@protesilaos
Copy link
Owner

I just created the remove-org-id in case we go through with this. I tested it, but please consider it a work-in-progress as I may have missed something.


@shrysr Thanks for the feedback! Indeed, the headline-based workflow is not intended for Denote. I think massive files with multiple headings introduce a dependency on Org or relevant specialised software. Same principle for not mixing notes with TODO items. My personal view is that those are bad habits that Org encourages or, to be more precise, they are good only in the right situation. Those points are covered in the manual's FAQ section: https://protesilaos.com/emacs/denote#h:da2944c6-cde6-4c65-8f2d-579305a159bb. Short notes of the sort you use are fine though: they work everywhere.

About howm's approach, I am interested to learn more, though better not change the subject here.

@jeanphilippegg
Copy link
Contributor Author

I am fine with removing org id: support! I have seen the commit. Do we want to go back to using #+identifier instead of the ID: property in org files? Denote identifiers are still valid IDs for org and some user might want to use org-insert-link even if we don't create id: link ourselves or work with org ids.

@protesilaos
Copy link
Owner

I am fine with removing org id: support! I have seen the commit. Do we want to go back to using #+identifier instead of the ID: property in org files? Denote identifiers are still valid IDs for org and some user might want to use org-insert-link even if we don't create id: link ourselves or work with org ids.

I think using the #+identifier: creates expectations that are consistent with the project. If we have a PROPERTIES drawer, we are preserving a "hidden option" for org-id. We are also offering the implicit invitation to existing org-roam users to migrate their notes to Denote---such cases have already been reported here. We cannot honour that tacit promise of being good for org-id, so I thought it is preferable to guard against potential problems.

There is also a general design/maintenance consideration here. If we are writing "hidden options", we still need to test them as if they were formal user options (otherwise why are we providing them?). Better avoid that.

Does this make sense or did I go too far?

@kaushalmodi
Copy link
Contributor

Sorry, I am away from computer for few days (long weekend in US). I'm just quickly reading this whole thread on phone.

I'm alright with changing the org-id style linking to nil, and also removing the org-id-extra-files update from within denote as users can and should add that in their emacs config.

But can the ID property still be left the default? That doesn't force the users to use org-id. But the org-id users can get the note linking work out of box (as they would have the org-id-extra-files set correctly in their config). There's no performance penalty for using the ID property.

Thoughts?

@kaushalmodi
Copy link
Contributor

We cannot honour that tacit promise of being good for org-id, so I thought it is preferable to guard against potential problems.

With

  1. Correct updating of org-id-extra-files
  2. Enabling id: style linking in denote

All of these work great:

  1. Linking to other ID notes
  2. Exporting using various exporters
  3. Other org-id tooling

@kaushalmodi
Copy link
Contributor

Another thought: @protesilaos I don't want to cause any further trouble with this decision. I'd say just pick the approach that fits your use case and bandwidth for support, and gut feeling 👍

@jeanphilippegg
Copy link
Contributor Author

Does this make sense or did I go too far?

I understand your reasons and I think they are valid. I am fine with the option you choose.

protesilaos added a commit that referenced this issue Jul 3, 2022
The original idea was to support the 'org-id' library on the premise
that it makes Denote a good Emacs citizen.  However, discussions on the
mailing list[0] and the GitHub mirror[1] have made it clear to me that
'org-id' is not consistent with Denote's emphasis on simplicity.

To support the way 'org-id' works, we will eventually have to develop
some caching mechanism, just how the org-roam package does it.  This is
because the variable 'org-id-extra-files' needs to be kept up-to-date
whenever an operation on a file is performed.  At scale, this sort of
monitoring requires specialised software.  Such a mechanism is outside
the scope of Denote---if you need a db, use org-roam which is already
great.

[0] <https://lists.sr.ht/~protesilaos/denote/%3C8735fk4y1w.fsf%40hallac.net%3E#%3C877d4un73c.fsf@protesilaos.com%3E>

[1] <#29>

Quote of what I wrote on the GitHub mirror issue 29:

        [ggjp] This is what I was implying.  That we are, in fact,
        providing an option that is not viable long-term, but keeping
        the option for expert users who will be able to handle this.
        And we should warn about this clearly in the doc of that option.

    [protesilaos] What you write here @ggjp and what @shrysr explained
    tells me that those expert users will need to be real experts.  To
    put it concretely, I am an experienced Emacs user with no
    programming background, who has written several Emacs
    packages (including the modus-themes which are built into Emacs),
    but I have zero knowledge of using a db or of handling things with
    python and the like.  So if I opt in to 'denote-link-use-org-id' I
    will eventually run into problems that my non-existent skills will
    prevent me from solving.  At that point, I will just use org-roam
    which already handles this use-case in a competent way (and has a
    massive community to rely on in case I need further support).

    If each package needs to write its own optimisations and maintain
    its own cache, to me this shows that 'org-id' is not good enough for
    the time being: more work needs to be done in org.git to provide a
    universal solution.

    I wanted to support 'org-id' by default on the premise that Denote
    must be a good Emacs citizen which interoperates with the rest of
    the wider ecosystem.  But if 'org-id' leaves something to be
    desired, then that goal is not worth pursuing: we add complexity to
    our code, offer an option that we cannot genuinely/adequately
    support, and make usage of it contingent on reading the docs and
    having a high level of expertise.

    I think being a good Emacs citizen is a laudable principle.  In this
    case, the right thing to do is to recommend the use of org-roam
    instead of trying to accommodate 'org-id'.  As such, I have now
    changed my mind and think we should remove what we previously added.

    For some context here: the reason I never used org-roam is
    because (i) it is Org-specific whereas I write notes in different
    file types and (ii) I did not want to ever rely on a db or
    equivalent dependency.

    <#29 (comment)>
@protesilaos
Copy link
Owner

kaushalmodi: I don't want to cause any further trouble with this decision. I'd say just pick the approach that fits your use case and bandwidth for support, and gut feeling

ggjp: I understand your reasons and I think they are valid. I am fine with the option you choose.

Thank you for the understanding! This is a difficult predicament to be in.

I just merged the branch after making some final changes to the README.org. This note in particular:

[ Support for =id:= type notes is REMOVED as part of
  {{{development-version}}}.  The reason is that to fully support org-id
  we need to change Denote's scope.  That will never be reconciled with
  the project's principles.  Users of the =id:= functionality are
  advised to use org-roam: it has first-class support for it, is a major
  project, and has a massive community.  My sincere apologies for not
  foreseeing this and for breaking some user configurations in the
  process. ]

My apologies once again!

@shrysr
Copy link

shrysr commented Jul 3, 2022

But can the ID property still be left the default? That doesn't force the users to use org-id. But the org-id users can get the note linking work out of box (as they would have the org-id-extra-files set correctly in their config). There's no performance penalty for using the ID property.

I'm finding this sensible and tbh I forgot mentioning this in my rambling last night. I guess this addresses the benefits of canonical linking. Thanks @kaushalmodi.

If we have a PROPERTIES drawer, we are preserving a "hidden option" for org-id. We are also offering the implicit invitation to existing org-roam users to migrate their notes to Denote---such cases have already been reported here. We cannot honour that tacit promise of being good for org-id, so I thought it is preferable to guard against potential problems.

There is also a general design/maintenance consideration here. If we are writing "hidden options", we still need to test them as if they were formal user options (otherwise why are we providing them?). Better avoid that.

This makes sense. Maybe I misunderstand things here, but can we not have denote style links to be default for (de)notes - and explicitly supported, while if they need to, users can still link denote org files via org-id to any other notes/files (and vice versa) -- in which case performance + testing for org-id driven linking is not within Denote's purview at all?

Also to be clear @protesilaos - I'm just expressing thoughts, and especially since my deplorable elisp knowledge does not yet let me usefully contribute code - I'm quite fine with what you are comfortable with.

@shrysr
Copy link

shrysr commented Jul 3, 2022

I'm not sure if my earlier question was clear. Here is another attempt : I mean to ask that, can we not use the ID property for Denote Org files and have denote links use that ID property to locate Denote org files - and this is Not connected to org-id within Denote's working view?

We cannot honour that tacit promise of being good for org-id, so I thought it is preferable to guard against potential problems.

With

  1. Correct updating of org-id-extra-files
  2. Enabling id: style linking in denote

All of these work great:

  1. Linking to other ID notes
  2. Exporting using various exporters
  3. Other org-id tooling

@protesilaos
Copy link
Owner

@shrysr I will reply to you tomorrow morning. It is already past my bedtime and I feel I won't manage to write the whole thing now. I've been here practically since dawn.

@protesilaos
Copy link
Owner

can we not have denote style links to be default for (de)notes - and explicitly supported, while if they need to, users can still link denote org files via org-id to any other notes/files (and vice versa) -- in which case performance + testing for org-id driven linking is not within Denote's purview at all?

The formal support for id: links was added shortly before the release of version 0.1.0. In the days prior, we supported what you describe via the manual. The user could change the denote-org-front-matter variable to include a PROPERTIES drawer. This possibility still exists, though yesterday I removed the relevant entry from the manual. This way only the real do-it-yourself experts will go down that path.

My concern here is with managing expectations. If our Org notes are superficially the same as org-roam's, an unsuspecting user may think that Denote is an org-roam lite. We will thus get issues/requests, such as those already mentioned in this GitHub repo, about migrating from org-roam to Denote. While there are similarities, Denote is not a minimalist org-roam and I would not like to encourage the idea of treating the two as interchangeable.

Doing things half-way-through is a way to create false expectations. A package on GNU ELPA must be usable by users of all skill levels. If the functionality we provide is incomplete and needs to be covered by user-level tweaks, we are excluding a portion of the user base while still assuming the maintenance burden. If someone trusts Denote to, say, write a 1000 notes, we do not want to surprise them after the fact. Imagine if the reported issues that triggered this change happened 6 months into one's daily usage of Denote: it wouldn't be nice.

Setting the right expectations is a matter of responsibility: we let the user make a more informed choice and show respect for their time. It also makes it easier for me to keep Denote's scope in check by not supporting every little extra that Org implements. The premier Org extension is org-roam: we do not need another one (or, if we do, I am not the one to implement it).


Some comments on the denote: hyperlink type for Org as they may be relevant in this context:

  • It is meant to work like the standard file: type. This means that it links to a file, while it can also have additional search parameters, as explained in the Org manual. Evaluate:

    (info "(org) Search Options")
    
  • It does not read the front matter, but only the file name. You can create a note as usual, delete all its contents, save it, and try to link to it from another note. It works.

  • Exporting now works like the file: type for HTML, LaTeX, Texinfo, and Markdown. Technically, it also supports the ASCII backend but the format of the output could be tweaked further.

There may be refinements to be made, which is okay as that is part of a maintainer's duties.

@shrysr
Copy link

shrysr commented Jul 4, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants