From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id eJh+Aro+F2NXbgEAbAwnHQ (envelope-from ) for ; Tue, 06 Sep 2022 14:36:10 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id oP15Abo+F2M4ZQEAG6o9tA (envelope-from ) for ; Tue, 06 Sep 2022 14:36:10 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 961BA40950 for ; Tue, 6 Sep 2022 14:36:09 +0200 (CEST) Received: from localhost ([::1]:38544 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oVXoF-0006u5-Qj for larch@yhetil.org; Tue, 06 Sep 2022 08:36:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38078) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oVXLo-0006jp-Dr for emacs-orgmode@gnu.org; Tue, 06 Sep 2022 08:06:44 -0400 Received: from mail-pg1-x530.google.com ([2607:f8b0:4864:20::530]:40646) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oVXLm-000050-FB for emacs-orgmode@gnu.org; Tue, 06 Sep 2022 08:06:44 -0400 Received: by mail-pg1-x530.google.com with SMTP id w63so1974027pgb.7 for ; Tue, 06 Sep 2022 05:06:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:from:to:cc:subject:date; bh=aGD0TjuErc/lhFQEq9vh5D8cxXssfTuXLgsuVagniss=; b=jxB703BgWq75PqSA+TALwjCzzDFDWuoKy72/BPTFfle3szHPNjrnBtVhYCYlTzo0IJ Tr8oLgpqeccZXRt99RukH4I9QBKp9CFg5iI66Iz4beuCpEIlcYw1ZMu/4BerE8GA8zWT XoJsyPNl1GzmzyRa/GiweaNlwVq4Dqg9azEY70hI2SVz/Yxo53Ux/oWr1FsvwpO91LMm r7VC2VWbJW4yHjGnroMnX30ceY4qNKHqKHM+owf8R1kE7okbF5Pd0+YbrQ3qf5tWdSWa B39qLqg+XZySymHtQ5BrrSXxev21OnBS8+ymBgc9wNdUo75Q4HKV/ibmimUhQXfvp+t1 ULgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date; bh=aGD0TjuErc/lhFQEq9vh5D8cxXssfTuXLgsuVagniss=; b=wVEDWdUSrvSO0wYGqOKWA1ssnS5kjD8PMJc0cPRaVPsr074hx+UB+5w1r78slacRq6 bwI7k439ksSLaaTGEEx44zU3FLqmkF/rXvwbCLvkiyozcCQKr27MtzzIPz4TzKb0q/qZ 2ndusJ+NlciME1h9y9hpCIZGW7uQV9+I4P1Iv5VgspOycEmEGTywIorvX6o/LLrqqwQm xAKyGWTtJZ6rQ24QD6sDR/krxzcHqdoJzi+ELvNLtGyf24l7oGj/GyBYEJynPQ+l7suw njNKdzxDTV55rSXbO58z004wv8UArpNMGQjGbI8CB6VGzuHJ+7v4jUkMe8FreOx/GVkN QEsg== X-Gm-Message-State: ACgBeo3XBeu71olhkWlnBiZID0mU212LhSE9VyYZCNl+eNEq8AAq+zn0 tedJCNzGerwXeVplQPyh/60= X-Google-Smtp-Source: AA6agR7nXjCQcZVcKS10ay6+YsFy2G/+cU7L3u61aqvhRrmGRhZ2WCDoHCdUEB9zcA9EFdNYyLqfaw== X-Received: by 2002:a05:6a00:1384:b0:538:73c5:91ff with SMTP id t4-20020a056a00138400b0053873c591ffmr39578811pfg.54.1662465989525; Tue, 06 Sep 2022 05:06:29 -0700 (PDT) Received: from localhost ([2409:8a70:2b2:5800:8ec6:81ff:fe70:339d]) by smtp.gmail.com with ESMTPSA id b20-20020aa79514000000b005327281cb8dsm10254573pfp.97.2022.09.06.05.06.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Sep 2022 05:06:28 -0700 (PDT) From: Ihor Radchenko To: Max Nikulin Cc: emacs-orgmode@gnu.org Subject: Re: [PATCH] org.el: Preserve case for link subgroups from `org-file-apps' In-Reply-To: References: Date: Tue, 06 Sep 2022 20:07:25 +0800 Message-ID: <8735d4wvsy.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::530; envelope-from=yantar92@gmail.com; helo=mail-pg1-x530.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1662467769; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=aGD0TjuErc/lhFQEq9vh5D8cxXssfTuXLgsuVagniss=; b=jfKjFWCMEspAIHLhEbMLUmWXztwBvBHdJT1lm3RfUt49+twvDfYThq4xuWusiz2bzRbI0g Wvhm0GiIXJe2znMjdBp62E2sWvktZA+OTJmAqhhsLI41cWNRF2Tb7BFEvIheNVwbJ9HjCC 5mAFGpnngLCdzoI0FDEoPg6J8ELs+KEwNNlv9mT7W6rWjhzH21c+ym8BpPg4no+kYyT4Nu hzpNZHfIe5YPpXml5Prz5EdBBHwursGKaQcr3JAUgM+KP7uCuaUPDfZWDtMXhezM8NDqmU e1rONnXklhftKLJtnIMAcBV+arbiIFQqIUj5puDEwNqdRniO+mNV8sjylaDGXw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1662467769; a=rsa-sha256; cv=none; b=iUoWYYfMwr8yiAGRU3cN1K5+Eo6fIwVwxp+cKe+M5r3JvP4yqCxqllJoKoW0caR+GaF4XE MhMTwoGjZKjWHeEd5sSlz7R2QUBz16kInkezLS45/iLbaV9kpS4xwR/QQm19/FRznRN3CL 9xIk9Zv7JvqB0FUcXpJJV3UQagzqO1KH6l+I+qqGaz5GYurBNA4ci7KkzTvLTMxe//nq8W irTAIdJJHY8IzCjsGdzdt238Ml8/XBik//NOjN3G3h4EVi3+FAMyY8/s0VXfScJtLVG7wB ibqxAm6Jms+ZifvQa1zXQ8aw6U2Qm1TKTdPBuGVoFdL5JbBbyzin3TGkUAyfHQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=jxB703Bg; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -1.77 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=jxB703Bg; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 961BA40950 X-Spam-Score: -1.77 X-Migadu-Scanner: scn1.migadu.com X-TUID: dJvbEI5NtQa6 Max Nikulin 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