Hello, Göktuğ Kayaalp <s...@gkayaalp.com> writes:
> /I’ll first explain the situation and append the code to the message./ > Go to code: [ M-x re-search-forward RET ^CODE RET ] > > I read in Org mode a lot, and I dislike reading prose in monospace > fonts. So I have turned on ‘variable-pitch-mode’ for Org mode. But > because some stuff has to stay in stoichedon, so I set some faces to be > monospace: > > I have also add a keyword to font-lock keywords as part of the Org hook, > so that I can have a face attached to initial whitespace and lists (-, > and 1., 2. etc). I set this face to monospace too, so that I have nice > aligned left line, while the actual prose stays in variable pitch. > > I just updated today, from the default Org mode of Emacs 24.5 to the > latest release (8.3.2, from git). > > The problems are as follows: > > 1. My code is buggy, and I can’t understand why. With previous Org some > font-lock actions were happening only after I hit enter at the end of a > line, and if I have less than 3 newlines at the end of the file > sometimes font-locking of headings didn’t work. For example, if I’m > writing a paragraph, I write it in a single physical line, and I use > word wrapping. If that paragraph happended to contain an inline > footnote, which I use very often, that note is not highlighted until I > insert a line-feed. > > And with the new version, while the problem persists, when I hit enter, > thus inserting a newline at the end of a line, Emacs hangs up, and > sometimes I see this error: > > org-element--current-element: Wrong type argument: integer-or-marker-p, nil > ;; See end of message for the backtrace… > ;; [ M-x re-search-forward RET ^BACK RET ] Your code is probably not buggy. You are encountering a cache error. Does it happen on a fresh buffer (e.g., open a new buffer, and copy contents there, then let your code apply appropriate fontification)? Regards, -- Nicolas Goaziou