emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] org.el: Preserve case for link subgroups from `org-file-apps


From: Ihor Radchenko
Subject: Re: [PATCH] org.el: Preserve case for link subgroups from `org-file-apps'
Date: Tue, 06 Sep 2022 20:07:25 +0800

Max Nikulin <manikulin@gmail.com> writes:

> Debugging `org-file-apps' and `org-open-file' regexp subgroups I noticed 
> an issue: the code distorts case of the link components making them 
> invalid. The patch to fix the bug is attached, the commit message 
> contains an example of the problem.
>
> Maybe I break some use case, but I am unaware when namely downcased link 
> must be used.

I tracked this dlink business down to
75563bf71e6df356a5ae77a93152fcf913378107.
The relevant ML discussion is in
https://orgmode.org/list/4B51D104.9090502@jboecker.de

Carsten replied (in
https://list.orgmode.org/orgmode/9771A876-82D8-4755-9EC4-F951EA9FE6E6@gmail.com/):

>> Hi Jan,
>> 
>> I have now applied this patch.
>> 
>> Hi everyone,
>> 
>> I am not sure if I completely understood every part of it,  so if
>> anyone finds strange behavior of links, make sure to report it so
>> that we (Jan, that is :-) gets a chance to fix it.

I do not see much of discussion relevant to downcasing the links.
I also do not see a clear reason why downcasing is necessary.
So, it is probably safe to drop it, especially if tests are passing.

>                   ;; First, try matching against apps-dlink if we
>                   ;; get a match here, store the match data for
>                   ;; later.
> -                 (let ((match (assoc-default dlink apps-dlink
> -                                             'string-match)))
> +                 (let* ((case-fold-search t)
> +                           (match (assoc-default link apps-dlink
> +                                                 'string-match)))

With this patch, `apps-dlink' name becomes completely confusing.
Is there any way to get rid of it as well? (or maybe rename to something
more reasonable).

-- 
Ihor Radchenko,
Org mode contributor,
Learn more about Org mode at https://orgmode.org/.
Support Org development at https://liberapay.com/org-mode,
or support my work at https://liberapay.com/yantar92



reply via email to

[Prev in Thread] Current Thread [Next in Thread]