From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id 2DWrIybUM2YYkwAAqHPOHw:P1 (envelope-from ) for ; Thu, 02 May 2024 19:57:58 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id 2DWrIybUM2YYkwAAqHPOHw (envelope-from ) for ; Thu, 02 May 2024 19:57:58 +0200 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=1714672678; 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=kSG7x4xEYS+bLJ7/L5nNdHfysIdx/nU7aDsSbatMJiE=; b=GC1oKkgEwTVOT8RuORQ0jBmUCUlVCIIOV9oJ+qdPTRz8bU9YCsajzSqwV/nhBVrbTCrX9w 3kKFFzZkyEvhaBwGURW7901eW8opuMeMC+HVGPuptf5MuzG/bW00wGXW0yNjGrsqvRh9cM rujLSK3/7hz8/gUEgbA1iQFO69ua8MJp1ClRSjUvwVHdugRHeg5AUcldMSnWHtlTGb6l9n s8sWOHh2F84bgGvbPZNldgCYYw3zpM+I35vYkt7gmDZh9wd0LPF1PfzIJUiGhw0bwmyRQm DcF8EJOsOgdcyhmAKK40wdUxqRBuOXHidlQVl0tweSCJxQBy6K6dPByQr3uOTQ== 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=1714672678; a=rsa-sha256; cv=none; b=r7ybJdBj9Kgeb2AIhqtjPARw46wH6qQ0ob3UvsWjvXxUQQreyDRFPaesqogAnZ3nKDLYKD QCmnD15Jpk5kWYlhfykMnKGxndczloV5Or8vXVst9Y6n+tUkOPEK2XNLyhUz9z2uy06hZT IH8nVJb1/mTv+5ZYpTwPr0lcIv6hscLvSuUGW4VuIlXQlW8jjrunMxdYWWjbF7iU8ql+BE GKdKlb3ogsbqfH9gIc75IunbthR56fFGTSpVltUG6UqATbjiXw9Nmh1yf2K0uMX0TOE3Zf WyoB07EG2kl5oqmZF1xHe+4N0+LX4VOwrXMp2TAngxYMtzT/0HHUX3flFRxKaw== 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 1B1927246B for ; Thu, 2 May 2024 19:57:58 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s2afx-00064M-Pz; Thu, 02 May 2024 13:56:57 -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 1s2afv-00063r-MB for emacs-orgmode@gnu.org; Thu, 02 May 2024 13:56:55 -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 1s2afu-0001IQ-AI for emacs-orgmode@gnu.org; Thu, 02 May 2024 13:56:55 -0400 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1s2afp-00046j-VW for emacs-orgmode@gnu.org; Thu, 02 May 2024 19:56:50 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: emacs-orgmode@gnu.org From: Max Nikulin Subject: Re: Importing "quoted" strings in `org-babel-import-elisp-from-file' Date: Fri, 3 May 2024 00:56:43 +0700 Message-ID: References: <18f24d87b62.d55e94e24743657.3252620114689708448@excalamus.com> <87il00crdm.fsf@localhost> <87jzkdenc8.fsf@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit User-Agent: Mozilla Thunderbird Content-Language: en-US, ru-RU In-Reply-To: <87jzkdenc8.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: 26 X-Spam_score: 2.6 X-Spam_bar: ++ X-Spam_report: (2.6 / 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.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, 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-Country: US X-Migadu-Flow: FLOW_IN X-Spam-Score: -0.84 X-Migadu-Queue-Id: 1B1927246B X-Migadu-Scanner: mx10.migadu.com X-Migadu-Spam-Score: -0.84 X-TUID: QgWIBdzKb2Ud On 01/05/2024 19:19, Ihor Radchenko wrote: > And replacing the call to org-babel-string-read with org-babel-read does not > break any tests... Since 005e68294 2009-06-11 17:04:42 -0700 Eric Schulte: making progress bringing org-babel-R.el into the new evaluation schema `org-babel-string-read' has been stripping quotes, but `org-string-read' got this feature later in 60a8ba556 2011-03-02 07:55:39 -0700 Eric Schulte: ob: read string variable values wrapped in double quotes, removing the quotes So now outer quotes are stripped twice. (org-babel-string-read "\"\"1\"\"") "1" (org-babel-read "\"\"1\"\"" t) "\"\"1\"\"" There are still more subtle differences between these functions: (org-babel-string-read "\"1\" 2 \"3\"") "1\" 2 \"3" (org-babel-read "\"1\" 2 \"3\"" t) "\"1\" 2 \"3\"" What I do not like in `org-babel-read' is false positive for escaped quote when actually backslash is escaped: (org-babel-read "\"1\\\\\" 2 \\\\\"3\"" t) "1\\" (org-babel-read "\"1\\\\|\" 2 \\\\|\"3\"" t) "\"1\\\\|\" 2 \\\\|\"3\"" Test suite is far from being exhaustive.