* Intercepting input in comint
@ 2015-12-01 13:47 Yuri D'Elia
2015-12-03 13:16 ` Elias Mårtenson
0 siblings, 1 reply; 5+ messages in thread
From: Yuri D'Elia @ 2015-12-01 13:47 UTC (permalink / raw)
To: emacs-devel
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?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Intercepting input in comint
2015-12-01 13:47 Intercepting input in comint Yuri D'Elia
@ 2015-12-03 13:16 ` Elias Mårtenson
2015-12-04 11:04 ` Yuri D'Elia
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Elias Mårtenson @ 2015-12-03 13:16 UTC (permalink / raw)
To: Yuri D'Elia; +Cc: emacs-devel
[-- 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 --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Intercepting input in comint
2015-12-03 13:16 ` Elias Mårtenson
@ 2015-12-04 11:04 ` Yuri D'Elia
2015-12-04 11:05 ` Yuri D'Elia
2015-12-04 11:08 ` Yuri D'Elia
2 siblings, 0 replies; 5+ messages in thread
From: Yuri D'Elia @ 2015-12-04 11:04 UTC (permalink / raw)
To: emacs-devel; +Cc: emacs-devel
On 03/12/15 14:16, Elias Mårtenson wrote:
> 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
Thanks for the example.
I feared to miss some other higher-level entry points I could use.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Intercepting input in comint
2015-12-03 13:16 ` Elias Mårtenson
2015-12-04 11:04 ` Yuri D'Elia
@ 2015-12-04 11:05 ` Yuri D'Elia
2015-12-04 11:08 ` Yuri D'Elia
2 siblings, 0 replies; 5+ messages in thread
From: Yuri D'Elia @ 2015-12-04 11:05 UTC (permalink / raw)
To: emacs-devel; +Cc: emacs-devel
On 03/12/15 14:16, Elias Mårtenson wrote:
> 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
Thanks for the example. Very helpful.
I feared to miss some other higher-level entry points I could use.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Intercepting input in comint
2015-12-03 13:16 ` Elias Mårtenson
2015-12-04 11:04 ` Yuri D'Elia
2015-12-04 11:05 ` Yuri D'Elia
@ 2015-12-04 11:08 ` Yuri D'Elia
2 siblings, 0 replies; 5+ messages in thread
From: Yuri D'Elia @ 2015-12-04 11:08 UTC (permalink / raw)
To: Elias Mårtenson; +Cc: emacs-devel
On 03/12/15 14:16, Elias Mårtenson wrote:
> 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
Thanks for the example. Very helpful.
I feared to miss some other higher-level entry points I could use.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-12-04 11:08 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-01 13:47 Intercepting input in comint Yuri D'Elia
2015-12-03 13:16 ` Elias Mårtenson
2015-12-04 11:04 ` Yuri D'Elia
2015-12-04 11:05 ` Yuri D'Elia
2015-12-04 11:08 ` Yuri D'Elia
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.