Re: [O] temporary set source blocks major-mode-hook to nil locally to speed up Org Mode

2018-10-18 Thread stardiviner
Nicolas Goaziou writes: > > Did you try to set the hook to a different value before (funcall lang-mode)? > Yes, like I said in previous messages, I want to make lang-mode-hook empty. It tested a few times, with restarting Emacs (loading a refresh Org Mode). It failed to fontify source blocks

Re: [O] temporary set source blocks major-mode-hook to nil locally to speed up Org Mode

2018-10-18 Thread Nicolas Goaziou
Hello, stardiviner writes: > Here is my try: > > #+begin_src diff > modified lisp/org-src.el > @@ -585,7 +585,14 @@ as `org-src-fontify-natively' is non-nil." > (erase-buffer) > ;; Add string and a final space to ensure property change. > (insert string " ")) > -

Re: [O] temporary set source blocks major-mode-hook to nil locally to speed up Org Mode

2018-10-17 Thread stardiviner
Nicolas Goaziou writes: > Some major modes may use major mode hooks to finish setting up their > fontification process, who knows. > > In any case, it could be worth trying it. Do you want to provide a patch > for that? > > Regards, I dived into the source code of two functions which are relate

Re: [O] temporary set source blocks major-mode-hook to nil locally to speed up Org Mode

2018-10-15 Thread Nicolas Goaziou
Hello, stardiviner writes: > When I open a big Org file which contains many different languages > source blocks. And when the Org file buffer is fontified when option > `org-src-fontify-natively` is enabled. Org will try to load those > major modes. Including major-mode-hook like "clojure-mode-h

[O] temporary set source blocks major-mode-hook to nil locally to speed up Org Mode

2018-10-14 Thread stardiviner
When I open a big Org file which contains many different languages source blocks. And when the Org file buffer is fontified when option `org-src-fontify-natively` is enabled. Org will try to load those major modes. Including major-mode-hook like "clojure-mode-hook", "emacs-lisp-mode-hook", "pyt