emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Org babel noweb expansion includes extra newline
@ 2022-02-03  2:03 pareto optimal
  0 siblings, 0 replies; only message in thread
From: pareto optimal @ 2022-02-03  2:03 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1666 bytes --]

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 =all-tangled-filepaths= only has 4 results, so the =org-babel-expand-src-block= function 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
       (org-babel-find-named-block "files-to-remove-from-git"))

"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 "
*** here's what hapepns if we just run =all-tangled-filepaths=

#+call: all-tangled-filepaths()

: ~/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  ' :tangle ([^yesno][^ ]+)' -r '$1' ~/.emacs.d/system.org  | rg '/system/'

** pass those to git-ls-files

#+name: files-to-remove-from-git
#+begin_src sh :noweb yes :dir ~/system
git ls-files <<all-tangled-filepaths()>>

-- Sent with https://mailfence.com  Secure and private email

[-- Attachment #2: Type: text/html, Size: 2021 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-02-03  2:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-03  2:03 Org babel noweb expansion includes extra newline pareto optimal

Code repositories for project(s) associated with this public inbox


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).