From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id 0BXZE4fnNGWEHgAAauVa8A:P1 (envelope-from ) for ; Sun, 22 Oct 2023 11:12:39 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id 0BXZE4fnNGWEHgAAauVa8A (envelope-from ) for ; Sun, 22 Oct 2023 11:12:39 +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 E7DD749CDF for ; Sun, 22 Oct 2023 11:12:38 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=rir8lobi; dmarc=pass (policy=none) header.from=posteo.net; 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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1697965959; a=rsa-sha256; cv=none; b=CNRs2HLSUwIGFFL4HM0u+8Cv66hfEhrm4TcayjbKw7rING7mproAtkD8O4K/phiSeec17C WvZWwD6mmMj2rzH/zh69cLvE51HL1D2JRFbBf6mdR3Jkvy5dVzmnmMaSmJUE3BlmNBW5Ry Ro/rBFdstPj3202jf+cCw3y6CViICMZbtHfup23xinWWnO92Rjai416avUGyAQGSwsks3z js+QEFOozrEf2J+F3oYNSkj8zfiwWSlkxGotlFBWvpMO9oFEzmUFvt9r7NIRMBlZo5YQNw O8m7W07HkLuVUrVax9nCl3woeaCoE8rO12n90IQJqLkmwEAH1fPLB31wuB9pqQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=rir8lobi; dmarc=pass (policy=none) header.from=posteo.net; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1697965959; 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=TU8xWoFrkZVxf/wGHtHbhQ70HecjauZ5svGN0xUjMlQ=; b=PR+kA9SdGZvogWWFeyN4rq/WyU6ANv/5l7NjAZrK+R/0OgvcrJMNrE6oDPWD07/yqWtI95 M4kPiB7o6EP/QaAhWGZ87OgW/JIcmyj30SBTIfKQgIhEREiGiFSuOYRaSSEfagLyfNnGNK 8RCXp7brZoZFyX9s9lVHB6ItbAuuiDOovtE3RsivL85stXysSFP9ZIFNkHSNsYmrrjlveQ 8Q0U8fRB4HNv+hZn1pcQwFTsaSyzgfqbBrzTCWkmAB2p1Jl9mdiwgErBIba90Ba3pqvw2y n/UJ5ps90OS8br4v6IGK103y1FwV8SN3r3wujQXSia6jLFthLi71YYs3PyOgyQ== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1quUV5-0004Ex-VE; Sun, 22 Oct 2023 05:11:59 -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 1quUV4-0004ES-4a for emacs-orgmode@gnu.org; Sun, 22 Oct 2023 05:11:58 -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 1quUV1-00074n-Le for emacs-orgmode@gnu.org; Sun, 22 Oct 2023 05:11:57 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 96E53240101 for ; Sun, 22 Oct 2023 11:11:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1697965913; bh=OQOSnU2bJVeN7FQ7EIvAk5+fErNYAgjt+CdjPG0Xjus=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:From; b=rir8lobil/gdeTKg76EjNCrT8yR7FAx/eAJMPrfGiW+3gRKW4vTgaHaEYpa6FVJAf MbG7fZesSW+sOD9kgXHnEebLD6WMPRo/1xSCv8F5d9g1FOHvrvfh2rw4PZrjJ9EhBI +AUvyIXmxrcJGiu7b2U1xgSz4iALpchS1w9BPhBIhMVMlevaa83Nt34d9CyNS6YNap XopfGvLmIaE2jIwhfTXt+5zR/mHoj6pLFER+Iw5lnj1gRtH8Y0EFVIAsVlu6l0KAOI woGtLI/iEqqGn3wE5iFztv02eSI1AlQ82ENKliuaWN2vBHN2Byr9DStSVUVvD0nlcX qeB1MRj99xFJQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4SCsyd0NNsz9rxF; Sun, 22 Oct 2023 11:11:53 +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: Date: Sun, 22 Oct 2023 09:13:36 +0000 Message-ID: <874jijaukf.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-Scanner: mx1.migadu.com X-Migadu-Spam-Score: -6.41 X-Spam-Score: -6.41 X-Migadu-Queue-Id: E7DD749CDF X-TUID: Bkqlmx7PSPQ7 Max Nikulin writes: > it was discussed that attempts to customize export to plain text of link > types such as "elisp:" and "shell:" break formatting as notes at the end > of the heading (`org-ascii-links-to-notes'). > > The attached patches is a draft implementing this feature (new functions > are not documented yet). > > For ascii backend :export function from `org-link-parameters' may return > (PATH . DESCRIPTION) `cons' instead of string. Depending on chosen link > style it will be exported as "[DESCRIPTION]" with the "[DESCRIPTION] > PATH" note at the end of heading or as the inline reference "DESCRIPTION > (PATH)". This is non-standard. We should document it somewhere in the manual. > I believe that parenthesis should be skipped in the case of angle > brackets "()", but I do not change this behavior. There is some > inconsistency in respect to brackets for description of inline links, > but it is preserved as well. May you elaborate? > I do not like that :export functions are called twice: for text and for > note. In my opinion it is better to collect links in a property of INFO > to later format notes at the end of the heading. I would consider more > dense style of notes with list markers instead of empty line as separator. Again, may you elaborate? > + (if (string-match-p "\\`\u200b*\\[.*\\]\u200b*\\'" anchor) > + anchor > + (format "[%s]" anchor)) This is out of scope of the patch, isn't it? I can see the motivation, but we should probably move this change to a separate patch and discussion thread. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at