From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Maus Subject: Re: Re: Debugger entered--Lisp error: (void-function -mode) Date: Sun, 28 Nov 2010 21:27:57 +0100 Message-ID: <87r5e5mbw2.wl%dmaus@ictsoc.de> References: <80eiadw0dh.fsf@missioncriticalit.com> <87tyj7ztap.wl%dmaus@ictsoc.de> <80sjyrpwzb.fsf@missioncriticalit.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: multipart/mixed; boundary="===============0160464213==" Return-path: Received: from [140.186.70.92] (port=42570 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PMnr3-0003JO-VY for emacs-orgmode@gnu.org; Sun, 28 Nov 2010 15:28:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PMnr2-0000JO-0t for emacs-orgmode@gnu.org; Sun, 28 Nov 2010 15:28:13 -0500 Received: from mailout110.xlhost.de ([213.202.242.110]:40607 helo=mysql1.xlhost.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PMnr1-0000Ip-Ji for emacs-orgmode@gnu.org; Sun, 28 Nov 2010 15:28:11 -0500 In-Reply-To: <80sjyrpwzb.fsf@missioncriticalit.com> 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?B?U8OpYmFzdGllbg==?= Vauban Cc: emacs-orgmode@gnu.org --===============0160464213== Content-Type: multipart/signed; boundary="pgp-sign-Multipart_Sun_Nov_28_21:27:57_2010-1"; micalg=pgp-sha256; protocol="application/pgp-signature" Content-Transfer-Encoding: 7bit --pgp-sign-Multipart_Sun_Nov_28_21:27:57_2010-1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable At Tue, 23 Nov 2010 22:10:32 +0100, S=C3=A9bastien Vauban wrote: >=20 > Hi David, >=20 > David Maus wrote: > > S=C3=A9bastien Vauban wrote: >=20 > Thanks a lot for looking at this, really! >=20 > >> When having the following code in any Org page, I now have an error ge= nerated. > >>=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-re= gion (point-min) (point-max)) (insert string) (unless (eq major-mode lang-m= ode) (funcall lang-mode)) (font-lock-fontify-buffer) (setq pos (point-min))= (while (setq next ...) (put-text-property ... ... ... ... org-buffer) (set= q pos next))) > >> (with-current-buffer (get-buffer-create (concat " org-src-fontificat= ion:" ...)) (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 ...) = pos next) (remove-text-properties start end (quote ...)) (with-current-buff= er (get-buffer-create ...) (delete-region ... ...) (insert string) (unless = ... ...) (font-lock-fontify-buffer) (setq pos ...) (while ... ... ...)) (ad= d-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. >=20 > I was testing some patches both from Eric and Dan (about native > fontification)... >=20 > 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. >=20 > > 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. >=20 > 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? Not sure, it might depend on the patches for native fontification: If they (try to) fontify the #+begin_html block on purpose, than this might be the case. If not, than they shouldn't call the function. But fontification and export of source blocks is still a mistery to me :| Best, -- David PS: I don't read the list via this address, so it is a good idea to always Cc: me in replies -- otherwise I only discover replies that need action on my side when working on the issue file. --=20 OpenPGP... 0x99ADB83B5A4478E6 Jabber.... dmjena@jabber.org Email..... dmaus@ictsoc.de --pgp-sign-Multipart_Sun_Nov_28_21:27:57_2010-1 Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iF4EABEIAAYFAkzyu00ACgkQma24O1pEeOaoXAEA4JIxrAooRo9G1sHyXGbRZzNy PQIixcG+cNzEGSpav6cA/jLEOlzHl9T5rFKQM2xTd5wIX/H3AiGrQnvFcRCZMHG7 =Z0gV -----END PGP SIGNATURE----- --pgp-sign-Multipart_Sun_Nov_28_21:27:57_2010-1-- --===============0160464213== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --===============0160464213==--