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

No buffer named *counsel* #1522

Closed
pepone opened this issue Apr 5, 2018 · 11 comments

Comments

@pepone
Copy link

commented Apr 5, 2018

I'm using counsel editing a buffer in a remote machine with TRAMP and counsel works fine, then I try to start, counsel-rg but the machine doesn't have rg installed.

After this point when I try to open a buffer C-x C-f, I just get "No buffer named counsel" in the status an d nothing happens. I'm using emacs 25.3.1 counsel 20180328.1326 from MELPA

@basil-conto

This comment has been minimized.

Copy link
Collaborator

commented Apr 5, 2018

Could you please send the (redacted, if necessary) backtrace obtained by reproducing the error after M-xtoggle-debug-on-errorRET?

@pepone

This comment has been minimized.

Copy link
Author

commented Apr 5, 2018

I enable this but don't see any backtrace when the error happens

@basil-conto

This comment has been minimized.

Copy link
Collaborator

commented Apr 5, 2018

I enable this but don't see any backtrace when the error happens

Is there no *Backtrace* buffer? If not, that is very strange; I don't know what could be demoting the error to a mere message.

I am unable to reproduce this issue on Emacs 25 and 27 starting from make plain. Without further details, e.g. a more detailed recipe starting from emacs -Q or make plain, I'm unsure how to further debug this.

The most obvious (in the sense of standing out, not obviously being the culprit) source of the error message, which is generated by function nsberror in src/buffer.c, is the call to kill-buffer in a recently refactored counsel--async-command. This call to kill-buffer is guarded by get-buffer, however, which is what kill-buffer itself predicates the error on.

@pepone pepone closed this Apr 7, 2018

@pepone

This comment has been minimized.

Copy link
Author

commented Apr 7, 2018

no Backtrace buffer here, just the fact that after run counsel-rg cannot longer open files with counsel

@pepone pepone reopened this Apr 7, 2018

@basil-conto

This comment has been minimized.

Copy link
Collaborator

commented Apr 8, 2018

Again, I can neither reproduce this, nor guess how it can be possible.

What is your M-xemacs-versionRET (i.e. including system-type)?

Have you tried reproducing this from emacs -Q or reinstalling Ivy and Counsel, just in (improbable) case there's something stale lying around?

@godkbg

This comment has been minimized.

Copy link

commented Apr 17, 2018

Same problem here. No Backtrace buffer.

When I ran counsel-ag on Tramp, I got "Error in post-command-hook (ivy--queue-exhibit): (error "No buffer named counsel")"

On melpa-stable, there's no this error.

My emacs-version is
|GNU Emacs 25.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.10.8) of 2018-03-21

@elimik31

This comment has been minimized.

Copy link

commented Apr 24, 2018

I get the exact same error as @godkbg. After run in my casecounsel-projectile-ag in a TRAMP buffer, I get Error in post-command-hook (ivy--queue-exhibit): (error "No buffer named *counsel*")
And from that point onwards, whenever I call counsel-find-file, I get byte-code: No buffer named *counsel* and cannot do anything.

Based on the suggestion of godkbg, I installed counsel and swiper from melpa-stable. When I use that and then run counsel-ag, I get error code 127 in the completion area, as if it were a completion candidate. It is not in the *messages* area. Maybe that can help you. After that, counsel-find-file stays usable at least, compared to the version on melpa. I can live without counsel-ag, I just accidentally call the command due to muscle memory. So I will stay with stable for now.

My emacs version is older, because I using my work PC in my institute, which runs Ubuntu16.04, with:

GNU Emacs 24.5.1 (x86_64-pc-linux-gnu, GTK+ Version 3.18.9) of 2017-09-20 on lcy01-07, modified by Debian.

And ag version 0.31.0, in case that might be important.

@apmanol

This comment has been minimized.

Copy link

commented May 14, 2018

Hello all,

same issue with tramp. It is working but after running an counsel-rg command, I get in messages:

Debug on Error enabled globally
Error in post-command-hook (ivy--queue-exhibit): (error "No buffer named  *counsel*")
Quit
tramp-file-name-handler: No buffer named  *counsel* [2 times]
Quit [6 times]
tramp-file-name-handler: No buffer named  *counsel* [2 times]
Quit [2 times]

GNU Emacs 25.3.1 (x86_64-redhat-linux-gnu, GTK+ Version 3.22.19)
melpa: counsel            20180409.1120 installed
@hyOzd

This comment has been minimized.

Copy link

commented May 15, 2018

Same issue here. Happened when I tried to run counsel-grep on a remote machine. After that I cannot open files on the remote machine. Same error as above. Calling (tramp-cleanup-all-connections) fixes the counsel.

@basil-conto

This comment has been minimized.

Copy link
Collaborator

commented May 15, 2018

Thanks, I can reproduce this with the following recipe:

  1. make emacs=emacs25 plain
  2. C-xC-f//ssh:host:fileRET
  3. M-xcounsel-grepRETfo

This temporarily displays an error in the echo area and returns to completion, but further typing in the minibuffer does nothing. The following appears in the *Messages* buffer:

Error in post-command-hook (ivy--queue-exhibit): (error "No buffer named  *counsel*")

Both local and remote hosts are x86_64-pc-linux-gnu, specifically running Debian.

M-xemacs-versionRET:

GNU Emacs 25.2.1
(x86_64-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
of 2018-05-07, modified by Debian

git rev-parse HEAD: be6db35.


I cannot reproduce this issue with make emacs=emacs26 plain or make plain, where the respective Emacs versions are

GNU Emacs 26.1
(build 2, x86_64-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
of 2018-05-06

and

GNU Emacs 27.0.50
(build 24, x86_64-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
of 2018-05-11

For both of these Emacs versions, step (3) results in a single candidate error code 2, but no other post-command-hook/TRAMP errors occur or impede further find-file operations.

@basil-conto

This comment has been minimized.

Copy link
Collaborator

commented May 15, 2018

So, the quickest solution to this invasive problem is to update Emacs to 26, which is currently in the RC stage and will soon be released, but I will try to look into fixing the issue for earlier Emacs versions as well if no-one beats me to it.

basil-conto added a commit to basil-conto/swiper that referenced this issue May 17, 2018
counsel.el: Explicitly create async command buffer
(counsel--async-command):
Pass start-file-process-shell-command an existing buffer to avoid
tramp-file-name-handler choking in Emacs versions prior to 26.

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