all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@gmail.com>
To: Max Nikulin <manikulin@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: [PATCH] org.el: Preserve case for link subgroups from `org-file-apps'
Date: Tue, 06 Sep 2022 20:07:25 +0800	[thread overview]
Message-ID: <8735d4wvsy.fsf@localhost> (raw)
In-Reply-To: <tf47n3$15l4$1@ciao.gmane.io>

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	other threads:[~2022-09-06 12:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-05  7:15 [PATCH] org.el: Preserve case for link subgroups from `org-file-apps' Max Nikulin
2022-09-06 12:07 ` Ihor Radchenko [this message]
2022-09-08 14:37   ` [PATCH v2] " Max Nikulin
2022-09-09 11:10     ` Ihor Radchenko

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

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

  git send-email \
    --in-reply-to=8735d4wvsy.fsf@localhost \
    --to=yantar92@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=manikulin@gmail.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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.