From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thorsten Jolitz Newsgroups: gmane.emacs.help Subject: Re: Fontifying-errors make Emacs (mostly) unusable Date: Wed, 29 Aug 2012 20:33:08 +0200 Message-ID: <87harlsg4b.fsf@googlemail.com> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1346265031 3552 80.91.229.3 (29 Aug 2012 18:30:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 29 Aug 2012 18:30:31 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Aug 29 20:30:33 2012 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 1T6n27-0004za-R4 for geh-help-gnu-emacs@m.gmane.org; Wed, 29 Aug 2012 20:30:31 +0200 Original-Received: from localhost ([::1]:50870 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T6n25-0007zx-Jq for geh-help-gnu-emacs@m.gmane.org; Wed, 29 Aug 2012 14:30:29 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:41952) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T6n1z-0007ze-Oy for help-gnu-emacs@gnu.org; Wed, 29 Aug 2012 14:30:24 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T6n1y-0000zU-0D for help-gnu-emacs@gnu.org; Wed, 29 Aug 2012 14:30:23 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:34316) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T6n1x-0000xO-Pi for help-gnu-emacs@gnu.org; Wed, 29 Aug 2012 14:30:21 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1T6n1x-0004k1-Bu for help-gnu-emacs@gnu.org; Wed, 29 Aug 2012 20:30:21 +0200 Original-Received: from e178054166.adsl.alicedsl.de ([85.178.54.166]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 29 Aug 2012 20:30:21 +0200 Original-Received: from tjolitz by e178054166.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 29 Aug 2012 20:30:21 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 44 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: e178054166.adsl.alicedsl.de User-Agent: Gnus/5.130002 (Ma Gnus v0.2) Emacs/24.0.93 (gnu/linux) Cancel-Lock: sha1:sk5io9/z4TWTdGQgP/cCEPxotSM= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 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:86581 Archived-At: Stefan Monnier writes: >> Thats probably because the error appears in a (fontifying) hook >> function thats called before any real action. >> How can I get out of this 'trap' without restarting Emacs? > > Depends on the specific problem you're encountering, but it may very > well be that kill&restart is the only way to fix it. > > Due to Emacs's extensive reliance of "modifiable Elisp code", it's > generally impossible to prevent such situations. > > There is code in various parts of Emacs to try and handle some > particular cases (e.g. an error in a pre-command-hook will cause Emacs > to remove that function from the hook), so if you can give details about > your particular case and it seems to be a common enough problem, maybe > we can find a way to make Emacs behave more gracefully. Ok, here is a recipe to reproduce the error: 0. with fully functional emacs, get markdown.el (via package manager) and make a copy of it (marktest.el) 1. (re)start "emacs -Q" 2. open file marktest.el 3. comment out this defun (at line 1954): ;; (defun markdown-fontify-buffer-wiki-links () ;; "Refontify all wiki links in the buffer." ;; (interactive) ;; (markdown-check-change-for-wiki-link (point-min) (point-max) 0)) 4. save and eval-buffer (or load marktest.el) 5. find (new empty) file test.md 6. put it in markdown-mode (M-x markdown-mode) #Bang# 'Symbol is void...' error message try M-x, M-:, C-x d, nothing works, you are trapped. -- cheers, Thorsten