Straw poll for emacs / org-mode workflow

editors
emacs

#1

Over the past few months I’ve been getting deeper into emacs, mostly by using org-mode for all my todo list management, keeping track of papers I am reading, and general note taking. It’s been pretty great.

Currently I use Atom+Juno for most of my Julia development and hacking around, but often when I’m making some plots or playing around with things related to notes I’m taking or papers I’m reading, I’d like to be able to put code blocks and plots directly in my org-mode notes.

Do folks have a good workflow for this? ob-julia hasn’t been updated in 5 years, though this post from earlier this year seems to indicate that it still works. Then this post from @non-Jedi says that using ob-ipython with the julia kernel works around some unspecified current issues with ob-julia.

At the moment I’m not super concerned with exporting my notes to pdf or html (though I can imagine that being useful at some point). Also I’ve been doing a lot of my day-to-day reading/note-taking in Windows 10 and linux, though so far I’ve had pretty good luck getting the rest of my emacs/org config working across platforms so hopefully there isn’t anything too specific.


#2

I use something similar - text is the way to go for sure. I’ve lost a lot of data to proprietary formats over the years, and nothing beats the power of text when you are in a familiar editor.

I use NeoVim, which is basically Vim, with a taskpaper mode that keeps the same kind of outline as org-mode. I would like to rewrite it into markdown so it would print nicely. Each project has its own list so I can pick up where I was pulled away. I tacked a bunch of macros and color schemes onto this ancient vim module.

To manage the lists, I wrote a Perl script to pull the done items down to an Archive group at the end, and move active items into their priority groupings. I just invoke it from a macro in Vim. My script and groupings have worked well for me this way since 2008, but they are idiosyncratic, based on GTD, and I wouldn’t assume they are useful to others.

The script is essential to keep the list sorted and uncrufted; I imagine the same could be done for org-mode. You can probably find a better language than Perl; Python would be good. Julia would be more fun, but would have a JIT wait everytime you ran it.

I really wish I’d had this when I was in grad school and starting companies; ironically it was available to me, but I was too busy with fancy things.


#3

I use org-mode and emacs with ob-julia. Seems to mostly get the job done: don’t remember it being perfect but I haven’t used it recently so I can’t remember what the exact issue was.

ob-ipython had some issues the last time I tried it with running jupyter kernels that weren’t python based. I don’t know if those have been fixed yet.


#4

Given the lack of recent (using the term generously) activity for ob-julia, I think it is safe to assume that it is abandonned (unless there is something to suggest otherwise). I don’t see a license in the repo, so I guess if someone wants to use it, they should start a new project for the same purpose.

FWIW, I switched from org-mode to Markdown for the same purpose. org-mode is of course much more “powerful” because you can customize it directly with Emacs Lisp, but because of this, 3rd party tools have a difficult time converting your document, also, 3-5 years is enough for that Emacs Lisp code to go stale. Markdown seems much more timeproof because it is just a markup syntax, not a markup syntax plus an insanely powerful and versatile programming language, hundreds of packages, and the decades of cruft I copy-pasted into my init.el.


#5

I’ve been really happy with ob-ipython and Julia. I’ve even managed to rangle it
fairly well to output papers for the Master’s degree courses I’m taking complete
with tables and graphs. Can’t say I remember exactly what wasn’t working about
ob-julia, but it was annoying enough to make me move.

The only real issue I have right now with ob-ipython is that some of the stuff I
setup in my spacemacs julia layer doesn’t work when I call org-edit-src-code,
and I’m fairly confident I could get even that working if I stopped being lazy
and actually tried to figure out what was going on.

The only thing missing really from ob-ipython is that it doesn’t natively spit
out org-tables if you’re using a language other than python. I’ve gotten around
that pretty easily by defining a custom show method on MIME"text/org" and
then explicitly calling display("text/org", myarray) at the end of my
code-blocks.

If you do decide to go down the ob-ipython path, let me know about any problems
you’re having, and I’ll see if I can figure out how I’ve worked around them.

EDIT: If you just want to be able to run julia code in blocks interspersed with
marked up plain text from emacs, the other thing you could look into would be
EIN. That’s where I started before moving the ob-ipython in org-mode, and it
worked fairly well. The really nice part is that when you’re done you can share
your work as an jupyter notebook without any effort since that’s the format you
were already working in. Since that seems to be the direction a lot of people
are moving in for reproducible research and just generally sharing results,
that’s a big advantage IMO.

There are annoyances though for sure; takes a lot of setup to start the jupyter
server, login to the jupyter server, and choose your notebook through the
jupyter server interface. Can’t use some normal emacs things because you’re not
editing a file but just a buffer interface to the jupyter server.


#6

I want to move my taskpaper implementation and macros, scripts over to markdown lists as well. Part of the question, then, is what can org-mode do that markdown (with pandoc and embedded latex) can’t in a more now-standard way?


#7

I’ve been using a lot of the task management tools of org-mode, as well as the bibtex integration, so things like:

  1. keyboard shortcuts to clock in and out of tasks to track time spent
  2. agenda view to see upcoming scheduled tasks and deadlines
  3. fuzzy-search of all my bibtex references to insert citations, open associated PDFs, or keep notes
  4. cross-reference between paper notes so I can jump between related ideas
  5. set up recurring tasks that get auto-rescheduled when I do them

I know emacs and org-mode can be kind of a ball of mud and I haven’t yet been bitten by non-backwards-compatible tooling changes, but so far it’s been really great to organically add features to my workflow, and glue little things together with emacs-lisp as needed.


#8

I found the mmark version of Markdown very handy for text with code & math. The only thing you won’t be able to do directly is “weave” functionality which org-mode can do out of the box. But for interactive notebooks I moved to Jupyter anyway.


#9

Excuse the side note, but what are the markdown non-emacs people using on the todo end of things? I couldn’t quite understand if there was an org-mode alternative… thanks!


#10

As noted above I use the taskpaper format for todo in Vim. It’s basically headers, item lists with dashes, and tags with ampersands. Vim colors all of that and has macros and folding. My script makes it move the way I want.

I think it would be port the same functionality (headers, lists, tags) to markdown, and copy over the functionality. I’ll do that someday, but there’s not much incremental benefit to me yet.


#11

Apparently there is a taskpaper-mode for Emacs, which appears to be actively maintained.

EDIT: it is not clear to me how one would include code blocks etc in Taskpaper. Is it a superset of Markdown?


#12

You’d have to put code blocks in a comment and it’d be messy for more than a couple of lines. If you had folding set properly, you could hide all comments, in order to visually focus on tasks.


#13

I am a big fan of Emacs+Org+Babel and I use them everyday. Concerning ob-julia.el I fully agree with @Tamas_Pappn: ob-julia.el seems to be not actively maintained. However, until recently, even if it is limited and not perfect it has done the job.

With Julia v1.0, ob-julia.el does not work anymore for the reason I explained in Stackoverflow, I also proposed a quick fix and I have submitted an ob-julia.el issue. We will see what happens.

As a general comment, I think Julia would worth a nice solution like ob-R.el for its integration into the Emacs eco-system. It would be wonderful if an up to date version of ob-julia.el existed (on my side, my knowledge of emacs-lisp are too brittle for this task…)


#14

I think the best solution at the moment is

which takes a different approach but integrates much better.

FWIW, I have gradually transitioned from org-mode to Markdown-based solutions over time. org-mode is very powerful, but this power comes at the price of creating and maintaining snippets of Lisp code. This approach is initially appealing (because one can literally do everything), but I find that documents I created a few years ago are now (occasionally subtly) broken, because of the plethora of moving parts involved.


#15

Main thing that keeps me from using Literate.jl is lack of tooling in atom. Markdown syntax highlighting in the comment sections + keeping me in comment mode (eg when there’s a hash at the beginning of a line, add a hash to the newline when I hit enter) would be all I need.

Pretty sure this would be simple to do in atom, but I don’t have the skills :frowning:. I’ve been thinking of making a simple parser that converts markdown with code fences to literate format, but there’s the best I can do.


#16

I thought all org-mode users used Emacs :wink:


#17

Heh, good point, wrong thread for my complaint :laughing:


#18

Yeah, that’s something I’m a little worried about (I’ve only been using org-mode for a year or so, so it hasn’t bitten me yet). I’m using the agenda/scheduling/time-tracking features pretty heavily though - are you aware of any Markdown-based replacements that can do that sort of thing? (also easy table creation).


#19

To be honest, I don’t really get this concern. Anything you can do with markdown you can do with org-mode without writing a single line of elisp. It’s only when you want to extend it or get funky with it that you need to reach for elisp. I use org-mode pretty heavily, and I only have a small snippet associated with it that I use maybe every few weeks to customize how org agenda works.

In short, even without elisp, org-mode functionality is strictly a super-set of markdown functionality.


#20

Thank for the feedback. I understand your point. However, in my situation as I do everything under org-mode (reports, slides etc…) I cannot/do not want to break the chain by introducing other tools. Beside Julia I also use Mathematica and C++. Emacs + Org… allows me to code, document, tangle code snippets, create links between documents… This is truly awesome and I do not want to leave that :slight_smile: