all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Daniel Pimentel <d4n1@openmailbox.org>
To: fgallina@gnu.org
Cc: Yuri D'Elia <wavexx@thregr.org>,
	emacs-devel-bounces+d4n1=opmbx.org@gnu.org, emacs-devel@gnu.org
Subject: Re: python.el, shell-send-region and exception handling
Date: Sun, 18 Jan 2015 09:05:37 -0300	[thread overview]
Message-ID: <150a351e5d5fe53cdaa3a045c560c804@openmailbox.org> (raw)
In-Reply-To: <87y4p0zxgc.fsf@gnu.org>

On 2015-01-17 22:31, fgallina@gnu.org wrote:
> 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
Thank you for it.
-- 
Daniel Pimentel (d4n1)



  reply	other threads:[~2015-01-18 12:05 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
2015-01-18 12:05   ` Daniel Pimentel [this message]
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=150a351e5d5fe53cdaa3a045c560c804@openmailbox.org \
    --to=d4n1@openmailbox.org \
    --cc=emacs-devel-bounces+d4n1=opmbx.org@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=fgallina@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.