From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id sM8ZAvo4+2HOXQEAgWs5BA (envelope-from ) for ; Thu, 03 Feb 2022 03:07:54 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id yH8dO/k4+2GILAAA9RJhRA (envelope-from ) for ; Thu, 03 Feb 2022 03:07:53 +0100 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 7953C13B29 for ; Thu, 3 Feb 2022 03:07:53 +0100 (CET) Received: from localhost ([::1]:47754 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nFRXM-0008C4-0U for larch@yhetil.org; Wed, 02 Feb 2022 21:07:52 -0500 Received: from eggs.gnu.org ([209.51.188.92]:46114) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nFRTH-0004qs-Ca for emacs-orgmode@gnu.org; Wed, 02 Feb 2022 21:03:39 -0500 Received: from wilbur.contactoffice.com ([212.3.242.68]:59798) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nFRTE-0001MH-K0 for emacs-orgmode@gnu.org; Wed, 02 Feb 2022 21:03:39 -0500 Received: from ichabod.co-bxl (ichabod.co-bxl [10.2.0.36]) by wilbur.contactoffice.com (Postfix) with ESMTP id 12F801CD9 for ; Thu, 3 Feb 2022 03:03:32 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1643853812; s=20210208-e7xh; d=mailfence.com; i=pareto.optimal@mailfence.com; h=Date:Message-ID:MIME-Version:Content-Type:From; l=4288; bh=CTfAhC/ffEHXW417gkPlT1+qbN1tFxYZkqrQ/TvZaIs=; b=nHUvA9lQ0oM8XE11BdDknoV+kd2hA7J+5aSEmOjKTcsQr3YV062TMpBO/dsduKEl t9cqX+ntRqik4nHQJyJ6XgCN1xQObJlJmc46s/fwRloQkmo4Xw0pcie2rF6byqprwcJ Q+0QS+DfWZl3F9bZb7bzUWuSmZeT6wtnGnu+746F1Zxop5ajvtWzEJC+zbdY+6czYNx E0u4AYJQw4IDlEpRjePJXFoXnywLyoq/OlN4ZIRynCxHTznGzMjTHOoBPZLX6qBSkU5 IDrywkx8LNxAcuvcCJR55+qfImnu1B0v35lTKlIcm0ixSZhSyTcgYIMNA0L/9knwmoo ghAg3D9y/g== Date: Thu, 3 Feb 2022 03:03:29 +0100 (CET) Message-ID: <1988480151.334881.1643853809467@ichabod.co-bxl> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_334878_849654132.1643853809465" Subject: Org babel noweb expansion includes extra newline From: pareto optimal To: emacs-orgmode@gnu.org X-Mailer: ContactOffice Mail X-ContactOffice-Account: com:311504211 Received-SPF: pass client-ip=212.3.242.68; envelope-from=pareto.optimal@mailfence.com; helo=wilbur.contactoffice.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1643854073; 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:dkim-signature; bh=CTfAhC/ffEHXW417gkPlT1+qbN1tFxYZkqrQ/TvZaIs=; b=sBSljnzqcjfScYR04jy8QWDyngAeXZcmOAZLr0m/qLHc83NQzBK2jn4i3Q25p9DfEibQoc eb7uu4QXKTxrQ6sF0HGkeEYWWrK+PzEiJqEg5gAcGz5ZwoVa79/EvzU8MHmbTNm9Rzhw40 Tt4xcbfJzDLIircze7PewhWbIpZ86Q/BChtdk+YjaLmTcJ4FnwA73pEElKHxSJBQRNxvRQ QQCJoC5GIFqnDdNAgA2dvvXSafwJS5S803Baj4Iaa6OUaCHLc/EO0qRZhHrFHs9Zm76iYQ ghNoM/r+AcNct6AemR8IYFtXw6fh/HTd6KHOsRtXgORuAOr7EFQuNnnAZVuHqg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1643854073; a=rsa-sha256; cv=none; b=Zr4B42polnwWptSjTE9Hg3hj1N7bm02r6KfNQhwsIqPwVybKVBGdCGjZXKmrSfvuQqq/t7 ZOV6Q9dTzFJhmQsFkh/psci6PJgLI8jOKV4IckgVkHqmVR7UNqFf6VnzQJofjkDDFFyIOv agliPHkbO5ZcbRGWAzF9z3Ue762feIoxWXELwbL6G3Oh9NrBow5PmO3lFd/EE1DOMGd6gw QZZX93NWs+i9wOIxW1i0jW6OZIrrQhhSTClIC97sPhWy3JEe6S8CSUFMTvzgebXRvEEuCv FwB40FasuozfvIsplQPOGHTLohDTT4E9nszyQiwemO6e5QzjfNvUSA4j4VrCcQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=mailfence.com header.s=20210208-e7xh header.b=nHUvA9lQ; dmarc=pass (policy=quarantine) header.from=mailfence.com; 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" X-Migadu-Spam-Score: -9.42 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=mailfence.com header.s=20210208-e7xh header.b=nHUvA9lQ; dmarc=pass (policy=quarantine) header.from=mailfence.com; 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" X-Migadu-Queue-Id: 7953C13B29 X-Spam-Score: -9.42 X-Migadu-Scanner: scn0.migadu.com X-TUID: 0Bypk5zo3ncg ------=_Part_334878_849654132.1643853809465 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi, I hope this org file is descriptive enough along with the subject. I'm using org 9.5.2. I believe it might be a bug since the results of calling =3Dall-tangled-fil= epaths=3D only has 4 results, so the =3Dorg-babel-expand-src-block=3D funct= ion might have a bug. * Show files I tangle and could delete from git ** currently not working and outputting weird stuff *** The expansion seems to include an empty result for some reason #+begin_src emacs-lisp :results verbatim =C2=A0 (save-excursion =C2=A0=C2=A0=C2=A0 (progn =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (goto-char =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (org-babel-find-named-block "files-to-= remove-from-git")) =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (org-babel-expand-src-block) =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 )) #+end_src #+RESULTS: #+begin_example "git ls-files ~/system/users/profiles/emacs/default.nix git ls-files ~/system/users/profiles/emacs/emacs-packages.nix git ls-files ~/system/users/profiles/chat/default.nix git ls-files ~/system/profiles/misc/default.nix git ls-files " #+end_example *** here's what hapepns if we just run =3Dall-tangled-filepaths=3D #+call: all-tangled-filepaths() #+RESULTS: : ~/system/users/profiles/emacs/default.nix : ~/system/users/profiles/emacs/emacs-packages.nix : ~/system/users/profiles/chat/default.nix : ~/system/profiles/misc/default.nix ** get tangled blocks #+name: all-tangled-filepaths #+begin_src sh :results output rg -N -o=C2=A0 ' :tangle ([^yesno][^ ]+)' -r '$1' ~/.emacs.d/system.org=C2= =A0 | rg '/system/' #+end_src ** pass those to git-ls-files #+name: files-to-remove-from-git #+begin_src sh :noweb yes :dir ~/system git ls-files <> #+end_src -- Sent with https://mailfence.com Secure and private email ------=_Part_334878_849654132.1643853809465 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline
Hi, I hope this org = file is descriptive enough along with the subject.

I'm using org 9.5.2.

I believe it might be a = bug since the results of calling =3Dall-tangled-filepaths=3D only has 4 res= ults, so the =3Dorg-babel-expand-src-block=3D function might have a bug.

* Show files I tangle and could delete from git<= br>** currently not working and outputting weird stuff
*** The expansion= seems to include an empty result for some reason

#+begin_src emacs-= lisp :results verbatim
  (save-excursion
    (pro= gn
      (goto-char
    =    (org-babel-find-named-block "files-to-remove-from-git"))
&n= bsp;     (org-babel-expand-src-block)
  &n= bsp;   ))
#+end_src

#+RESULTS:
#+begin_example
"g= it ls-files ~/system/users/profiles/emacs/default.nix
git ls-files ~/sys= tem/users/profiles/emacs/emacs-packages.nix
git ls-files ~/system/users/= profiles/chat/default.nix
git ls-files ~/system/profiles/misc/default.ni= x
git ls-files "
#+end_example
*** here's what hapepns if we just = run =3Dall-tangled-filepaths=3D

#+call: all-tangled-filepaths()
<= br>#+RESULTS:
: ~/system/users/profiles/emacs/default.nix
: ~/system/= users/profiles/emacs/emacs-packages.nix
: ~/system/users/profiles/chat/d= efault.nix
: ~/system/profiles/misc/default.nix

** get tangled bl= ocks

#+name: all-tangled-filepaths
#+begin_src sh :results output=
rg -N -o  ' :tangle ([^yesno][^ ]+)' -r '$1' ~/.emacs.d/system.org=   | rg '/system/'
#+end_src

** pass those to git-ls-files
#+name: files-to-remove-from-git
#+begin_src sh :noweb yes :dir ~/s= ystem
git ls-files <<all-tangled-filepaths()>>
#+end_src<= br>
--=20 Sent with https://mailfence.com =20 Secure and private email ------=_Part_334878_849654132.1643853809465--