From: Jonathan Kyle Mitchell <kyle@jonathanmitchell.org>
To: bbenedetto@goodyear.com
Cc: help-gnu-emacs@gnu.org
Subject: Re: Can I turn off ivy-mode in comint buffers?
Date: Sat, 30 Jun 2018 17:22:08 -0500 [thread overview]
Message-ID: <CAAnK0TYQ4w=cq7ECsbat1E8awjzr9O9rLx4FAwSmu2_xXwKyMQ@mail.gmail.com> (raw)
In-Reply-To: <24796.1530381157@rds059.goodyear.com>
On Sat, Jun 30, 2018 at 3:36 PM <bbenedetto@goodyear.com> wrote:
>
> Good day.
>
> I have loaded ivy-mode and really like it... everywhere except in
> comint buffers (for filename completion). Is there some way to either
> disable it in comint buffers or to just turn it on everywhere else?
>
> Sorry if this is a pretty basic question. I couldn't find an answer
> either online or looking through the source.
>
> Thanks!
>
> --
> - Bill
> +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
> Bill Benedetto <bbenedetto@goodyear.com> The Goodyear Tire & Rubber Co.
> I don't speak for Goodyear and they don't speak for me. We're both happy.
One way to do it is to customize post-command-hook to dynamically turn
ivy on and off depending on the current buffer's major mode.
(ivy-mode 1) ; globally enabled
(defun disable-ivy-in-comint-only ()
"Leave `ivy-mode' enabled everywhere except in buffers that derive
from `comint-mode'."
(if (derived-mode-p 'comint-mode)
(ivy-mode -1)
(ivy-mode 1)))
(add-hook 'post-command-hook 'disable-ivy-in-comint-only)
--
Jonathan Kyle Mitchell
next prev parent reply other threads:[~2018-06-30 22:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-30 17:52 Can I turn off ivy-mode in comint buffers? bbenedetto
2018-06-30 22:22 ` Jonathan Kyle Mitchell [this message]
2018-07-01 4:22 ` Stefan Monnier
2018-07-01 7:37 ` Jonathan Kyle Mitchell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAAnK0TYQ4w=cq7ECsbat1E8awjzr9O9rLx4FAwSmu2_xXwKyMQ@mail.gmail.com' \
--to=kyle@jonathanmitchell.org \
--cc=bbenedetto@goodyear.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.