From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?S=C3=A9bastien_Vauban?= Subject: Re: Debugger entered--Lisp error: (void-function -mode) Date: Tue, 23 Nov 2010 22:10:32 +0100 Message-ID: <80sjyrpwzb.fsf@missioncriticalit.com> References: <80eiadw0dh.fsf@missioncriticalit.com> <87tyj7ztap.wl%dmaus@ictsoc.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: 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-mXXj517/zsQ@public.gmane.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org To: emacs-orgmode-mXXj517/zsQ@public.gmane.org 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 gene= rated. >>=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-regi= on (point-min) (point-max)) (insert string) (unless (eq major-mode lang-mod= e) (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-fontificatio= n:" ...)) (delete-region (point-min) (point-max)) (insert string) (unless (= eq major-mode lang-mode) (funcall lang-mode)) (font-lock-fontify-buffer) (s= etq pos (point-min)) (while (setq next ...) (put-text-property ... ... ... = ... org-buffer) (setq pos next))) >> (let* ((lang-mode ...) (string ...) (modified ...) (org-buffer ...) po= s next) (remove-text-properties start end (quote ...)) (with-current-buffer= (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 need= ed 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 restrictiv= e? Best regards, Seb --=20 S=C3=A9bastien Vauban _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode-mXXj517/zsQ@public.gmane.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode