Skip to content
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

hs-outorg, a commandline outcommenter #1

Open
jedahu opened this issue Jul 26, 2017 · 3 comments
Open

hs-outorg, a commandline outcommenter #1

jedahu opened this issue Jul 26, 2017 · 3 comments
Assignees

Comments

@jedahu
Copy link

jedahu commented Jul 26, 2017

Hi @alphapapa, fwiw I just wrote an outcommenter in haskell. I'm using it to auto-generate documentation without having to run emacs in batch mode on my build server. https://github.com/jedahu/hs-outorg

@alphapapa
Copy link
Owner

Hey Jeremy,

That's very cool! And the code is so short, too! I have looked at Haskell in the past but haven't grokked it yet, but this looks like a great example for someone wanting to learn simple text processing.

Does it go in both directions? It doesn't look like it does, but since I'm not much with Haskell, maybe I missed it. If not, have you thought about adding that? It would be cool to have a two-way converter. I could see that being very useful, almost like a poor man's babel tangling.

Thanks for sharing this! I will link to it in the readme. :)

@alphapapa alphapapa self-assigned this Jul 26, 2017
@jedahu
Copy link
Author

jedahu commented Jul 26, 2017

Only one direction for now as that's my use case. I have to say the other direction is not a priority for me as that's what I use outorg inside Emacs for.

My gettyped project is keeping me quite busy, but if I ever get round to making hs-outorg do the round trip thing I'll certainly let you know.

Babel is pretty awesome, especially being able to interactively evaluate things in a live buffer. But from a program generation point of view it sucks because you have to either run it manually from within Emacs or use batch mode. It would be nice if there was a compatible command line implementation.

@oruppert
Copy link

oruppert commented Mar 4, 2018

This one is my helper to generate README.org files:

(defun outorg-export-to-org-file ()
  (interactive)
  (let ((buffer (generate-new-buffer "outorg-org-output"))
	(mode major-mode))
    (copy-to-buffer buffer (point-min) (point-max))
    (switch-to-buffer buffer)
    (funcall mode)
    (outorg-convert-to-org)
    (save-buffer)
    (kill-buffer)))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants