benma / visual-regexp.el

A regexp/replace command for Emacs with interactive visual feedback
396 stars 28 forks source link

Navigating history includes non-regexp and point ends up in a strange place #7

Closed rneatherway closed 10 years ago

rneatherway commented 10 years ago

Hi,

First off this is a great piece of work! I've been thinking about making something like this for a long time but you just saved me a lot of effort, so thank you very much.

I noticed that when navigating the history it contains all things entered in the minibuffer previously, not just regexps. Secondly, when navigating through the history it appears as if point is at the end of the remembered command but when I hit the left cursor key I move to an unpredictable location, sometimes at the 'R' of Regexp:, sometimes at the beginning of the remembered command, or sometimes somewhere inside it. I would expect to be one character from the end of the remembered command.

benma commented 10 years ago

Thanks a lot!

I cannot reproduce the part about the history. Can you give me concrete sequence of commands which produces error?

About the point in the minibuffer: please see my two comments in this issue. I welcome any suggestions on this matter.

rneatherway commented 10 years ago

M-x vr/replace RET RET M-x vr/replace Up

And you will see vr/replace as the first suggestion.

The minibuffer thing, I see the problem. Is it possible to move the point to the end so that it is visually consistent? I don't know of any workaround for the point being displayed at the end.

benma commented 10 years ago

So I fixed both issues (commits for history and confusing cursor).

The workaround to the latter problem is that the minibuffer message stays visible all the time and does not disappear as soon as you do something (move point etc.). Let me know what you think.

rneatherway commented 10 years ago

Just tested briefly, but these fixes look good to me. I have no objection to the minibuffer message staying visible. Thanks a lot for looking into it. I will test more as I use it over the next few days and let you know if there are any more problems.

benma commented 10 years ago

I am closing this; feel free to post more comments here or to a new issue if anything comes up. Thanks again for reporting!

rneatherway commented 10 years ago

I've been using it for the last week with no issues. Thanks for the fix.