Live data from Hacker News

Emacs 31: An unofficial guide to Markdown-ts-mode

rahuljuliato.com

21–30 of 92 posts

Re: Emacs 31: An unofficial guide to Markdown-ts-mode

#21
post #11

One of the biggest reason I've stopped using Emacs, and I was a pretty heavy user before was that org-mode files weren't fully native Markdown files, which caused annoying friction when collaborating with others. It would be interesting for me to have a new markdown-centric org-mode thing. I'd love to vibe lisp to customize my workflows, and I don't totally love Obsidian, which is what I've setup and configured now.…

I use markdown and nvim with telekasten plugin on desktop and mobile obsidian and for me is good enough

Re: Emacs 31: An unofficial guide to Markdown-ts-mode

#22
post #20
post #13

Earlier quoted context omitted.

Yeup, I would love to have some of the org/agenda operations/views on a regular markdown file. Especially so I could just copy it raw out, and paste into other markdown-centric tools, github md files, etc. for colaborating with others. Since markdown is becoming so prevalent. Even our product managers are becoming natively conversant with it, I'd just prefer to have as markdown first world. (don't get me started rant…

Yes must say I have found myself moving away from org and looking at it as an annoyance wrapping up many excellent features that could be wrapped up in simple elisp function and structures that could then just be encoded in what every way one likes, it seems to me that for example todo lists are actually better as nested lisp lists, And then you can simply render as what ever you like. Of course one might like to ser…

That's actually not a bad mindset, especially when lisp can be vibed so easily. I could actually see myself building out my own library that does the things I want over markdown.

- have it look through all md files in a directory, collect all the todos into a main view

- look for items tagged with a date

- support customer tagging, and provide workflow exports for each one...

- behind the scenes git management for files

- etc...

I've been wanting to build a collaborative markdown editor for awhile now, making it so that different front-ends could work with it is an interesting thing to think about....

Re: Emacs 31: An unofficial guide to Markdown-ts-mode

#23
post #11

One of the biggest reason I've stopped using Emacs, and I was a pretty heavy user before was that org-mode files weren't fully native Markdown files, which caused annoying friction when collaborating with others. It would be interesting for me to have a new markdown-centric org-mode thing. I'd love to vibe lisp to customize my workflows, and I don't totally love Obsidian, which is what I've setup and configured now.…

Org mode is a coherent whole, and has capabilities far beyond what Markdown can accomplish (Markdown is inherently HTML-based, org-mode is not). Markdown's history is littered with folks trying to augment it in just the right way to bring these sorts of features, which has resulted in a diaspora of flavors, none particularly dominant+powerful (which is to say, no real org-mode competitor has emerged, even though one could have). I've used Markdown and Org-mode for 20 years concurrently, and trying to make Markdown work like org-mode has never been successful for me.

I wrote a bit about this back in 2021, in response to a query on Reddit "Why didn't org-mode just use Markdown?".

https://rpdillon.net/why-doesnt-emacs-org-mode-just-use-mark...

Re: Emacs 31: An unofficial guide to Markdown-ts-mode

#24
post #15

A bit of extra info: - `ts` stands for "tree-sitter", meaning this mode uses tree-sitter under the hood, which is, among other things, very performant. - There's support for the CommonMark spec and GFM, so things like `- [ ]` checkboxes and ~~strikethrough~~ work out of the box, along with many other small QoL features. - This mode is BUILT-IN, so no extra packages are needed. - This is currently in the experimental…

I think in 31 registering the file types isnt necessary any more, the mode opens automatically for me (and i did manually delete the old markdown-mode)

Re: Emacs 31: An unofficial guide to Markdown-ts-mode

#25
post #22
post #20

Earlier quoted context omitted.

Yes must say I have found myself moving away from org and looking at it as an annoyance wrapping up many excellent features that could be wrapped up in simple elisp function and structures that could then just be encoded in what every way one likes, it seems to me that for example todo lists are actually better as nested lisp lists, And then you can simply render as what ever you like. Of course one might like to ser…

That's actually not a bad mindset, especially when lisp can be vibed so easily. I could actually see myself building out my own library that does the things I want over markdown. - have it look through all md files in a directory, collect all the todos into a main view - look for items tagged with a date - support customer tagging, and provide workflow exports for each one... - behind the scenes git management for fi…

My thinking was lean into lisp lists rather then the actual rendered format, so that instead of a text buffer (although you could always open up a text buffer that is the lisp list) you have a list that you can use normal elisp functions that is bindable to keys and highly customizable and your only really building fairly simple elisp machinery on top and you can just use an alist (though you could use a plist I think alist's work better for todos) to represent todo's and just use assoc and setf and friends to do your modifications.

Of course one might also want to actually build out todo nodes as CLOS style objects. Only caveat hear is that you would need to decide how the object should be serialized and deserialized and the deserializing has to be more precise.

serializing and deserializing to MD should be easy I think since all we need to do is read in headings and list items into lists with some denotation to the type it was.

Those are just my thoughts on the topic. My thinking has been I have gotten fed up with emacs modes that are good and a lot of effort to write but just end up adding a lot of stuff on top that make it difficult to customize or customize the the standard way and returning to simple lists could be good.

Re: Emacs 31: An unofficial guide to Markdown-ts-mode

#26

What are people’s workflows for using eMacs with generative coding? I’m trying to get a workflow where I can generate code and approve it like a PR (maybe leave comments for a next round of generation) but I’m new to eMacs and the ai coding package isn’t working with the latest eMacs

I use cLaude cOde in my eMacs (through ghostel, which is unbelievably great!) to generate code :-)

I then use mAgit to review it.

Re: Emacs 31: An unofficial guide to Markdown-ts-mode

#27
post #11

One of the biggest reason I've stopped using Emacs, and I was a pretty heavy user before was that org-mode files weren't fully native Markdown files, which caused annoying friction when collaborating with others. It would be interesting for me to have a new markdown-centric org-mode thing. I'd love to vibe lisp to customize my workflows, and I don't totally love Obsidian, which is what I've setup and configured now.…

I love Org-mode and use it for many things - the outline format is great, even for some unexpected cases - Jira tickets, Slack, Reddit and HN threads, etc. But of course, hard to escape Markdown these days, so I burned some tokens to implement this https://github.com/agzam/prisma.el

Re: Emacs 31: An unofficial guide to Markdown-ts-mode

#28
post #15

A bit of extra info: - `ts` stands for "tree-sitter", meaning this mode uses tree-sitter under the hood, which is, among other things, very performant. - There's support for the CommonMark spec and GFM, so things like `- [ ]` checkboxes and ~~strikethrough~~ work out of the box, along with many other small QoL features. - This mode is BUILT-IN, so no extra packages are needed. - This is currently in the experimental…

Tree sitter support is half baked in the same way official LSP support is, only kind of worse.

Eglot won't help you get your system ready for LSP work, it will only avail itself if what's there. It doesn't even auto detect and configure that, either. There's no user prompting, so you'll have to read the docs to know that this even needs to be done.

Similarly, tree sitter support doesn't include the grammars! And those aren't typically sitting in your package repository, so users have to find a grammar and compile it themselves. There's not even a good recommendation given by Emacs on where to get them, leaving users to hope that whatever repository showed up on a Google search is both in good working order and safe to use.

It's really quite a failure on Emacs.

Re: Emacs 31: An unofficial guide to Markdown-ts-mode

#29
post #12
post #11

One of the biggest reason I've stopped using Emacs, and I was a pretty heavy user before was that org-mode files weren't fully native Markdown files, which caused annoying friction when collaborating with others. It would be interesting for me to have a new markdown-centric org-mode thing. I'd love to vibe lisp to customize my workflows, and I don't totally love Obsidian, which is what I've setup and configured now.…

What is wrong with markdown mode? Is it that you would rather do the org agenda or calendar via md rather then org? I do understand that if that is the case.

> What is wrong with markdown mode?

Nothing. It's just not Org-mode, and thus many great features of Org just not possible - sparse tree search; timestamps with built-in calendaring features; outline features like narrow-to-subtree; editing the subtree in an indirect buffer; executable code blocks; embedded LaTeX snippets; real tables with spreadsheet-like capability; checkbox statistics cookies - [/] and [%]; org-sort; column views; tags and tag inheritance; etc.

Anyone who's familiar with even a small subset of things that's possible in Org-mode and unlikely ever be supported in Markdown (just because there's no agreed format standard) have no confusion about it - Org-mode is absolutely superior. But superior doesn't mean universally better for everyone. The biggest drag of Org-mode is that it can never fully exist outside of Emacs. Yet Markdown can't ever fully cover its grounds (even in Emacs), simply because Markdown has to exist and work outside of Emacs as well.

Re: Emacs 31: An unofficial guide to Markdown-ts-mode

#30
post #28
post #15

A bit of extra info: - `ts` stands for "tree-sitter", meaning this mode uses tree-sitter under the hood, which is, among other things, very performant. - There's support for the CommonMark spec and GFM, so things like `- [ ]` checkboxes and ~~strikethrough~~ work out of the box, along with many other small QoL features. - This mode is BUILT-IN, so no extra packages are needed. - This is currently in the experimental…

Tree sitter support is half baked in the same way official LSP support is, only kind of worse. Eglot won't help you get your system ready for LSP work, it will only avail itself if what's there. It doesn't even auto detect and configure that, either. There's no user prompting, so you'll have to read the docs to know that this even needs to be done. Similarly, tree sitter support doesn't include the grammars! And thos…

In Emacs 31 none of what you’re saying is true. Grammars auto install and setting them up is easy.

https://www.reddit.com/r/emacs/comments/1utghab/treesitter_s...

Post reply on HN