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

Inconsistent history value with query-replace #37

Closed
cute-jumper opened this issue Jun 1, 2016 · 11 comments
Closed

Inconsistent history value with query-replace #37

cute-jumper opened this issue Jun 1, 2016 · 11 comments

Comments

@cute-jumper
Copy link

vr/query-replace-defaults-variable's default value is query-replace-defaults, which will be set to a list of cons pairs after performing some replacements, for example, (("A" . "b") ("B" . "b")). However, query-replace only store a cons pair in query-replace-defaults, i.e., ("A" . "b"). This inconsistency makes it impossible to use them together. After using one of them, we can't use another one.

@Silex
Copy link
Contributor

Silex commented Jun 9, 2016

I have the same problem, it was probably introduced in 80668e9

@Silex
Copy link
Contributor

Silex commented Jun 9, 2016

Ok, the format of this variable changed in emacs25 and the new code assumes only emacs 25.

@benma: given you are the most familiar with the change, you probably know better where to add the right if checking for version < 25 :)

@conornash
Copy link

I'm seeing this error too. Where would a change need to be made to submit a patch?

@Silex
Copy link
Contributor

Silex commented Jun 24, 2016

@benma
Copy link
Owner

benma commented Jun 24, 2016

Fixed in 2cf4dc5. Please let me know if that helps.

For Emacs 24, the defaults of visual regexp and the builtin replace are not now independent (and interoperable), but at least using vr does not break the builtin functions anymore. In Emacs 25, the defaults variable is shared between vr and the builtin replace and fully compatible.

@Silex
Copy link
Contributor

Silex commented Jun 24, 2016

Nice 👍 I confirm the problem is gone on my end.

@conornash
Copy link

Looks like it's time for me to upgrade to Emacs 25 :)

@benma
Copy link
Owner

benma commented Jun 24, 2016

Looks like it's time for me to upgrade to Emacs 25 :)

I for one did not have any issues with upgrading, so give it a try 📄

@cute-jumper can you confirm this problem is solved for you as well?

@conornash
Copy link

Ah yes, I tried using the master branch instead of the exact commit you linked. Fixed for me in Emacs 24. Thank you!

@benma
Copy link
Owner

benma commented Jun 24, 2016

What do you mean? The commit I linked is master.

@cute-jumper
Copy link
Author

@benma Perfect. Thank you.

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

4 participants