From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thierry Volpiatto Newsgroups: gmane.emacs.devel Subject: Why timers are now catching errors Date: Sun, 13 Jan 2013 14:24:24 +0100 Organization: Emacs Helm Message-ID: <877gnhb4hj.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1358083493 5280 80.91.229.3 (13 Jan 2013 13:24:53 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 13 Jan 2013 13:24:53 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jan 13 14:25:11 2013 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 1TuNYk-0004Fh-6S for ged-emacs-devel@m.gmane.org; Sun, 13 Jan 2013 14:25:10 +0100 Original-Received: from localhost ([::1]:51997 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TuNYT-0007uQ-Tw for ged-emacs-devel@m.gmane.org; Sun, 13 Jan 2013 08:24:53 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:50553) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TuNYM-0007sY-CN for emacs-devel@gnu.org; Sun, 13 Jan 2013 08:24:52 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TuNYK-0007VT-6x for emacs-devel@gnu.org; Sun, 13 Jan 2013 08:24:46 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:45718) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TuNYK-0007VM-0O for emacs-devel@gnu.org; Sun, 13 Jan 2013 08:24:44 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1TuNYW-00040N-09 for emacs-devel@gnu.org; Sun, 13 Jan 2013 14:24:56 +0100 Original-Received: from lbe83-2-78-243-104-167.fbx.proxad.net ([78.243.104.167]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 13 Jan 2013 14:24:55 +0100 Original-Received: from thierry.volpiatto by lbe83-2-78-243-104-167.fbx.proxad.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 13 Jan 2013 14:24:55 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 24 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: lbe83-2-78-243-104-167.fbx.proxad.net User-Agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.3.50 (gnu/linux) Cancel-Lock: sha1:mCvRgoi7b/x+rpbjlLes9R/uv70= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 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:156303 Archived-At: Hi, is there a particular reason to catch errors in timers functions ? --8<---------------cut here---------------start------------->8--- (condition-case-unless-debug err ;; Timer functions should not change the current buffer. ;; If they do, all kinds of nasty surprises can happen, ;; and it can be hellish to track down their source. (save-current-buffer (apply (timer--function timer) (timer--args timer))) (error (message "Error in timer: %S" err))) --8<---------------cut here---------------end--------------->8--- Timer functions may return errors or diverses different values at one time and next time no errors etc... This change will break many commands using timers. This happen in `timer-event-handler', hope this will not be merged in 24.3... -- Thierry Get my Gnupg key: gpg --keyserver pgp.mit.edu --recv-keys 59F29997