Coder Social home page Coder Social logo

Comments (11)

nobiot avatar nobiot commented on July 28, 2024 1

@reyman @protesilaos , you two have moved on with an idea, so I won't dwell too long on this issue. But let me part with a couple of notes, which may be relevant with this topic of radio targets and wiki creator.

  1. "Performance issue" with Org's radio targets.
    I believe the ML thread @reyman refers to is this one. Thanks for noting. I am now trying to contribute. We should be aware of the "scale" here. The issue reported in the thread speaks about roughly 4,000 radio targets. I have created test files with 5000 and 500 radio targets. They work beautifully with 500 of them. I can reproduce the reported error with 5000 targets. For my normal use, 500 (within a single Org file) is more than enough -- for your wiki creator, perhaps it may not be; I am not sure.

  2. Patch proposal.
    The ML thread has a recent update from Ihor, the maintainer of Org-mode, with a patch. This was on 19 Feb 2024. No news about test results has been sent to the ML yet, but this may lead to removing the error and limit in number of radio targets.

  3. Radio targets across multiple files
    I am working on a small patch/package to enable radio targets for multiple files. I am trying to refurbish the built-in org-ctag to achieve this. It works fine on my end (though it is cranky if you want to use it at the moment). Together with the patch proposal from Ihor, this may lead to a useful package -- I am considering to have a discussion in the ML to send a patch for upstream Org.

  4. How is this related to Denote and this issue/feature request?
    I'm not trying to persuade you two to change the course you have discussed above. One thing you may want to consider is this possibility:

  • Now radio targets work more than 5000 targets
  • They also work with multiple Org files
  • If you have a single Org file where you have definitions like this:
- <<<beagle>>> :: [[denote:20240118T060608]]
- <<<Darwin>>> :: [[denote:20240120T060608]]
- <<<term 3>> :: [[denote:ID-for-term-3]]
  ... [more terms]

It would be easy to have Denote code to let radio targets to automatically jump to the note the denote link points to. For the user, the link works as if you go like this:

"beagle" link in the body text -> denote:20240118T060608

when technically the code jumps and hops like this:

"beagle" link in body text -> definition -> denote:20240118T060608.

Just a thought.

from denote.

reyman avatar reyman commented on July 28, 2024 1

@nobiot Thanks for all this hard work 💯 👍 , and for all your packages in general !

Both solution are really interesting for a wiki use case.
It's more a matter of taste i suppose, if user prefer denote link written in the text or not.
In my use case, i see another disadvantage for the radio target link, in the future we work in team and some people don't use org-mode, and yes, this is a shame :) In my head, denote link seems more easy to transform/maintain in such context, but i'm probably wrong.

from denote.

protesilaos avatar protesilaos commented on July 28, 2024

Hello @reyman! I need to refresh my knowledge of Org radio targets. I think it should be possible, but I must double-check.

When do you need this though? Even if we make the change now, it will take a while before it is available on GNU ELPA. I will publish the next version in a few weeks. Maybe in April.

from denote.

reyman avatar reyman commented on July 28, 2024

When do you need this though? Even if we make the change now, it will take a while before it is available on GNU ELPA. I will publish the next version in a few weeks. Maybe in April.

Great ! No problem, April is perfect, this feature doesn't block me to build a wiki with manual link around the different interviews.

from denote.

nobiot avatar nobiot commented on July 28, 2024

@reyman

Radio targets work within a single Org file.
Why not just do something like this? Calling org-update-radio-target-regexp, "beagle" becomes a radio target link; in the definition, you can have the denote link if you like... Personally to me, this way, you don't need any additional feature, you can still use the denote link to another note, and looks cleaner without links in the body text.

image

* Links
- <<<beagle>>> :: [[denote:20240118T060608]

* Body
    13 avril 1834. — Le beagle jette l’ancre à l’embouchure du Santa
 Cruz. Ce fleuve se jette dans la mer Ă  environ 60 milles au sud du port
 Saint-Julien. Pendant son dernier voyage le capitaine Stokes l’avait
 remontĂ© Ă  une distance d’environ 30 milles, mais le manque de
 provisions l’obligea alors à revenir en arriùre. On ne connaüt de ce
 fleuve que ce qui a Ă©tĂ© dĂ©couvert pendant l’excursion dont je viens de
 parler. Le capitaine Fitz-Roy se décide à le remonter aussi loin que le
 temps le lui permettra. Le 18, nous partons dans trois baleiniĂšres,
 portant trois semaines de provisions ; notre expédition se compose de
 vingt-cinq hommes, force suffisante pour dĂ©fier une armĂ©e d’Indiens. La
 marée montante nous entraßne rapidement, le temps est beau, aussi
 faisons-nous une longue Ă©tape ; nous buvons bientĂŽt l’eau douce du
 fleuve et le soir nous nous trouvons au-dessus du point oĂč se fait
 sentir la marée.

    5 mai. — Nous commençons à redescendre le fleuve avant le lever du
 soleil : cette descente s’effectue avec une grande rapiditĂ© ; nous
 faisons ordinairement dix nƓuds à l’heure. En un jour, nous avons
 traversé ce qui nous a coûté cinq jours et demi de travail pénible
 quand nous remontions le fleuve. Le 8, nous nous retrouvons Ă  bord du
 beagle aprĂšs vingt et un jours d’expĂ©dition. Tous mes compagnons
 Ă©prouvent un vif dĂ©sappointement ; quant Ă  moi, j’ai tout lieu de me
 fĂ©liciter de ce voyage, car il m’a permis d’observer une section fort
 intéressante de la grande formation tertiaire de la Patagonie.

from denote.

reyman avatar reyman commented on July 28, 2024

@reyman

Radio targets work within a single Org file. Why not just do something like this? Calling org-update-radio-target-regexp, "beagle" becomes a radio target link; in the definition, you can have the denote link if you like... Personally to me, this way, you don't need any additional feature, you can still use the denote link to another note, and looks cleaner without links in the body text.

image

* Links
- <<<beagle>>> :: [[denote:20240118T060608]

* Body
    13 avril 1834. — Le beagle jette l’ancre à l’embouchure du Santa
 Cruz. Ce fleuve se jette dans la mer Ă  environ 60 milles au sud du port
 Saint-Julien. Pendant son dernier voyage le capitaine Stokes l’avait
 remontĂ© Ă  une distance d’environ 30 milles, mais le manque de
 provisions l’obligea alors à revenir en arriùre. On ne connaüt de ce
 fleuve que ce qui a Ă©tĂ© dĂ©couvert pendant l’excursion dont je viens de
 parler. Le capitaine Fitz-Roy se décide à le remonter aussi loin que le
 temps le lui permettra. Le 18, nous partons dans trois baleiniĂšres,
 portant trois semaines de provisions ; notre expédition se compose de
 vingt-cinq hommes, force suffisante pour dĂ©fier une armĂ©e d’Indiens. La
 marée montante nous entraßne rapidement, le temps est beau, aussi
 faisons-nous une longue Ă©tape ; nous buvons bientĂŽt l’eau douce du
 fleuve et le soir nous nous trouvons au-dessus du point oĂč se fait
 sentir la marée.

    5 mai. — Nous commençons à redescendre le fleuve avant le lever du
 soleil : cette descente s’effectue avec une grande rapiditĂ© ; nous
 faisons ordinairement dix nƓuds à l’heure. En un jour, nous avons
 traversé ce qui nous a coûté cinq jours et demi de travail pénible
 quand nous remontions le fleuve. Le 8, nous nous retrouvons Ă  bord du
 beagle aprĂšs vingt et un jours d’expĂ©dition. Tous mes compagnons
 Ă©prouvent un vif dĂ©sappointement ; quant Ă  moi, j’ai tout lieu de me
 fĂ©liciter de ce voyage, car il m’a permis d’observer une section fort
 intéressante de la grande formation tertiaire de la Patagonie.

Yeah you're right @nobiot, at this scale it works well using your snippet.

But, i think about that all this day, and i need to refine my problem.
I see on org mailling list that radio target don't scale well because it maintain a list of regexp that grow with your usage ...

A function that do some sort of "search and replace" in the text based on the content of the description in denote [[link][description]] could be more useful in my case. Advantage of this approach, no need to maintain a list of regex, and link are write in hard in the text. The inverse function could also be useful, removing all links in the text based on description.

from denote.

protesilaos avatar protesilaos commented on July 28, 2024

I see on org mailling list that radio target don't scale well because it maintain a list of regexp that grow with your usage

Indeed. The issue we have here is that radio links are pointers in the current file. There is no mechanism to extend them.

Perhaps you @reyman can use the new feature is denote-org-extras.el that links to a heading inside of the file? I did a video demo of the feature: https://protesilaos.com/codelog/2024-01-20-emacs-denote-link-org-headings/

A function that do some sort of "search and replace" in the text based on the content of the description in denote [[link][description]] could be more useful in my case. Advantage of this approach, no need to maintain a list of regex, and link are write in hard in the text. The inverse function could also be useful, removing all links in the text based on description.

I think I follow you, but just to be sure: can you show how you imagine the file will change? Like have a before and after for comparison?

I do not know if we can do something on this front, because it will not be standard Org. But we may write some snippet in the manual.

from denote.

reyman avatar reyman commented on July 28, 2024

I see on org mailling list that radio target don't scale well because it maintain a list of regexp that grow with your usage

Indeed. The issue we have here is that radio links are pointers in the current file. There is no mechanism to extend them.

Perhaps you @reyman can use the new feature is denote-org-extras.el that links to a heading inside of the file? I did a video demo of the feature: https://protesilaos.com/codelog/2024-01-20-emacs-denote-link-org-headings/

Yes ! This is a good proxy in a first approach. I need to look a new time the video to see if i understand well, and after that i will test.

A function that do some sort of "search and replace" in the text based on the content of the description in denote [[link][description]] could be more useful in my case. Advantage of this approach, no need to maintain a list of regex, and link are write in hard in the text. The inverse function could also be useful, removing all links in the text based on description.

I think I follow you, but just to be sure: can you show how you imagine the file will change? Like have a before and after for comparison?

I do not know if we can do something on this front, because it will not be standard Org. But we may write some snippet in the manual.

Before :

13 avril 1834. — Le [[denote:20240118T060608][beagle]] jette l’ancre Ă  l’embouchure du Santa Cruz. Ce fleuve se jette dans la mer Ă  environ 60 milles au sud du port Saint-Julien. Pendant son dernier voyage le capitaine Stokes l’avait remontĂ© Ă  une distance d’environ 30 milles, mais le manque de provisions l’obligea alors Ă  revenir en arriĂšre. On ne connaĂźt de ce fleuve que ce qui a Ă©tĂ© dĂ©couvert pendant l’excursion dont je viens de parler. Le capitaine Fitz-Roy se dĂ©cide Ă  le remonter aussi loin que le temps le lui permettra. Le 18, nous partons dans trois baleiniĂšres, portant trois semaines de provisions ; notre expĂ©dition se compose de vingt-cinq hommes, force suffisante pour dĂ©fier une armĂ©e d’Indiens. La marĂ©e montante nous entraĂźne rapidement, le temps est beau, aussi faisons-nous une longue Ă©tape ; nous buvons bientĂŽt l’eau douce du fleuve et le soir nous nous trouvons au-dessus du point oĂč se fait sentir la marĂ©e.

5 mai. — Nous commençons Ă  redescendre le fleuve avant le lever du soleil : cette descente s’effectue avec une grande rapiditĂ© ; nous faisons ordinairement dix nƓuds Ă  l’heure. En un jour, nous avons traversĂ© ce qui nous a coĂ»tĂ© cinq jours et demi de travail pĂ©nible quand nous remontions le fleuve. Le 8, nous nous retrouvons Ă  bord du beagle aprĂšs vingt et un jours d’expĂ©dition. Tous mes compagnons Ă©prouvent un vif dĂ©sappointement ; quant Ă  moi, j’ai tout lieu de me fĂ©liciter de ce voyage, car il m’a permis d’observer une section fort intĂ©ressante de la grande formation tertiaire de la Patagonie.

Command : M-x org-denote-replace-using-description on [[denote:20240118T060608][beagle]]

After :

13 avril 1834. — Le [[denote:20240118T060608][beagle]] jette l’ancre Ă  l’embouchure du Santa Cruz. Ce fleuve se jette dans la mer Ă  environ 60 milles au sud du port Saint-Julien. Pendant son dernier voyage le capitaine Stokes l’avait remontĂ© Ă  une distance d’environ 30 milles, mais le manque de provisions l’obligea alors Ă  revenir en arriĂšre. On ne connaĂźt de ce fleuve que ce qui a Ă©tĂ© dĂ©couvert pendant l’excursion dont je viens de parler. Le capitaine Fitz-Roy se dĂ©cide Ă  le remonter aussi loin que le temps le lui permettra. Le 18, nous partons dans trois baleiniĂšres, portant trois semaines de provisions ; notre expĂ©dition se compose de vingt-cinq hommes, force suffisante pour dĂ©fier une armĂ©e d’Indiens. La marĂ©e montante nous entraĂźne rapidement, le temps est beau, aussi faisons-nous une longue Ă©tape ; nous buvons bientĂŽt l’eau douce du fleuve et le soir nous nous trouvons au-dessus du point oĂč se fait sentir la marĂ©e.

5 mai. — Nous commençons Ă  redescendre le fleuve avant le lever du soleil : cette descente s’effectue avec une grande rapiditĂ© ; nous faisons ordinairement dix nƓuds Ă  l’heure. En un jour, nous avons traversĂ© ce qui nous a coĂ»tĂ© cinq jours et demi de travail pĂ©nible quand nous remontions le fleuve. Le 8, nous nous retrouvons Ă  bord du [[denote:20240118T060608][beagle]] aprĂšs vingt et un jours d’expĂ©dition. Tous mes compagnons Ă©prouvent un vif dĂ©sappointement ; quant Ă  moi, j’ai tout lieu de me fĂ©liciter de ce voyage, car il m’a permis d’observer une section fort intĂ©ressante de la grande formation tertiaire de la Patagonie.

Command : M-x org-denote-remove-using-description on [[denote:20240118T060608][beagle]]

13 avril 1834. — Le beagle jette l’ancre Ă  l’embouchure du Santa Cruz. Ce fleuve se jette dans la mer Ă  environ 60 milles au sud du port Saint-Julien. Pendant son dernier voyage le capitaine Stokes l’avait remontĂ© Ă  une distance d’environ 30 milles, mais le manque de provisions l’obligea alors Ă  revenir en arriĂšre. On ne connaĂźt de ce fleuve que ce qui a Ă©tĂ© dĂ©couvert pendant l’excursion dont je viens de parler. Le capitaine Fitz-Roy se dĂ©cide Ă  le remonter aussi loin que le temps le lui permettra. Le 18, nous partons dans trois baleiniĂšres, portant trois semaines de provisions ; notre expĂ©dition se compose de vingt-cinq hommes, force suffisante pour dĂ©fier une armĂ©e d’Indiens. La marĂ©e montante nous entraĂźne rapidement, le temps est beau, aussi faisons-nous une longue Ă©tape ; nous buvons bientĂŽt l’eau douce du fleuve et le soir nous nous trouvons au-dessus du point oĂč se fait sentir la marĂ©e.

5 mai. — Nous commençons Ă  redescendre le fleuve avant le lever du soleil : cette descente s’effectue avec une grande rapiditĂ© ; nous faisons ordinairement dix nƓuds Ă  l’heure. En un jour, nous avons traversĂ© ce qui nous a coĂ»tĂ© cinq jours et demi de travail pĂ©nible quand nous remontions le fleuve. Le 8, nous nous retrouvons Ă  bord du beagle aprĂšs vingt et un jours d’expĂ©dition. Tous mes compagnons Ă©prouvent un vif dĂ©sappointement ; quant Ă  moi, j’ai tout lieu de me fĂ©liciter de ce voyage, car il m’a permis d’observer une section fort intĂ©ressante de la grande formation tertiaire de la Patagonie.

That will be an interesting function to simplify the work for wiki creator :)

from denote.

nobiot avatar nobiot commented on July 28, 2024

I think you are right about team collaborative editing being a weak spot for Org and, perhaps, Emacs in general.

But if the goal is to work with others who do not use Emacs, I would probably just use Markdown and a [[wiki-link]] syntax straight away.

Edit: Apologies. The last comment about Markdown does not help you achieve what you are pursuing. Please disregard it. Sorry for the noise I caused.

from denote.

protesilaos avatar protesilaos commented on July 28, 2024

I checked again: the radio targets are not easy to extend. We cannot implement this feature right now. Closing, thank you!

from denote.

reyman avatar reyman commented on July 28, 2024

I see on org mailling list that radio target don't scale well because it maintain a list of regexp that grow with your usage

Indeed. The issue we have here is that radio links are pointers in the current file. There is no mechanism to extend them.

Perhaps you @reyman can use the new feature is denote-org-extras.el that links to a heading inside of the file? I did a video demo of the feature: https://protesilaos.com/codelog/2024-01-20-emacs-denote-link-org-headings/

A function that do some sort of "search and replace" in the text based on the content of the description in denote [[link][description]] could be more useful in my case. Advantage of this approach, no need to maintain a list of regex, and link are write in hard in the text. The inverse function could also be useful, removing all links in the text based on description.

I think I follow you, but just to be sure: can you show how you imagine the file will change? Like have a before and after for comparison?

I do not know if we can do something on this front, because it will not be standard Org. But we may write some snippet in the manual.

@protesilaos Ok for <<>> but do you think a simple snippet like described in the quoted previous discussion would be feasible ? I could open a new issue if you want.

from denote.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.