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 candidates in gnus-summary-move-article #195

Closed
oscarperpinan opened this Issue Aug 12, 2015 · 8 comments

Comments

Projects
None yet
4 participants
@oscarperpinan
Copy link

oscarperpinan commented Aug 12, 2015

Hi,

I would appreciate your help to use ivy-mode in gnus. It works correctly, for example, to complete groups when using gnus-group-jump-to-group. However, it shows no candidates with gnus-summary-move-article. I have tried to assign ivy-completing-read to gnus-completing-read-function but I get:

ivy-read: Wrong type argument: stringp, gnus-group-history

Thanks in advance.

Oscar.

@abo-abo

This comment has been minimized.

Copy link
Owner

abo-abo commented Aug 12, 2015

What's your Emacs version? I'm on 24.5.2 and have no trouble, except that I get zero matches for the initial input of gnus. But when I delete the minibuffer contents with C-k, I see the matches.

@oscarperpinan

This comment has been minimized.

Copy link
Author

oscarperpinan commented Aug 12, 2015

I'm on 24.5.1. Ok, after C-k I get the matches. Is it possible to avoid this step?

@xuchunyang

This comment has been minimized.

Copy link
Contributor

xuchunyang commented Aug 12, 2015

The issue seems to apply to unload-feature and describe-face as well. (on Emacs 24.5.1)

@abo-abo

This comment has been minimized.

Copy link
Owner

abo-abo commented Aug 12, 2015

Thanks for these, I didn't notice them before.

describe-face

This uses completing-read-multiple, which is an interface different from completing-read. Hence ivy-mode isn't involved here (yet). I did some work on multiple candidates with counsel-org-tag, but it's not yet in a state to work in a generic way.

unload-feature

This is a bug in Emacs, I believe. According to the doc of completing-read, the collection can be a list of strings or function or alist or obarray. However, read-feature calls completing-read with a list of symbols, which should be a list of strings instead. Here's how to patch it right now to work with or without ivy-mode:

(defun read-feature (prompt &optional loaded-p)
  "Read feature name from the minibuffer, prompting with string PROMPT.
If optional second arg LOADED-P is non-nil, the feature must be loaded
from a file."
  (intern (completing-read prompt
               (mapcar 'symbol-name features)
               (and loaded-p #'feature-file)
               loaded-p)))

I can apply this patch in Emacs master, but it will take a while before it makes it to the new Emacs release.

@abo-abo abo-abo closed this in 5269b79 Aug 12, 2015

@abo-abo

This comment has been minimized.

Copy link
Owner

abo-abo commented Aug 12, 2015

I'm on 24.5.1. Ok, after C-k I get the matches. Is it possible to avoid this step?

I found the cause of the problem: the initial input contains +, which is interpreted as a regex construct. If you escape the plus with \, it will work as intended. I've added the code to make this automatically, please check.

@oscarperpinan

This comment has been minimized.

Copy link
Author

oscarperpinan commented Aug 13, 2015

Thanks. It works perfectly.

@ngleb

This comment has been minimized.

Copy link

ngleb commented Sep 14, 2017

It doesn't work anymore on Emacs 25.3 and Gnus 5.13. No candidates until I remove \ from the the initial input which is "nnimap+fm:"

So when I have "nnimap+fm:", everything works as expected. Is there anything that can be done?

@abo-abo

This comment has been minimized.

Copy link
Owner

abo-abo commented Sep 15, 2017

@ngleb You can turn of ivy selectively with ivy-completing-read-handlers-alist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment