From: "Elias Mårtenson" <lokedhs@gmail.com>
To: "Yuri D'Elia" <wavexx@thregr.org>
Cc: emacs-devel <emacs-devel@gnu.org>
Subject: Re: Intercepting input in comint
Date: Thu, 3 Dec 2015 21:16:10 +0800 [thread overview]
Message-ID: <CADtN0WKvNNzGmSxowG+0=vKqx7GAEuJjK6fiHcoifUE4dMrwBQ@mail.gmail.com> (raw)
In-Reply-To: <n3k8db$5bm$1@ger.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 808 bytes --]
You can do this by setting comint-input-sender to a function that can
intercept the entered commands.
I'm doing exactly this in gnu-apl-mode:
https://github.com/lokedhs/gnu-apl-mode/blob/a4fdcede138a4777b1fa3780574ef931d155f464/gnu-apl-interactive.el#L219
Regards,
Elias
On 1 December 2015 at 21:47, Yuri D'Elia <wavexx@thregr.org> wrote:
> Hi everyone,
>
> In a comint buffer, I'd like to intercept certain kinds of inputs from
> the user.
>
> For certain kinds of patterns, I'd like to side-step comint and call a
> function instead (and avoid the command to be sent to the inferior
> process).
>
> A logical place seems to be comint-input-filter-functions, except I
> cannot prevent the command to be sent to the process there.
>
> Do I have to override comint-input-sender?
> Any other advice?
>
>
>
[-- Attachment #2: Type: text/html, Size: 1391 bytes --]
next prev parent reply other threads:[~2015-12-03 13:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-01 13:47 Intercepting input in comint Yuri D'Elia
2015-12-03 13:16 ` Elias Mårtenson [this message]
2015-12-04 11:04 ` Yuri D'Elia
2015-12-04 11:05 ` Yuri D'Elia
2015-12-04 11:08 ` Yuri D'Elia
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='CADtN0WKvNNzGmSxowG+0=vKqx7GAEuJjK6fiHcoifUE4dMrwBQ@mail.gmail.com' \
--to=lokedhs@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=wavexx@thregr.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.