4 ms·
org-mode in emacs supports tables, and it's ASCII-based. Here's an example, displayed exactly how you would see it marked up in org-mode syntax in emacs: |-
by pmoriarty 12y ago
org-mode in emacs supports tables, and it's ASCII-based.
Here's an example, displayed exactly how you would see it marked up in org-mode syntax in emacs:
|-----+-------|
| Key | Value |
|-----+-------|
| 00 | foo |
| 01 | bar |
|-----+-------|
org-mode can export to HTML, and many other formats.
- josteink 12y agoOrg-mode is a beast. A fantastic beast, much like Emacs itself. You dive in, but there's always more to learn. Some things may be for you and some things don't. Everyone should give it a try. A little known fact, even among most org-users: Github can render org-mode files to HTML directly if checked into a repo, thus you can write your README files as org-files. Shameless example: https://github.com/josteink/csharp-mode/blob/master/README.org https://github.com/josteink/csharp-mode/blob/master/README.o... This alone was enough to make me drop Markdown as my go-to format for semi-formatted text-files. A subtle killer feature here is org-babel. You can embed proper code in your text-files and have your editor (at least Emacs) understand them as such. Which makes it excellent for writing technical documentation for projects where code is involved.
- pyre 12y ago> A little known fact, even among most org-users: Github can render > org-mode files to HTML directly if checked into a repo, thus you can > write your README files as org-files. I recently stumbled across the tidbit. The Ruby library Github uses to generate it though isn't 100% though. If you want to use org-mode properties for style customization of html output your SOL. Original project: https://github.com/bdewey/org-ruby https://github.com/bdewey/org-ruby Currently, you cannot do much to customize the conversion. The supplied textile conversion is optimized for extracting “content” from the orgfile as opposed to “metadata.” It does say that developement has moved to: https://github.com/wallyqs/org-ruby https://github.com/wallyqs/org-ruby Which has no such note, but doesn't say anything about supporting it.
- TazeTSchnitzel 12y ago>Github can render org-mode files to HTML directly if checked into a repo They also support ASCIIDoc, ReST, MediaWiki markup, Creole, etc. See: https://github.com/github/markup https://github.com/github/markup
- donniezazen 12y agoI really wish that other services would be like this. You enter text in a few popular markup languages and not one specific language.
- baddox 12y agoorg-mode tables are great, but they're only easy to type because org-mode does the dynamic resizing and border drawing for you. Markdown is supposed to be simple to type in any plain text editor.
- breuleux 12y agoYou can still have simpler table syntax that's nice to read but easier to maintain. For my own markup language (http://breuleux.net/quaint_demo/ http://breuleux.net/quaint_demo/) I implemented this syntax: + Name + Occupation | Alice | Accountant | Bob | Baker | Charles | Car salesman Headers are easier to make and the last column does not require a trailing marker. It's still some work to align columns other than the last, but that's not a requirement and I'd still much rather have a non-aligned ASCII table than nothing at all.
- baddox 12y agoYeah, the alignment of columns is a big issue. If you have 100 rows, and add another with a cell that is longer than any other cell in that column, you've got to either edit 100 rows or live with a much harder to read table.
- medgno 12y agoOr use a text editor that supports region editing. I agree with you, but this isn't a complete failing of that syntax.
- tedunangst 12y agoWhat happens when I add a new value that's "much longer"?
- pmoriarty 12y agoAt first, |-----+-------| | Key | Value | |-----+-------| | 00 | foo | | 01 | bar | |-----+-------| becomes |-----+-------| | Key | Value | |-----+-------| | 00 | foo | | 01 | bar | | 02 | much longer | |-----+-------| but as soon as I hit TAB, it turns in to: |-----+-------------| | Key | Value | |-----+-------------| | 00 | foo | | 01 | bar | | 02 | much longer | |-----+-------------| There's probably a way to make org-mode dynamically resize tables as you type, without requiring the use of TAB, but I'm not sure if that's always desirable.
- LukeShu 12y agoM-q also resizes the table; I mention this because M-q is universally "reflow whatever is under my cursor."
- tedunangst 12y agoOK. I think where I'm going is that for anyone who doesn't use emacs org-mode, ASCII tables are a major PITA to edit. I didn't know if emacs used a different underlying syntax (that markdown could borrow), but it doesn't.
- wtbob 12y agoWell, anything is a major PITA for someone who doesn't use emacs… More seriously, ASCII tables are always a major pain to edit, without the proper tools (like emacs—and I'd not be at all surprised if there's something for vim and/or Sublime Text too). That's no reason to avoid them; they are useful.
- MarcScott 12y agoI never create tables in HTML any more. If I ever want an HTML table, I create it in org-mode and export it. It's just so much faster to create what you want.