Org-Mode Is One of the Most Reasonable Markup Languages to Use for Text
karl-voit.at
karl-voit.at
: Simple pre-formatted text such as for source code.
: This also respects the line breaks. *bold* is not bold here.
This makes it annoying to cut/paste code in and out of the markup text. It's better to use a block syntax for that, like: ```
Simple pre-formatted text such as for source code.
This also respects the line breaks. *bold* is not bold here.
```Well, not that annoying because you're inside Emacs and operating on rectangles of text is a doddle. But the preferred syntax is to enclose the source code in #+BEGIN_SRC/#+END_SRC blocks anyway.
Using this method also enables neat features, such as activating the appropriate major mode for each block of text and doing literate programming.
No, I won't be. The article also stated:
> Please do note that this is not about Emacs. This is about Org-mode syntax and its advantages even when used outside of Emacs.
Sorry, but a "reasonable" markup language in my book would be one I would be comfortably using anywhere, meaning typing in manually (which I do a lot with markdown). #+BEGIN_SRC/#+END_SRC is too verbose and ':' as a line prefix impractical.
This won't see any wide-spread adoption outside of the Emacs world, markdown's adoption is widespread and is here to stay I'm afraid, even though it has tons of pitfalls and different styles. For pretty much everything, it's "good enough", and some things make a lot more sense if you're actually typing the text.
Or <s TAB (or <q TAB) will create a block.
There are also #+BEGIN_QUOTE, #+BEGIN_EXAMPLE, #+BEGIN_EXPORT and some others. They all represent blocks of special text, and have special meaning in Org Mode and/or in exports to other formats.
For instance, a source block declared through "#+BEGIN_SRC language" can have syntax highlighting enabled using appropriate language mode in Emacs, can be easily edited (C-c ') in that mode, and can be also set to automatically evaluate and print results in the document (kind of like Jupyer Notebooks, except in Emacs, but more advanced, and also supports full-blown literate programming use).
Using backquotes (as required in bitbucket) is uncomfortable with my non-English keyboard. I have to type 6 backquotes instead of 3 because backquote is a deadkey
I feel this cannot be overstated. I am finally moving from a 2009 Nokia N900 to Android only because I know I can run Emacs+org-mode in Termux on it, and I can get a hardware keyboard.
Emacs is central to the org-mode experience because all of the goodness is implemented in emacs lisp. Most everything I do with it is an extension of that (custom capture templates, todo lists and agendas, etc.) A standalone tool just wouldn't cut it for me. If I need to share something I've worked on in org-mode, I'll export or use pandoc to get it into something useful for a non-emacs user.
EDIT: I also don't find org-mode difficult to read outside of org-mode, but I'm also pretty familiar with it. It does frustrate me when I open up notepad++ or something similar to check an org-mode files and my tables don't format automatically.
Another important advantage of using block syntax is that it offers a natural uniform extension mechanism, potentially even with auto-completion for improved discoverability. For example Trac uses this for source code highlighting and plugins.[3]
[1] http://www.wikicreole.org/wiki/Creole1.0 [2] https://en.wikipedia.org/wiki/Creole_(markup) [3] https://i.imgur.com/zbkU670.gif
That kind of special casing is pretty much a deal-breaker. Other schemes (anyone ever heard of https?) will need that same deal.
Open it in it's own pane with C-c ' and you can cut and paste to your heart's content.
Sorry but this just isn't true. org-mode doesn't have the standardization problems Markdown does only because it's not as popular. As far as I know org-mode also doesn't have a standard, just an official implementation. And all the unofficial implementations suffer from bugs where they do something a little differently (https://github.com/bjonnh/PyOrgMode/issues/39 , https://github.com/hsitz/VimOrganizer/issues/78 , plenty of others in every org-mode tool that doesn't just call Emacs).
This isn't to malign any of the authors of these tools, but the reality is without an actual specification the problems are exactly the same as Markdown's - everyone is chasing subtle implementation details, not a clear goal.
IMO, org-mode only makes sense in the context of editing within Emacs. The (enormous) value isn't in the file format, which doesn't really offer anything over GFM, but in the editing tool itself - which is difficult enough to realize inside of Emacs, let alone in any other editor - and its integration with other Emacs tools.
In the same spirit, one may like or hate `*` for indicating headings (the choice is really unnatural for me, always thinking of a list).
More generally in this post I find Markdown has a pretty short learning curve, is highly readable and logical (EG. I like the number of `#` for level of headings). My biggest issue with Markdown is the different interpretations and how they're represented. Eg. Github vs. someplace else vs. Markdown-viewer apps. Org in comparison looks more concise, but less readable, IMO.
i still have to look up the format for images every time.
In plaintext you'd have a claim (and parens directing you to see the citation at citation.com).
In hypertext you'd have a [claim](and a link to citation.com).
For example, [[www.example.com]] makes sense.. it will render as www.example.com that hyperlinks to that link. But [[link description]] is useless by itself.
So.. put the more important thing first, the link:
[[www.example.com]]
Now, if you also have a description text for that link, put that afterwards.. [[www.example.com][link description]]
Hope that helps.To me putting the link first is extremely counter-intuitive, as if writing plain text I'd also be more likely to write out a description of what I'm referencing first, and then enclosing the link in parentheses.
Thankfully with Markdown that makes it easier to remember - the URL part is as it always was, and I just need to mark which part of the text makes up the description.
And the entire point of Markdown is to get something that is closer to how we write plain text.
> link_to "Text", "http://example.com"
And Markdown:
> [Text](http://example.com)
It's pretty easy to remember the order after a while.
> [The W3C recommends not using "here" or "click here" for links.](https://www.w3.org/QA/Tips/noClickHere)
According to the original vision of hypermedia, the text should be able to stand on its own and the hyperlinks are added on top of it. This keeps the link text semantic by itself without relying on the hyperlink.
this is a link [1]
[1]: <link>
would display 1 and direct you to <link>. Then inline links are just reference links but you have the location in parenthesis after the link body, as an aside.
IOW I just think about "inlining" the reference, which would have otherwise used [] everywhere. Feels much more regular that way around.
The same command works if you want to edit a link under the cursor.
Also, most people have `C-c l` bound to a function that “captures” the link from wherever you are in Emacs (e.g. a newsfeed, a document, an email, a folder) so you can easily reference those places from within Org.
Because editors with MD support tend to have shortcuts for inserting a link or image too, so this isn't really an argument in favour of either syntax.
Fraction of people who have Emacs installed. Fraction of people who use Emacs for things other than programming. Fraction of those who use org-mode.
As an Emacs user I know most of humanity is far from ignumitation. (And also have bad sense of humor)
I just announced the ox-hugo package. I love the blogging framework of Hugo, but disliked that I needed to manually take care of the post front matter and also noticed the shortcomings of writing in just Markdown. I also missed the tree-based text organization of Org mode. So this package was born.
Writing posts in Org mode gives you all the Org markup power (that's already more than Markdown), plus a lot more! like Org Babel, property inheritance, etc.
An example: I wrote this post ( https://scripter.co/notes/string-functions-nim-vs-python/ ) that's heavy with code blocks and results of evaluating those code blocks. It would be super-painful in Markdown to paste all the code blocks and also their results. In the Org source: https://gitlab.com/kaushalmodi/kaushalmodi.gitlab.io/raw/mas..., each of the #+RESULTS blocks in that Org source are auto generated using the Org Babel feature.
I elaborate more on why I use ox-hugo, or why I use Org for blogging in native Emacs environment here: https://ox-hugo.netlify.com/doc/why-ox-hugo/
Even if one is not using Emacs as their editor, as the OP mentions, the Org markup is simple enough that anyone can use their favorite editor to write in Org. To add to that, using a little Makefile, they can run Emacs in batch mode to take advantage of true Org mode features like Org Babel, etc.
For instance, one can clone the ox-hugo repo, https://github.com/kaushalmodi/ox-hugo/, and just run "make test" or "make doc" to let ox-hugo do its thing, without having anyone to know what to do after opening Emacs, what command to run, etc.
"make doc" will generate all the Markdown content needed for the entire documentation website that I linked in the very beginning of this comment, all from a single Org file.. You cannot do that in Markdown.
I also disagree with the original post to the extent that it is correct but attacks issues that are not there in practice. Yes, there are multiple versions but this is not a major issue. Most people use github flavored anyway. There is an initiative to standardize markdown by the way [0]. The fact that it is not really taken up tells me there is no big issue with having multiple markdown flavors.
Also, I prefer not leaving empty blank lines in between. Factors like that can change one's perception of readability.
Also, your markup without the blank lines and the fact that headings look like bullets to me make it harder to follow.
That's because I like that and only I am using that.
If it's a matter of team collaboration, certain ground rules can be set to resolve that.. like use blank lines after headings. You might be surprised but there's actually an Org mode setting in Emacs which can be configured to set how many blank lines to auto-insert after each heading -- I set that to zero.
> the fact that headings look like bullets to me make it harder to follow.
If you start using Org, it won't look like that. In fact, I use hyphens for list items in Markdown too as they work there too, so there is not too much context switching as I switch between Org and Markdown. I went through a lot of that as I was developing the ox-hugo package :)
Also in Org, lines starting with "# " are comments, which intuitively are comments in many languages. Markdown doesn't have comment syntax! I need to do stuff like below to fake a comment in Markdown:
[//]: # "comment"
So the "headings look like bullets issue" will wear off once you start using Org, and then you wish Markdown also did the same :)But if you do use emacs and org, there's absolutely no question that org is more readable than markdown. It's a bit like comparing Word to plaintext, they are just not the same tool.
EDIT: I guess the article could be interpreted as convincing you to switch to org so that's probably what you mean, but I sort of read it as "if you use emacs, org is better than markdown", which I can't really argue with. But if emacs is a non-starter for some people, I find pandoc is very useful for moving documents back and forth.
Sure it does, <!-- ... -->. This is also what Emacs will automatically use if you add-file-local-variable in a Markdown file, so I don't know why you're using that weird format.
There's a stronger argument to made that org-mode doesn't really have comments. As far as I can tell syntax-ppss never gives me non-nil for them. Sure, a line like "# foo" appears in a comment face, but so does a line like "#+ASDF:" or "#+BEGIN_SRC" (but not a line like "#+TITLE:"). So whether something is a "comment" depends on its contents, which means it's syntax, never really a comment.
I was thinking of native comment syntax in Markdown, which is absent. But you are right, HTML comments, like anything else HTML work fine in Markdown. So you have a valid point.
> There's a stronger argument to made that org-mode doesn't really have comments. As far as I can tell syntax-ppss never gives me non-nil for them.
Hmm, I had never checked that. That's good to know. M-x comment-dwim works though. This might be good to report as Emacs bug.
> Sure, a line like "# foo" appears in a comment face,
That's a proper comment as per Org spec. Those lines are completely ignored by Org, for any parsing or for any exporting business.
> but so does a line like "#+ASDF:" or "#+BEGIN_SRC" (but not a line like "#+TITLE:").
Because those are not comments. It's not an official term but I think of those as pseudo-comments. The "#+.." lines while looking like comments have a special meaning to Org. The meaning of those can also be exporter backend dependent.
> So whether something is a "comment" depends on its contents, which means it's syntax, never really a comment.
Yes only for #+ comments.
This is because org overrides massive amounts of Emacs default functions - in this case, in org-setup-comments-handling. org-mode doesn't really use syntax tables normally. Similar problems occur with strings. They are known issues, and unlikely to be fixed.
[1]: http://orgmode.org/worg/dev/org-syntax.html#Affiliated_keywo...
- free data (not locked by proprietary systems like Word) - ability to diff, search easily - ability to quickly refactor (biggest one for me) of not just content but markup too!
Now readability is subjective plus if you know what you are reading.
If you know Org markup, reading even raw Org will be easy. If you know Markdown, reading Markdown will be easy. If you don't know Org, you might think that the headings look like bullets. But that just because you don't know it not because if is less 'readable'.
I linked the raw Org earlier. Here is the Markdown conversion of the the same Org source: https://gitlab.com/kaushalmodi/kaushalmodi.gitlab.io/raw/mas...
To a Markdown-untrained eye, that wouldn't look too "readable".
Now of course, if you use a good editor that allows folding of headings, optional hiding of markup, coloring code blocks in the right syntax, etc, that definitely becomes more readable than raw. The same applies to Markdown.
It's basically -- Pick the right tool to make the experience more pleasant. But even if you use a wrong tool, plaintext content will allow you to get the job done. It's your choosing.
So as I mentioned earlier, "readability" is a perception, subjective to each individual. Based on their experience with plaintext, Org or Markdown "readability" can change. But the plusses of plaintext I mentioned in the very beginning stay unaffected by that.
But think again, if it's a good plaintext markup language, why would we concern about an editor anyway?
TBH the time it's being useful is when I am writing in _any_ plaintext editor. Not a great example but if I'm already used to pressing Ctrl + B for the past twenty years, why would Shift + _ suddenly make things better?
I work with a colleague who edits Org mode files in Vim just fine. But if you use Emacs to edit the same file, you get the benefits of subtree folding, syntax highlighting, etc.
You can get the same in Vim too, but someone has to develop a plugin for that.
So talking about my colleague editing Org mode in Vim, once he is done editing, he runs a Makefile that runs emacs in batch mode to run the Org exporter.
> TBH the time it's being useful is when I am writing in _any_ plaintext editor.
You still can, as I mentioned above.
The benefit of plain text is that it can be easily edited in any editor. Now emacs just adds features related to viewing (folding, syntax highlighting) and navigating on top of that. Given time and enough interest, any editor can support those features for Org mode files.
~A new search engine@https://google.com
I think considering the status of @ in the rfc this can be parsed. If a link has spaces just replace them with + or %20
On the plus side, having a simpler syntax for URLs I feel is more readable which is great for ease of use. I think ~ looks like a link, and @ makes sense semantically.
But to be sure I think the legacy syntax could remain as a fallback / alternative. New syntax is something that could be tried in a flavor.
I did my "market study" before I started investing time for this project. I have a page on ox-hugo Documentation site (the first link in my original comment) that talks in detail why I needed to have a ox-hugo: https://ox-hugo.netlify.com/doc/why-ox-hugo/
Org tables are sublime. I quite often fire up orgtbl-mode just to create tables easily in other text documents.
Writing code blocks, in a language's major mode, is amazing. Just C-c ' and you're away, complete with your emacs tool chain, which for me means I get Python syntax highlighting, autocomplete and a PEP-8 checker. Then you can use babel to present your output.
Export to html, pdf, odf works brilliantly, and I can specify a CSS sheet to style it however I want.
And lastly there's https://github.com/yjwen/org-reveal which let's me make slide decks effortlessly.
I'm currently trying to learn to use the time tracking functions better.
Emacs really is an OS. Linux is just my (current) kernel.
This is normal text^[And this is a footnote, which will be rendered as such when converting to, say, LaTeX]
I can also add citations [@likethisone, p. 12]. Pandoc will look up and format that bibtex reference for me.
Is there anything like that for Org-Mode?
org-ref[fn:2] has extensive support for for citations and is explicitly designed for scientific papers and output to LaTeX.
[fn:1] Check out http://orgmode.org/manual/Footnotes.html
[fn:2] Check out https://github.com/jkitchin/org-ref/blob/master/org-ref.org
GitHub uses this org-ruby project[1] to render Org files. If someone loves Org and knows Ruby too (I don't), please open PR's on that repo to improve Org parsing.
That's a big one for me that I've only gotten to work in online latex tools.
You can also consult Kieran Healy's guide here: http://plain-text.co (again, this targets social scientists)
I've tried doing academic writing in both org-mode and markdown. Org-mode ended up being the only one that did everything I needed.
Other than emacs, some things have very partial orgmode implementations, but they tend to be very partial, much more different to markdown implementations.
I liked it, but there were some things that really irritated me
- Exporting to other formats is not as clean cut as it first seems, especially if you use org-mode features like tags, LOG drawers etc. I always had to spend time fixing things up after the export which got annoying
- It's not very easy to move from org-mode to <insert other note taking tool here>
- Accessing your notes on other devices is a hit and miss affair, especially on Android devices
I'd say if you're interested in using it for writing blog posts etc then you'll probably experience none of these troubles, but I'd just proceed with caution first
- exporting: some lisp magic can help you here, such as automatically assigning custom properties to drawers. This isn't everyone's cup of tea, but it has helped quite a bit for me.
- pandoc supports org, which makes it trivial for my usecase. It may not be for everyone, but pandoc is very powerful.
- Have to agree with you here. I like orgzly, but it has its shortcomings. It is nice to be able to use a plaintext editor in a pinch, however. I don't have that option with most other tools.
the other small disadvantage is that text isn't really bound to headers. So headers and text just kinda float around meaninglessly. So you can't have:
* Header topic1
introductory text
* * Subheader
some descriptive text related to the subheader
more text to wrap up topic1
Exactly what is states in the article.
Asciidoc has 3 different types of headings (prefix, pre-postfix and underlined).
http://example.com[Text]
The form is simple but for complex URLs, the [Text] might look like being part of the URL itself. Not beautiful but at least something I could live with.Additionally asciidoc uses ===== for underlining headings and for delineating code blocks.
the other small disadvantage is that text isn't really bound to headers
Surely this is true of all markup languages. How you would represent this visually in a document?
An extra newline between the end of the inner part and the return to the outer part, which is what I do naturally. This can get unwieldy for breaking out of more than one level, but that's rare enough you can handle that with an alternative syntax like "--" alone to break out of two levels, "---" to break out of 3, etc.
Another possibility would be picking up ASCII SI/SO again. (Emacs already makes extensive use of FF.)
Not to be snarky, but the ML in XML and HTML stands for markup language..
I'd like my markup to be easy to read and also to map to a tree hierarchy. This seems essential for parsing and anything related to literate programming and reusing "blocks"
Like when I drop in a org mode clock (for logging time in my work logbook), without a tree hierarchy I have no means of binding the time to my description of the work I did. I mean... I see in visually, but its not programmatically linked as an attribute of that text block.
You can kinda get around with pepperin headers everywhere, but it's not as flexible
- supported in GitHub: README.org
- ipython integration allows full code execution to generate inline plots by executing the code in the document.
- many other features too numerous to mention; it’s the truly ancient granddaddy of markup, developed over decades.
Of course, this is not restricted to iPython/Jupyter. Babel allows you to execute code in many languages inline, without running a full Jupyter instance/kernel:
http://orgmode.org/worg/org-contrib/babel/
You can also generate inline plots with Babel. Let the code snippet generate an image, return the file name from the block, and set the result type to file.
* Heading
Euler's identity: \(e^{i\pi} + 1 = 0\)
Then <C-c><C-e>lp to export to PDF and I have a neatly formatted document with properly rendered math. This is a lot easier than taking notes in LaTeX, and I can use any LaTeX packages. The ability to embed and execute source code makes it very easy for literate programming. Exporting to HTML or ODT is also possible.I won't criticize Markdown (or anything) for failing to achieve what it doesn't attempt, but as a programmer I consider any format with fixed semantics to be, as Bret Victor might say, "dead fish." I know XML has a bad rap (for good reasons), but at least they were trying to be extensible!
From https://daringfireball.net/projects/markdown/syntax
> For any markup that is not covered by Markdown’s syntax, you simply use HTML itself. There’s no need to preface it or delimit it to indicate that you’re switching from Markdown to HTML; you just use the tags.
> The only restrictions are that block-level HTML elements — e.g. <div>, <table>, <pre>, <p>, etc. — must be separated from surrounding content by blank lines, and the start and end tags of the block should not be indented with tabs or spaces. Markdown is smart enough not to add extra (unwanted) <p> tags around HTML block-level tags.
(That said, I do miss the reStructuredText comments sometimes in Markdown, but partly because the syntax was so simple.)
+ Easy to read
+ Good support in major text editors
• Started in the emacs world
• Been around since 2003
- Would put a strikethrough all the advantages above because they use the + symbol.
No, it wouldn't. `+` is a valid list bullet in Org-mode. For strikethrough, the plus-signs must be attached to the start and end of the words (`+an example+`).
+88673630588+63377
i.e. -strikethough-
This is something I've never liked about org-mode. Markdown was designed to be authored in existing tools, so its conversion of ASCII to Unicode quotes makes some sense. But Org is defined by its Emacs implementation, and Emacs has always had electrified punctuation support. There's no reason to export -- as –, and therefore need to deal with escapes, etc., when you can make -- insert – and export literally.
The fancier the editor, the fewer special syntaxes you should need in the format.
I'm not sure I understand that. You need to customize the export behavior because everyone doesn't prefer the exact same thing. While you prefer not to auto-convert to en/em-dashes, I prefer that. So having options (what you refer to as balkanization) is good.
> Comparisons to the minor incompatibilities of Markdown parsers is laughable
Didn't follow that. What incompatibility is this in reference to? Which parser? Of which flavor of Markdown?
> when the solution to concerns about the format is "customize your local Emacs."
How else would every user get their export behavior unless customizability is added? Taking the same example as yours, I am glad that "--" does the job of "–" or "–".
I know of one Markdown parser (Blackfriday) that adds a similar en-dash/em-dash conversation like Org exporter (and is enabled by default in Hugo). So the customization is needed by a sizeable number of people.
In the end, it's alright if you don't prefer Org mode or like the option to have options. I presented the ox-hugo package for folks who like blogging using Hugo, but don't want the leave the comforts of Org mode. I am not enforcing Org mode on anyone.
Org-mode is an amazing tool and I use that tool every day. But to the extent there's an org format, it's not very good, and it's less interoperable than Markdown (the interoperability problems of Markdown are cited by the author as a major reason to avoid it).
I didn't write anything about ox-hugo or Hugo, and I don't know why you brought up either.
Main problem (as I note in another message) is lack of feature parity in non-Emacs implementations and lack of quality html renderers outside of Emacs.
Be human-readable, for starters.
For me the org-mode syntax is more logical than Markdown—and I can have cross references.
If you put a Markdown document and an Org document implementing only what Markdown can, there's no readability difference between the two as I know both markup style fairly well.
Some markdowns have some nice features:
- Fenced code blocks, which I would prefer to prefixing with colons (update: oh I guess org-mode has an equivalent! good)
- Footnote support
- Definition list support (<dl><dt></dt><dd></dd></dl>)
Additionally, it should be noted that Markdown allows usage of any HTML you want and it will be passed through. In practice this is often sanitized or escaped, but not always. On GitHub, for example, you are perfectly free to use <sup>, <detail><summary>, and so on.
Update Nice, Org-Mode does all that? Then that is a strong advantage over Markdown, where you never know which parts of which flavor will work on what site. (Heck, we can’t even get GitHub and StackOverflow to treat code blocks similarly.)
some text [fn:1]
[fn:1] this is where the footnote text goes
The one thing that I find weird is that if you convert to HTML using pandoc, those appear after an <hr>, but in the org mode itself, they'll appear as children of the previous sub-heading. #+begin_src c
printf("%d", 1);
#+end_src
it has both named and unnamed footnotes [1]. You can use '::' in a list item to create a description list, like so: + coffee :: a dark, bitter, stimulating beverage
+ tea :: a beverage with effects similar to but milder than coffee
+ beer :: an alcoholic drink made from grains
[1]: http://orgmode.org/manual/Footnotes.html #+BEGIN_SRC
#+END_SRC
The cursor is left at the end of the first line where one presumably types the word python or c or shell or whatever language you'd like the code block to be treated as.Once editing the code block, typing C-' takes you to a dedicated editing pane that runs in an emacs major mode most appropriate for the language being edited, with full Emacs programming language support. It's really painless, other than learning Emacs first, (LOL, but honestly really worth it).
#+BEGIN_SRC |
#+END_SRC
with the cursor placed to specify a language.As for readability, I don't think it's clear at all that ```...``` beats
#+BEGIN_SRC perl
...
#+END_SRC
* * *As it turns out, I hadn't refreshed the page for hours, and someone else said pretty much the same five hours before.
But other than that, it really does look great.
#+BEGIN_SRC bash
$ echo Hello, World!
#+END_SRC
That will also give you syntax highlighting, and allow you to edit it as a bash script (in Emacs, at least).I don't remember it off the top of my head, but there's also a similar syntax to include a file directly, instead of duplicating it in the org file.
I guess this is also said to be true for other format like markdown, but at least format like HTML doesn't have that problem...
テスト*テスト*テスト
テスト_テスト_テスト
テスト[[http://orgmode.org/][テスト]]テスト
Back when I actually have been using org-mode extensively (loved ID based document linking, Calendar file export, etc.) just I couldn't use it for anything that involves Japanese text which was 1/3 of things I had to deal with.
I've actually tried suggesting on a developer's list for possibility of "negative" space where it can denote "space, but not quite space" which wasn't received well..> Holy moly. This is some weird stuff. First, you have to grave accents ` and not apostrophes '.
Because grave accents are rarely used on their own, and they were thus picked as rst's "meta-character" for roles (inline extensions). Apostrophes would be significantly more problematic.
> Then what about the underscore character at the end?
The underscore is actually how links are marked. The "core" form of external links is this:
Text_
and at the bottom of the document would be .. _Text: http://example.com/
that way any instance of "Text" can be hyperlinked at little expense. Multi-word labels are simply wrapped in backticks: `This is text`_
.. _This is text: <link here>
The inline form is provided as "a convenience at the expense of readability" using the generic role syntax: :role:`label <id>`
where for hyperlinks `:role:` becomes an underscore postfix.> This is as complicated as you can define a simple URL. I'd even prefer the hard to type HTML version of linking. A disaster for something which has "lightweight" in its class name.
rST was designed as a lightweight markup for documents, hence its support for footnotes, citations, substitutions, document fields and built-in extensions hooks (roles and directives). The "inline external hyperlink" use case wasn't much of a focus.
As a criticism of rST as a lightweight markup, title denotation is probably a much better target, they look OK in plain text but are a chore to write and maintain, even with editor help.
And they require a combination of two keys, pressed twice, on international keyboards.
[Shift]+['], [Shift]+['] gives you `
If you want ```, you gotta press [Shift]+['], [Shift]+['], [Shift]+['], [Shift]+['], [Shift]+['], [Shift]+[']
If your language, or any of your software, ever uses grave accents, it’s dead to me. I’m not going to do twelve key presses to mark something up
For example, multiline or highlighted code in GitHub’s markdown is ```java blablabla```. That’s [Shift]+['] [Shift]+['] [Shift]+['] [Shift]+['] [Shift]+['] [Shift]+['] [j] [a] [v] [a] [Space] (...) [Shift]+['] [Shift]+['] [Shift]+['] [Shift]+['] [Shift]+['] [Shift]+[']
If you use X11 (at least on Linux), and have a useless key in your layout, try to find its keycode from the output of "xmodmap -pke". If you want to enter the backtick without a modifier key, it should be the first symbol after the equals sign. Replace that symbol with "grave" and feed the whole line to "xmodmap -" (or, if you prefer, "xmodmap -e 'keycode XX = grave ...'").
This is not ideal, but I think preferable to flogging all those dead keys :)
I have no idea how to achieve the same on Windows or Mac; I suppose they have more user friendly mechanisms to remap keys.
So I avoid anything that relies on it.
It's a single keypress on US and UK QWERTY or Apple US-International, it's probably two keypresses on most european keyboards.
> If you want ```
In rST? Why would you want that?
> If your language, or any of your software, ever uses grave accents, it’s dead to me.
At least you get easier language choices: no bash or Z shells, no D, no Go, no Haskell, no ES6, no OCaml, no F#.
> For example, multiline or highlighted code in GitHub’s markdown
My comment is about reStructuredText, and specifically the inline external link syntax. If you want to complain about Markdown syntax may I suggest one of the markdown subthreads instead?
This is the German layout, it’s used by over 150 million people worldwide. It’s on shift-', and it’s a deadkey for using it as accent.
> At least you get easier language choices: no bash or Z shells, no D, no Go, no Haskell, no ES6, no OCaml, no F#.
In bash and ZSH I simply use other solutions for the same purpose like $() and co, and when I need it in Go or Haskell I simply have ` in my clipboard, and I don’t use the rest.
> My comment is about reStructuredText, and specifically the inline external link syntax. If you want to complain about Markdown syntax may I suggest one of the markdown subthreads instead?
Well, I’m saying this is an issue with both of them.
Perhaps a public shaming will help me remember this time.
Edit: Images are inlined with a link-style syntax.
[[file:myimg.jpg]]I use Markdown and just start to peek into Asciidoc.
But it is centrally dependent on emacs for that power. Markdown and asciidoc work in anything.
Otherwise I mostly program, admin or devops around. Bash, git, vim, grep, awk, tmux, ssh are the tools I use most. Nowadays also a quite a lot of Ansible. But don't like it as much.
You know, I spent nearly 10 years really learning all that stuff with the intention to use it the rest of my life. And to this point it seems to work out quite well. So no reason to learn other tools like Emacs, which would take up another few years to learn. Once you have a basic set of tools down it's more important to use it for value production.
Do you know Powershell? It feels similar to me. You interact with objects instead of strings. That's also why string manipulation tools don't feel so great with org mode files. You cannot grab an org mode object as easily as a line or a paragraph with tools optimized for string manipulation.
For example, the ability to search a file or set of files and collect responsive org heading items in a separate "Agenda" buffer is hugely empowering for a lot of different uses. Org-mode on emacs has both very broad and very deep functionality.
It's not necessarily easy to learn, but you can ignore the more complicated stuff if you want, just use the very simple basics and remain ignorant of the much deeper functionality that's there for people who want to make use of it. Or, better, start simple and learn more complex bits and pieces as you go; there's an active and friendly org community that helps with that.
And, of course, like someone mentioned, being able to interact with your document almost like it's a proper data set that you can manipulate programatically.
Eventually, I was looking for a TODO app and realised the Org mode gave me everything I was looking for -- and Emacs was a dramatically better UI than any other TODO app that I looked at. This got me back to Emacs (now enhanced with Evil mode which works remarkably well).
The interesting thing is that I've completely switched back to Org mode for notes. I don't even use any of the org mode features in Emacs when I'm writing. As the author of the article says, I just find it a more convenient text markup language. Sometimes I'll update org mode documents in Vim and I don't even really realise that I'm doing it because all I really want is structured documentation with folding.
However, I think for org mode to become mainstream you have to get another editor with some feature parity to Emacs. Tables are a killer feature of Org mode in Emacs. Another thing that I think is needed is better renderers outside of Emacs. Github has an orgmode renderer and it is not very good at all. I have a colleague that does all his project planning in Org mode (highly recommend, by the way) and he converts his documents to github flavoured markdown before pushing them -- which is crazy.
I'd love to see this format gain some more traction...
One thing I love with org mode is how dynamic the document is. Inserting [/] or [%] to get updated task count/percentage as TODO underneath the header is fantastic.
For what it's worth, I found vimwiki pretty good for personal organisation/journalling.
Personally, I have found both editors too difficult to customize since I stopped using qwerty. There are just too many default keybindings. Emacs modes all map the same keys, and remapping vim has too many edge cases.
0: https://github.com/jimhester/dotfiles/blob/master/colemak/vi...
So I `nnoremap`ed them all, but I still have a couple of issues.
The first problem with remapping keys is that you have to remap each key again for every key that can come after the first key, i.e. to move `cw` to a different key, you have to remap `c`, and `w`. Now consider commands like `qa4caw`, and you can see it gets really hairy, really fast.
The second problem I have with remapping keys is that my qwerty `h` key is replaced with `y` in my layout, and remapping y adds a strange pause, and prevents the next command from working correctly. `w` has the same issue.
Emacs with evil-mode had a slightly better solution: I could my real layout in normal-mode, and have Emacs emulate another layout in insert-mode. Still, I would have to use qwerty as my real layout to get that to work, so it's only slightly more convenient.
Long story short: I used normal Emacs for a while since I didn't have strong muscle-memory, and the layout I use is pretty comfortable with default Emacs bindings. Emacs as an editor is quite nice anyway. Out of a mix of frustration and interest, I am working on a new editor with a more purposefully modular design, so I don't have to rely on workarounds. One of my main goals is to have "defaults" separated into separate modules rather than baked-in.
For those wondering, the layout I use is workman[0]
I never remapped anything, I just avoid h/j/k/l (I have my arrow keys bound to the homerow) and added a bunch of bindings (F3-8, for example) that wouldn't normally be of much use to me (sitting behind the fn key on my laptop) but are also homerow-accessible.
I have transitioned to emacs + evil lately, and found that mostly seamless, but I can imagine it would have been rough if I was trying to keep QWERTY muscle memory.
> Even worse than this is the underlined heading category.
I think its the best. Compared to the prefix style it actually looks like a headline in the text document.
> The user is completely irritated for multiple reasons. Besides the tedious manual work to align the stupid heading characters with the heading title
What is tedious on typing <esc>yyp <shift>-v r # to underline current line with #?
> it is not clear what characters must be used for those heading lines. If you've got a bigger document with different levels of headings you get confused which heading character stands for which heading level.
Using a convention where bigger headlines use bigger looking characters works for me.
H1 uses # and is both under and overlined, the rest is only underlined
H2 uses #
H3 uses =
H4 uses -> What is tedious on typing <esc>yyp <shift>-v r # to underline current line with #?
Also, there is the "easy" approach where you just fill the line instead (insert 72 #s or =s or whichever on under/over-lines). reStructuredText has a minimum fill size for a header, but not a maximum fill size.
I've drafted documents that way and then trimmed the lines down to fit the headers as a last step once they have stabilized.
You can easily say "this line is kind of header" but it is not human readable as it all happens inside source code editor having monospaced fonts like in this very widget I am typing the message on HN site.
Plain text blocks is plain pain in markdowns. Web platform has no concept of tabs - counting whitespaces for each line... And tables ... like 20 years ago we were doing with pseudo-graphic symbols - formatting nightmare.
That's why I've introduced "magic sequences" : https://notes.sciter.com/2017/09/09/magic-sequences-a-la-mar... - the best of two worlds - WYSIWYG but with Markdown typing twist.
Generally though, you don't need the table or graph to be "readable" if you're the one constructing the content for others to consume, since you've already modeled the structure of the content within your head. Those -item1, -item2, --subitem1 demarcations are already internalized in your head. (Though, if we're talking about a platform for capturing data/mind-mapping/outlining/note-taking, this may not be entirely true, I admit.)
Even Adobe opts for a non-WYSIWYG DITA/SGML for their professional content management systems if only because publishing a book or magazine becomes a editorial nightmare. (In publishing, they have separations of controls just like we have separations of concerns. Our graphics and front-end guys have control over the .css and what-have-you, while our data guys will have control of the schema, and our app guys will have control of the binary; likewise, they'll have someone in charge of typesetting, someone who performs the layout management so the interstitial ads look consistent within your magazines theme or whatever, someone generating the content, and then an editor who finally signs off on it.[3]) Now that I think about it, a magazine has many source-control-management problems quite similar to what we have.
Magic sequences are pretty brilliant, I'll give you that. If it 'degrades gracefully' (i.e., when copied into a standard instance of notepad.exe or Nano, it's still grokable), that hybrid solution might be the closest panacea we have. Keep on working on that project, it has tons of interesting, orthogonal avenues to explore[4]
=====
[1] https://github.com/knsv/mermaid
[2] https://www.amazon.com/3DX-700040-3Dconnexion-SpaceMouse-Pro... Pretty much the paragon of HIDs for CAD, in my limited use. For the last 10% of touchups it's second to none, but at the project level it's still slower than using the LISP derivative once you build up a sufficient set of macros.
[3] https://en.wikipedia.org/wiki/Desktop_publishing ArborText and Framemaker Server are the two industry standards at least in my experience.
[4] I.e., take say, chemists who want to share their findings with people in their dept. Being able to design their own markup for Lewis diagrams, multiple representations of orbitals, degenerates states, etc -- then have them real time render the observed values -> a generated chart rendered in a consistent theme (a la Jupyter Notebook, but..better...) I'd imagine would be quite powerful.
Given HTML/CSS as input you can render it precisely (produce pixels on the screen). Mathematically speaking, the task of rendering is determined.
But WYSIWYG editing essentially is an opposite task: by given/desired set of pixels to synthesize HTML/CSS structure. And that task is not determined - different HTML/CSS constructs can produce the same set of pixels. That's why there are no acceptable/usable "WYSIWYG web site editors" - WYSIWYG is feasible only on reduced scope -limited set of HTML/CSS constructs that you can use to achieve 1:1 source/rendering ratio.
And that is what Markdown is all about, again, mathematically speaking - its rendering is in 1:1 relationship with its source.
I am experimenting with Markdown too: https://notes.sciter.com/2017/09/24/markdown/
but it is far from ideal either.
As any tool it is good for its purpose. De facto it is a DSL (domain specific language) in the same way as Markdown or Emacs editing system in general.
It works if creation of graphs is what you do for living. But for occasional usage (say once in a quarter or year) people usually prefer Visio - you do not need to keep in mind (limited resource) mermaid syntax - just do drag and drop - actions common to all WYSYWYG systems.
Even with Markdown - each site has its own conventions - that's why occasional users prefer WYSIWYG if it is available.
Also, when used in Emacs or with otherwise proper editor support, the WYSIWYG aspect is moot.
But again all this is about additional tools. Main goal of Markdown & friends is to achieve at least some WYSIWYG when the only editor that you have is <textarea>.
https://www.youtube.com/watch?v=fTJVLJd_gz0
Jump to 2:20 where the table editing starts. Just wow.
HTML is readable in pure text but it does not look that great.
Markdown and restructured text are both easier than HTML for common things, but markdown falls on its face for complicated things and rST ends up devolving into a bunch of directives that are just marginally better than HTML.
- foo
Is the same as writing: <node type="list-item">foo</node>
It can be parsed identically. If you just parse it into a hash table, like {type: "list-item", value: "foo"}, then all of this becomes a non-issue. It's an intermediate format, so you can take that hash table and write it out as either of the above. You could even transpile org text into HTML and vice-versa.The <ul> tag has one great benefit: you know exactly where the list ends, namely at the </ul> tag. Your pointy-haired boss wants a list 5 levels deep where the second paragraph of item 2.4.1 needs to be at the third level of indentation, but the second paragraph of 3.1.6 needs to be indented only twice because it belongs to the 3.1 item? With opening and closing tags you make the tree structure explicit. Edge cases like this are exactly why there are six flavours of markdown (that and egoism on its creators' part) and in some of them, getting the indentation exactly as required doesn't seem to be possible at all without chucking in HTML tags.
FWIW Emacs solves this with text properties. You can attach a property list to any arbitrary character.
For better or worse, org mode has no such equivalent.
Like, if I write
Heading 1:
Heading 10:
...
Heading 11:
Heading 110:
...
Heading 111:
...
I can easily navigate a huge tree by using code folding to hide subsections. If heading levels are instead given by number of leading `*`s, then the editor really needs to be aware of the language.(Also, backtricks are really easy to type, I see no reason to replace them with other weird characters.)
For example, https://tensorflight.com/tutorial is written in org and exported to HTML via theme https://github.com/fniessen/org-html-themes . People in the team were suggesting moving it to google docs.
Wiki engine based on this markup: https://amusewiki.org/
The reason Markdown has so many versions is because it's been so successful and is used by so many different tools and in many different contexts. I guarantee if Org-mode became a "standard" markup language outside of Emacs that it, too, would sprout different versions.
While dialects probably would have sprouted they probably all would have supported the same core, at least, and there quite likely would be fewer of them.
The only way I've used org-mode is the canonical Emacs implementation, which (at the time) was reason enough for some people to take up learning Emacs.
As a long term markdown user I also don't think "reasonable" is a relevant criterion. Markdown definitely is not reasonable but it's useful.
Author criticises table in other formats. But look at the table, much time taken.
My markup language is the language with small effort to display what I want.
and it makes a table. I can navigate it using the tab button, it will expand columns automatically as text gets longer. It can even do some basic spreadsheet functions if you need that.
Here's a video that covers it in some depth
Not really, in org-mode, you can compute columns using expressions (like in a spreadsheet) [1]. Moreover, you can feed a table to an (executable) source code block and/or you can store the output of a source code block to a table.
Just to give an example why this could be useful: suppose that you have a code snippet that produces some statistics. You can execute this snippet directly in the org-mode document and have the result in an org table. Then, you could execute another code snippet (e.g. using R) that uses the table as the input and produces a graph that is embedded inline in your org document. In GUI Emacs, you can even preview the resulting graph.
My primary criticism is that the value of org-mode documents decreases enormously outside Emacs.
[1] http://orgmode.org/worg/org-tutorials/org-spreadsheet-intro....
[1] https://github.com/skeeto/skewer-mode [2] And even then, modern cell phones have quad-core 1ghz ARMs on them. I was using org-mode with a P3 600, I'm sure modern phones + a Bluetooth keyboard would be sufficient to run emacs, or at least SSH + emacsclient.
Definitely, that's what I meant. I share org stuff with ox-html or ox-latex. But colleagues cannot really use my org documents unless they are on Emacs.