From mboxrd@z Thu Jan 1 00:00:00 1970 From: Aaron Jensen Subject: Re: Fontification error Date: Sun, 19 Mar 2017 08:19:56 -0700 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47162) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cpccj-0007Kk-Mn for emacs-orgmode@gnu.org; Sun, 19 Mar 2017 11:20:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cpccg-0006E4-Cf for emacs-orgmode@gnu.org; Sun, 19 Mar 2017 11:20:01 -0400 Received: from mail-vk0-x234.google.com ([2607:f8b0:400c:c05::234]:36285) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cpccg-0006Dk-4q for emacs-orgmode@gnu.org; Sun, 19 Mar 2017 11:19:58 -0400 Received: by mail-vk0-x234.google.com with SMTP id j64so45420788vkg.3 for ; Sun, 19 Mar 2017 08:19:57 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org This is in reply to the Fontification error Thomas S. Dye reported on Feb 13 2017: http://lists.gnu.org/archive/html/emacs-orgmode/2017-02/msg00280.html I was able to bisect this error to the following commit: f2a5104e45b6f44a08960ae49ba20c124a8fa9d8 is the first bad commit commit f2a5104e45b6f44a08960ae49ba20c124a8fa9d8 Author: Noam Postavsky Date: Sat Jan 7 16:05:19 2017 -0500 Backport commit ae8264c5cc from Emacs * lisp/org-src.el (org-src-font-lock-fontify-block): Let-bind `inhibit-modification-hooks' to nil, since this function can be called from jit-lock-function which binds that variable to t (Bug#25132). Call modification hooks in org-src fontify buffers ae8264c5cccf19d5b25a340a605bf2f07de1577e Noam Postavsky Sun Jan 29 11:01:32 2017 -0500 At the moment, the minimum ECM I know of is to install spacemacs and open an org file containing: #+begin_src emacs-lisp () #+end_src This is the stack trace if I remove the condition-case that leads to the fontification error warning: Debugger entered--Lisp error: (args-out-of-range 6 23) put-text-property(23 6 fontified nil) jit-lock-after-change(23 24 1) put-text-property(23 24 face nil #) (let ((new-prop (get-text-property pos prop))) (put-text-property (+ start (1- pos)) (1- (+ start next)) prop new-prop org-buffer)) (let ((prop (car --dolist-tail--))) (let ((new-prop (get-text-property pos prop))) (put-text-property (+ start (1- pos)) (1- (+ start next)) prop new-prop org-buffer)) (setq --dolist-tail-- (cdr --dolist-tail--))) (while --dolist-tail-- (let ((prop (car --dolist-tail--))) (let ((new-prop (get-text-property pos prop))) (put-text-property (+ start (1- pos)) (1- (+ start next)) prop new-prop org-buffer)) (setq --dolist-tail-- (cdr --dolist-tail--)))) (let ((--dolist-tail-- (cons (quote face) font-lock-extra-managed-props))) (while --dolist-tail-- (let ((prop (car --dolist-tail--))) (let ((new-prop (get-text-property pos prop))) (put-text-property (+ start (1- pos)) (1- (+ start next)) prop new-prop org-buffer)) (setq --dolist-tail-- (cdr --dolist-tail--))))) (while (setq next (next-property-change pos)) (let ((--dolist-tail-- (cons (quote face) font-lock-extra-managed-props))) (while --dolist-tail-- (let ((prop (car --dolist-tail--))) (let ((new-prop (get-text-property pos prop))) (put-text-property (+ start (1- pos)) (1- (+ start next)) prop new-prop org-buffer)) (setq --dolist-tail-- (cdr --dolist-tail--))))) (setq pos next)) (let ((pos (point-min)) next) (while (setq next (next-property-change pos)) (let ((--dolist-tail-- (cons (quote face) font-lock-extra-managed-props))) (while --dolist-tail-- (let ((prop (car --dolist-tail--))) (let ((new-prop ...)) (put-text-property (+ start ...) (1- ...) prop new-prop org-buffer)) (setq --dolist-tail-- (cdr --dolist-tail--))))) (setq pos next))) (let ((inhibit-modification-hooks nil)) (erase-buffer) (insert string " ") (if (eq major-mode lang-mode) nil (funcall lang-mode)) (org-font-lock-ensure) (let ((pos (point-min)) next) (while (setq next (next-property-change pos)) (let ((--dolist-tail-- (cons (quote face) font-lock-extra-managed-props))) (while --dolist-tail-- (let ((prop ...)) (let (...) (put-text-property ... ... prop new-prop org-buffer)) (setq --dolist-tail-- (cdr --dolist-tail--))))) (setq pos next)))) (save-current-buffer (set-buffer (get-buffer-create (format " *org-src-fontification:%s*" lang-mode))) (let ((inhibit-modification-hooks nil)) (erase-buffer) (insert string " ") (if (eq major-mode lang-mode) nil (funcall lang-mode)) (org-font-lock-ensure) (let ((pos (point-min)) next) (while (setq next (next-property-change pos)) (let ((--dolist-tail-- (cons ... font-lock-extra-managed-props))) (while --dolist-tail-- (let (...) (let ... ...) (setq --dolist-tail-- ...)))) (setq pos next))))) (let ((string (buffer-substring-no-properties start end)) (modified (buffer-modified-p)) (org-buffer (current-buffer))) (remove-text-properties start end (quote (face nil))) (save-current-buffer (set-buffer (get-buffer-create (format " *org-src-fontification:%s*" lang-mode))) (let ((inhibit-modification-hooks nil)) (erase-buffer) (insert string " ") (if (eq major-mode lang-mode) nil (funcall lang-mode)) (org-font-lock-ensure) (let ((pos (point-min)) next) (while (setq next (next-property-change pos)) (let ((--dolist-tail-- ...)) (while --dolist-tail-- (let ... ... ...))) (setq pos next))))) (let ((src-face (nth 1 (assoc-string lang org-src-block-faces t)))) (if (or (facep src-face) (listp src-face)) (progn (font-lock-append-text-property start end (quote face) src-face))) (font-lock-append-text-property start end (quote face) (quote org-block))) (add-text-properties start end (quote (font-lock-fontified t fontified t font-lock-multiline t))) (set-buffer-modified-p modified)) (progn (let ((string (buffer-substring-no-properties start end)) (modified (buffer-modified-p)) (org-buffer (current-buffer))) (remove-text-properties start end (quote (face nil))) (save-current-buffer (set-buffer (get-buffer-create (format " *org-src-fontification:%s*" lang-mode))) (let ((inhibit-modification-hooks nil)) (erase-buffer) (insert string " ") (if (eq major-mode lang-mode) nil (funcall lang-mode)) (org-font-lock-ensure) (let ((pos (point-min)) next) (while (setq next (next-property-change pos)) (let (...) (while --dolist-tail-- ...)) (setq pos next))))) (let ((src-face (nth 1 (assoc-string lang org-src-block-faces t)))) (if (or (facep src-face) (listp src-face)) (progn (font-lock-append-text-property start end (quote face) src-face))) (font-lock-append-text-property start end (quote face) (quote org-block))) (add-text-properties start end (quote (font-lock-fontified t fontified t font-lock-multiline t))) (set-buffer-modified-p modified))) (if (fboundp lang-mode) (progn (let ((string (buffer-substring-no-properties start end)) (modified (buffer-modified-p)) (org-buffer (current-buffer))) (remove-text-properties start end (quote (face nil))) (save-current-buffer (set-buffer (get-buffer-create (format " *org-src-fontification:%s*" lang-mode))) (let ((inhibit-modification-hooks nil)) (erase-buffer) (insert string " ") (if (eq major-mode lang-mode) nil (funcall lang-mode)) (org-font-lock-ensure) (let ((pos ...) next) (while (setq next ...) (let ... ...) (setq pos next))))) (let ((src-face (nth 1 (assoc-string lang org-src-block-faces t)))) (if (or (facep src-face) (listp src-face)) (progn (font-lock-append-text-property start end (quote face) src-face))) (font-lock-append-text-property start end (quote face) (quote org-block))) (add-text-properties start end (quote (font-lock-fontified t fontified t font-lock-multiline t))) (set-buffer-modified-p modified)))) (let ((lang-mode (org-src--get-lang-mode lang))) (if (fboundp lang-mode) (progn (let ((string (buffer-substring-no-properties start end)) (modified (buffer-modified-p)) (org-buffer (current-buffer))) (remove-text-properties start end (quote (face nil))) (save-current-buffer (set-buffer (get-buffer-create (format " *org-src-fontification:%s*" lang-mode))) (let ((inhibit-modification-hooks nil)) (erase-buffer) (insert string " ") (if (eq major-mode lang-mode) nil (funcall lang-mode)) (org-font-lock-ensure) (let (... next) (while ... ... ...)))) (let ((src-face (nth 1 ...))) (if (or (facep src-face) (listp src-face)) (progn (font-lock-append-text-property start end ... src-face))) (font-lock-append-text-property start end (quote face) (quote org-block))) (add-text-properties start end (quote (font-lock-fontified t fontified t font-lock-multiline t))) (set-buffer-modified-p modified))))) org-src-font-lock-fontify-block("emacs-lisp" 23 27) (cond ((and lang (not (string= lang "")) org-src-fontify-natively) (org-src-font-lock-fontify-block lang block-start block-end) (add-text-properties beg1 block-end (quote (src-block t)))) (quoting (add-text-properties beg1 (min (point-max) (1+ end1)) (list (quote face) (list :inherit (let ((face-name ...)) (append (and ... ...) (quote ...))))))) ((not org-fontify-quote-and-verse-blocks)) ((string= block-type "quote") (add-text-properties beg1 (min (point-max) (1+ end1)) (quote (face org-quote)))) ((string= block-type "verse") (add-text-properties beg1 (min (point-max) (1+ end1)) (quote (face org-verse))))) (progn (setq end (min (point-max) (match-end 0)) end1 (min (point-max) (1- (match-beginning 0)))) (setq block-end (match-beginning 0)) (if quoting (progn (org-remove-flyspell-overlays-in beg1 end1) (remove-text-properties beg end (quote (display t invisible t intangible t))))) (add-text-properties beg end (quote (font-lock-fontified t font-lock-multiline t))) (add-text-properties beg beg1 (quote (face org-meta-line))) (org-remove-flyspell-overlays-in beg beg1) (add-text-properties end1 (min (point-max) (1+ end)) (quote (face org-meta-line))) (org-remove-flyspell-overlays-in end1 end) (cond ((and lang (not (string= lang "")) org-src-fontify-natively) (org-src-font-lock-fontify-block lang block-start block-end) (add-text-properties beg1 block-end (quote (src-block t)))) (quoting (add-text-properties beg1 (min (point-max) (1+ end1)) (list (quote face) (list :inherit (let (...) (append ... ...)))))) ((not org-fontify-quote-and-verse-blocks)) ((string= block-type "quote") (add-text-properties beg1 (min (point-max) (1+ end1)) (quote (face org-quote)))) ((string= block-type "verse") (add-text-properties beg1 (min (point-max) (1+ end1)) (quote (face org-verse))))) (add-text-properties beg beg1 (quote (face org-block-begin-line))) (add-text-properties (min (point-max) (1+ end)) (min (point-max) (1+ end1)) (quote (face org-block-end-line))) t) (if (re-search-forward (concat "^[ ]*#\\+end" (match-string 4) "\\>.*") nil t) (progn (setq end (min (point-max) (match-end 0)) end1 (min (point-max) (1- (match-beginning 0)))) (setq block-end (match-beginning 0)) (if quoting (progn (org-remove-flyspell-overlays-in beg1 end1) (remove-text-properties beg end (quote (display t invisible t intangible t))))) (add-text-properties beg end (quote (font-lock-fontified t font-lock-multiline t))) (add-text-properties beg beg1 (quote (face org-meta-line))) (org-remove-flyspell-overlays-in beg beg1) (add-text-properties end1 (min (point-max) (1+ end)) (quote (face org-meta-line))) (org-remove-flyspell-overlays-in end1 end) (cond ((and lang (not (string= lang "")) org-src-fontify-natively) (org-src-font-lock-fontify-block lang block-start block-end) (add-text-properties beg1 block-end (quote (src-block t)))) (quoting (add-text-properties beg1 (min (point-max) (1+ end1)) (list (quote face) (list :inherit (let ... ...))))) ((not org-fontify-quote-and-verse-blocks)) ((string= block-type "quote") (add-text-properties beg1 (min (point-max) (1+ end1)) (quote (face org-quote)))) ((string= block-type "verse") (add-text-properties beg1 (min (point-max) (1+ end1)) (quote (face org-verse))))) (add-text-properties beg beg1 (quote (face org-block-begin-line))) (add-text-properties (min (point-max) (1+ end)) (min (point-max) (1+ end1)) (quote (face org-block-end-line))) t)) (cond ((and (match-end 4) (equal dc3 "+begin")) (setq block-type (downcase (match-string 5)) quoting (member block-type org-protecting-blocks)) (if (re-search-forward (concat "^[ ]*#\\+end" (match-string 4) "\\>.*") nil t) (progn (setq end (min (point-max) (match-end 0)) end1 (min (point-max) (1- (match-beginning 0)))) (setq block-end (match-beginning 0)) (if quoting (progn (org-remove-flyspell-overlays-in beg1 end1) (remove-text-properties beg end (quote ...)))) (add-text-properties beg end (quote (font-lock-fontified t font-lock-multiline t))) (add-text-properties beg beg1 (quote (face org-meta-line))) (org-remove-flyspell-overlays-in beg beg1) (add-text-properties end1 (min (point-max) (1+ end)) (quote (face org-meta-line))) (org-remove-flyspell-overlays-in end1 end) (cond ((and lang (not ...) org-src-fontify-natively) (org-src-font-lock-fontify-block lang block-start block-end) (add-text-properties beg1 block-end (quote ...))) (quoting (add-text-properties beg1 (min ... ...) (list ... ...))) ((not org-fontify-quote-and-verse-blocks)) ((string= block-type "quote") (add-text-properties beg1 (min ... ...) (quote ...))) ((string= block-type "verse") (add-text-properties beg1 (min ... ...) (quote ...)))) (add-text-properties beg beg1 (quote (face org-block-begin-line))) (add-text-properties (min (point-max) (1+ end)) (min (point-max) (1+ end1)) (quote (face org-block-end-line))) t))) ((member dc1 (quote ("+title:" "+author:" "+email:" "+date:"))) (org-remove-flyspell-overlays-in (match-beginning 0) (if (equal "+title:" dc1) (match-end 2) (match-end 0))) (add-text-properties beg (match-end 3) (if (member (intern (substring dc1 1 -1)) org-hidden-keywords) (quote (font-lock-fontified t invisible t)) (quote (font-lock-fontified t face org-document-info-keyword)))) (add-text-properties (match-beginning 6) (min (point-max) (1+ (match-end 6))) (if (string-equal dc1 "+title:") (quote (font-lock-fontified t face org-document-title)) (quote (font-lock-fontified t face org-document-info))))) ((string-prefix-p "+caption" dc1) (org-remove-flyspell-overlays-in (match-end 2) (match-end 0)) (remove-text-properties (match-beginning 0) (match-end 0) (quote (display t invisible t intangible t))) (save-excursion (beginning-of-line) (looking-at "\\([ ]*#\\+caption\\(?:\\[.*\\]\\)?:\\)[ ]*")) (add-text-properties (line-beginning-position) (match-end 1) (quote (font-lock-fontified t face org-meta-line))) (add-text-properties (match-end 0) (line-end-position) (quote (font-lock-fontified t face org-block))) t) ((member dc3 (quote (" " ""))) (org-remove-flyspell-overlays-in beg (match-end 0)) (add-text-properties beg (match-end 0) (quote (font-lock-fontified t face font-lock-comment-face)))) (t (org-remove-flyspell-overlays-in (match-beginning 0) (match-end 0)) (remove-text-properties (match-beginning 0) (match-end 0) (quote (display t invisible t intangible t))) (add-text-properties beg (match-end 0) (quote (font-lock-fontified t face org-meta-line))) t)) (let ((beg (match-beginning 0)) (block-start (match-end 0)) (block-end nil) (lang (match-string 7)) (beg1 (line-beginning-position 2)) (dc1 (downcase (match-string 2))) (dc3 (downcase (match-string 3))) end end1 quoting block-type) (cond ((and (match-end 4) (equal dc3 "+begin")) (setq block-type (downcase (match-string 5)) quoting (member block-type org-protecting-blocks)) (if (re-search-forward (concat "^[ ]*#\\+end" (match-string 4) "\\>.*") nil t) (progn (setq end (min (point-max) (match-end 0)) end1 (min (point-max) (1- ...))) (setq block-end (match-beginning 0)) (if quoting (progn (org-remove-flyspell-overlays-in beg1 end1) (remove-text-properties beg end ...))) (add-text-properties beg end (quote (font-lock-fontified t font-lock-multiline t))) (add-text-properties beg beg1 (quote (face org-meta-line))) (org-remove-flyspell-overlays-in beg beg1) (add-text-properties end1 (min (point-max) (1+ end)) (quote (face org-meta-line))) (org-remove-flyspell-overlays-in end1 end) (cond ((and lang ... org-src-fontify-natively) (org-src-font-lock-fontify-block lang block-start block-end) (add-text-properties beg1 block-end ...)) (quoting (add-text-properties beg1 ... ...)) ((not org-fontify-quote-and-verse-blocks)) ((string= block-type "quote") (add-text-properties beg1 ... ...)) ((string= block-type "verse") (add-text-properties beg1 ... ...))) (add-text-properties beg beg1 (quote (face org-block-begin-line))) (add-text-properties (min (point-max) (1+ end)) (min (point-max) (1+ end1)) (quote (face org-block-end-line))) t))) ((member dc1 (quote ("+title:" "+author:" "+email:" "+date:"))) (org-remove-flyspell-overlays-in (match-beginning 0) (if (equal "+title:" dc1) (match-end 2) (match-end 0))) (add-text-properties beg (match-end 3) (if (member (intern (substring dc1 1 -1)) org-hidden-keywords) (quote (font-lock-fontified t invisible t)) (quote (font-lock-fontified t face org-document-info-keyword)))) (add-text-properties (match-beginning 6) (min (point-max) (1+ (match-end 6))) (if (string-equal dc1 "+title:") (quote (font-lock-fontified t face org-document-title)) (quote (font-lock-fontified t face org-document-info))))) ((string-prefix-p "+caption" dc1) (org-remove-flyspell-overlays-in (match-end 2) (match-end 0)) (remove-text-properties (match-beginning 0) (match-end 0) (quote (display t invisible t intangible t))) (save-excursion (beginning-of-line) (looking-at "\\([ ]*#\\+caption\\(?:\\[.*\\]\\)?:\\)[ ]*")) (add-text-properties (line-beginning-position) (match-end 1) (quote (font-lock-fontified t face org-meta-line))) (add-text-properties (match-end 0) (line-end-position) (quote (font-lock-fontified t face org-block))) t) ((member dc3 (quote (" " ""))) (org-remove-flyspell-overlays-in beg (match-end 0)) (add-text-properties beg (match-end 0) (quote (font-lock-fontified t face font-lock-comment-face)))) (t (org-remove-flyspell-overlays-in (match-beginning 0) (match-end 0)) (remove-text-properties (match-beginning 0) (match-end 0) (quote (display t invisible t intangible t))) (add-text-properties beg (match-end 0) (quote (font-lock-fontified t face org-meta-line))) t))) (progn (let ((beg (match-beginning 0)) (block-start (match-end 0)) (block-end nil) (lang (match-string 7)) (beg1 (line-beginning-position 2)) (dc1 (downcase (match-string 2))) (dc3 (downcase (match-string 3))) end end1 quoting block-type) (cond ((and (match-end 4) (equal dc3 "+begin")) (setq block-type (downcase (match-string 5)) quoting (member block-type org-protecting-blocks)) (if (re-search-forward (concat "^[ ]*#\\+end" (match-string 4) "\\>.*") nil t) (progn (setq end (min ... ...) end1 (min ... ...)) (setq block-end (match-beginning 0)) (if quoting (progn ... ...)) (add-text-properties beg end (quote ...)) (add-text-properties beg beg1 (quote ...)) (org-remove-flyspell-overlays-in beg beg1) (add-text-properties end1 (min ... ...) (quote ...)) (org-remove-flyspell-overlays-in end1 end) (cond (... ... ...) (quoting ...) (...) (... ...) (... ...)) (add-text-properties beg beg1 (quote ...)) (add-text-properties (min ... ...) (min ... ...) (quote ...)) t))) ((member dc1 (quote ("+title:" "+author:" "+email:" "+date:"))) (org-remove-flyspell-overlays-in (match-beginning 0) (if (equal "+title:" dc1) (match-end 2) (match-end 0))) (add-text-properties beg (match-end 3) (if (member (intern ...) org-hidden-keywords) (quote (font-lock-fontified t invisible t)) (quote (font-lock-fontified t face org-document-info-keyword)))) (add-text-properties (match-beginning 6) (min (point-max) (1+ (match-end 6))) (if (string-equal dc1 "+title:") (quote (font-lock-fontified t face org-document-title)) (quote (font-lock-fontified t face org-document-info))))) ((string-prefix-p "+caption" dc1) (org-remove-flyspell-overlays-in (match-end 2) (match-end 0)) (remove-text-properties (match-beginning 0) (match-end 0) (quote (display t invisible t intangible t))) (save-excursion (beginning-of-line) (looking-at "\\([ ]*#\\+caption\\(?:\\[.*\\]\\)?:\\)[ ]*")) (add-text-properties (line-beginning-position) (match-end 1) (quote (font-lock-fontified t face org-meta-line))) (add-text-properties (match-end 0) (line-end-position) (quote (font-lock-fontified t face org-block))) t) ((member dc3 (quote (" " ""))) (org-remove-flyspell-overlays-in beg (match-end 0)) (add-text-properties beg (match-end 0) (quote (font-lock-fontified t face font-lock-comment-face)))) (t (org-remove-flyspell-overlays-in (match-beginning 0) (match-end 0)) (remove-text-properties (match-beginning 0) (match-end 0) (quote (display t invisible t intangible t))) (add-text-properties beg (match-end 0) (quote (font-lock-fontified t face org-meta-line))) t)))) (if (re-search-forward "^\\([ ]*#\\(\\(\\+[a-zA-Z]+:?\\| \\|$\\)\\(_\\([a-zA-Z]+\\)\\)?\\)[ ]*\\(\\([^ \n]*\\)[ ]*\\(.*\\)\\)\\)" limit t) (progn (let ((beg (match-beginning 0)) (block-start (match-end 0)) (block-end nil) (lang (match-string 7)) (beg1 (line-beginning-position 2)) (dc1 (downcase (match-string 2))) (dc3 (downcase (match-string 3))) end end1 quoting block-type) (cond ((and (match-end 4) (equal dc3 "+begin")) (setq block-type (downcase (match-string 5)) quoting (member block-type org-protecting-blocks)) (if (re-search-forward (concat "^[ ]*#\\+end" ... "\\>.*") nil t) (progn (setq end ... end1 ...) (setq block-end ...) (if quoting ...) (add-text-properties beg end ...) (add-text-properties beg beg1 ...) (org-remove-flyspell-overlays-in beg beg1) (add-text-properties end1 ... ...) (org-remove-flyspell-overlays-in end1 end) (cond ... ... ... ... ...) (add-text-properties beg beg1 ...) (add-text-properties ... ... ...) t))) ((member dc1 (quote ("+title:" "+author:" "+email:" "+date:"))) (org-remove-flyspell-overlays-in (match-beginning 0) (if (equal "+title:" dc1) (match-end 2) (match-end 0))) (add-text-properties beg (match-end 3) (if (member ... org-hidden-keywords) (quote ...) (quote ...))) (add-text-properties (match-beginning 6) (min (point-max) (1+ ...)) (if (string-equal dc1 "+title:") (quote ...) (quote ...)))) ((string-prefix-p "+caption" dc1) (org-remove-flyspell-overlays-in (match-end 2) (match-end 0)) (remove-text-properties (match-beginning 0) (match-end 0) (quote (display t invisible t intangible t))) (save-excursion (beginning-of-line) (looking-at "\\([ ]*#\\+caption\\(?:\\[.*\\]\\)?:\\)[ ]*")) (add-text-properties (line-beginning-position) (match-end 1) (quote (font-lock-fontified t face org-meta-line))) (add-text-properties (match-end 0) (line-end-position) (quote (font-lock-fontified t face org-block))) t) ((member dc3 (quote (" " ""))) (org-remove-flyspell-overlays-in beg (match-end 0)) (add-text-properties beg (match-end 0) (quote (font-lock-fontified t face font-lock-comment-face)))) (t (org-remove-flyspell-overlays-in (match-beginning 0) (match-end 0)) (remove-text-properties (match-beginning 0) (match-end 0) (quote (display t invisible t intangible t))) (add-text-properties beg (match-end 0) (quote (font-lock-fontified t face org-meta-line))) t))))) (let ((case-fold-search t)) (if (re-search-forward "^\\([ ]*#\\(\\(\\+[a-zA-Z]+:?\\| \\|$\\)\\(_\\([a-zA-Z]+\\)\\)?\\)[ ]*\\(\\([^ \n]*\\)[ ]*\\(.*\\)\\)\\)" limit t) (progn (let ((beg (match-beginning 0)) (block-start (match-end 0)) (block-end nil) (lang (match-string 7)) (beg1 (line-beginning-position 2)) (dc1 (downcase (match-string 2))) (dc3 (downcase (match-string 3))) end end1 quoting block-type) (cond ((and (match-end 4) (equal dc3 "+begin")) (setq block-type (downcase ...) quoting (member block-type org-protecting-blocks)) (if (re-search-forward ... nil t) (progn ... ... ... ... ... ... ... ... ... ... ... t))) ((member dc1 (quote ...)) (org-remove-flyspell-overlays-in (match-beginning 0) (if ... ... ...)) (add-text-properties beg (match-end 3) (if ... ... ...)) (add-text-properties (match-beginning 6) (min ... ...) (if ... ... ...))) ((string-prefix-p "+caption" dc1) (org-remove-flyspell-overlays-in (match-end 2) (match-end 0)) (remove-text-properties (match-beginning 0) (match-end 0) (quote ...)) (save-excursion (beginning-of-line) (looking-at "\\([ ]*#\\+caption\\(?:\\[.*\\]\\)?:\\)[ ]*")) (add-text-properties (line-beginning-position) (match-end 1) (quote ...)) (add-text-properties (match-end 0) (line-end-position) (quote ...)) t) ((member dc3 (quote ...)) (org-remove-flyspell-overlays-in beg (match-end 0)) (add-text-properties beg (match-end 0) (quote ...))) (t (org-remove-flyspell-overlays-in (match-beginning 0) (match-end 0)) (remove-text-properties (match-beginning 0) (match-end 0) (quote ...)) (add-text-properties beg (match-end 0) (quote ...)) t)))))) org-fontify-meta-lines-and-blocks-1(37) org-fontify-meta-lines-and-blocks(37) font-lock-fontify-keywords-region(1 37 nil) font-lock-default-fontify-region(1 37 nil) font-lock-fontify-region(1 37 nil) font-lock-default-fontify-buffer() font-lock-fontify-buffer() org-bullets-mode() run-hooks(change-major-mode-after-body-hook text-mode-hook outline-mode-hook org-mode-hook) apply(run-hooks (change-major-mode-after-body-hook text-mode-hook outline-mode-hook org-mode-hook)) run-mode-hooks(org-mode-hook) org-mode() set-auto-mode-0(org-mode nil) set-auto-mode() normal-mode(t) after-find-file(nil t) find-file-noselect-1(# "~/Dropbox (Personal)/Notes/test.org" nil nil "~/Dropbox (Personal)/Notes/test.org" (213415716 16777220)) find-file-noselect("/Users/aaronjensen/Dropbox (Personal)/Notes/test.org" nil nil nil) find-file("/Users/aaronjensen/Dropbox (Personal)/Notes/test.org") find-file-existing("/Users/aaronjensen/Dropbox (Personal)/Notes/test.org") (lambda (&rest ignore) (find-file-existing "/Users/aaronjensen/Dropbox (Personal)/Notes/test.org"))((push-button :args nil :value "~/Dropbox (Personal)/Notes/test.org" :action (lambda (&rest ignore) (find-file-existing "/Users/aaronjensen/Dropbox (Personal)/Notes/test.org")) :mouse-face highlight :follow-link " " :button-prefix "" :button-suffix "" :format "%[%t%]" :button-overlay # :from # :to #) nil) widget-apply((push-button :args nil :value "~/Dropbox (Personal)/Notes/test.org" :action (lambda (&rest ignore) (find-file-existing "/Users/aaronjensen/Dropbox (Personal)/Notes/test.org")) :mouse-face highlight :follow-link " " :button-prefix "" :button-suffix "" :format "%[%t%]" :button-overlay # :from # :to #) :action nil) widget-apply-action((push-button :args nil :value "~/Dropbox (Personal)/Notes/test.org" :action (lambda (&rest ignore) (find-file-existing "/Users/aaronjensen/Dropbox (Personal)/Notes/test.org")) :mouse-face highlight :follow-link " " :button-prefix "" :button-suffix "" :format "%[%t%]" :button-overlay # :from # :to #) nil) widget-button-press(1142) funcall-interactively(widget-button-press 1142) call-interactively(widget-button-press nil nil) command-execute(widget-button-press)