Live data from Hacker News

Org-mode parser in Rust

github.com

31–40 of 85 posts

Re: Org-mode parser in Rust

#31
post #23

Earlier quoted context omitted.

Of course. That is a derivative work.

And if I compile some GNU code (for example written in C) to javascript with a compiler, then change some details here and there can I change the licence to MIT? How derivative is defined? Manual compilation is ok, but automatic is not? But what if I beleive that humans are just fancy machines? ;)

I am neither a lawyer nor experienced with anything serious, but accordingly to how copyright is often a relevant topic in this "everyone is creator" era I believe that to be derivative you need to change the purpose.

rewriting the parser to make a background image for a desktop could be derivative as being "artistic" is not anywhere near the intention of the original creation. So the picture could be MIT and the code the picture shows GPL.

In general how you use something is more relevant than how you produce something. A human translation with heavy restructuring of the code and improvements can be derivative (maybe) putting it inside a pipeline (be it a transpiler or a contractor) wouldn't.

Re: Org-mode parser in Rust

#32

What sense does it make to have org mode outside of emacs? I think the entire power of the system would be that it explicitly lives within emacs. From the repo: > Org is probably the best and most complete plain text organizational system known to mankind. It has countless applications like authoring, publishing, task and time tracking, journal, blog, agenda, wiki etc... Yes, absolutely. > Unfortunately Org was origi…

I think just having the table creating aspects would be very useful as a way to quickly make plaintext tables

For sure, I think in the 2008 Google Talk by Carsten Dominik (org mode creator) his host makes a comment from the back of the room that he has a use case(among others) of creating html tables in org mode because its so easy. Org mode has so much functionality hooked in to plaintext structures it is ridiculous. Tab and S-Tab alone do so much work in an org mode workflow, it is things like this that make it hard for for me to understand what good an external parser for org mode would do. Org mode is incredibly feature rich for authoring.

Re: Org-mode parser in Rust

#33

Earlier quoted context omitted.

As someone who only reads about the love of Org, could you breakdown what features you see as improvements over markdown, specially CommonMark? I often see Org and OrgMode conflated, where OrgMode seems to provide much more of an experience with the way Emacs has integrated it into the editor. Could markdown be as integrated and provide similar experience?

The four differences between .org and CommonMark I could spot right now is that the latter lacks metadata[0], macros[1], syntax for specifying language for inline code blocks[2], and for tables[3]. It's hard to separate .org the markup language from org-mode the application, because quite a lot of its syntax is driven by application features. TODO markers, time stamps, schedule/deadline markers, property drawers, log…

Going off of table support:

- org mode is at least as powerful as excel thanks to gnu cal or straight up lisp

- org mode tables are nuts in the sense that you can refer to cells from your text (paragraphs, titles etc). Its neat because it means that when writting a report, you can refer to results of computations in tables - meaning that you can then change constants in the table and numbers will update in you document body (paragraphs etc)

Ive tried explaining org mode with as little words as possible to people and it goes like this:

- its as simple as markdown (a subset of orgmode is isomorphic to md)

- its as powerful as jupyter notebooks (although you can have a cell in scala refering to the output of a python cell itself taking as inpute the output of a previous bash cell)

- its as powerful as excel and word, but you can refer to table cells into your document (copy paste excel table in word, refer to table cell from word body, change excel and see changes appear in word paragraphs refering to said cells)

- its as poweful as pandoc (my spacemacs exports org files to latex, html, odt, md, etc in 5 keys)

- its a fantastic todo manager (drop todos in documents instead of going to todo app and refer todo to org file) although you git for multi user todos.

- its got macros (so you can make macros that will inject html/tex code at export so you can have arbitrarily complex pdfs (html+princexml+css or just latex). If anyone’s interested, i can write an article about this paricular feature. Ive automated my reports to have double page bg images and other goodies but (macro)-enhancing org)

- its got a UI (aka shortcuts) to easily add tables, rows, lines, realign tables etc. So text tables end up being more productive than word/excel tables (although they’re a pain to git since git will version table “indents” instead of cell content since a line can change but not its semantic content)

- its infinitely hackable (make a gantt program in js and make an org cell that takes some DSL code and outputs gantt. It already exists for uml, flowcharts (in emacs you have artist mode, so text flowcharts are eazzy) etc)

I thinks thats about all it is, but i’ve surely forgot about feature im unaware about because i havent needed them yet.

Org mode surely reminds me of apple UIs which ive always described as “your grandma can use it, yet your avg power user will find his spot”. Org is as easy as Md if that’s what you want, but also as powerful as you need it to be if thats what you want.

Thanks for org mode and emacs, its taught me about the sort of things you can make a computer do. And ive only been an emacsian (?) for 2 years, but as a 27 year old (emacs still conquering youngsters ?), ive finally found what i needed to be productive, and hot damn have i not been these past to years (thanks to org, magit, ace, dired, tramp, flycheck, term, evil (im a vim guy originally), helm, which-key, undo tree, the elisp api, paredit, the many others im forgetting, and of course spacemacs). And originally i switched to emacs to have a better window control, lol. Thanks to vs code (which btw is a fantastic editor) which didnt have what i needed (i could switch from a pane to the tree with a shortcut but i had to click to escape the tree (but with helm no trees needed anymore, fiouf), ive discovered life :)

But yeah, org mode is insanely powerful, give it a try. If i were to think of org mode’s power and flexibility as a text editor, its be emacs ;p (or is it the opposite?)

Cheers,

A GNU fanboy

Re: Org-mode parser in Rust

#34

What sense does it make to have org mode outside of emacs? I think the entire power of the system would be that it explicitly lives within emacs. From the repo: > Org is probably the best and most complete plain text organizational system known to mankind. It has countless applications like authoring, publishing, task and time tracking, journal, blog, agenda, wiki etc... Yes, absolutely. > Unfortunately Org was origi…

I have just recently found Org (last week) as I stumbled on spacemacs and then fell down that rabbit-hole, which had a branch off into this rabbit hole.

Now I'm having experiencing some Baader-Meinhof phenomenon as I've seen two org-mode articles on the front-page here since and never noticed any before.

Anyways, this seems sort of obvious to me as a total org (and emacs) beginner... the sheer flexibility and power from this being built on top of the emacs system is the real killer feature, though lots of other organization apps would do well to copy some the base features. I really don't understand why repeated tasks is so hard for other task management apps to implement well and is yet easily done by whoever put them into Org:

https://orgmode.org/manual/Repeated-tasks.html ...

   ** TODO Call Father
   DEADLINE: 
   Marking this DONE shifts the date by at least one week, but also
   by as many weeks as it takes to get this date into the future.
   However, it stays on a Sunday, even if you called and marked it
   done on Saturday.

   ** TODO Empty kitchen trash
   DEADLINE: 
   Marking this DONE shifts the date by at least one day, and also
   by as many days as it takes to get the timestamp into the future.
   Since there is a time in the timestamp, the next deadline in the
   future will be on today's date if you complete the task before
   20:00.

   ** TODO Check the batteries in the smoke detectors
   DEADLINE: 
   Marking this DONE will shift the date to one month after today.

Re: Org-mode parser in Rust

#35
post #10

Earlier quoted context omitted.

I use pandoc + org-mode and it’s perfect. I love being able to convert my notes to LaTeX while correctly handling the inline images and math.

What's the reason to use Pandoc to convert .org files to LaTeX instead of the built-in Org Mode LaTeX exporter? Serious question - I do plenty of .org -> LaTeX like this, and never tried the Pandoc route before.

I don't think there is one, other than personal preference. It's really useful for going the other way though: -> org.

Re: Org-mode parser in Rust

#36

What sense does it make to have org mode outside of emacs? I think the entire power of the system would be that it explicitly lives within emacs. From the repo: > Org is probably the best and most complete plain text organizational system known to mankind. It has countless applications like authoring, publishing, task and time tracking, journal, blog, agenda, wiki etc... Yes, absolutely. > Unfortunately Org was origi…

> Why would this want to live outside of emacs?

It allows us to throw different use-case-optimized GUIs at a sync'ed folder of org-mode files. A clear example are the mobile apps, but there are others.

I've been using org-mode for a year, trying to replace a 5 year-old Evernote knowledge base/todo list, which itself inherited from a 12 year-old InfoSelect knowledge base.

For task management, org-mode on spacemacs complemented with beorg on mobile is proving to be the best system I've ever used.

As for the knowledge base features, however, I'm still far from being able to reproduce the speed and precision of recall that I had on InfoSelect, or even Evernote with a solid tag hierarchy. I also use Dynalist to have an outliner on mobile.

On mobile, the KB situations is even worse, since beorg is optimized for the task management use-case and does not provide proper search.

I would also love to be able to browse connections in my knowledge base, TheBrain-style, but that will always be clunky to unusable on a pure-text UI.

It would be awesome if I could get rid of Evernote and Dynalist and just point different apps at the same org file repository.

This is one reason having alternate parsers for the org markup is important.

Re: Org-mode parser in Rust

#37

Earlier quoted context omitted.

The four differences between .org and CommonMark I could spot right now is that the latter lacks metadata[0], macros[1], syntax for specifying language for inline code blocks[2], and for tables[3]. It's hard to separate .org the markup language from org-mode the application, because quite a lot of its syntax is driven by application features. TODO markers, time stamps, schedule/deadline markers, property drawers, log…

I guess these days it is better to compare GitHub Formatted Markdown, a common extension to CommonMark, as opposed to plain CommonMark. It supports code blocks with language hints, tables etc. Also, I am pretty sure Markdown with metadata (sometimes referred to as "front matter") already exists and is called MultiMarkdown, though presumably not as powerful/useful as what you describe here.

> code blocks with language hints

CommonMark also supports code blocks with language hints (using the ```lang... syntax). What Org-mode has, in addition to code blocks with language hints, is inline code with language hints, which neither CommonMark nor GFM support.

> tables

I'm horrified that, indeed, CommonMark doesn't have tables, though you're right that most people now just use GFM.

Re: Org-mode parser in Rust

#38

Earlier quoted context omitted.

The four differences between .org and CommonMark I could spot right now is that the latter lacks metadata[0], macros[1], syntax for specifying language for inline code blocks[2], and for tables[3]. It's hard to separate .org the markup language from org-mode the application, because quite a lot of its syntax is driven by application features. TODO markers, time stamps, schedule/deadline markers, property drawers, log…

Going off of table support: - org mode is at least as powerful as excel thanks to gnu cal or straight up lisp - org mode tables are nuts in the sense that you can refer to cells from your text (paragraphs, titles etc). Its neat because it means that when writting a report, you can refer to results of computations in tables - meaning that you can then change constants in the table and numbers will update in you docume…

One feature I didn't see in your list is the ability to mix any LaTeX code into the org document, enabling to get all features of LaTeX but a far more compact and simple syntax for the common cases. This is the main reason I switched from Markdown: I now can use a single file format for every kind of document, without any limitations.

Re: Org-mode parser in Rust

#39
I've been using org and org-mode for literate programming for the past few months. org-mode provides a really nice interactive environment suitable for literate programming, but tangling code is hilariously slow, to the point where several people [0] (including myself [1]), have written org tanglers. It'd be interesting to see benchmarks against the original org-mode implementation.

[0] https://github.com/orgtangle

[1] https://github.com/OrgTangle/Worgle

Re: Org-mode parser in Rust

#40
post #17

Genuinly curious: > Why reinventing the wheel when we can just copy it! This project takes the only surefire way to get it right - use the original elisp parser implementation as a blueprint! Emacs Lisp code is under GPLv3 license, is it OK to rewrite it in another language (using original code as blueprint) and publish it under MIT?

IANAL - But I think it depends on how much it is a "translation", and how much it is a reimplementation of an identical algorithm.

As I understand it copyright doesn't apply to the algorithm. It does apply to things like code organization, variable naming, and comments.

Post reply on HN