From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id uN8FHAyfN2VMnwAA9RJhRA:P1 (envelope-from ) for ; Tue, 24 Oct 2023 12:40:12 +0200 Received: from aspmx1.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id uN8FHAyfN2VMnwAA9RJhRA (envelope-from ) for ; Tue, 24 Oct 2023 12:40:12 +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 1179E3AA04 for ; Tue, 24 Oct 2023 12:40:12 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=OBzv9TC0; 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"; dmarc=pass (policy=none) header.from=posteo.net ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1698144012; 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=drOUwVSu5Fs19iGEHPDNHJiBLQCO7pvIu56exvP079M=; b=fedxXFf1ZQcfZRSzt8pxLLO0pI9f96l2QRU+2ySu7FQ5AuY0JuJeMA48NqcOzBHU2NQa2q OMTf1aUoJ0LMmSyCcGLvfA3bHtRVVffMu1Dgt8vAHUGBe9NEoBcj9nRsMb42j33/kJfBQA dd6keDO+gvHn1UzGUFuVXoBFB0HVmTPtjNRQS1I2ApWRkhTC2Cnm4chViNL3txckAk8NxA OiugsJ/qjkth1ArF6lFYrPRoP210Zlq59q+CFizNA0ZBIsfDTOpn0nvZoH2pzgLt29FZsv 2sbVbQRXu2ksUiSTXEx502XOH35GADxkmMcYYD9fJ2hmkimHskjBh1q+INdX5g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=OBzv9TC0; 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"; dmarc=pass (policy=none) header.from=posteo.net ARC-Seal: i=1; s=key1; d=yhetil.org; t=1698144012; a=rsa-sha256; cv=none; b=TVaNTeWH4Jz8U4dkcmXQC79S8fomBTZEkPJeUgP0IwP5iH6eqYI57/hbpU2DKtAriVhjdn jSi4RgFcw+8HD/GvqW5Vj0cG1hm1mUuu1pUXJWYy1P4H35t1whHOCTGjCpSiFL+HHYJMnU 4/Xwx4yIllMEwKh3zrVSw8Uqotq3642Y7Ex6B86sFX5EPWqdNKPzBlLxmRp+7avaLatArD rrKhqU+/zMRZ843eMydMu0Zacv21zLepYlz9Z5ckWGHWerkUoeg9Bq0CvrkWapWW33q7rD dWMDPzx3sl/JLAB/NNv2yMzWbMNPR9dm4x1WlTkNdIl82tSAo3kgQZh6xaLVVw== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qvEob-0002tU-1H; Tue, 24 Oct 2023 06:39:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qvEoW-0002tI-9c for emacs-orgmode@gnu.org; Tue, 24 Oct 2023 06:39:08 -0400 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qvEoO-0006ph-Kw for emacs-orgmode@gnu.org; Tue, 24 Oct 2023 06:39:06 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 1EA1B240105 for ; Tue, 24 Oct 2023 12:38:58 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1698143938; bh=HV9hg+rpIb+Sm8jrZdMUFrquD+ib64btKkNcIp3GisY=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:From; b=OBzv9TC0cVSGkmc0V9i9+jUCjKy6tPCiz2zBi25FPBx072PG1LNcHTWtJUuSk9ecY hTLzkgkyQl+/VHbp7NEWo1uA1BBT8PqGJMqK2SuCZXJFoXtC4oGrJXn4MCoSEWg6iC BGztQakWbEMHdBfvZ5RzXiVNMeusTsWzlS+e/FoLYYq3TVnAcSnoaClBJtPdXwh7jy UpvLouKASnJbD+elSHZfj4If4K2zrTWgqVAWaRqL24S+HfcTPS8IpChRFb75hEZtoX KuplhghvQwODTWQvNLinPKv29IcmFmOWhfFAZ8eFCFAAvaiVqFOboda12CAfRL84DR 8cxJ6TDcedh7A== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4SF7p94jsNz9rxB; Tue, 24 Oct 2023 12:38:57 +0200 (CEST) From: Ihor Radchenko To: Max Nikulin Cc: emacs-orgmode@gnu.org Subject: Re: [RFC][PATCH] Allow to export to ascii custom link types as notes In-Reply-To: References: <874jijaukf.fsf@localhost> <8734y1aeae.fsf@localhost> <87lebt8rrm.fsf@localhost> Date: Tue, 24 Oct 2023 10:40:41 +0000 Message-ID: <87edhk717a.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.66; envelope-from=yantar92@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -6.36 X-Spam-Score: -6.36 X-Migadu-Queue-Id: 1179E3AA04 X-Migadu-Scanner: mx2.migadu.com X-TUID: 1ux+nOhcXjsx Max Nikulin writes: > However "cond form will work without changes" is not clear for me. > `org-export-custom-protocol-maybe' is called twice and depending on > context the result should be either "[description]" inline or > "[description] path" for note, so the code around > `org-export-custom-protocol-maybe' has to be changed. I see. What about (1) passing link object to custom protocol, (2) making `org-ascii-make-link-with-note' marking the link object to be recorded in notes; (3) modifying `org-ascii--describe-links' to check for the recorded mark before the `cond' clause (org-export-custom-protocol-maybe...). >>> [Org mode] () >>> man >>> man (http://man.he.net/?topic=man§ion=all) >> >> This is probably a bug in ol-man. > > Which one? Absence of square brackets? Absence of angle brackets? Both? Should be [man] () >>> internal >>> heading (See section 1) >> >> I see no problem here - internal links are special, and it makes sense to >> drop angle brackets, unlike external web links that are often marked >> with angle brackets in the wild. > > Due to absence of square brackets around "heading" it should be treated > differently from e.g. http links. Hmm.. I do see a problem now. To be consistent, it should be [heading] (See section 1) By "special" I meant URL/path part. > ... It is the reason why I added a regexp > to detect if a caller added square brackets: > >>>>>>> + (if (string-match-p "\\`\u200b*\\[.*\\]\u200b*\\'" anchor) >>>>>>> + anchor >>>>>>> + (format "[%s]" anchor)) I still fail to see how it is related to the problem at hand: "Allow to export to ascii custom link types as notes". We had this problem for non-custom links in the past and we still have it. It should be solved separately. > I do not like repetitions in the current code. Me either. But let's address them separately. Otherwise, it is very hard to keep track of the discussion. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at