emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Daniel Clemente <n142857@gmail.com>
To: "Rudolf Adamkovič" <salutis@me.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Radio links work only in small numbers
Date: Wed, 28 Dec 2022 09:46:44 +0000	[thread overview]
Message-ID: <CAJKAhPDo07QDSG6WXGJ6xTpdi7UMh4Vjh2XuSMZ6j8y1DsXZfA@mail.gmail.com> (raw)
In-Reply-To: <m2lenax5m6.fsf@me.com>

[-- Attachment #1: Type: text/plain, Size: 3005 bytes --]

Hi,
I also found this limitation, and my solution was to disable radio links
and to replace them by a manual approach:

1. I disabled the call to (org-update-radio-target-regexp) in org.el. Well,
I added a boolean org-inhibit-startup-radio-refresh, that works in a
similar way to org-inhibit-startup-visibility-stuff. After this change, I
still type <<<this>>> to define a title, but org doesn't handle it anymore

2. I created a helm <https://github.com/emacs-helm/helm> menu, that offers
me all the radio links. I compute the list of radio links myself, through
grep, by looking for <<<. It's easier than it seems, and very fast. The
code (no explanations) is my configuration
<https://www.danielclemente.com/emacs/confi.html>, in these functions:
anythingyhelm-fuente-etiquetas-radio-org,
precarga-etiquetas-radio-de-wiki-para-helm

3. Often, when I want to refer to a title, I write in in cursive, /like
this/. That's my way of telling myself „that's a link, you can manually
search for it through helm“. The target will be tagged <<<like this>>>. I
could automate this link-following but I don't mind typing for 1 or 2
seconds to go a header. I still use normal links (C-c C-l, :ID: etc.) if I
want something that is easier to follow.

My system doesn't provide the same features as org's radio links, but I get
an interactive menu with pattern matching and very fast access to all
headers. I would still prefer the real radio links, with no limitations.
However, I understand that org-mode's approach is computationally harder.
Whereas I'm looking for ONE target link through all my 100 files, org-mode
is doing a regexp that looks for ALL target links in the current file. And
I have around 20k radio links!. Grepping for 20k things everywhere is
harder than grepping for 1 thing everywhere. Even GNU grep is slow (>25
seconds) if I use a long regular expression
<https://gist.github.com/clemente/4dbe4fd4d4e9a8cc88e11f4a731d88f8> with
20k things inside.

In other words: since radio links don't scale well, I have replaced the
real radio links (search for everything everywhere) with a directed
approach (search for 1 thing everywhere).


On Tue, 13 Dec 2022 at 23:11, Rudolf Adamkovič <salutis@me.com> wrote:

> Greetings smart people!
>
> All [[link]]s in my notes perfectly match LEVEL-1 headings, so I figured
> that I may as well ask Org to make links for me.  So, I replaced all the
> ~4000 headings in my notes with radio <<<targets>>>.  However, Org now
> errors out with "Regular expression too big".
>
> Does anyone know how to overcome this limitation?  Or, perhaps someone
> has a patch in works that fixes it?  If so, please let me know!
>
> Thank you.
>
> Rudy
> --
> "The introduction of suitable abstractions is our only mental aid to
> organize and master complexity."
> -- Edsger Wybe Dijkstra, 1930-2002
>
> Rudolf Adamkovič <salutis@me.com> [he/him]
> Studenohorská 25
> 84103 Bratislava
> Slovakia
>
>

[-- Attachment #2: Type: text/html, Size: 3697 bytes --]

  parent reply	other threads:[~2022-12-28  9:47 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-13 23:10 Radio links work only in small numbers Rudolf Adamkovič
2022-12-14  8:30 ` Ihor Radchenko
2022-12-14 15:29   ` Rudolf Adamkovič
2022-12-14 15:47 ` Max Nikulin
2022-12-14 16:02   ` Ihor Radchenko
2022-12-20  3:21     ` Timothy
2022-12-20  1:00   ` Rudolf Adamkovič
2022-12-28  9:46 ` Daniel Clemente [this message]
2024-02-19  9:26 ` Ihor Radchenko
2024-02-28 16:33   ` nobiot
2024-02-28 17:14     ` Ihor Radchenko
2024-02-28 22:18       ` Noboru Ota
2024-02-29 11:11         ` Ihor Radchenko
2024-02-29 16:47           ` Noboru Ota
2024-02-29 17:21             ` Ihor Radchenko
2024-02-29 17:44               ` Noboru Ota
2024-04-04 20:20           ` Rudolf Adamkovič

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAJKAhPDo07QDSG6WXGJ6xTpdi7UMh4Vjh2XuSMZ6j8y1DsXZfA@mail.gmail.com \
    --to=n142857@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=salutis@me.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).