[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to translate input command in comint before send to debugger?
From: |
Z |
Subject: |
Re: How to translate input command in comint before send to debugger? |
Date: |
Sun, 7 Oct 2012 00:01:45 -0700 (PDT) |
User-agent: |
G2/1.0 |
On Sunday, October 7, 2012 6:23:32 AM UTC+8, Z wrote:
> Hi all,
>
> I use pdb to debug Python programs. But pdb is lack of command
>
> like "u 3"(means up 3 frames). So I'd like to translate "u 3" to
>
> "u;;u;;u" in comint before it is send to external debugger.
>
>
>
> I have tried to add hook to comint-input-filter-functions, but it seems only
> receive the input and don't return translated command
>
> to commit. Any suggestion to do that?
>
>
>
> Thank you very much,
>
> Z
I found the solution. Write a wrapper(e.g. pdb-sender) for comint-simple-send
and (setq comint-input-sender 'pdb-sender) in pdb-mode-hook.