From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id sAEzNDgmSmVQAgAA9RJhRA:P1 (envelope-from ) for ; Tue, 07 Nov 2023 12:57:44 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id sAEzNDgmSmVQAgAA9RJhRA (envelope-from ) for ; Tue, 07 Nov 2023 12:57:44 +0100 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 C2CF722BCA for ; Tue, 7 Nov 2023 12:57:37 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=hcuO2T8c; 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=1699358258; a=rsa-sha256; cv=none; b=u/SJjAC26ByrrGZ3XRLMh7RdtAPaMPRiPZSVxMD8g3WXKNllDr1T1n+usmmtqSUHLaHKE4 uBopZEZwmQ4uHbN/i4oMpYFRE/UqM9Zy/vF5H7vuMDVs8BYs9GHzKFDmbEswds/nP20LFO Ia4t5iKRAUQcvXOVMAooljKoeeEntLoPieclx5ifzm93B88sVUdviiKf9icL5w8pBA+ikN ddgV8TAG+QRP/3nU1Xx5Q6v1WBjsJIlSuZAQsGkLUTbArDoMZt9FZacEr5yPEZIf1f212Q KQX5XP35JkbHI2H/x8WR7p8DQgi1i33Tmk/cur/mrsMt8UIagxFbIlNd+aUTsQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=hcuO2T8c; 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=1699358258; 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=PCVlsFLg0n5aRsSUr8yYZbsz1P85HL6Rd3flnXOqKgw=; b=LqUj9PzFzraYljIGvmfxHB7G+fQSZvi6eF9NTSemhJ+cwKjucOaMqbgQALjQeQUqPvDpbY 18X8HFQ4thEE0S68SWxnrm5m10vCBJs3BMFy7+p5bDaZi0TVrbYak+2hVSlF76iOz88iIa SDGK4oTCKgPwCFZ3KOO8DfiIm2e35Gib2VLcJ+z7jpVhKBIfvv5CDuAboygQ/LW+Ci7APF aU7U4XrGemYj9Su3pu7BW3YbEFyh66J0+yxSEPlmdc3IM/przw0/U9g6J8J4yZIknPEGsy q4HTgathwYKApnabTUCqaqp03tmW+YMD20k878Bobawr2cXahp5NDWi7meZSWg== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r0KhX-0003o3-Vn; Tue, 07 Nov 2023 06:57:00 -0500 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 1r0KhV-0003nY-LK for emacs-orgmode@gnu.org; Tue, 07 Nov 2023 06:56:57 -0500 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 1r0KhS-0006Us-SD for emacs-orgmode@gnu.org; Tue, 07 Nov 2023 06:56:57 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 3D23E240104 for ; Tue, 7 Nov 2023 12:56:52 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1699358212; bh=9Fp3sPShF3HbhCAum8u47VOoWd6Gsem8m6gyh76d6UQ=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:From; b=hcuO2T8cGd0JdYu6Jxg8HWrQQ5J0fZuyiPZehlHbe4PA7hpc8VMc94hxW4U5xlL8d Xr75L3ujqXD2IVAuVOYyYrVFdHfTdKVBVRr5mJCYx84izJ5oiT1zU0uY8z1GS4VllK o8M2wpVIc3jiJ2JtWCg23fIC0biclX8wg6iPNxkTMJCHmd4nmyCjWK1vT0bi5ooF8T d0U7WF0arTzOpSAPKD8/WTNFZpEZ6L5RIjkF+uXBj8Lk6XcOxfNQZ1I3fyyxTW0Ep9 aSw/XlFnsP+/WPEP5isd9V3uQDpWg2WoeK0QPvVIVkemiuvleYl0TcPpGyCoP/xqqG FKpBNd6PbVF4Q== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4SPmsb2Y6hz6ty8; Tue, 7 Nov 2023 12:56:51 +0100 (CET) From: Ihor Radchenko To: Max Nikulin Cc: emacs-orgmode@gnu.org Subject: Re: [RFC][PATCH v2] Allow to export to ascii custom link types as notes In-Reply-To: References: <874jijaukf.fsf@localhost> <8734y1aeae.fsf@localhost> <87lebt8rrm.fsf@localhost> <87v8ad29n2.fsf@localhost> Date: Tue, 07 Nov 2023 11:58:48 +0000 Message-ID: <87il6d22rr.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, 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Queue-Id: C2CF722BCA X-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam-Score: -8.95 X-Spam-Score: -8.95 X-TUID: C8quNU5HS45n Max Nikulin writes: >> What about passing an extra argument to :export function in >> `org-export-custom-protocol-maybe': >> >> (funcall protocol path desc backend info *link-object*) > > It would require another iteration with `condition-case' to deal with > functions having old signature. Is it a problem? We can alternatively check function arity. > Earlier you considered :filter property that receives link object > instead of path and desc pair. I am unsure concerning name, but I like > that idea. I feel that :filter + :export will be rather redundant - they will do the same thing and only differ by calling convention. And we will have issues with priority of :filter vs. :export if both happen to be present (e.g. when a user defines a custom :export in personal config). I guess we may instead make :filter apply earlier, right after `org-export-filter-parse-tree-functions'. Then, it will be called before export transcoding process begins. >> Then, if the :export function returns non-string, the return value is >> further processed as (org-export-data *return-value* info). > > Do you mean something like the following? > > (defun org-man-export (link description backend) > "Export a man page LINK with DESCRIPTION. > BACKEND is the current export backend." > (org-element-create-link > (format "http://man.he.net/?topic=%s§ion=all" link) > description)) > > where org-element-create-link parses link target into :type, :raw-link, > etc. properties. Yes. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at