Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Command completion doubles the slash #193

Closed
david-christiansen opened this issue Jul 1, 2015 · 17 comments
Closed

Command completion doubles the slash #193

david-christiansen opened this issue Jul 1, 2015 · 17 comments
Milestone

Comments

@david-christiansen
Copy link

When completing a command with completion-at-point, it adds an extra slash. This means that it's easy to accidentally write something in a channel rather than /msg it to someone.

Example:

#chan> /ms

then pressing tab yields

#chan> //MSG 

I would expect it to not do that.

@wasamasa
Copy link
Collaborator

wasamasa commented Jul 1, 2015

Cannot reproduce this on HEAD. What Circe and Emacs version are you on?

@jorgenschaefer jorgenschaefer added this to the v2.0 milestone Jul 1, 2015
@david-christiansen
Copy link
Author

Circe is latest from MELPA, Emacs is 24.4. Perhaps it's some kind of interaction with other packages...

@david-christiansen
Copy link
Author

Hmm, just tried it in emacs -q and it works correctly. The bug must be somewhere else. Sorry!

@david-christiansen
Copy link
Author

I suppose I should poke at Helm's handling of /.

@jorgenschaefer
Copy link
Collaborator

Thank you for the report anyhow. It's always good to report possible problems :-)

If you find out what is causing this, and if Circe can do something (relatively) easy to avoid the problem, please do let us know!

@david-christiansen
Copy link
Author

Thanks! You run a tight ship here!

@wasamasa
Copy link
Collaborator

wasamasa commented Jul 1, 2015

Are you by any chance using helm-mode? It does not only handle general completing-read operations, but also hooks itself into the more generic completion mechanism as provided by Emacs. I have a workaround for it in my config and combine it with inline completion via (setq circe-use-cycle-completion t). See more at emacs-helm/helm#673.

@david-christiansen
Copy link
Author

That fixed it for me! Thanks!

@jorgenschaefer
Copy link
Collaborator

@wasamasa, do you think something like the following in Circe would be useful? Or is that too intrusive?

(eval-after-load "helm-mode"
  '(setq helm-mode-no-completion-in-region-in-modes
         (append helm-mode-no-completion-in-region-in-modes
                 '(circe-channel-mode circe-query-mode circe-server-mode))))

@david-christiansen
Copy link
Author

I don't think it's a good idea to tweak the user's Helm config like that, personally. Better to have an FAQ entry or something.

@jorgenschaefer
Copy link
Collaborator

Hm. Makes sense. An FAQ entry would be good :-)

@jorgenschaefer jorgenschaefer reopened this Jul 1, 2015
@wasamasa
Copy link
Collaborator

wasamasa commented Jul 1, 2015

Doesn't the wiki handle this purpose already? I'm not sure where exactly I'd put that tip into it though...

@wasamasa
Copy link
Collaborator

wasamasa commented Jul 1, 2015

Oh and yes, I'm in favour of not altering helm behaviour as it's unexpected and could even be desired as alternative "input method", similar to a related issue with company-mode. It sure looks like completion-in-region-function is a variable modes are fighting each other for, just to provide less horrible UI for this part of Emacs.

@jorgenschaefer
Copy link
Collaborator

Could someone who knows Helm and can test this update the Configuration section in the wiki accordingly?

@wasamasa
Copy link
Collaborator

wasamasa commented Jul 3, 2015

I've added a tab completion section to the wiki.

@jorgenschaefer
Copy link
Collaborator

Thank you!

@david-christiansen
Copy link
Author

Thanks, all!

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

3 participants