From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: phillip.lord@newcastle.ac.uk (Phillip Lord) Newsgroups: gmane.emacs.help Subject: Re: Debugging Elisp Date: Sun, 26 May 2013 11:49:40 +0200 Message-ID: <87li72gjez.fsf@newcastle.ac.uk> References: <51a08001$0$32589$862e30e2@ngroups.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1369561813 2666 80.91.229.3 (26 May 2013 09:50:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 26 May 2013 09:50:13 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Miguel Guedes Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun May 26 11:50:13 2013 Return-path: Envelope-to: geh-help-gnu-emacs@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 1UgXaf-0005aH-Bc for geh-help-gnu-emacs@m.gmane.org; Sun, 26 May 2013 11:50:13 +0200 Original-Received: from localhost ([::1]:44812 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UgXae-0004ae-Vw for geh-help-gnu-emacs@m.gmane.org; Sun, 26 May 2013 05:50:13 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:37309) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UgXaM-0004aF-15 for help-gnu-emacs@gnu.org; Sun, 26 May 2013 05:50:01 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UgXaG-0004uZ-IA for help-gnu-emacs@gnu.org; Sun, 26 May 2013 05:49:53 -0400 Original-Received: from cheviot22.ncl.ac.uk ([128.240.234.22]:36048) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UgXaG-0004uR-C4 for help-gnu-emacs@gnu.org; Sun, 26 May 2013 05:49:48 -0400 Original-Received: from smtpauth-vm.ncl.ac.uk ([10.8.233.129]) by cheviot22.ncl.ac.uk with esmtp (Exim 4.63) (envelope-from ) id 1UgXaB-0001E6-Eb; Sun, 26 May 2013 10:49:43 +0100 Original-Received: from localhost ([162.38.111.191]) (authenticated bits=0) by smtpauth-vm.ncl.ac.uk (8.13.8/8.13.8) with ESMTP id r4Q9nfi2007423 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Sun, 26 May 2013 10:49:42 +0100 In-Reply-To: <51a08001$0$32589$862e30e2@ngroups.net> (Miguel Guedes's message of "Sat, 25 May 2013 09:10:26 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 128.240.234.22 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:91065 Archived-At: The general solution is to turn debug-on-error on then replicate the error. With post-command-hook on, though, it's much harder because this hooks so deeply into the Emacs workflow. Really, you need to find out what is on "post-command-hook" before it crashes. This will allow you to narrow down a bit on where the problem is. Phil Miguel Guedes writes: > Hello List, > > Is it possible to set up emacs so as to output more meaningful messages > when it steps into errors? > > I'd be so *very* grateful if someone contributed a tip that makes emacs > output a line:col pair when it steps into an error as messages of the > kind below are just so frustrating to debug (especially so when it's hard > to replicate what causes them): > > Error in post-command-hook: (wrong-type-argument characterp wrong-type- > argument) -- Phillip Lord, Phone: +44 (0) 191 222 7827 Lecturer in Bioinformatics, Email: phillip.lord@newcastle.ac.uk School of Computing Science, http://homepages.cs.ncl.ac.uk/phillip.lord Room 914 Claremont Tower, skype: russet_apples Newcastle University, twitter: phillord NE1 7RU