Skip to content

Org knit #4065

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 43 commits into from
Closed

Org knit #4065

wants to merge 43 commits into from

Conversation

tecosaur
Copy link
Member

@tecosaur tecosaur commented Oct 9, 2020

See https://discourse.doomemacs.org/t/org-knit-development/1432 for task list and discussion.

Usage: org-knit [OPTIONS] [TARGETS...]

A command line interface for weaving (exporting) and tangling org-mode files.
TARGETS can be files of folders (which are searched for org files recursively).

This is useful for automated generation of files,
and integration with other scripts.

Example:
  org-knit some-file.org
  org-knit -f pdf book/chapters/
  org-knit -t -f ascii,md scripts.org

Options:
  -a, --alias [FORMATS]	Give the org function called by a particlar alias.
  			List all aliases when no format or other arguments are given
  -c, --clean		Delete all non-org files which share their basename
  -e, --exec		Execute src blocks in the file before exporting
  -f, --format FORMATS	Export formats (comma seperated, no space), html by default
  -j, --jobs		Number of jobs executed in parallel (14 by default)
  -l, --load		Elisp files to load
  -s, --sync		Perform the exporting/tangling synchronously
  -t, --tangle		Also tangle the file(s).
  			See org-tangle for more advanced functionallity
  -q, --quiet		Suppress the output of status information
  -   			Output to stdout instead of writing to files

org-knit -a

org-knit -s -f ascii,md,html *.org

image

@hlissner hlissner added module:lang/org Pertains to Doom's :lang org module is:feature Adds or requests new features, or extends existing ones module:core:binscripts Pertains to one of Doom's bin scripts and removed module:lang/org Pertains to Doom's :lang org module labels Dec 13, 2020
@tecosaur
Copy link
Member Author

Update: after a long delay I'm coming back to this 🙂

@tecosaur tecosaur force-pushed the org-knit branch 2 times, most recently from 7bbee61 to 33709de Compare July 31, 2021 15:50
@tecosaur tecosaur force-pushed the org-knit branch 3 times, most recently from 3790b5f to 6826cb6 Compare August 8, 2021 06:32
@tecosaur tecosaur force-pushed the org-knit branch 4 times, most recently from 6cf9893 to 736c769 Compare September 11, 2021 17:24
@github-actions
Copy link

⚠️ This pull request has been automatically marked stale due to 60 days of inactivity. If this PR is still valid, please reply to it or it will be closed in 7 days.

@github-actions github-actions bot added the stale No response, forgotten, or abandoned label Nov 11, 2021
@tecosaur
Copy link
Member Author

A wonderful bird is the pelican,
His bill can hold more than his beli-can.
He can take in his beak
Food enough for the week;
But I'm damned if I see how the heli-can.

@github-actions github-actions bot removed the stale No response, forgotten, or abandoned label Nov 18, 2021
@tecosaur tecosaur force-pushed the org-knit branch 2 times, most recently from faf84fb to 5118f60 Compare January 10, 2022 04:33
hlissner and others added 8 commits January 13, 2022 21:54
Now that we've reclaimed the master branch, the develop branch will soon
be phased out.
BREAKING CHANGE: This commit changes the behaviour of the TAB and RET
keys in a consult-completing read multiple session, in order to make
them more intuitive. The behaviour is now:

- TAB: (unchanged) always select or deselect the current candidate, and
  if the candidate is selected, move the index to the next one (this
  allows for pressing TAB repeatedly to select multiple subsequent
  candidates).

- RET: If no candidates have been selected, select the current candidate
  and exit the completion session. If some have been selected, disregard
  the current candidate and exit.

- S-TAB: (new) like TAB, but the keeps the input.
The C-c C-s binding mirrors the export and writable export bindings.

embark-export is used for type specific exports (such as buffers to an
ibuffer buffer), not for verbatim exports. This is most noticeable if
you want to export a variable list, which gets you to an apropos buffer.
if you just want a list of things to keep around,
embark-collect-snapshot is the tool for the job, but having it be only
on C-; S makes it harder to reach and less visible. C-c C-s is a nice
visible thing to have around.
This ensures that argument processing occurs before any further actions
relying on the arguments.
Just calling `error' leads to a full stacktrace. Now we just give the
error message and exit.
This is accomplished treating tangling as a special case publishing
format.
This may be nicer with a if-required check in future, but for now this
allows this to work at all on Emacs 27.
This just adds clutter, as we manage this ourselves.
When code-block evaluation changes the contents of the buffer, it should
be saved.
When using `find-file-noselect', there are quite a few things are run
implicitly, which can cause issues. Using `insert-file-contents' instead
is much more predictable, and thus safe.
The tangle action (tang) was marked as "completed" regardless. It should
be included in the `condition-case' and only run when there is no error.
@github-actions
Copy link

⚠️ This pull request has been automatically marked stale due to 60 days of inactivity. If this PR is still valid, please reply to it or it will be closed in 7 days.

@github-actions github-actions bot added the stale No response, forgotten, or abandoned label Mar 23, 2022
@github-actions github-actions bot closed this Mar 30, 2022
@tecosaur
Copy link
Member Author

Delayed but not abandoned.

@tecosaur tecosaur reopened this May 2, 2022
@hlissner hlissner removed the stale No response, forgotten, or abandoned label Mar 22, 2023
@hlissner hlissner deleted the branch doomemacs:develop February 16, 2024 09:51
@hlissner hlissner closed this Feb 16, 2024
@hlissner
Copy link
Member

This was auto-closed because I deleted the develop branch, but I'm still interested in the functionality. I will revisit it after v3.

@tecosaur
Copy link
Member Author

NP. Likewise, happy to revisit later. I think this is 80-90% there, and neat functionality to have.

levindu added a commit to levindu/doomemacs that referenced this pull request Sep 3, 2024
levindu added a commit to levindu/doomemacs that referenced this pull request Jul 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
is:feature Adds or requests new features, or extends existing ones module:core:binscripts Pertains to one of Doom's bin scripts
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants