Open whatacold opened 6 years ago
A workaround I can think of is to define a before advice for Info-goto-node
, but it is Info-mode specific. It will be perfect if there is a general way.
Just to be clear, here's a MWE. Compare:
emacs -Q
emacs
RET(elisp)Number
TAB
with:
make plain
(elisp)
Go to node (match required):
Possibly relates to #946, #1524, and #1556.
Note that default completion (without ivy) works fine here. In a random info node in the emacs manual, you can press 'g ( e TAB' and it will show all the manuals whose name start with 'e', such as the elisp manual. However, if you turn on ivy-mode, you can't see those other manuals, and you can't get to those other manuals. This is a pretty severe reduction in functionality!
This also means that someone with ivy installed and enabled won't be able to get all the way through the info manual itself. They will get stuck at the node "(info)Go to node".
Here's how Ivy works with Info:
Hmm, maybe ivy's version of 'g' could include a message to that effect somehow? For the sake, if nothing else, of the poor newbs trying to get through the info manual itself?
Also: wishlist: maybe figure out some way of combining the two commands?
Also: wishlist: maybe figure out some way of combining the two commands?
The best way to do that would be to support programmed completion.
I'm open to improvements. But let's not pretend that the built-in programmed completion does it in the best (or even in a good) way.
With default completion, suppose I'm in (emacs)
. I press TAB, and I get all candidates for (emacs)
. No mention that (elisp)
or (ccmode)
also exist. However, when I input (
and press TAB, suddenly they are offered as completion candidates, along with all files in the current directory.
For Ivy, I would prefer a more consistent and discoverable interface. Although, we do hide the dotfiles for counsel-find-file
, which is similar. And the /ssh:
or /sudo::
switches in counsel-find-file
are not very visible :). So there are still improvements to be made.
The best way to do that would be to support programmed completion.
Programmed completion is basically :dynamic-collection
. We could just hand everything over to Info-read-node-name-1
and programmed completion. But then (I think) we lose regex builders, which I would like to avoid.
I can't recall more built-in cases where we don't have access to the full collection, other than Info-read-node-name-1
and read-file-name-internal
, which are the use cases for programmed completion. Both can be solved by multi-stage completion where each stage has access to the full collection, just like what counsel-find-file
does.
But let's not pretend that the built-in programmed completion does it in the best (or even in a good) way.
There's nothing wrong with programmed completion per se; it's how it's used that may not be the most elegant, or in this case compatible with Ivy's UI.
For Ivy, I would prefer a more consistent and discoverable interface.
If Ivy did something similar to the built-in completion, where the extra programmed completions don't appear until I pressed TAB or similar, I wouldn't personally find this inconsistent, and it'd be no less discoverable than the current situation. I'm not sure if this approach would always work, though.
Hi,
Recently I enables ivy-mode globally with
(ivy-mode 1)
, then I noticed that it failed to goto other info file inInfo-mode
.For example,
(ivy)
then after some time I want to see some doc about elisp,
M-x Info-goto-node
will pop up candidates of current file only, so I have no way to go to elisp.I roughly read the ivy doc and searched the web, but failed to find any helpful. And a few days ago I encountered a similar problem with
org-refile
, and managed to solved it by setting(setq org-outline-path-complete-in-steps nil)
.So is there a way to solve it in ivy? Thanks.