Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add table-editing features akin to orgtbl #171

Closed
Ambrevar opened this issue Oct 10, 2016 · 3 comments
Closed

Add table-editing features akin to orgtbl #171

Ambrevar opened this issue Oct 10, 2016 · 3 comments

Comments

@Ambrevar
Copy link
Contributor

Markdown table extension is frustratingly close to orgtbl: only the + differs at intersections.

orgtbl is terrifically convenient in my opinion, I would love to see similar editing features for markdown-mode.

I found a few similar discussions:

@jrblevin
Copy link
Owner

I'm also interested in this, but after looking into it I'm not sure of the best way to proceed. My first thought was to add an option for markdown-mode to automatically load orgtbl-mode. Then we could either 1) "advise" the realignment functions to reformat the tables (i.e., changing -+- to -|- for starters) or 2) rebind the most important orgtbl-mode keys like C-c | and C-c C-c to wrappers that call out to orgtbl and then do the reformatting.

What I realized quickly is that when loading orgtbl-mode, the minor mode keymap overrides the markdown-mode keymap, so a lot of things are unavailable. For example, markdown-mode defines several keys under the C-c C-c prefix. Yet, if I change orgtbl-mode-map directly to remove C-c C-c, then it would be changed everywhere orgtbl-mode is used (not just in the markdown-mode buffer). Does anyone know the best way to handle this?

@Ambrevar
Copy link
Contributor Author

I don't think making use of the high-level org-mode functions is a good idea.
I guess going lower level is the way to go. If org-mode's API is poorly design, that might mean reimplementing everything from scratch...

@jrblevin
Copy link
Owner

Yeah, I also don't like the idea, but it seemed like the fastest way to get something working for people. If it means re-implementing it, then I likely won't be doing that in the foreseeable future (too many more fundamental things to do on markdown-mode). Perhaps for now I'll write up some directions about a simple setup with advice that does 90% of what most people need through orgtbl, which can be toggled on and off as needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants