From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.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 ELTeILYBA2ODjgAAbAwnHQ (envelope-from ) for ; Mon, 22 Aug 2022 06:10:30 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id eD++ILYBA2O27gAAauVa8A (envelope-from ) for ; Mon, 22 Aug 2022 06:10:30 +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 2AB67463BF for ; Mon, 22 Aug 2022 06:10:30 +0200 (CEST) Received: from localhost ([::1]:59130 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oPylg-00079v-U4 for larch@yhetil.org; Mon, 22 Aug 2022 00:10:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39092) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oPykF-00079k-QO for emacs-orgmode@gnu.org; Mon, 22 Aug 2022 00:08:59 -0400 Received: from mail-pg1-x530.google.com ([2607:f8b0:4864:20::530]:33634) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oPykE-00061W-36 for emacs-orgmode@gnu.org; Mon, 22 Aug 2022 00:08:59 -0400 Received: by mail-pg1-x530.google.com with SMTP id l64so8364373pge.0 for ; Sun, 21 Aug 2022 21:08:57 -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; bh=NkVajAtVL1aLNLonSBvfFOps6jLsNzNc2m3n6XhbBjg=; b=F0GtgTSKQojuvJOChPK+eU/E9C1ze+UL79g9i581WIeaNZWF8EJI9vx+267SLVQ7pU hZO0o9QNSA3Ewi36mQAHmhbCjT82CzE/1Zg7pkukG/b4dX9LFL5wBOb9kGLySdEdzHWy 2Zaeu5fnldN8LA6R4o9T4qeWovywyf5zj2iKJEtAPuXRh14qv9x8mvKVa6djw3JJ9HRA PUM/3fXIDQ+GnbMNIDF2q3W/HdkvyVzKtv9V5eedwL3G8AyYAXI/QMyBr3FwvqDVAQbi ooZ+h/rQNVUVO2mu+jNfP8ZIrKmhIABR4FMrpnmnO7kekVVTeRvXbtJ9r4e6XFiRSgtw UG1g== 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; bh=NkVajAtVL1aLNLonSBvfFOps6jLsNzNc2m3n6XhbBjg=; b=Urp9Taq5nPKTXGjlt+urhCqRpY2PTIe/yGKkWmDGFST9Tr2lPZYeg8uZV5vjQqGrCx SJZ7TgXP1tJUm8b6n+VH5TvOLs6S9TYZAVMAEU4ktSMqHrF2AK6LSXkjBP/pWY1mauCF kw/BZRiffJrOmphT8rtOVAIMG9pjNXAhWhBSxYjP9G0vUT+gHGdtkbTf36PVKI/aOXYa kQoGvG8vj0q6vCijY6CkD1BSN95PjeajAX3dj7cucJ1Zga6+ua4mnzqq/P/+SZ4GvwzT DAWvxyZbs5Dbhiy4xN5X8NWmhlTSD5whwl+MF9wK1IMsCb86Czd2UhCYUc+YcUqf9RF3 K2bQ== X-Gm-Message-State: ACgBeo1dgpY5gY/IF8WUO2cM14vpRffVqIs9wf1jIhBJ2ia7Z1fJGQy6 DQp97fwCXIf1WRg3y8MQPa2l1MLJ0Je+9g== X-Google-Smtp-Source: AA6agR4fyf599HSNbJGyBQFmUDsLm0ejg03BgGPJ9qMDeH0yzgMDmxpe/iAJE4yZEtm1wO0kZhuIiQ== X-Received: by 2002:a63:1e61:0:b0:41c:45d:7d50 with SMTP id p33-20020a631e61000000b0041c045d7d50mr14816009pgm.507.1661141336129; Sun, 21 Aug 2022 21:08:56 -0700 (PDT) Received: from localhost ([115.154.175.57]) by smtp.gmail.com with ESMTPSA id n6-20020a170902e54600b00172b87d9770sm6801723plf.81.2022.08.21.21.08.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 21 Aug 2022 21:08:55 -0700 (PDT) From: Ihor Radchenko To: Max Nikulin Cc: emacs-orgmode@gnu.org Subject: Re: [PATCH v2] ol-info: Define :insert-description function In-Reply-To: References: <87zgl1npow.fsf@localhost> <87k08bjw0t.fsf@heagren.com> <47248a4f-10aa-0980-c054-563f30c05aaa@gmail.com> <87mtd0gthe.fsf@heagren.com> <78b97c9e-fced-0ee4-f3f2-3cbe81080ffa@gmail.com> <87sfms9dx7.fsf@localhost> <87v8rmd53g.fsf@localhost> <871qu9xv8q.fsf@heagren.com> <0da49392-26c6-8ba3-f657-647522d59342@gmail.com> <87zggrg2om.fsf@heagren.com> <87edy3t8o0.fsf@localhost> <87tu6zf2o1.fsf@heagren.com> <871qu3rpt9.fsf@localhost> <8bbccdb4-52f4-b9b5-eb10-252bb15108ec@gmail.com> <87a68hn9es.fsf@localhost> <87zgg0q2kz.fsf@localhost> <877d33nzjd.fsf@localhost> Date: Mon, 22 Aug 2022 12:10:01 +0800 Message-ID: <871qt8ly06.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=1661141430; 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=NkVajAtVL1aLNLonSBvfFOps6jLsNzNc2m3n6XhbBjg=; b=Yc0LHy23NZ0hotMJorn11F2vMQxMin4RgJkoGooCqpSNIHH8Wuw6tjQVOJWSwxL6LlddJ/ BZC/tLlnTZQmA1SNV40HNV8yozXzK/prHh7F+w++NP3OUIwSI7iZuQ/FLFgjPkCnyH99Bh PXpTDelq3srUuRv0yaCU/8iw7vLuX2tc9So3T+EHrBI2pGhgwzze4osG9OtMNdbkZkh5Mv jlqPQXSNXlZWrm2NxANHAU1EfdCQATn270gwh3pFHU8GCntUNh5rCzXXVLUYHwXFq6S0gZ QkO/66xi2fM1b1jPspX3TnuBuskjeGb+VJHqhqS+cViZ8J0iPijxGwWbQlS/FA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1661141430; a=rsa-sha256; cv=none; b=qwqbKBSRCL4pNWoKumhVAEkm7XqN7vI2CZBkfYmkXUFjVzfi+eK+05uViqQMQxINHU46sL vfD9vljn2RWjFVcrnMwKleklbdUt25061g1p+KwEv0Vj0F8X6McqPJdDX0yd7fDAHOyzYD 7wI1F1RyItPgPepFLxEeZl7qkn4SJ3zlnRrA2TzEWD8SSH0+5fjXG/TsEiogjiqnvsjPZT EkbOnGow2e03gJTycOtW6iC7lNQCrDan2fREMzcX5Rw47OeNrm/RBEHP+MZdvch0NhwmpX lG0ErUFWc5PIxlWyCPS/FmbHeN3zq2w5eweUg5Lj9Lm8JRsD3PhgM1qiDZn+nw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=F0GtgTSK; 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: -7.62 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=F0GtgTSK; 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: 2AB67463BF X-Spam-Score: -7.62 X-Migadu-Scanner: scn0.migadu.com X-TUID: yLeKFTmFIymN Max Nikulin writes: >>> It returns a cons, doesn't it? Is it confusing that separator for >>> components is related to the argument? >> >> It is confusing that cons consist of _file name_ and node name. >> However, the function may return non-file as car of the cons. > > "dir" should not appear in well-formed links . If a user > adds "info:" links then it is unlikely that their has never used info > and has never seen directory index. Moreover I do not see real problem > since it is considered as a virtual info file: > > https://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/info.el#n2344 > (add-to-list 'Info-virtual-files > '("\\`dir\\'" ; ... I do not see ("dir" . "etc") as a problematic return value. The only issue is that docstring is a bit confusing. Maybe, in addition to "Return cons consisting of file name and node name", you can put something like "File name may also be a virtual file name (see `Info-virtual-files')." > After all, it is an internal function and I am still unsure that I have > chosen the best variant. I believed that underspecified behavior here > may give less harm than making some 3rd party code relying on the > proposed variant. > > I can drop "(dir)" special case to consider incomplete links as invalid > ones. The only problem is test cases for escaping of various characters > since they use links without file name as the input, but they may be > easily adjusted by adding some file name. I am ok with current behavior. It is only the docstring that I find slightly confusing. > There is huge room for improvements in "ol-info.el", e.g. other virtual > files such as "(*History*)" may signal an error during HTML export. May you open a separate bug report about this? -- 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