News for hackers. Stuff that matters.
Re:Org-Mode Is One of the Most Reasonable Markup Languages t... by JonAtkinson on Wednesday April 10, 2019 @03:47AM (#19622664)
The authors argument that Markdown should be discarded because there are several competing implementations isn't valid.

For many years (even now), we have several competing implementations of HTML, yet the HTML document is the dominant presentational document format (and UI layout language). It hasn't done anything to hurt adoption.

The fact that Markdown does have a common subset of features, and that Markdown is widely interoperable with a vast amount of products is why it wins. As far as I can tell Org-Mode markup is used within Emacs and really nowhere else.

Re:Org-Mode Is One of the Most Reasonable Markup Languages t... by mort96 on Wednesday April 10, 2019 @04:56AM (#19622950)
The argument isn't that Markdown is bad because there are competing implementations. The argument is that Markdown is bad because there is no standard for those implementations to adhere to, so they end up being wildly incompatible. With HTML, there will be browser differences, but there's a pretty well-defined standard which browsers try to adhere to; there will be bugs, but at least you can know you're writing standards-compliant HTML, and then work around particular browser engines as necessary.

You say Markdown has a common set of features, but what is that common set? There's no standard, and I find myself surprisingly frequently struggle with figuring out what's the correct way in a particular markdown engine to do what I need to do.

An example is that in Reddit's markdown; this text:

    ```
    if (true) {
        console.log("hi");
    }
    ```
will all end up as inline code, with all the newlines and extra whitespace stripped out. The correct way to do it in Reddit's markdown is to hit the space bar (n+1)*4 times before each line, where n is the indentation level. Some (but presumably not all) other markdown engines would render it as a code block.

Markdown engines are also wildly inconsistent about when they treat something as a link, and whether they require a blank line between a paragraph and code blocks or lists.

They seem to mostly agree about how explicit links and bold and emphasis and headings work though, so if that's your consistent common set of features, I suppose you're right.

Re:Org-Mode Is One of the Most Reasonable Markup Languages t... by cfv on Wednesday April 10, 2019 @07:08AM (#19623497)
Commonmark (https://commonmark.org) exists, has a fairly well defined standard, and the reference implementations are not hard to reason about. They are part of several thousands of larger codebases right now, too.

Org-mode on the other hand is basically an emacs thing that has never been seen in the wild outside maybe as a pandoc input? Which is coincidentally another tool I almost never actually use by itself. And I have literally no idea how ota reference implementation works or on which languages could I embed it and how.

I'm pretty sure my experience isn't that rare too.

Re:Org-Mode Is One of the Most Reasonable Markup Languages t... by AlexCoventry on Wednesday April 10, 2019 @09:32AM (#19624426)
> an emacs thing that has never been seen in the wild outside maybe as a pandoc input

There are a couple of vim plugins. I don't know whether they're any good.

https://www.reddit.com/r/vim/comments/4ms4z0/org_mode_which_...

Re:Org-Mode Is One of the Most Reasonable Markup Languages t... by bachmeier on Wednesday April 10, 2019 @03:42PM (#19628080)
> Commonmark (https://commonmark.org) exists, has a fairly well defined standard

Commonmark didn't really accomplish much in terms of standardization. The problem is that they didn't take seriously comments that they didn't support everything they needed to support in order for it to be a standard. The most prominent example is support for math, which is extremely common. That wouldn't be so bad if there were support to escape processing, but they weren't willing to support that either.

The response is to tell anyone that they need to look for an implementation with the proper extensions for equations or whatever you might need that's not currently supported. There's not much to be gained from having a standard if it doesn't ensure document compatibility among competing implementations. Commonmark is nothing but yet another version of markdown.

Re:Org-Mode Is One of the Most Reasonable Markup Languages t... by inlineint on Wednesday April 10, 2019 @05:02AM (#19622988)
> You say Markdown has a common set of features, but what is that common set? There's no standard, and I find myself surprisingly frequently struggle with figuring out what's the correct way in a particular markdown engine to do what I need to do.

There is CommonMark specification: https://commonmark.org.

Re:Org-Mode Is One of the Most Reasonable Markup Languages t... by mort96 on Wednesday April 10, 2019 @05:07AM (#19623011)
Yeah, CommonMark is awesome, and if the argument was about CommonMark and not Markdown in general, I'd be on the other side of the argument. However, most Markdown renderers don't implement CommonMark.
Re:Org-Mode Is One of the Most Reasonable Markup Languages t... by pitaj on Wednesday April 10, 2019 @11:46AM (#19625828)
Many of the most popular markdown renderers do implement CommonMark, though.
Re:Org-Mode Is One of the Most Reasonable Markup Languages t... by uranusjr on Wednesday April 10, 2019 @05:59AM (#19623210)
> The argument is that Markdown is bad because there is no standard for those implementations to adhere to, so they end up being wildly incompatible.

This argument is valid, but…

> An example is that in Reddit's markdown; this text: [snipped] will all end up as inline code, with all the newlines and extra whitespace stripped out.

This does not validate the argument. Implementations defer to John Gruber’s Markdown Syntax Documentation.[1] It is insufficient to be used as a standard (hence your argument being valid), but does (in some cases) provide a common subset of features compatible everywhere. The “fenced” code block is not included in Gruber’s original Markdown, but became so popular due to GitHub that people come to expect it. It is still not part of “Standard Markdown” though.

[1]: https://daringfireball.net/projects/markdown/syntax

Re:Org-Mode Is One of the Most Reasonable Markup Languages t... by lucideer on Wednesday April 10, 2019 @06:18AM (#19623278)
Furthermore, GFM* has fast become a defacto standard for newer implementations—still a bit of incompatibility, but improving.

* GFM = Github Flavoured Markdown, even if Gitlab have very cheekily taken on the same initialism for their (in fairness, highly compatible) flavour.

Re:Org-Mode Is One of the Most Reasonable Markup Languages t... by xemdetia on Wednesday April 10, 2019 @12:29PM (#19626287)
Has anyone found a good GFM to HTML converter that does not call out to a SaaS service (often GitHub)? I keep ending up in use cases where I need to do this conversion or do a live preview without having the data leave the box. When I was looking around previously I found out that under the hood they were using the GitHub API to actually do the preview.
Re:Org-Mode Is One of the Most Reasonable Markup Languages t... by theandrewbailey on Wednesday April 10, 2019 @02:42PM (#19627572)
I've used marked for years, and it doesn't make any network calls. In fact, it looks like it does tons of regex.

https://github.com/markedjs/marked

Re:Org-Mode Is One of the Most Reasonable Markup Languages t... by tokyodude on Wednesday April 10, 2019 @06:12AM (#19623260)
there are lots of other issues. AFAICT HTML is allowed inline in markdown but the flowing inline HTML is interpretted differently depending on implementation

    some markdown text

    <div>
      some
      **inline**
      text
    </div>

    some more markdown text
some will take that as one block. some will process each line separately. some will convert the asterisks ...
Re:Org-Mode Is One of the Most Reasonable Markup Languages t... by laumars on Wednesday April 10, 2019 @08:02AM (#19623766)
HTML inlined into markdown is easily my least favourite feature of markdown. In my opinion it breaks the very point of of MD (namely that it's formatting makes as much sense in a graphical render as it does in a plain text editor).
Re:Org-Mode Is One of the Most Reasonable Markup Languages t... by 0xbadcafebee on Wednesday April 10, 2019 @07:59AM (#19623749)
If Org-mode became widespread, it too would suffer from different implementations.
Re:Org-Mode Is One of the Most Reasonable Markup Languages t... by localhostdotdev on Wednesday April 10, 2019 @05:18AM (#19623047)
reddit's code formatting is its own story, it supports both 4 spaces and triple backticks (but only on redesign web).

> On redesign, a slightly-edited version of CommonMark. On old reddit, it's still snudown.

(and mobile apps have their own markdown)

> New Reddit note: Indented code blocks are the only form of code block that works on Old Reddit. Use them for compatibility

https://www.reddit.com/wiki/markdown#wiki_code_blocks_and_in...

maybe in a few years there is going to be syntax highlighting, one can hope :) (slack doesn't have it either, but even discord has it...)

Re:Org-Mode Is One of the Most Reasonable Markup Languages t... by curioussavage on Wednesday April 10, 2019 @12:33PM (#19626330)
I did some investigation into this recently. My hope is to make at least new reddit support it this year. Can't promise anything about old.reddit.com though
Re:Org-Mode Is One of the Most Reasonable Markup Languages t... by davemp on Wednesday April 10, 2019 @09:18AM (#19624318)
It doesn't help that there's no unambiguous CFG for Markdown. Any new implementation is more or less on their own with many using odd tricks to get around the inherent ambiguity.
Re:Org-Mode Is One of the Most Reasonable Markup Languages t... by simonh on Wednesday April 10, 2019 @04:41AM (#19622880)
It's arguable that the fact that there are multiple implementations is itself a sign of success. If Org-Mode was to become widely adopted, it's pretty much inevitable it would get multiple implementations too.
Re:Org-Mode Is One of the Most Reasonable Markup Languages t... by mgoetzke on Wednesday April 10, 2019 @06:39AM (#19623383)
indeed it is. When something is used by a lot of people, they will find use cases not covered sufficiently and will try to extend. Some of these will survive and be absorbed back, some will not. Normal evolutionary pressure at work.
Re:Org-Mode Is One of the Most Reasonable Markup Languages t... by simias on Wednesday April 10, 2019 @07:20AM (#19623563)
HTML has a lock-in because it's supported by web browsers directly, exactly like JS. I have a profound dislike for anything SGML-related but what can I do? Display my website as a PDF? At best I can transpile an other format into HTML.

HTML and JS have succeeded in spite of their clunkiness, not because of it.

Markdown on the other hand has no such lock-in, mainly because it usually gets transpiled into HTML or other formats. Replacing it is a lot easier and can be done incrementally without client support.

Re:Org-Mode Is One of the Most Reasonable Markup Languages t... by mannykannot on Wednesday April 10, 2019 @08:00AM (#19623752)
The several competing implementations of HTML are not a feature, they are a complication we have to deal with. This has not hurt adoption because of the nature of the marketplace.

The 'number of implementations' issue with org-mode is that there are almost no implementations outside of Emacs. Standardization by obscurity is not a very compelling virtue, and the opportunity for widespread adoption has passed.

Re:Org-Mode Is One of the Most Reasonable Markup Languages t... by tamrix on Wednesday April 10, 2019 @04:05AM (#19622736)
And so soon we'll get org-mode to markdown transpilers.
Re:Org-Mode Is One of the Most Reasonable Markup Languages t... by mickael-kerjean on Wednesday April 10, 2019 @04:16AM (#19622773)
We've been having it since quite a few years, it's called export and it looks like this:

- original org: https://demo.filestash.app/api/export/hnorg/text/org/emacs.o...

- markdown: https://demo.filestash.app/api/export/hnorg/text/markdown/em...

- html: https://demo.filestash.app/api/export/hnorg/text/html/emacs....

- pdf: https://demo.filestash.app/api/export/hnorg/application/pdf/...

- more fancy plain text: https://demo.filestash.app/api/export/hnorg/text/plain/emacs...

there's more builtin and with plugin you can say extend the github markdown to cope with jekyll, hugo, ...etc

Re:Org-Mode Is One of the Most Reasonable Markup Languages t... by joaomsa on Wednesday April 10, 2019 @04:33AM (#19622849)
This looks really nice, do you have plans to implement text search of note contents? No matter how methodical I get with tags and hierarchies, nothing beats search for recall.
Re:Org-Mode Is One of the Most Reasonable Markup Languages t... by mickael-kerjean on Wednesday April 10, 2019 @04:45AM (#19622894)
It's the feature I'm working on as we speak :)
Re:Org-Mode Is One of the Most Reasonable Markup Languages t... by mickael-kerjean on Tuesday April 16, 2019 @10:37AM (#19673959)
The search has landed :)
Re:Org-Mode Is One of the Most Reasonable Markup Languages t... by joseph8th on Wednesday April 10, 2019 @03:46PM (#19628118)
Very cool.
Re:Org-Mode Is One of the Most Reasonable Markup Languages t... by aepiepaey on Wednesday April 10, 2019 @07:44AM (#19623669)

    pandoc -f org -t markdown <file>