From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id yK1ENVuSD2GpQgEAgWs5BA (envelope-from ) for ; Sun, 08 Aug 2021 10:14:19 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id aMRrMFuSD2GzfQAAbx9fmQ (envelope-from ) for ; Sun, 08 Aug 2021 08:14:19 +0000 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 8C2571118D for ; Sun, 8 Aug 2021 10:14:18 +0200 (CEST) Received: from localhost ([::1]:46048 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mCdwm-0004Nt-CO for larch@yhetil.org; Sun, 08 Aug 2021 04:14:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33096) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mCdwK-0004Ne-DT for emacs-orgmode@gnu.org; Sun, 08 Aug 2021 04:13:48 -0400 Received: from andalucia.tim-landscheidt.de ([2a01:4f8:1c1c:d4d0::1]:40362) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mCdwI-0008UB-9i for emacs-orgmode@gnu.org; Sun, 08 Aug 2021 04:13:48 -0400 Received: from dslb-090-186-106-075.090.186.pools.vodafone-ip.de ([90.186.106.75]:40182 helo=vagabond) by andalucia.tim-landscheidt.de with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1mCdwE-0001fi-Ai for emacs-orgmode@gnu.org; Sun, 08 Aug 2021 08:13:42 +0000 From: Tim Landscheidt To: emacs-orgmode@gnu.org Subject: Bug: Cannot insert multiple multi-line elisp links [9.4.4 (release_9.4.4 @ /usr/share/emacs/27.2/lisp/org/)] Organization: http://www.tim-landscheidt.de/ Date: Sun, 08 Aug 2021 08:13:41 +0000 Message-ID: <87h7g0xsju.fsf@vagabond.tim-landscheidt.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2a01:4f8:1c1c:d4d0::1; envelope-from=tim@tim-landscheidt.de; helo=andalucia.tim-landscheidt.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, 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.23 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" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1628410459; 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:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=/z8tODl3fk4TrG1LzZQYi7QLqy5unAvMMIa21vF49tQ=; b=WymdLvHdqayXppBpYDNNGiZcmOuqbi65GSAqgmvQ3RSKfBOUQLTlO39WEoBbguvNcsHyGL cPd8W617wCfn4k4iTR2m1AvSKae2H1CO8mxlKCaN6Z6EtnQ+7dpUfYfk8tpyTWHAPCb49n 6qFO1Ndlf5Rsu591B7IU6rhrGHlpCKzozdMPO4Urkodka/8wOI9eFeCJ2xYSfw/b71zjIR sxxsVaaSinAMQe2WV/+7TJBwWr3+bNK7k/od40v3tFSmB1XlBrFQ6CoKyDWqNi+Zyn1N0N BMLmPAmp5OI3FTEcotVGbwKmr2cLR9e26bx0ADhuqLTA3L8OOIB5CdH8auBF2w== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1628410459; a=rsa-sha256; cv=none; b=OjjEcFF/WE+pHbtuTiecUWeC7x3E3vTQcVB8JrKWbvBMbp/AG5oQoCEo6z/d9kC1wi8Uqr HtmtlxPauZohHf5qPAMcUrLNO0vGYfAHuWzZDT1dKGVAWbL6plbrbaoQs2y2/PQ3e6iAPj RTqIumhACohJKDzqX4NyBoj8cPnHl0jXLfu/qSvP8YkJPV0mdfwU/MtADlj9jgBL9eyAOA rx8yZ/0hkpqL7TE3JqbfWz9I6qKTi7SUgFMKPXyzpipRHrMSiPCaGHZRIDHnCSn6m3biph b0Vc5cJySA/a2GaVdY6X413ITxAe/AUOph1DSpbpNkOiZwGrLXFwFSwQXo0ngQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: -2.41 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: 8C2571118D X-Spam-Score: -2.41 X-Migadu-Scanner: scn0.migadu.com X-TUID: P9jvmkWldLKr With Emacs 27.2, I want to generate a list of stuff with em- bedded Emacs Lisp scripts to work on it. The Emacs Lisp scripts have newlines as string literals in them. When I evaluate: | #+BEGIN_SRC elisp :results raw :var number-of-lines=1 | (mapconcat | (lambda (i) | (concat | (org-link-make-string (concat "elisp:" (prin1-to-string `(message "Hello, World %d!\n" ,i))) (format "Test #1.%d" i)) | "\n")) | (number-sequence 1 number-of-lines) | "") | #+END_SRC for the first time with C-c C-c, I get: | #+RESULTS: | [[elisp:(message "Hello, World %d! | " 1)][Test #1.1]] which, if shown in org-mode, is and works exactly correct. (When I rerun C-C C-c, I get: | #+RESULTS: | [[elisp:(message "Hello, World %d! | " 1)][Test #1.1]] | " 1)][Test #1.1]] which is not correct, but does not bother me much.) When I evalute: | #+BEGIN_SRC elisp :results raw :var number-of-lines=10 | (mapconcat | (lambda (i) | (concat | (org-link-make-string (concat "elisp:" (prin1-to-string `(message "Hello, World %d!\n" ,i))) (format "Test #1.%d" i)) | "\n")) | (number-sequence 1 number-of-lines) | "") | #+END_SRC I get: | #+RESULTS: | [[elisp:(message "Hello, World %d! | " 1)][Test #1.1]] | [[elisp:(message "Hello, World %d! | " 2)][Test #1.2]] | [[elisp:(message "Hello, World %d! | " 3)][Test #1.3]] | [[elisp:(message "Hello, World %d! | " 4)][Test #1.4]] | [[elisp:(message "Hello, World %d! | " 5)][Test #1.5]] | [[elisp:(message "Hello, World %d! | " 6)][Test #1.6]] | [[elisp:(message "Hello, World %d! | " 7)][Test #1.7]] | [[elisp:(message "Hello, World %d! | " 8)][Test #1.8]] | [[elisp:(message "Hello, World %d! | " 9)][Test #1.9]] | [[elisp:(message "Hello, World %d! | " 10)][Test #1.10]] where the last link ("Test #1.10") is not recognized by org-mode and not clickable. My guess is that org-link-make-string should escape new- lines, but does not, and the org-mode parser is liberal enough to "fix" some links, but not all.