[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Character mode for comint?
From: |
Antoine Levitt |
Subject: |
Re: Character mode for comint? |
Date: |
Sat, 29 Oct 2011 20:36:17 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.90 (gnu/linux) |
29/10/11 18:35, Stephen J. Turnbull
> Antoine Levitt writes:
>
> > Because then you don't benefit from the emacs interaction features of
> > the various python modes, like sending the current
> > buffer/region/defun. If your question is "why are these features
> > implemented with comint rather than term-mode", I have no clue.
>
> Here's a clue:
>
> ;;; term.el --- general command interpreter in a window stuff
>
> ;; Copyright (C) 1988-1995, 1997 Free Software Foundation, Inc.
>
> ;; Author: Per Bothner <address@hidden>
> ;; Based on comint mode written by: Olin Shivers <address@hidden>
>
> So comint can do it, and term-mode can teach you how to tickle comint
> mode into doing what you want it to do. If you're very lucky, your
> investigation of term-mode may show that this is a feature of comint
> itself and you just have to enable it.
Actually, the basic code seems to be pretty simple. In character mode,
pretty much everything is mapped to term-send-raw, which is just a
wrapper around process-send-string. But what's more complex is the fact
that ipython (for instance) reacts to special strings (for instance,
tab, C-p, C-p ...) in a more complex way than just outputting something,
which comint doesn't seem to understand. In the end, that's probably the
difference between an input/output interface like comint and a real
terminal emulator like term. So the solution (for what I want to do
anyway) might be to run python inside term, and rewrite the shell
interaction code to send to term instead of comint.
- Re: Character mode for comint?, (continued)
- Re: Character mode for comint?, Antoine Levitt, 2011/10/29
- Re: Character mode for comint?, Andreas Schwab, 2011/10/29
- Re: Character mode for comint?, Antoine Levitt, 2011/10/29
- Re: Character mode for comint?, Andreas Schwab, 2011/10/29
- Re: Character mode for comint?, Antoine Levitt, 2011/10/29
- Re: Character mode for comint?, Andreas Schwab, 2011/10/29
- Re: Character mode for comint?, Antoine Levitt, 2011/10/29
- Re: Character mode for comint?, Andreas Schwab, 2011/10/29
- Re: Character mode for comint?, Antoine Levitt, 2011/10/29
- Re: Character mode for comint?, Stephen J. Turnbull, 2011/10/29
- Re: Character mode for comint?,
Antoine Levitt <=
- Re: Character mode for comint?, Stefan Monnier, 2011/10/29
Re: Character mode for comint?, Stefan Monnier, 2011/10/29