From: fgallina@gnu.org (Fabián Ezequiel Gallina)
To: Yuri D'Elia <wavexx@thregr.org>
Cc: emacs-devel@gnu.org
Subject: Re: python.el, shell-send-region and exception handling
Date: Sat, 17 Jan 2015 22:31:15 -0300 [thread overview]
Message-ID: <87y4p0zxgc.fsf@gnu.org> (raw)
In-Reply-To: <m8pdo0$gdj$1@ger.gmane.org> (Yuri D'Elia's message of "Fri, 09 Jan 2015 21:29:52 +0100")
Yuri D'Elia <wavexx@thregr.org> writes:
> Is there a way to have python-shell-send-region (and friends) to detect
> uncaught exceptions at the python prompt?
>
> I would like to be notified somehow of python exceptions either in the
> minibuffer or by splitting the window and showing python's output.
> Currently, uncaught exceptions simply go unnoticed if you don't have the
> output buffer visible.
>
> This is done currently in python-mode.el, but I couldn't find an
> alternative in python.el.
>
> If I wanted to implement such a feature, how would you suggest to
> implement it?
>
> Thanks.
>
Hi Yuri,
A simple way to achieve this would be to create a comint output filter
function. The `python-pdbtrack-comint-output-filter-function` is a nice
guide to start. You would check with a regexp for the occurrence of an
exception and act accordingly.
I plan to add this to python.el. If you'd like your implementation to
be considered feel free to propose it, otherwise expect my approach to
land in the next few weeks.
Regards,
Fabián
next prev parent reply other threads:[~2015-01-18 1:31 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-09 20:29 python.el, shell-send-region and exception handling Yuri D'Elia
2015-01-18 1:31 ` Fabián Ezequiel Gallina [this message]
2015-01-18 12:05 ` Daniel Pimentel
2015-06-23 13:42 ` Yuri D'Elia
2015-06-25 13:55 ` Yuri D'Elia
-- strict thread matches above, loose matches on Subject: below --
2015-01-09 15:35 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=87y4p0zxgc.fsf@gnu.org \
--to=fgallina@gnu.org \
--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.