From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id KJEDNCbi02IpMwEAbAwnHQ (envelope-from ) for ; Sun, 17 Jul 2022 12:19:18 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id GMMJNCbi02JyHAEA9RJhRA (envelope-from ) for ; Sun, 17 Jul 2022 12:19:18 +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 0AF6922483 for ; Sun, 17 Jul 2022 12:19:18 +0200 (CEST) Received: from localhost ([::1]:52822 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oD1Mp-0002h2-BT for larch@yhetil.org; Sun, 17 Jul 2022 06:19:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34776) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oD1L7-0002fF-0x for emacs-orgmode@gnu.org; Sun, 17 Jul 2022 06:17:30 -0400 Received: from mail-pl1-x635.google.com ([2607:f8b0:4864:20::635]:44874) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oD1L5-0003D9-EQ for emacs-orgmode@gnu.org; Sun, 17 Jul 2022 06:17:28 -0400 Received: by mail-pl1-x635.google.com with SMTP id q5so6710933plr.11 for ; Sun, 17 Jul 2022 03:17:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=y7fPRxvehpo4ZBVDfbSc2D91rIJn4jgwIUL3duunels=; b=kqjz/JEBuJdPTV5A8rj7/cq9+iFn6ul4dzsCIgd3QvrnGajQ6GRfUQrjfBxsXvLnWX oBR3RTWFY+oMrmrw+h8bK/poxEPxSPT5upknJ68ykZFlNnYcEfN0zLEhyFdsP/GSFZK1 wMezMQx7PtVh+DMdaKDE+sHKw9t2mPcR7SZoU5j970vk/Y7VWzt4AXDv9bPdKckCdiRM oy2jFkyOLm1aue+2BabmT1ugCUnJPbqq912b4M7fwc96FmIb564KyPmkylEijF6MlYd1 BKC99xRIOF0bmCDkbeqOYxFGJavhdWvDP96spG0P4RkN6QGWoi3/9w/b1ZM6KtsNPpoI Jl3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=y7fPRxvehpo4ZBVDfbSc2D91rIJn4jgwIUL3duunels=; b=kzPUh75HsMePbDzEkSZ70EjJJgjFv8/6Id44YKKVEjd6vMF73b5x1gaG2QkF4dAQV0 r1BuY5ZMN66SgkKtbtFdVNslNWRRMfhgoyxBsrmg7vAF/vru/bIWA6HOm95YQxD5Lmad 6GNZr28FhAbZfSe5bOX4pA4XqBEuSXSWKxfsmk4uMmwFWdTmWOyJBnL5GwD/hDHa9DNr MnQ8SPPIql1HLlI3GZIuk+pt334GV6BEBRxfBhe9ZWTq6mBkFeO1mIC5Tq2hpNaYqokK iBCUvHQk+kW7Kxa+Tlk2qTv6xEegkTgqI6VZw0IVnSHNKNWv7nZi6M6kKil9NMKu9uLI gqKg== X-Gm-Message-State: AJIora9ywrJ/sd9FqqIKVAwels/Ov6H7S5QcIbahqi7Sk8X13gVCYHEV FcFry4dv2zZTfmm61QhpMJb1nnK6gEYFDQ== X-Google-Smtp-Source: AGRyM1uwLeCSNtjvo8v7EsL8UWA4NkSD7Dd5IY2ook17FAv13ScxNEg6DbRpfKhTwS2dwwj5NpCcZQ== X-Received: by 2002:a17:90a:db96:b0:1ef:8c86:eb09 with SMTP id h22-20020a17090adb9600b001ef8c86eb09mr31990452pjv.22.1658053046095; Sun, 17 Jul 2022 03:17:26 -0700 (PDT) Received: from localhost ([2409:8a70:2bd:4d0:8ec6:81ff:fe70:339d]) by smtp.gmail.com with ESMTPSA id s187-20020a625ec4000000b0051e7b6e8b12sm7299392pfb.11.2022.07.17.03.17.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Jul 2022 03:17:25 -0700 (PDT) From: Ihor Radchenko To: Hugo Heagren Cc: emacs-orgmode@gnu.org Subject: Re: [PATCH v5] ol.el: add description format parameter to org-link-parameters In-Reply-To: <87tu7gkb4l.fsf@heagren.com> References: <87zgl1npow.fsf@localhost> <20220405192931.6747-1-hugo@heagren.com> <87a6cx79xn.fsf@localhost> <87zgi6fckr.fsf@heagren.com> <871qvixhfw.fsf@gmail.com> <87v8s8n1bm.fsf@heagren.com> <87let39d3c.fsf@localhost> <877d4flu3x.fsf@heagren.com> <87cze5e84m.fsf@localhost> <87tu7gkb4l.fsf@heagren.com> Date: Sun, 17 Jul 2022 18:18:27 +0800 Message-ID: <87y1ws6o0c.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::635; envelope-from=yantar92@gmail.com; helo=mail-pl1-x635.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=1658053158; 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=y7fPRxvehpo4ZBVDfbSc2D91rIJn4jgwIUL3duunels=; b=AkESWLsZbqREnpjkBrjeyFipYokLtWYLk5XcosYrNyamuU2GI7w50XTPzlVu8I177cL0kX tHdAicCXJDJna5Onsbo5gJLzac893HoLA222wddwjHsTNnj6Lw70p0iYLzMbpd0WIPiFdG Xloi2aD7DGfc6UHOgolVfntJBUMlUoY0jJGjyrhjtfgpgNL7X1Jynr7aR10oi9b+QjTBMy 4CG3mP8RDHtI5+XFk2fVgRd8VXpojY6Fl0ZxJWcigFe4JicXue6gxoXCs6XV+tsYCo21pe AKigR/oirO01vqzD8MtB6yaTFLdA60RMy1ejNL2SmG77E2nduatGQxv36I59Qw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1658053158; a=rsa-sha256; cv=none; b=XCDocjue8enrHMS7T/nI40ReGXL5Mts/laZKVEaN5PzrdHMavuny8HLiA3NxPZFoO2uV4e wOlOi31H5asYHKDZofm7kEHeQve9miMOSXJC1pvDmAG1myXYxWVtc1OkImnLxel9TEFNLJ 7DzF4fHi/+1xTgu/I8BZ0XQ1fSkojkXz2oO1oZJsJxmVF0mW4pnY5QvSoxm/3bK6klTlHI Kt62aLY9xxVOFHj7JGzGcR8IChlKh0mVZo0yb/OjbD/8JU/YBOulJFXqgIqw93o33/XPq4 vxOPXTPeNg5ueBvD/HC2aDecEUbW7SEgYWMcgT35kgLt5/Usv7tNDmx1raevFA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b="kqjz/JEB"; 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: -4.93 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b="kqjz/JEB"; 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: 0AF6922483 X-Spam-Score: -4.93 X-Migadu-Scanner: scn0.migadu.com X-TUID: +1p7SHCU0+xu Hugo Heagren writes: >> Can you also update the documentation for >> org-link-make-description-function? > > I'm not sure what sort of documentation you have in mind? What should > I add? I referred to my earlier statement: > tl;dr The question is: what is the Good Behaviour when > :default-description is set to something, which is meant to return a > string and returns 'nil instead? Should it be treated like an empty > string, or as an error? Currently, the internal implementation will treat nil return value as if there was no :default-description and org-link-make-description-function were set to nil. We may probably document this. It sounds like a useful behaviour. If the :default-description function returns non-string and not nil, the behaviour is simply undefined. It was also the case for org-link-make-description-function. Though we might add a cl-assert somewhere near the end of org-insert-link to deliberately throw an error. The return value of org-link-make-description-function can also be nil in addition to string. I suggest documenting this, just as you did for :insert-description parameter. Best, Ihor