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

counsel-M-x make some lisp not work as expected #810

Closed
seudut opened this issue Nov 29, 2016 · 5 comments
Closed

counsel-M-x make some lisp not work as expected #810

seudut opened this issue Nov 29, 2016 · 5 comments

Comments

@seudut
Copy link

seudut commented Nov 29, 2016

I have these code snippet in scratch buffer

(defun sd/test ()
  "fjoefjei"
  (interactive)
  (print (current-buffer))
  (setq-local default-directory "~/"))

(setq-local default-directory "~/temp")

(pwd)

I try to test using the function sd/test() to change to default-directory of current buffer.

The problem is that when I called the command sd/test from counsel-M-x, this function not works as expected. the default-directory isn't changed at all.

Bule if I called this command from M-x, it works well. the default-directory is changed to ~/

I also posted a question in stackovflow for this issue, because at that time I didn't find where the problem was.
http://stackoverflow.com/questions/40857251/different-result-when-a-function-run-as-interactive-command-and-run-as-eval-expr/40857760#40857760

@abo-abo
Copy link
Owner

abo-abo commented Nov 29, 2016

This is a difficult issue. It was fixed (#760), but the fix was reverted because it messed up Projectile (#779).

@abo-abo
Copy link
Owner

abo-abo commented Nov 29, 2016

Please test.

@seudut
Copy link
Author

seudut commented Nov 29, 2016

Thanks abo-abo, I have verified the fix. now it works well. Thanks.

One thing during my test, I deleted the ivy, and swipper folders under elpa, and installed them again from package-install, but looks like the ivy still doesn't contain your latest commit. So I just made local change as your 6519ecc commit to verify it.

So, do you know when the mepla will update usually to sync the latest packages changes?

@abo-abo
Copy link
Owner

abo-abo commented Nov 29, 2016

So, do you know when the mepla will update usually to sync the latest packages changes?

MELPA usually updates in 4 hour windows. Which means the update can take anywhere from 30 minutes to 4 hours, depending on the time of the commit.

@seudut
Copy link
Author

seudut commented Nov 29, 2016

got it, many thanks

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