From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Daniel Pimentel Newsgroups: gmane.emacs.devel Subject: Re: python.el, shell-send-region and exception handling Date: Sun, 18 Jan 2015 09:05:37 -0300 Message-ID: <150a351e5d5fe53cdaa3a045c560c804@openmailbox.org> References: <87y4p0zxgc.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1421593280 18112 80.91.229.3 (18 Jan 2015 15:01:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 18 Jan 2015 15:01:20 +0000 (UTC) Cc: Yuri D'Elia , emacs-devel-bounces+d4n1=opmbx.org@gnu.org, emacs-devel@gnu.org To: fgallina@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jan 18 16:01:20 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YCrLr-0002Bm-Ou for ged-emacs-devel@m.gmane.org; Sun, 18 Jan 2015 16:01:19 +0100 Original-Received: from localhost ([::1]:33757 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YCrLq-0007fh-Tt for ged-emacs-devel@m.gmane.org; Sun, 18 Jan 2015 10:01:18 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35118) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YCoc2-000337-Oj for emacs-devel@gnu.org; Sun, 18 Jan 2015 07:05:51 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YCoc1-0002va-PP for emacs-devel@gnu.org; Sun, 18 Jan 2015 07:05:50 -0500 Original-Received: from mail.openmailbox.org ([62.4.1.34]:46816) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YCobs-0002ui-Pr; Sun, 18 Jan 2015 07:05:41 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by mail.openmailbox.org (Postfix) with ESMTP id 537E12E0077; Sun, 18 Jan 2015 13:05:39 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=openmailbox.org; h=user-agent:message-id:references:in-reply-to:subject:subject :from:from:date:date:content-transfer-encoding:content-type :content-type:mime-version:received:received; s=openmailbox; t= 1421582737; bh=HT7PKHYCNHF8OLZilpBdXmMPglsF5ZcEXswvDIiPuvw=; b=o 2zAXOAferYPmNXCSAmiKD9j5B7siyQxbFLCdn9vZTYGieBHROGFk+hZm7nreY6wE al/vUip1tVQsSW1VmIRtSuM0Yrv0m08QivbJU3neSmJDmcEhcbHYgpSNgZGHdZDw euOwoS81tMyXi7xq/yZCch9HChhaF5tVlquHrv+1C4= X-Virus-Scanned: amavisd-new at openmailbox.org Original-Received: from mail.openmailbox.org ([62.4.1.34]) by localhost (mail.openmailbox.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ZNiypXd0j1QQ; Sun, 18 Jan 2015 13:05:37 +0100 (CET) Original-Received: from www.openmailbox.org (localhost [127.0.0.1]) by mail.openmailbox.org (Postfix) with ESMTP id 7969C2E0076; Sun, 18 Jan 2015 13:05:37 +0100 (CET) In-Reply-To: <87y4p0zxgc.fsf@gnu.org> X-Sender: d4n1@openmailbox.org User-Agent: Roundcube Webmail/1.0.4 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 62.4.1.34 X-Mailman-Approved-At: Sun, 18 Jan 2015 10:01:07 -0500 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:181401 Archived-At: On 2015-01-17 22:31, fgallina@gnu.org wrote: > Yuri D'Elia writes: >=20 >> Is there a way to have python-shell-send-region (and friends) to=20 >> detect >> uncaught exceptions at the python prompt? >>=20 >> 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=20 >> the >> output buffer visible. >>=20 >> This is done currently in python-mode.el, but I couldn't find an >> alternative in python.el. >>=20 >> If I wanted to implement such a feature, how would you suggest to >> implement it? >>=20 >> Thanks. >>=20 > Hi Yuri, >=20 > A simple way to achieve this would be to create a comint output filter > function. The `python-pdbtrack-comint-output-filter-function` is a=20 > nice > guide to start. You would check with a regexp for the occurrence of an > exception and act accordingly. >=20 > 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. >=20 >=20 >=20 > Regards, > Fabi=EF=BF=BDn Thank you for it. --=20 Daniel Pimentel (d4n1)