From mboxrd@z Thu Jan 1 00:00:00 1970 From: Richard Kim Subject: Bug: error on html export [7.9.3e (7.9.3e-3-gb07a9b @ /u/kimr/src/emacs/emacs-trunk_latest/lisp/org/)] Date: Sat, 23 Feb 2013 10:41:12 -0800 Message-ID: Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:41091) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U9K3e-0005d7-ON for emacs-orgmode@gnu.org; Sat, 23 Feb 2013 13:43:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U9K2g-0004pv-1l for emacs-orgmode@gnu.org; Sat, 23 Feb 2013 13:42:50 -0500 Received: from mail-pb0-f45.google.com ([209.85.160.45]:43404) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U9K2f-0004pe-Oj for emacs-orgmode@gnu.org; Sat, 23 Feb 2013 13:41:49 -0500 Received: by mail-pb0-f45.google.com with SMTP id ro8so973032pbb.18 for ; Sat, 23 Feb 2013 10:41:48 -0800 (PST) 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Starting with emacs bzr trunk revision 111688 of Feb 7, 2013, following three line org file results in error when html export is attempted. -------------- start of foo.org -------------------------------------------= ----- #+TITLE: Nothing # file:/tmp -------------- end of foo.org -------------------------------------------= ----- To see the problem, load the three line org file, then hit `C-c C-e h'. It results in the following stack trace: Debugger entered--Lisp error: (wrong-type-argument stringp nil) string-match("\\([^\\\\]\\)\\([_^]\\)" nil) org-export-protect-sub-super(nil) org-export-normalize-links() org-export-preprocess-string(#("#+TITLE: Nothing\n\n# file:/tmp\n= " 0 8 (fontified t font-lock-fontified t org-category "foo" face org-docume= nt-info-keyword) 8 13 (fontified t org-category "foo") 13 21 (fontified t o= rg-category "foo" font-lock-fontified t face org-document-title) 21 22 (fon= tified t font-lock-fontified t org-category "foo") 22 24 (fontified t font-= lock-fontified t org-category "foo" face font-lock-comment-face) 24 30 (fon= tified t font-lock-fontified t org-category "foo" org-no-flyspell t mouse-f= ace highlight face font-lock-comment-face keymap (keymap (follow-link . mou= se-face) (mouse-3 . org-find-file-at-mouse) (mouse-2 . org-open-at-mouse)))= 30 31 (fontified t font-lock-fontified t org-category "foo" rear-nonsticky= (mouse-face highlight keymap invisible intangible help-echo org-linked-tex= t htmlize-link) org-no-flyspell t mouse-face highlight face font-lock-comme= nt-face keymap (keymap (follow-link . mouse-face) (mouse-3 . org-find-file-= at-mouse) (mouse-2 . org-open-at-mouse))) 31 32 (font-lock-fontified t font= ified t org-category "foo" rear-nonsticky (mouse-face highlight keymap invi= sible intangible help-echo org-linked-text htmlize-link) org-no-flyspell t = mouse-face highlight face font-lock-comment-face keymap (keymap (follow-lin= k . mouse-face) (mouse-3 . org-find-file-at-mouse) (mouse-2 . org-open-at-m= ouse))) 32 33 (font-lock-fontified t fontified t org-category "foo" rear-no= nsticky (mouse-face highlight keymap invisible intangible help-echo org-lin= ked-text htmlize-link) org-no-flyspell t mouse-face highlight face font-loc= k-comment-face keymap (keymap (follow-link . mouse-face) (mouse-3 . org-fin= d-file-at-mouse) (mouse-2 . org-open-at-mouse))) 33 34 (fontified t org-cat= egory "foo")) :emph-multiline t :for-backend html :skip-before-1st-heading = nil :drawers nil :todo-keywords t :tasks t :tags not-in-toc :priority nil := footnotes t :timestamps t :archived-trees headline :select-tags ("export") = :exclude-tags ("noexport") :add-text nil :LaTeX-fragments t) org-export-as-html(nil) call-interactively(org-export-as-html) org-export(nil) call-interactively(org-export nil nil) I believe this bug was introduced by bzr version 111688 which has this comm= ent 2013-02-07 Bastien Guerry * org-exp.el (org-export-normalize-links): Don't match links within tags. along with this code change: =3D=3D=3D modified file 'lisp/org/org-exp.el' --- lisp/org/org-exp.el 2013-01-08 14:27:18 +0000 +++ lisp/org/org-exp.el 2013-02-07 07:11:59 +0000 @@ -2113,7 +2113,8 @@ (put-text-property (match-beginning 0) (match-end 0) 'org-no= rmalized-link t)) (goto-char (point-min)) (while (re-search-forward re-plain-link nil t) - (unless (get-text-property (match-beginning 0) 'org-normaliz= ed-link) + (unless (or (get-text-property (match-beginning 0) 'org-norm= alized-link) + (assoc :tags (org-context))) (goto-char (1- (match-end 0))) (org-if-unprotected-at (1+ (match-beginning 0)) (let* ((s (concat (match-string 1) If I revert this change, then the error goes away. Since "# file:/tmp" is a comment line, shouldn't the link be ignored instead of causing an error? Emacs : GNU Emacs 24.3.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.1= 0) of 2013-02-22 on kimr-e6410 Package: Org-mode version 7.9.3e (7.9.3e-3-gb07a9b @ /u/kimr/src/emacs/emac= s-trunk_latest/lisp/org/) current state: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (setq org-export-preprocess-before-selecting-backend-code-hook '(org-beamer-sele= ct-beamer-code) org-tab-first-hook '(org-hide-block-toggle-maybe org-src-native-tab-command-maybe org-babel-hide-result-toggle-maybe org-babel-header-arg-expand) org-speed-command-hook '(org-speed-command-default-hook org-babel-speed-command-hook) org-occur-hook '(org-first-headline-recenter) org-metaup-hook '(org-babel-load-in-session-maybe) org-export-preprocess-before-normalizing-links-hook '(org-remove-file-link= -modifiers) org-confirm-shell-link-function 'yes-or-no-p org-export-latex-final-hook '(org-beamer-amend-header org-beamer-fix-toc org-beamer-auto-fragile-frames org-beamer-place-default-actions-for-lists) org-export-latex-after-initial-vars-hook '(org-beamer-after-initial-vars) org-after-todo-state-change-hook '(org-clock-out-if-current) org-src-mode-hook '(org-src-babel-configure-edit-buffer org-src-mode-configure-edit-buffer) org-agenda-before-write-hook '(org-agenda-add-entry-text) org-babel-pre-tangle-hook '(save-buffer) org-mode-hook '(#[nil "\300\301\302\303\304$\207" [org-add-hook change-major-mode-hook org-show-block-all append local] 5] #[nil "\300\301\302\303\304$\207" [org-add-hook change-major-mode-hook org-babel-show-result-all append local] 5] org-babel-result-hide-spec org-babel-hide-all-hashes) org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point org-babel-execute-safely-maybe) org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers org-cycle-show-empty-lines org-optimize-window-after-visibility-change) org-export-latex-format-toc-function 'org-export-latex-format-toc-default org-export-blocks '((src org-babel-exp-src-block nil) (export-comment org-export-blocks-format-comment t) (ditaa org-export-blocks-format-ditaa nil) (dot org-export-blocks-format-dot nil)) org-export-first-hook '(org-beamer-initialize-open-trackers) org-export-interblocks '((src org-babel-exp-non-block-elements)) org-confirm-elisp-link-function 'yes-or-no-p org-metadown-hook '(org-babel-pop-to-session-maybe) org-clock-out-hook '(org-clock-remove-empty-clock-drawer) )