From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id 8HUXHvAQIGSTQQEASxT56A (envelope-from ) for ; Sun, 26 Mar 2023 11:31:28 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id yEWxHfAQIGQWCQEAauVa8A (envelope-from ) for ; Sun, 26 Mar 2023 11:31:28 +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 1DF5B37723 for ; Sun, 26 Mar 2023 11:31:28 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=Da4zQYxk; 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=pass (policy=none) header.from=posteo.net ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1679823088; 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=5T7NHij9C6PgjuVem0xE0EV0kig9op7/Xxxh92KoBYQ=; b=YIrlcwBvmeOVPY/owDEQHySxZMz240K0xoBvsOfUV89XaXCpEYqzayfYeEDQmKI5I66dml 0p2FhygCTKKc0h84CjcxWJ0NGCQydnofNW1mDOPEkVXK8dp3+vkNtTlH3pdVbfaz7koTm8 VYGJnnuFN0+LNLaqkCyyr55G421UFRc9oMsvdnUUfj5SMS8fL8frpKskjWOFW6DJtAd50C cyNGg2jZ+3cwoeaoFOyvLryz33KH6Rx29+MJWN/PxMFcRUiChF4nmGzvDT6vnyrsMN30j9 /3Gkoo2EtugsBzeNGR2TYFzzsBnrmYP31VyK7X2TaMLpSyuW/X/guPOVLhaMvg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1679823088; a=rsa-sha256; cv=none; b=WeDpH5AuXdYHI60JjXUPDdzly5w+b/MlO2HrezkNlfoPzZniA/umPUYQEVoEV0m8CSu5Bs jT+pINAoKkvx/Zhnpj10UX1UnMCpz8Zzu2ei6NOK78qBzri/QagUjw0W2P4Cg/m1eJjJu2 CNG5diPuaXhyc4VNz3oInFwyVTAI04rBKcfrE1bj3CAr9KiAYVc/yrSy9zWWdNhS9VNDlu sK71upAji/5rhSHnVyUqf6eA8daZePaIpTKPFZIvSKt8t4fuPV2eZ3girF9AfepEdsPEKe rfl0SexRcEno4ao4AgNui9UTdciQwNoWYNOES8nROkbvAYh6GUUQ3ldqMdab3g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=Da4zQYxk; 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=pass (policy=none) header.from=posteo.net Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pgMhs-0000OI-3c; Sun, 26 Mar 2023 05:30:32 -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 1pgMhi-0000M6-Jy for emacs-orgmode@gnu.org; Sun, 26 Mar 2023 05:30:25 -0400 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 1pgMhg-0007o2-5U for emacs-orgmode@gnu.org; Sun, 26 Mar 2023 05:30:22 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id CC59F2401C8 for ; Sun, 26 Mar 2023 11:30:17 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1679823017; bh=CGElo23y6MW7yKykUVHeNlWDxcrHuehbrKlS/wrSg7I=; h=From:To:Cc:Subject:Date:From; b=Da4zQYxk1aMLXlbo/SmCaZhZVictRQaEwHHTvL0IJJplVUKXC5mMIqTR0Q2u6EBtn N5J3/+O+4P1cAUtHAqNbV63go8xd68eW8g0Nv/nAk6aSpbgqtGsXAEtbxqJKGP9cjc pk4BZ+nn4Igap7OALF6maSmVYkPmnWtj5Xjh3Ww53FOOSfg2c+PLvxSfKkH7wSnlgN VcAexCEKecGQcEjQDCdzjaF/WI2FKWaeuZBm/LRpcwJw6TzhHSAjKFUBg5DuuL8p4p nFAExm6CXLPvZ3ykCA7+0pts2276QlRcA+TLZjn+wl4ImM2kl/u3szMzt7vaBWMvCq ZB7nyjY9quejg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4PkrJm28DHz9rxD; Sun, 26 Mar 2023 11:30:16 +0200 (CEST) From: Ihor Radchenko To: Zelphir Kaltstahl Cc: Bruno Barbier , emacs-orgmode@gnu.org, Bastien Subject: Re: [PATCH] lisp/ob-scheme.el In-Reply-To: <3208da46-d61e-98b6-fbbe-85d3e6b77291@posteo.de> References: <9eab60bc-9b82-e037-d63b-3d879573ae32@posteo.de> <87v8jceihi.fsf@localhost> <7fc63848-d6d3-80e0-ae78-00967990813d@posteo.de> <64079614.170a0220.5a0d3.0a23@mx.google.com> <97ee254e-72d2-2bdf-e026-78bde076f1f9@posteo.de> <6408e424.5d0a0220.8862a.2a62@mx.google.com> <87v8jaoz3u.fsf@localhost> <21ea836d-8bdf-2d0d-8515-283209f2eb1f@posteo.de> <878rg3y5he.fsf@localhost> <9710552a-601b-8a0c-1c30-4bb2263c2739@posteo.de> <87edphoyls.fsf@localhost> <3208da46-d61e-98b6-fbbe-85d3e6b77291@posteo.de> Date: Sun, 26 Mar 2023 09:32:19 +0000 Message-ID: <87a5zzvows.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_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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: X-Migadu-Queue-Id: 1DF5B37723 X-Spam-Score: -6.55 X-Migadu-Spam-Score: -6.55 X-Migadu-Scanner: scn0.migadu.com 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-TUID: 3K2W7WRt4FET Zelphir Kaltstahl writes: >>> + "Expand :var header arguments given as VARS." >>> + (mapconcat >>> + (lambda (var) >>> + (format "(define %s %S)" (car var) (cdr var))) >> Is there any reason why you use %s for variable name? Previously it was >> formatted with escapes (using %S). > > That was me thinking: "The name of the variable should just be itself, not > wrapped in double quotes, because in Scheme I cannot create a variable as > (define "abc" 123)". But maybe I misunderstood %s and %S. I also do not know, > how elisp's `print' treats its arguments. Will use 2 times %S then. The main difference between %S and %s can be demonstrated using the following: (insert (format "%s" 'symbol\#w\ spaces)) (insert (format "%S" 'symbol\#w\ spaces)) Basically, if symbol name contains funny chars, reader may need to have them escaped. %S does the escaping, while %s does not. Of course, %S escapes according to Elisp reader, not Scheme. I am not sure if Scheme syntax allows escapes in symbol names. If not, there should be no real difference. Also, `print' is the same as %S. >> Also, previous version quoted the variable value with "'". Why didn't >> you do it here? > > I am not sure I understand what you are referring to in the previous version. Do > you mean that `print' quoted variable values with a single quote? Do you mean > this part of the previous code: > > (print `(,(car var) ',(cdr var))) > > ? Yes, but upon closer look, it should not matter. Your code will work just fine. >>> + (concat (org-babel-expand-header-arg-vars:scheme vars) body)) >> `mapconcat' you used in `org-babel-expand-header-arg-vars:scheme' does >> not add trailing newline, unlike done previously. > Am I not adding a newline? I think I do?: I meant after variable definitions. You have (concat (org-babel-scheme-expand-header-arg-vars vars) body) but string returned by `org-babel-scheme-expand-header-arg-vars' will not have final newline after the very last define. > I have a question or suggestion: > > When I save the file in Emacs, my Emacs turns all the tabs in there into spaces. > Probably my own custom global config's choice about indentation. Could a general > mode line thing be added to avoid that and nail down the current formatting > style, so that contributors only need to allow Emacs to run those settings and > then not need to care about it? Currently the indentation style seems to be a > mix of tabs and spaces. This is something about your setup overriding Org mode project defaults. If you open org-mode/.dir-locals.el, you will see that we enable indent-tabs-mode. If you still do not get it enabled, you probably set indentation defaults aggressively it in your config via hooks or something similar. > And one more question: > > Does the name of the patch file matter? Git changed the name and I will attach > it as it was created by git. Hope that's alright. Patch file name does not matter. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at