From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id UHyFEjW8CWXnEQAA9RJhRA:P1 (envelope-from ) for ; Tue, 19 Sep 2023 17:20:21 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id UHyFEjW8CWXnEQAA9RJhRA (envelope-from ) for ; Tue, 19 Sep 2023 17:20:21 +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 0455159380 for ; Tue, 19 Sep 2023 17:20:21 +0200 (CEST) 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=1695136821; 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=+mY6Ii+hMoP3vJUYIDzog73J7g23jWHVrKxIEuhz+nw=; b=Gim7D6VYd1KacJkpSYw2AMDR6kE3bX7AN2foHGWn6lQAjyhjqhLMHuqi654iYoYNo9cuvq 8RF2caundqQIGYNl6Q5t2MzmI/EHSXdcnq+xGkmeR4xa1Fu2A60RMmPO513H6IxsmolXdc ffxj/PCfxYsTqOWf7S8v4Dyt0MpkH+yPlFOudjBCvXVlKQA9p47NcaJZy4pt6kuhLtRP+f 0AwiJAHBMv2ewTgCnU33EZUzZ9NSex98dfeTc5Pm/80lqCL4bBrj9x+w6KhIrpdKvOh7EH 3lWSbscsYmIkQUnfypoa/7XdrKAgtfS635AYUZZQsjkNdkLAHCm4z3cPjoHufA== 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=1695136821; a=rsa-sha256; cv=none; b=fbUP001w83jqifwrWM4YUHaupoBIX+64BceDxtSDMXLVPsurguXBUgVl3dsVt3GzBmASig pEaj8Yt0dI04g4TJsi9BbipZu5dTFoMOenmn6G7KvBYeyqeD1rk9vyX3IER92s7WmV4Fjv Mygjm3L6/KnYTA7iuAQ0qJvR8lBcUqKfgYlpaWSSuqWV4+bzpYnGNBB0o4tNfXQ25vkICs adbGo6GbuHik7HfHGKzKtVL1Gcu+6z0av6NK6NBeUDFUfDGj2uNDZtaNFUTigZa/+hN4Px 6FaL/8/PRRFmeroKoSoVOzuBevwxoAUf8qO8ZW7MCPm3iefODo3Ek9WNvWb/DA== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qicVW-0004fi-9T; Tue, 19 Sep 2023 11:19:22 -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 1qicVU-0004fX-8j for emacs-orgmode@gnu.org; Tue, 19 Sep 2023 11:19:20 -0400 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 1qicVS-0003kx-D9 for emacs-orgmode@gnu.org; Tue, 19 Sep 2023 11:19:20 -0400 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1qicVN-0003Uh-VK for emacs-orgmode@gnu.org; Tue, 19 Sep 2023 17:19:13 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: emacs-orgmode@gnu.org From: Max Nikulin Subject: Re: Exporting elisp: and shell: links Date: Tue, 19 Sep 2023 22:19:06 +0700 Message-ID: References: <87il8v2q00.fsf@riseup.net> <89434f4f-8aea-23f2-bbfc-3961c18f2154@gmail.com> <87a5u6tgb3.fsf@localhost> <878r9nofpw.fsf@localhost> <8734ztvtvk.fsf@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.0 Content-Language: en-US, ru-RU In-Reply-To: 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: 13 X-Spam_score: 1.3 X-Spam_bar: + X-Spam_report: (1.3 / 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.249, NICE_REPLY_A=-1.473, NML_ADSP_CUSTOM_MED=0.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Scanner: mx1.migadu.com X-Migadu-Spam-Score: -2.98 X-Spam-Score: -2.98 X-Migadu-Queue-Id: 0455159380 X-TUID: f4rGTRzgylTA On 19/09/2023 07:10, Rudolf Adamkovič wrote: > Max Nikulin writes: > >> Do you think a label specifying language should be added to code >> snippets, e.g. (identity "a") or it is >> useless and may cause undesired noise for screen reader users? What >> about LaTeX? > > As a user, I would expect > > [[elisp:(identity "a")]] > > to be export-equivalent to > > src_elisp[:exports code]{(identity "a")} > > across all backends. (defun org-link-export-eval-link-no-descr (type path descr backend info) (unless descr (let ((element (org-element-create 'inline-src-block (list :language type :value path :parameters ":exports code :noweb no :eval never")))) (org-export-data element info)))) (defun org-link-make-export-eval-link-no-descr (type) (lambda (path descr backend info) (org-link-export-eval-link-no-descr type path descr backend info))) (dolist (type '("elisp" "shell")) (org-link-set-parameters type :export (org-link-make-export-eval-link-no-descr type))) >> What is your expectation for links having description? >> >> [[elisp:(identity "a")][Run it]] > > Good point! Perhaps we just need to find a > good symbol that would work well between the > Elisp code and the description? > > For example > > /Run it/ \to src_elisp[:exports code]{(identity "a")} > > exports to ASCII as > > /Run it/ -> `(identity "a")' > > Of course, \to could be something else... I have another example: [[elisp:(server-start)][=M-x server-start RET=]] suitable for a printed document. From my point of view, it is better either to drop link path completely or to add a button to copy the code to clipboard. Repetition is undesired. So I am unsure if it is possible to choose unambiguous rules for export of elisp and shell links.