Comments (5)
Closing this as I'm no longer interested in the feature, and I won't be able to work on it.
from markdown-toc.
Let me know what you think!
Interesting!
I just think of the case of people already using the tool needs their buffer to migrate.
So from the top of my head, i see 2 possibilities, either:
- migrate silently, markdown-toc-generate detects and adapt accordinly the new delimiter comment.
- do not migrate and let the user decide to migrate or not (adding a new interactive command
markdown-toc-migrate
), keeping the actual behavior if not migrated, using the new one you propose if not migrated (seems not that nice though).
Well, feel free to choose then ;)
... but I don't make any promise on when this will be delivered.
Sure, to simplify and ease the time to market ;), you could split this into multiple PRs:
-
1 would introduce the new comment (i used my complicated thing at the time to avoid clash, maybe that was dumb).
-
another one would introduce the parametric comment (hard part maybe?)...
But that's from the top of my head ;)
Cheers,
from markdown-toc.
The only problem I see is that currently settings are handled trough global settings in the emacs config, compared to local settings in the <!-- TOC -->
comment.
I'll open a WIP
PR when I start and document all the problems I hit there. This will end up being a breaking change, so it will need to be released as a major version increase, I'll see how easy it is to maintain compatibility.
from markdown-toc.
I checked the start of the code again, it's been a while since i looked, here are the customs to setup the start/end tags:
(defcustom markdown-toc-header-toc-start
"<!-- markdown-toc start - Don't edit this section. Run M-x markdown-toc-refresh-toc -->"
"Beginning delimiter comment."
:group 'markdown-toc)
(defcustom markdown-toc-header-toc-title
"**Table of Contents**"
"Title comment on TOC header."
:group 'markdown-toc)
(defcustom markdown-toc-header-toc-end
"<!-- markdown-toc end -->"
"Ending delimiter comment."
:group 'markdown-toc)
It's defcustom
already so you might be able to check you can actually have what you want already (well the 1. part i mentioned at least ;) by changing to something like:
(custom-set-variables '(markdown-toc-header-toc-start "<!-- TOC -->")
'(markdown-toc-header-toc-title "")
'(markdown-toc-header-toc-end "<!-- TOC -->"))
Cheers,
from markdown-toc.
Don't forget about markdown-toc-user-toc-structure-manipulation-fn
. I'll also need to analyze the other repos to find a list of common parameters, find their defaults and implement them. Anyway, I'll get back to you with mode details when I actually start working on it. Right now I only have a vague idea on what I will change and I might be wrong on my assumptions.
Side note, it would be nice if vim/sublime/intellij had similar functionality implemented. I might put it as a side goal to get all major editors in line with this approach. Starting off with atom and vscode since they were they already have some compatibility.
from markdown-toc.
Related Issues (20)
- Always start TOC on first column HOT 4
- Symbol's function definition is void: markdown-imenu-create-index HOT 3
- Not working on emacs 24.5 HOT 5
- Make `markdown-toc--header-toc-title` customizable HOT 3
- markdown-imenu-create-nested-index function definition is void HOT 4
- Need to insert empty line before TOC header HOT 2
- The comment mentioning how to regenerate the markdown TOC should mention which package the function is from (this one) HOT 4
- Please add a prefix to test-helper.el to avoid conflicts with 68 other packages HOT 2
- Lines starting with # in code sections are treated as headings HOT 1
- strip links from headings HOT 1
- generating toc for a big file requires jumping to the end (markdown-toc-generate-toc: Wrong type argument: consp, 148688) HOT 2
- How to follow the link in TOC? HOT 4
- Generate invalid link when heading contains underscore `_` HOT 3
- 0.1.3 depends on unreleased s.el, and Package-Requires needs to be corrected HOT 4
- update TOC on save HOT 2
- Wrong type argument: consp, nil HOT 6
- Can't load markdown-toc mode or call any functions
- Generate TOC does not respect heading levels. HOT 9
- `markdown-toc--to-link` need remove the un-ascii char
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from markdown-toc.