-
Notifications
You must be signed in to change notification settings - Fork 163
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
Can markdown-mode cause problems with query-replace? #104
Comments
Which emacs version do you use ? |
On Windows: |
Funny thing. It's there, then it isn't. Since I'm currently @work I'm under Windows. Setup is: working directory: ~\AppData\Roaming.emacs.d\elpa\markdown-mode-20160223.537
query-replace /salsa/ with /sals/ -> error args out of range
query-replay /salsa/ with /sals/ -> no problem. I've attached a ZIP with the test.md file. I'm really curious, if you're now going to see the same problem. |
Thanks for this report. Indeed, markdown-mode can cause problems with query-replace and it has happened before, back in 2011. The fix (eacccad) required placing |
Thanks a lot. That I see the "args out of range" error is basically fresh. I believe I'm seeing this with my update of markdown-mode to 20160223.537. Before that, I only saw the effect, that only the first item was replaced during a query-replace. I would say, that I noticed it about a week ago, that query-replace behaved not quite kosher in markdown buffers. |
Great, thanks for reporting this and for confirming that it is fixed! |
Hi there.
I believe, I'm experiencing an issue with the Emacs query-replace function, which in the end might be caused by the latest development versions of markdown-mode from Melpa.
Let my try to explain. Let's say I've a simple Markdown file, which contains a simple bulleted list of links to a number of images in a directory
and the latest markdown-mode loaded (20160223.537 after having Emacs terminated and restarted).
Then I execute "M-x query-replace" and enter "/xyz/" to be replaced by "/klm/". Then all occurrences of "/xyz/" are highlighted and I should be able to replace all occurrences one by one by using the Space key or all at once by hitting the ! key. What I'm experiencing however is, that the first occurrence is replaced and then query-replace basically stops and I'm back to editing. In the message buffer I see "replace-match-maybe-edit: Args out of range: 1336".
The reason, why I believe markdown-mode might have something to do with this behavior is, that I put the buffer into simple text-mode (M-x text-mode). Then query-replace worked as expected.
Additionally I also replaced the markdown-down.el file with the one from 2.1 and byte-compiled it and completely restarted Emacs (simple loading of the byte-compiled file does not seem enough). And with the 2.1 markdown-mode loaded query-replace also worked as expected.
Hopefully I don't pickup any residue from something else I've configure in my Emacs startup. I'm experiencing the described behavior on Windows and Linux Emacsen, which share cloud synced initialization files.
BTW, really thank you so much for a really great Emacs Major mode.
The text was updated successfully, but these errors were encountered: