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

Re evaluate ivy results after performing action? #572

Closed
sandric opened this issue Jul 1, 2016 · 6 comments

Comments

@sandric
Copy link

commented Jul 1, 2016

My example - if I open switch-buffer via ivy and performing ivy-dispatching-call action, in my case - kill buffer - then when returning to list of buffers killed buffer still will be listing, although it was killed. Is this how it is supposed to work and if there's more specific function to call instead of ivy-dispatching-call if you wish to re evaluate results window?

@sandric sandric changed the title Re evaluate ivy minibuffer after performing action? Re evaluate ivy results after performing action? Jul 1, 2016

@abo-abo

This comment has been minimized.

Copy link
Owner

commented Jul 2, 2016

It should not be listing normally, see the code:

(ivy-set-actions
 'ivy-switch-buffer
 '(("k"
    (lambda (x)
      (kill-buffer x)
      (ivy--reset-state ivy-last))
    "kill")
   ("j"
    ivy--switch-buffer-other-window-action
    "other window")
   ("r"
    ivy--rename-buffer-action
    "rename")))

If you can reproduce the bug reliably, please provide a detailed scenario.

@sandric

This comment has been minimized.

Copy link
Author

commented Jul 3, 2016

Hm, strange. I investigated it a little bit and I found actually two different errors that I can reproduce, and behavior when it works correctly.

So here's the scenario when killing buffer works all correctly:

  • open ivy-switch-buffer window
  • select buffer you want to kill, BUT this buffer must be third or more from beginning of list
  • press C-M-o to invoke ivy-dispatching-call
  • press k for kill action
  • buffer gets killed, its removed from buffer list and window stays open.

Here's the scenario when killing buffer works but its not deleted from list of buffers and one error occur:

  • open ivy-switch-buffer window
  • select buffer you want to kill, BUT this buffer must be exactly second from beginning of list
  • press C-M-o to invoke ivy-dispatching-call
  • press k for kill action
  • buffer gets killed, but it stays in buffer list, and now changed its position from second to first. If you perform the same steps before this for this not killed buffer that is on first position now - message appear "No buffer named ".

Here's the scenario when killing buffer works but its not deleted from list of buffers and two error occur:

  • open ivy-switch-buffer window
  • select buffer you want to kill, BUT this buffer must be exactly first from beginning of list
  • press C-M-o to invoke ivy-dispatching-call
  • press k for kill action
  • buffer gets killed, but error shown "Error in post-command-hook (ivy--exhibit): (error "Selecting deleted buffer") ivy-read: Selecting deleted buffer". After error message disappear and ivy window returns, deleted buffer still stays in buffer list, if you will try to repeat previous steps as in second scenario, it spawns the same error "No buffer named ".

In both of error scenarios if after 4 step you will close window and open again - deleted buffer already not appearing in list.

Hope this helps.

@tadegenban

This comment has been minimized.

Copy link

commented Oct 12, 2016

seem i got the same issue when use ivy-dispatching-call to kill buffer
Error in post-command-hook (ivy--exhibit): (error "Selecting deleted buffer") ivy-read: Selecting deleted buffer")

@Yevgnen

This comment has been minimized.

Copy link
Contributor

commented Nov 20, 2016

I'm also looking for some function to update the candidates. For example, when using ivy-dispatching-call to remove a recentf file, the list will not update in this ivy session.

@ericdanan

This comment has been minimized.

Copy link
Contributor

commented Dec 4, 2017

I can reproduce this issue when invoking ivy-dispatching-call to kill a buffer, but only if the killed buffer is the first candidate (which as far as I understand only happens when the killed buffer is the same buffer from which ivy-switch-buffer was called). I'm not sure how this can be solved though.

@abo-abo abo-abo closed this in 82bf244 Dec 5, 2017

@abo-abo

This comment has been minimized.

Copy link
Owner

commented Dec 5, 2017

Thanks, all. Please test. For me it seems fine, sometimes there's a message "Selecting deleted buffer", but it's harmless.

If there are still problems, please open a new issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.