Re: Bug: Plain https links with brackets are not recognised [9.4.4 (release_9.4.4-625-g763c7a @ /home/yantar92/.emacs.d/straight/build/org/)]

2021-05-15 Thread Bastien
Hi Ihor, Ihor Radchenko writes: > Updated version of the patch. Applied in maint as f313b8184 with an modified commit message, thanks. -- Bastien

Re: Bug: Plain https links with brackets are not recognised [9.4.4 (release_9.4.4-625-g763c7a @ /home/yantar92/.emacs.d/straight/build/org/)]

2021-03-24 Thread Ihor Radchenko
Updated version of the patch. Ihor Radchenko writes: > Nicolas Goaziou writes: >> Actually, this is (was?) intentional. By forbidding parenthesis in >> a plain URL, you allow one to type, e.g., (https://orgmode.org), which >> is, IMO, a more frequent need than having to deal with parenthesis in

Re: [PATCH] Re: Bug: Plain https links with brackets are not recognised [9.4.4 (release_9.4.4-625-g763c7a @ /home/yantar92/.emacs.d/straight/build/org/)]

2021-03-24 Thread Ihor Radchenko
Maxim Nikulin writes: > Example for #+STARTUP: overview: > > org-activate-links 560 0.028971085 5.173...e-05 > > For content number of calls is 410, without special settings (all) 120, > let me remind that it is for 10 find-file invocations. Another example > > org-activate-links 410

Re: Bug: Plain https links with brackets are not recognised [9.4.4 (release_9.4.4-625-g763c7a @ /home/yantar92/.emacs.d/straight/build/org/)]

2021-03-24 Thread Ihor Radchenko
Nicolas Goaziou writes: > Actually, this is (was?) intentional. By forbidding parenthesis in > a plain URL, you allow one to type, e.g., (https://orgmode.org), which > is, IMO, a more frequent need than having to deal with parenthesis in > the URL. The patch correctly recognises situations like t

Re: Bug: Plain https links with brackets are not recognised [9.4.4 (release_9.4.4-625-g763c7a @ /home/yantar92/.emacs.d/straight/build/org/)]

2021-03-24 Thread Nicolas Goaziou
Hello, Ihor Radchenko writes: > I have a https link like "https://doi.org/10.1016/0160-791x(79)90023-x". > If I put this link into an org file (using emacs -Q or Org mode master), > only "https://doi.org/10.1016/0160-791x(79)" part of the link is treated > as a link. I guess, it should not happe

Re: [PATCH] Re: Bug: Plain https links with brackets are not recognised [9.4.4 (release_9.4.4-625-g763c7a @ /home/yantar92/.emacs.d/straight/build/org/)]

2021-03-24 Thread Maxim Nikulin
On 19/03/2021 22:07, Ihor Radchenko wrote: Maxim Nikulin writes: I could not guess how to benchmark font-lock. I have tried to open file (to get everything loaded), kill the buffer, I usually just use profiler-start/open buffer/profiler-report. However, there is also https://github.com/Lindyd

Re: [PATCH] Re: Bug: Plain https links with brackets are not recognised [9.4.4 (release_9.4.4-625-g763c7a @ /home/yantar92/.emacs.d/straight/build/org/)]

2021-03-19 Thread Ihor Radchenko
Maxim Nikulin writes: > To be clear, I do not ask for any changes. It is great to have some > tests even in the current form. I just have never tried ert before, so I > have some questions. Note that I have no experience with tests since I never did programming professionally. I wrote the test

Re: [PATCH] Re: Bug: Plain https links with brackets are not recognised [9.4.4 (release_9.4.4-625-g763c7a @ /home/yantar92/.emacs.d/straight/build/org/)]

2021-03-19 Thread Ihor Radchenko
Maxim Nikulin writes: > I could not guess how to benchmark font-lock. I have tried to open file > (to get everything loaded), kill the buffer, I usually just use profiler-start/open buffer/profiler-report. However, there is also https://github.com/Lindydancer/font-lock-profiler for more fine-gr

Re: [PATCH] Re: Bug: Plain https links with brackets are not recognised [9.4.4 (release_9.4.4-625-g763c7a @ /home/yantar92/.emacs.d/straight/build/org/)]

2021-03-19 Thread Maxim Nikulin
On 16/03/2021 19:35, Ihor Radchenko wrote: +;;; Link regexps + +(ert-deftest test-ol/plain-link-re () + "Test `org-link-plain-re'." + (should + (equal +'("https" "//example.com/qwe()") +(org-test-with-temp-text +"(Some text in parenthesis followed by link with brackets https:

Re: [PATCH] Re: Bug: Plain https links with brackets are not recognised [9.4.4 (release_9.4.4-625-g763c7a @ /home/yantar92/.emacs.d/straight/build/org/)]

2021-03-17 Thread Maxim Nikulin
On 16/03/2021 19:35, Ihor Radchenko wrote: I am testing the new regexp for a few days now. Because the regexp is quite complex and because font-lock apparently fontifies even invisible (folded) text, loading time on large org files with many links became noticeably longer. Though it was 7.2Mb fi

Re: [PATCH] Re: Bug: Plain https links with brackets are not recognised [9.4.4 (release_9.4.4-625-g763c7a @ /home/yantar92/.emacs.d/straight/build/org/)]

2021-03-16 Thread Ihor Radchenko
Maxim Nikulin writes: > I have tried to compare current, your, and a little modified your > regexps on several synthetic examples: Thanks! Your version is indeed cleaner. I updated the patch. It uses your version now with one group specification that I missed earlier. I also added tests from yo

Re: [PATCH] Re: Bug: Plain https links with brackets are not recognised [9.4.4 (release_9.4.4-625-g763c7a @ /home/yantar92/.emacs.d/straight/build/org/)]

2021-03-15 Thread Maxim Nikulin
On 13/03/2021 12:24, Ihor Radchenko wrote: Here is the right one I think, some unit tests would be great to avoid future regressions. Since it is heuristics, some cases will be always broken, so tests could clarify intentions. I have not tested the regexp on real cases, so you have full rig

Re: [PATCH] Re: Bug: Plain https links with brackets are not recognised [9.4.4 (release_9.4.4-625-g763c7a @ /home/yantar92/.emacs.d/straight/build/org/)]

2021-03-12 Thread Ihor Radchenko
Sorry, attached wrong version of the patch. Here is the right one >From 0acb961d916d4bfde505c9f5eb16d1e8851b6c8f Mon Sep 17 00:00:00 2001 From: Ihor Radchenko Date: Sat, 13 Mar 2021 13:16:06 +0800 Subject: [PATCH] Improve org-link-plain-re * lisp/ol.el (org-link-make-regexps): Allow URLs with u

[PATCH] Re: Bug: Plain https links with brackets are not recognised [9.4.4 (release_9.4.4-625-g763c7a @ /home/yantar92/.emacs.d/straight/build/org/)]

2021-03-12 Thread Ihor Radchenko
Kyle Meyer writes: > This case was discussed at > . > There's mention of an improved regexp that might be worth trying. The improved regexp appears to work for me. I tried my best to transform the regexp provided in t

Re: Bug: Plain https links with brackets are not recognised [9.4.4 (release_9.4.4-625-g763c7a @ /home/yantar92/.emacs.d/straight/build/org/)]

2021-03-12 Thread Kyle Meyer
Ihor Radchenko writes: > I have a https link like "https://doi.org/10.1016/0160-791x(79)90023-x". > If I put this link into an org file (using emacs -Q or Org mode master), > only "https://doi.org/10.1016/0160-791x(79)" part of the link is treated > as a link. I guess, it should not happen. This

Bug: Plain https links with brackets are not recognised [9.4.4 (release_9.4.4-625-g763c7a @ /home/yantar92/.emacs.d/straight/build/org/)]

2021-03-12 Thread Ihor Radchenko
I have a https link like "https://doi.org/10.1016/0160-791x(79)90023-x". If I put this link into an org file (using emacs -Q or Org mode master), only "https://doi.org/10.1016/0160-791x(79)" part of the link is treated as a link. I guess, it should not happen. Best, Ihor