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 ms8.migadu.com with LMTPS id 8FruLw4vBmaQLQEAqHPOHw:P1 (envelope-from ) for ; Fri, 29 Mar 2024 04:01:34 +0100 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 8FruLw4vBmaQLQEAqHPOHw (envelope-from ) for ; Fri, 29 Mar 2024 04:01:34 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=jBiUseWi; 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=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1711681294; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=lxg1e3Vtg2g9Y2tekwpdzNhxQPvewXBgHly83CP2Oio=; b=btdzB+P6OocKXZXSYxPOEQ4MO6acljbtktZ6MYKnauQNPOopnSMhHwwHR8E8HYAVqh5GDC dV+lR9UwvdnohQ0BDC+P8yqadCAr9VlsBQel7EE6QJIBzwvdy6LDzZEN6ktd19gnAvX7J4 uvu7iqtqxk4kvzY0D8VP0K1TJl4w6oZtwoDyD2y+61kM6L+2tZZU2F4FcC6D8Dzs546jsf AXhcn+MnIRtjkPppF+ebdwboyn8w0LRR32jyqztrPYjlAZNQW/pc8zVjLb38eksZH/jkIw 3Hkm8pbCCXG9bb7+RDD32uYj1IgbZB22JHxL1y2fDkAGrJQkCKdnojmgoculaw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=jBiUseWi; 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=gmail.com ARC-Seal: i=1; s=key1; d=yhetil.org; t=1711681294; a=rsa-sha256; cv=none; b=DxR2AmQjiEXPNHeTRrWVXLIjYd/TQPvTVPaaKzrOSIPz4aZL7jjZd1oq/vjZXb0FIlgfYQ wigLRIgNiuhZsmd4LtGrnWrYASFXmm9NZ8TB3rAsXn67tC2VVV4smybwNceoU169riIbr1 tbCydERc3KDdRfOlbFTuMR9ZznKrRkKTdCOcX5lcIUdMDD43jsX1faN1yDT3E074umlkjn 71CwxfEYxzIiF2WIWjYtkfK/U1vSQR+K3LWjeOYnXhOuyXehgSY5IwEztUk+6fde/cTke4 g41+aSkAbvnLJWU3PeJmdvXAl9XxWrz931fHryszZEKV+WYQt5t4l8ll7fzwIw== 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 68DF076BF0 for ; Fri, 29 Mar 2024 04:01:34 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rq2PA-0007Vw-KC; Thu, 28 Mar 2024 22:55:44 -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 1rq2P8-0007VR-TD for emacs-orgmode@gnu.org; Thu, 28 Mar 2024 22:55:42 -0400 Received: from mail-oi1-x22c.google.com ([2607:f8b0:4864:20::22c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rq2P7-0006lN-Ev for emacs-orgmode@gnu.org; Thu, 28 Mar 2024 22:55:42 -0400 Received: by mail-oi1-x22c.google.com with SMTP id 5614622812f47-3c3e2e0e407so1176189b6e.0 for ; Thu, 28 Mar 2024 19:55:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711680940; x=1712285740; darn=gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=lxg1e3Vtg2g9Y2tekwpdzNhxQPvewXBgHly83CP2Oio=; b=jBiUseWiF2QNyYgbAaor1dEJGTVHvVp7frMUp5V95VkHi6RlzOlXJsXG/jkeRW59xm JYrXKjXugdZG0/lM1AAXv909U3lcwo9rKb+usRtQ3gxFizgGTxsuiZQGbNXh8rfNU+BX 9jE15lHDivjlVSmznDLebmpD+IwgZAWjryibgWfN7LTUZ2vJH81RWHKggSQETKt/UUYF a5fdeI8bGs3AYdx8nIWsJ0cAwcgiqfNNpdmHywFyQ7/RLQ7rNQumM0FIuX8l9L6MXjXM 0PvNZPpawbW0WErHZRbetCl7AlUusY88S2uRW1fTsu9Mypo4QLkavDD8Zepy6P4iBbw3 LGPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711680940; x=1712285740; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=lxg1e3Vtg2g9Y2tekwpdzNhxQPvewXBgHly83CP2Oio=; b=fATqjPBxf9PL9MgrEqpQ0gX8CXDpPCNwfRG/EwdbFiDd/QsRCDvM4ZPBw2Z3Ha7n/I T4lx/tdXsQy/nN2IfcMBxc05IOE+2PhENxP8elm3ZgRoRJrC5HqoUX0Q/13lap35zbTH DAQPZryI8SBAFvCLan1dLuGjzubF0tbfnlf4CZPGF6ofQYZRegOM8ifZZWbz+oP8fHq7 kUQnjIuJSfQ7jvMbNeyjqXuPG6DH6MCQy4MX08B5dW0p8DBv2Z4MNTeEPx6eZlrmr4tX ojUSejiKp2/ut6/uE6aMv/zjdwNjceZqfQhrLFGitezunTNA1NJZZIUPpjIGcOmABalD y3uw== X-Gm-Message-State: AOJu0Yw3iWLC/6ssGOQhDGkeHXUw4qmX11xey8vfL7JDMFvF5SY8Hdcb kgiSuI8RpBMRmnw+oAs829h5Z9AdOEHkwAx9CgqeMAoZlUWu90LPOH8ZHBKeqlnbKmkit+G+Vhp mNgVwaS+YEhorEvvNMFSI3BxagN2G0Y87Kfg= X-Google-Smtp-Source: AGHT+IGYsClCTu1EvOf1zrqX4M6kQ6407pZVYPUBGddGR1kZPAfr5GjUs+Z6UAuh4HNqshvEEpIDxmQRrR4l71PWPGM= X-Received: by 2002:a54:409a:0:b0:3c3:bb59:f543 with SMTP id i26-20020a54409a000000b003c3bb59f543mr1052036oii.49.1711680939776; Thu, 28 Mar 2024 19:55:39 -0700 (PDT) MIME-Version: 1.0 References: <87o7ayrwfc.fsf@localhost> In-Reply-To: <87o7ayrwfc.fsf@localhost> From: Doerthous Date: Fri, 29 Mar 2024 10:55:19 +0800 Message-ID: Subject: Re: Support for whitespace prefix for :noweb-prefix To: Ihor Radchenko Cc: emacs-orgmode@gnu.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2607:f8b0:4864:20::22c; envelope-from=doerthous@gmail.com; helo=mail-oi1-x22c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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.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-Queue-Id: 68DF076BF0 X-Spam-Score: -8.06 X-Migadu-Spam-Score: -8.06 X-Migadu-Scanner: mx10.migadu.com X-TUID: KJVQwZbV0gpm Ihor Radchenko =E4=BA=8E2024=E5=B9=B43=E6=9C=8829=E6= =97=A5=E5=91=A8=E4=BA=94 03:25=E5=86=99=E9=81=93=EF=BC=9A > > Doerthous writes: > > > Can we add a support for whitespace prefix such that the prefix of a > > noweb-ref replaced by whitespace characters? > > > > ... > > #+name: a-fragment > > #+begin_src elisp :noweb yes :noweb-prefix whitespace > > (let (<>) > > <>) > > #+end_src > > > > using whitespace :noweb-prefix, the above code will expand to > > > > #+begin_src elisp > > (let ((a 0) > > (b 1)) > > `(,a ,b)) > > #+end_src > > Do you mean that you want the code to be indented according to the major > mode rules? > Why it relates to major mode, Currently, with :noweb-prefix set to yes, the above code will be expand to #+begin_src elisp (let ((a 0) (let ((b 1)) `(,a ,b)) #+end_src ~(let (~ is the prefix of <>. I thought we can replace just the prefix in current code[1] with ~(setq prefix (replace-regexp-in-string "[^ \t]" " " prefix))~ ? [1] lisp/ob-core.el (org-babel-expand-noweb-references) @ 9.6.23