0

windows 10, emacs 26.1,

M-x occur

enter image description here

And if want to execute, e.g. command "occur-mode" I need to

  1. Press -
  2. Press TAB
  3. Input mode

OK, it's work. But it not very conveniently. Is it possible to run command occur-mode faster? Maybe has some package for this?

P.S. I know about helm package. But I don't like it.

  • If you don't like helm you might prefer ivy or ido. Also check out smex (which uses ido by default but can be used with ivy). And most of these packages can take advantage of flx for fuzzy matching - there are lots of options here, you may need to experiment to find what works best for you. – glucas Jan 3 at 18:10
  • 1
    Also, just because I'm curious: Are you really trying to run the command occur-mode? It would be much more common to run occur, which will open its results in a buffer that is already in occur-mode. And in that case I'd recommend learning the key bindings and using M-s o to do an occur search. – glucas Jan 3 at 18:15
1

Use icomplete-mode - the builtin incremental minibuffer completion mode. It continuously displays a list of possible completions as soon as you type in minibuffer. Then M-x oc-m and C-j to accept completion candidate.

  • icomplete-mode not exist in MELPA repo. Where I can download it? – a_subscriber Sep 2 at 13:45
  • 1
    @a_subscriber icomplete-mode probably introduced at or before Emacs version 19.29. So just turn it on with e.g. M-x icomplete-mode. – muffinmad Sep 2 at 14:19
0
  1. You can make your recipe a bit shorter: M-x occur-m TAB (or even M-x oc-m TAB). And you can of course hit TAB at any point, to see completions of what you've typed so far - e.g., M-x oc TAB.

  2. If you use Icicles then you can show completions as you type. Icicles calls this incremental completion.

    The behavior is controlled by option icicle-incremental-completion. By default this does not kick in unless *Completions* is already displayed (hit TAB to display it). But if you customize the option to a non-nil, non-t value then it kicks in as soon as you type. Then, as soon as you type M-x o you see completions for o; when you type M-x oc you see completions for that, etc.

    There are also options for the delay before incremental completion kicks in (icicle-incremental-completion-delay) and the number of completions needed for it to kick in (icicle-incremental-completion-threshold).

  • I set icicle-incremental-completion = Update ‘Completions’ incrementally if already displayed. Restart Emacs. But when I type "occur" nothing happend. Completions not show. – a_subscriber Sep 5 '18 at 14:10
  • 2
    That's the default value (t). Set it to Update ‘*Completions*’ incrementally always (always) if you want *Completions* to show as soon as you type something. No need to restart Emacs. (But you need to turn on icy-mode, of course.) – Drew Sep 5 '18 at 14:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.