From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Eric Schulte" Subject: Re: Re: Debugger entered--Lisp error: (void-function -mode) Date: Mon, 13 Dec 2010 12:47:15 -0700 Message-ID: <877hfdihfg.fsf@gmail.com> References: <80eiadw0dh.fsf@missioncriticalit.com> <87tyj7ztap.wl%dmaus@ictsoc.de> <80sjyrpwzb.fsf@missioncriticalit.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from [140.186.70.92] (port=44236 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PSENL-00089d-RU for emacs-orgmode@gnu.org; Mon, 13 Dec 2010 14:48:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PSEMl-0002yq-E2 for emacs-orgmode@gnu.org; Mon, 13 Dec 2010 14:47:58 -0500 Received: from mail-yw0-f41.google.com ([209.85.213.41]:47818) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PSEMl-0002yW-43 for emacs-orgmode@gnu.org; Mon, 13 Dec 2010 14:47:23 -0500 Received: by ywj3 with SMTP id 3so4198159ywj.0 for ; Mon, 13 Dec 2010 11:47:22 -0800 (PST) In-Reply-To: <80sjyrpwzb.fsf@missioncriticalit.com> (=?utf-8?Q?=22S=C3=A9b?= =?utf-8?Q?astien?= Vauban"'s message of "Tue, 23 Nov 2010 22:10:32 +0100") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: =?utf-8?Q?S=C3=A9bastien?= Vauban Cc: emacs-orgmode@gnu.org Hi, Does this error still exist? If so could you send a small example org-mode file which reproduces the problem? Thanks, and my apologies if such an example has already been shared with the list -- Eric S=C3=A9bastien Vauban writes: > Hi David, > > David Maus wrote: >> S=C3=A9bastien Vauban wrote: > > Thanks a lot for looking at this, really! > >>> When having the following code in any Org page, I now have an error gen= erated. >>>=20 >>> - If the code is in a =3Dbegin_src html=3D block, no problem. >>> - If between a =3Dbegin_html=3D, see what I get. >>>=20 >>> * Some code >>>=20 >>> #+begin_html >>> >>> >>> #+end_html >>>=20 >>> * Debug info >>>=20 >>> #+begin_src emacs-lisp >>> Debugger entered--Lisp error: (void-function -mode) >>> -mode() >>> funcall(-mode) >>> (if (eq major-mode lang-mode) nil (funcall lang-mode)) >>> (unless (eq major-mode lang-mode) (funcall lang-mode)) >>> (save-current-buffer (set-buffer (get-buffer-create ...)) (delete-reg= ion (point-min) (point-max)) (insert string) (unless (eq major-mode lang-mo= de) (funcall lang-mode)) (font-lock-fontify-buffer) (setq pos (point-min)) = (while (setq next ...) (put-text-property ... ... ... ... org-buffer) (setq= pos next))) >>> (with-current-buffer (get-buffer-create (concat " org-src-fontificati= on:" ...)) (delete-region (point-min) (point-max)) (insert string) (unless = (eq major-mode lang-mode) (funcall lang-mode)) (font-lock-fontify-buffer) (= setq pos (point-min)) (while (setq next ...) (put-text-property ... ... ...= ... org-buffer) (setq pos next))) >>> (let* ((lang-mode ...) (string ...) (modified ...) (org-buffer ...) p= os next) (remove-text-properties start end (quote ...)) (with-current-buffe= r (get-buffer-create ...) (delete-region ... ...) (insert string) (unless .= .. ...) (font-lock-fontify-buffer) (setq pos ...) (while ... ... ...)) (add= -text-properties start end (quote ...)) (set-buffer-modified-p modified)) >>> org-src-font-lock-fontify-block("" 27 287) >>> #+end_src >>>=20 >>> I don't understand why. Maybe it will ring a bell to you? >> >> I cannot reproduce this on >> >> >> Org-mode version 7.3 (release_7.3.123.g950be) >> >> GNU Emacs 23.2.1 (i486-pc-linux-gnu, GTK+ Version 2.20.1) of >> 2010-11-03 on potassium, modified by Debian >> >> It looks like some problem with the font-locking: I suspect you have >> `org-fontify-natively' set to a non-nil value and for whatever reason >> Org tries to fontify the #+begin_html as a source block with the >> language beeing the empty string. > > I was testing some patches both from Eric and Dan (about native > fontification)... > > I've pulled a new version, temporarily setting the patches aside, as I ne= eded > to be able to export. Since then, I don't have the problem anymore. > > >> I have no idea about how font-locking works, but one thing for sure: >> The regexp in `org-fontify-meta-lines-in-blocks' does match >> a #+begin_html statement and the matching group used to determine the >> language (it's 7) returns an empty string. > > That looks like the explanation of what I observed. Do I understand you > correctly if I read that the regexp should be patched to be more restrict= ive? > > Best regards, > Seb