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

show language history before complete language list #135

Closed
blaenk opened this issue May 5, 2016 · 3 comments
Closed

show language history before complete language list #135

blaenk opened this issue May 5, 2016 · 3 comments

Comments

@blaenk
Copy link

blaenk commented May 5, 2016

I'm wondering if we can have the markdown-insert-gfm-code-block history can be made to show up first followed by the complete language list. Otherwise, the complete language list is so large that it makes it pointless I think to even have the history list if it's at the very bottom. Is there a reason for doing it the way we're doing it now?

@jrblevin
Copy link
Owner

jrblevin commented May 5, 2016

In markdown-gfm-get-corpus, the list of used languages (markdown-gfm-used-languages) is prepended to the list of known languages (which is what you would like, if I understand correctly). With the default completing-read-function, you can use M-n and M-p to cycle through previously used languages. The complete language list is used for tab completion.

I must be missing something here. What is your value of the variable completing-read-function?

@blaenk
Copy link
Author

blaenk commented May 5, 2016

You're absolutely right. I'm not sure how I got mixed up. I added the languages I want to markdown-gfm-additional-language too and everything seems to be working great. I'm using helm but yeah, I think I just got mixed up.

@blaenk blaenk closed this as completed May 5, 2016
@jrblevin
Copy link
Owner

jrblevin commented May 5, 2016

Actually, I think there was something to this. Previously, when a truly new language was used, it was added to the front of the list as returned by markdown-gfm-get-corpus. However, when a known language was used it was simply kept in position in the list of recognized languages. This yielded unexpected results with ido, helm, etc. The history was there (e.g., with M-p), but that wasn't reflected in the displayed list of language names.

Hopefully this is fixed by this commit: afc5544. Previously used language names (known or unknown) are added to the front of the list. Now, for example, the default choice (in square brackets) should match the name at the front of the list (the most recently used language name).

Thanks for reporting this. Let me know if anything doesn't work as expected after this change.

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

No branches or pull requests

2 participants