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

Bug? lispy-unbind-variable does not replace the unbound variable with its value as described in docs #576

Open
pierre-rouleau opened this issue Mar 6, 2021 · 5 comments · May be fixed by #607

Comments

@pierre-rouleau
Copy link

  • Lispy version: lispy-20210121.926
  • Tested on Emacs 26.3 and 27.1
  • Wanted behavior description: lispy-unbind-variable doc
  • Observed behavior:

Start with the following code and placing the cursor at the same position as described in the linked document above:

defun foobar ()
  (let ((x 10)
	(y 20)
	(z 30))
    (foo1 x y z)
    (foo2 x z y)
    (foo3 y x z)
    (foo4 y z x)
    (foo5 z x y)
    (foo6 z y x)))

Type xu and the result currently is:

(defun foobar ()
  (let ((y 20)
        (z 30))
    (foo1 x y z)
    (foo2 x z y)
    (foo3 y x z)
    (foo4 y z x)
    (foo5 z x y)
    (foo6 z y x)))

Notice that the variable x has been left as-is inside the code instead of being replaced by it's previously bound value of 10 as described in the documentation.

I have not yet looked into the code, but is it possible some statements were removed since the original code tested to write the documentation was done?

--

Despite this minor problem, this package is great! Thanks!!

@ComedyTomedy
Copy link

xu works fine for me - Emacs 28, current lispy 0.27.0 (from git or melpa).

@pierre-rouleau
Copy link
Author

Good to know, thanks. It would seem to mean that a regression showed up between 0.27.0 done on May 8, 2019 and the version I use, which goes to Jan 21 2021.

@contrapunctus-1
Copy link

I too am facing this bug.

Lispy version 0.27.0 (20210702.1206 from MELPA)

GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.24, cairo version 1.16.0) of 2021-03-28, modified by Debian

papercatlol added a commit to papercatlol/lispy that referenced this issue Sep 20, 2021
papercatlol added a commit to papercatlol/lispy that referenced this issue Sep 20, 2021
papercatlol added a commit to papercatlol/lispy that referenced this issue Sep 20, 2021
@joshcho
Copy link

joshcho commented Apr 18, 2022

Still an issue, Emacs 29.0.50 and lispy-20211020.907. The pull request doesn't quite fix it. Something about (iedit-mode) is off, evaluating it manually after previous lines in the function has the intended effect.

@abo-abo
Copy link
Owner

abo-abo commented Sep 12, 2022

You're right, it's related to iedit-mode. I noticed just now that I'm using a pretty old fork: https://github.com/abo-abo/iedit. lispy-unbind-variable works fine for me with that fork.

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

Successfully merging a pull request may close this issue.

5 participants