Live data from Hacker News

Literate Devops with Emacs Org-Mode (2014)

howardism.org

41–50 of 86 posts

Re: Literate Devops with Emacs Org-Mode (2014)

#41
post #2

Org-mode & Magit really are the secret superpowers of modern emacs. And notmuch (full-text search of one's email, at least one order of magnitude faster than Gmail's!). And elfeed. And gnus. And dired. And pretty much everything else in emacs …

Is there a good side-by-side video of someone using magit vs the command line? I keep reading the documentation for magit, and I can't really imagine it giving me a huge advantage over GitX plus good command line completion settings.

I don't have side by side comparison, but I'm adept at command line and I still use Magit even when I have command line or other IDE available.

Magit is my go to tool, I only use command line to quickly switch branches sometimes or for non-standard things.

Things I love about Magit:

- CHUNKING .. staging chunks or unstaging chunks is so easy (my favorite feature)

- General overview of information

- diffs, rebases, etc

- It's really fast when you learn the key chords

Other thing I use for Git:

- Command line (if I'm in command line and need to change a branch, might as well do it there)

- Tig (Log is fine in Magit too, just old habbits)

Re: Literate Devops with Emacs Org-Mode (2014)

#42
post #2

Org-mode & Magit really are the secret superpowers of modern emacs. And notmuch (full-text search of one's email, at least one order of magnitude faster than Gmail's!). And elfeed. And gnus. And dired. And pretty much everything else in emacs …

I know it's being worked on but every time I see posts about how great magit is, it pains be because my experience is that it continues to be ungodly slow on MacOS. Other MacOS/Emacs folks, is my experience considered atypical at this point?

Are you using stock magit? I think a few of the GitHub integration plugins for example have performance issues, so it may not be Magit's fault but some of the other extension you're using.

Re: Literate Devops with Emacs Org-Mode (2014)

#43
post #2

Org-mode & Magit really are the secret superpowers of modern emacs. And notmuch (full-text search of one's email, at least one order of magnitude faster than Gmail's!). And elfeed. And gnus. And dired. And pretty much everything else in emacs …

Is there a good side-by-side video of someone using magit vs the command line? I keep reading the documentation for magit, and I can't really imagine it giving me a huge advantage over GitX plus good command line completion settings.

It’s mainly that things happen in a couple of key presses instead of a few typed words.

For example to stage things you can just tap ‘s’ while running your cursor down a list of changed lines/files. To commit, it’s just ‘c c’, and you’re in an editor, in a markdown-like mode, with hard wrapping lines at a good default.

Amending previous commits is also very easy, and there are some quality of life abstractions involving branches which I’ve found very useful.

But, ultimately, it’s all the same stuff. If you have a good system with Gitx at the moment (and not much of an interest in Emacs), I wouldn’t worry about it.

Re: Literate Devops with Emacs Org-Mode (2014)

#44
post #21
post #6

much of whats covered in org mode can be handled by vim's folding option. if you write ansible playbooks with coworkers who handle automation as a stream of consciousness out of a single file, folding can save you some sanity. http://vim.wikia.com/wiki/Folding

Since we're off-topic anyway: have you tried Spacemacs? It's all the ingrained vim keybindings on top of a... more powerful system.

Personally, if I was going to give Vim a try again I'd use Oni:

https://github.com/onivim/oni

Re: Literate Devops with Emacs Org-Mode (2014)

#45
post #25
post #6

much of whats covered in org mode can be handled by vim's folding option. if you write ansible playbooks with coworkers who handle automation as a stream of consciousness out of a single file, folding can save you some sanity. http://vim.wikia.com/wiki/Folding

Do vim's folds give you a full literate programming environment with support for executing code, saving results in vars, WEB syntax, etc? From what I'm familiar with, vim's folding is a lot closer to outline-mode[1], which org relies on for folding. The folding is a very small part of org-mode's functionality. [1] https://www.gnu.org/software/emacs/manual/html_node/emacs/Ou...

I think you can run python inline in vim. But I obviously vim doesn't really have something as full-featured as Org mode. I mean, there's vimwiki - and you could probably get a majority of the rest of the features through messing around with plugins. But at that point, you may as well just switch to spacemacs.

Re: Literate Devops with Emacs Org-Mode (2014)

#46
So "Literate DevOps" is writing comments in your shell scripts and running the commands line by line?

I agree it's a good idea. I do similar things when writing PowerShell scripts (can run them line by line using PowerShell ISE).

EDIT: If you're going to downvote me, it'd be better to explain why.

Re: Literate Devops with Emacs Org-Mode (2014)

#47

So "Literate DevOps" is writing comments in your shell scripts and running the commands line by line? I agree it's a good idea. I do similar things when writing PowerShell scripts (can run them line by line using PowerShell ISE). EDIT: If you're going to downvote me, it'd be better to explain why.

I didn't downvote but I'll try to explain.

Is the fact that you got the idea exactly backwards: is not about putting comments on your scripts. Is about writing an article, intended to be read by humans, that is also executable.

Imagine it this way: Suppose you are reading a blog post on how to install, configure vagrant and install drupal on it. The article is pretty clear an well written and you enjoy it. And you also know that is correct because every single one of the instructions shown was executed while you were reading the article and every output was given back to you.

That is literate programming, is closer to a jupyter notebook than to 'comments on scripts'.

Re: Literate Devops with Emacs Org-Mode (2014)

#48
post #31

Earlier quoted context omitted.

Check out orgzly: http://www.orgzly.com/

As a user of Orgzly it's fine for basic notes and task management but you hit the limits of what it can do fairly early. It's a small partial Java implementation of the Org file format.

I think you're being slightly unfair. Of course it doesn't compare to full Emacs Org. Nothing does. But if you (like me) keep your life in Org and would forget to eat without it but sometimes have only your Android device, Orgzly has picked a highly efficient 1% subset. The dev is responsive and moves very fast too -- if you tried it more than a few months ago, you should give it another try.

I would not be where I am without Orgzly. Yes, I wish it was more complete. But given the very limited manpower behind it, it is excellent.

It's also better than any other similar app I've tried, even non-Org ones. So it's the best note-taking/todo/planner app for Android, and then the fact that it uses Org files behind the scenes is just a great bonus.

Re: Literate Devops with Emacs Org-Mode (2014)

#49
post #47

So "Literate DevOps" is writing comments in your shell scripts and running the commands line by line? I agree it's a good idea. I do similar things when writing PowerShell scripts (can run them line by line using PowerShell ISE). EDIT: If you're going to downvote me, it'd be better to explain why.

I didn't downvote but I'll try to explain. Is the fact that you got the idea exactly backwards: is not about putting comments on your scripts. Is about writing an article, intended to be read by humans, that is also executable. Imagine it this way: Suppose you are reading a blog post on how to install, configure vagrant and install drupal on it. The article is pretty clear an well written and you enjoy it. And you al…

> "That is literate programming, is closer to a jupyter notebook than to 'comments on scripts'."

Surely that's a matter of perspective? Imagine you have a text document containing one command and one description of that command. Is this a literate programming document or not?

Furthermore, does the mode change depending on which tool is used to open the source file? For example, if I open a Bash script in a text editor then it's a document, and if I open it in Bash then it's a script, but if I could open it in a tool that allows me to both read and execute the script at my leisure does it then become a literate programming document?

Aside from this, to use your Jupyter notebook example, is it necessary for the results of execution to be captured in-line in order to follow the literate programming methodology?

Re: Literate Devops with Emacs Org-Mode (2014)

#50
post #4
post #2

Org-mode & Magit really are the secret superpowers of modern emacs. And notmuch (full-text search of one's email, at least one order of magnitude faster than Gmail's!). And elfeed. And gnus. And dired. And pretty much everything else in emacs …

Is there some way to tell org exactly how I want it to spit out HTML? I was going to do my blog entirely with org-mode+org-publish, but it spits out a mess of HTML and also a small bit of js for some reason, so I'm just writing html directly myself now. I don't really find writing html myself all that annoying or anything, but it'd be nice if I could get org to generate really clean/simple HTML for me that I could th…

Are you kidding!? This is Emacs! You can tell it exactly how to do everything. Just advise/redefine the relevant functions. ;) The documentation of ox and publish does not cover everything, but when in doubt, just ask Emacs what code it runs when you do the thing you want to modify.

On my site (https://two-wrongs.com/) there is very little left of the original HTML. I'll see tomorrow if I can dig up the Lisp code I wrote for it.

Post reply on HN