From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:700:3204::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id KLSWHmGrgWVKNQEAkFu2QA (envelope-from ) for ; Tue, 19 Dec 2023 15:40:33 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id kLTFGGGrgWVtZgEAe85BDQ (envelope-from ) for ; Tue, 19 Dec 2023 15:40:33 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=none; 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=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmail.com (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1702996833; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=N9oKnW5YS198X4eNjzCMxHuGxgZ9H8gqvech4OwBE6w=; b=lZZ6CwH+vgqs6fxGYShjC9cv4eGbz5//rEntAn657QuHW5AlIZLDYAKWZTaO9eHAvTBTrB 5Yhi17+t3nzBl4l/x9KMlk7zFbzOF/FVFhEbH2Acl6Uy8b9S+jCWUDF35H5GvP4FiE5BvB 40c9YkvmBZQfMPOKvduGi0Bi07AaS4csKNBIANV+ZV+dW+vlFAkJ02Wu0uUQWosnx/ZWF1 KFHJPnpWYW8sHyujdD8wvM9jWCuSlKd+sLgMzLcp2gz2SUVpX3MlvoZnpUHjXDYVAq+M8+ 8zh+ThROSIEsY+tv1ZB2c4lrOoWoXYWjF1oOhlVbROcyXlxRqSXPmI/+sOMFrw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; 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=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmail.com (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1702996833; a=rsa-sha256; cv=none; b=lSnZtyC/i8Ybxm+qcTcW9429dXoYEBBDejLdK68xTrj/6cLlVpSAnmA0iCssLSP8MS1Xx1 RS1iAChBfYATfVrmodM3THo2xLO8FGqDcH1ZT+U9BbaZpUXDaRmONkxB9u81LfhHW2RGp3 vCHJaOT+JoT46RUmJeUcRtD+drNbCQBla7tBeSl3K9YkbIckVx8Jl3YEVoyg1RRQ/htzaA CumIcPC1GE4dbQDoCGCvONp3AjQW9BgcCYx9gJ41z45pdPsclNYqO7ELmNhd5i6k3Ts8iq 1kSYg65Jl/D6wKG47Vw98hsRrYBboeQTIgCqL0mzZ8NmvSbPPG417iM2HGc8EA== 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 4FA7154790 for ; Tue, 19 Dec 2023 15:40:32 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rFbG2-00026O-AT; Tue, 19 Dec 2023 09:39:42 -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 1rFbG1-000264-7j for emacs-orgmode@gnu.org; Tue, 19 Dec 2023 09:39:41 -0500 Received: from ciao.gmane.io ([116.202.254.214]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rFbFz-0003NK-Qq for emacs-orgmode@gnu.org; Tue, 19 Dec 2023 09:39:40 -0500 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1rFbFw-000AO2-K2 for emacs-orgmode@gnu.org; Tue, 19 Dec 2023 15:39:36 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: emacs-orgmode@gnu.org From: Max Nikulin Subject: Re: Links & images with different attributes in the same paragraph Date: Tue, 19 Dec 2023 21:39:26 +0700 Message-ID: References: <87lea8vk1i.fsf@localhost> <871qbr7e5s.fsf@localhost> <878r5wq03g.fsf@localhost> <878r5ucill.fsf@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit User-Agent: Mozilla Thunderbird Content-Language: en-US, ru-RU In-Reply-To: <878r5ucill.fsf@localhost> Received-SPF: pass client-ip=116.202.254.214; envelope-from=geo-emacs-orgmode@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: 28 X-Spam_score: 2.8 X-Spam_bar: ++ X-Spam_report: (2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FORGED_MUA_MOZILLA=2.309, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, NML_ADSP_CUSTOM_MED=0.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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: mx13.migadu.com X-Migadu-Spam-Score: -2.62 X-Spam-Score: -2.62 X-Migadu-Queue-Id: 4FA7154790 X-TUID: ITYSl2IvcQh0 On 16/12/2023 21:44, Ihor Radchenko wrote: > Max Nikulin writes: > >>> @wrap{{outer wrap; @wrap{{inner wrap allowing } as well}}; back}}. >> >> Are you assuming invisible zero-width space as a way to escape literal >> {{ or }}? I would prefer some visible characters. > > No, not zero-width space. Literally, {{...}}. The idea is to define > delimiters as "[{]+" the matching number of "}". This way, we do not > need to worry about escaping "}" inside and can get nested markup for > free. It is more or less how Org parser works for special block: > the opening delimiter is #+begin_whatever is matched against > #+end_. I am afraid, there is an issue if wrapped content is surrounded by braces. An ambiguity arises for @wrap{{{content}}} it may be @wrap{{{ content }}}, @wrap{{ {content} }}, or @wrap{ {{content}} }. It seems, some escape character is unavoidable. > Also, see https://list.orgmode.org/orgmode/87mtaez8do.fsf@localhost/ > with my original proposal and some discussion that followed up. I completely forgot that you wrote about balanced parenthesis earlier. >> Juan Manuel MacĂ­as. Re: About 'inline special blocks' >>> Bringing that into the paragraph is >>> unnecessarily overloading the paragraph and breaking the social contract >>> of lightweight markup, where paragraphs should still look like >>> paragraphs. > I am pretty sure that I replied to that concern raised in a parallel > thread. My idea was to allow macro replacement inside attributes: > > #+macro: alt #+attr_html :alt $1 > What about @wrap[<<>>]{[[/path/to/image]]} Certainly it allows to shorten in-text arguments. Just as noweb references, it has some disadvantages. I consider comma as macro argument separator as a kind of a pitfall. Macro definitions, unlike code blocks definitions for noweb references, can not be multiline (unless defined in elisp code). Unless something better will be proposed, I consider macro expansion inside arguments as a viable approach. (I can not recall if it was discussed earlier.)