emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Bug: error on html export [7.9.3e (7.9.3e-3-gb07a9b @ /u/kimr/src/emacs/emacs-trunk_latest/lisp/org/)]
@ 2013-02-23 18:41 Richard Kim
  2013-02-26 10:52 ` Bastien
  0 siblings, 1 reply; 2+ messages in thread
From: Richard Kim @ 2013-02-23 18:41 UTC (permalink / raw)
  To: emacs-orgmode


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-document-info-keyword) 8 13 (fontified t org-category "foo") 13 21 (fontified t org-category "foo" font-lock-fontified t face org-document-title) 21 22 (fontified 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 (fontified t font-lock-fontified t org-category "foo" org-no-flyspell t mouse-face highlight face font-lock-comment-face keymap (keymap (follow-link . mouse-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-text htmlize-link) org-no-flyspell t mouse-face highlight face font-lock-comment-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 fontified t org-category "foo" rear-nonsticky (mouse-face highlight keymap invisible intangible help-echo org-linked-text htmlize-link) org-no-flyspell t mouse-face highlight face font-lock-comment-face keymap (keymap (follow-link . mouse-face) (mouse-3 . org-find-file-at-mouse) (mouse-2 . org-open-at-mouse))) 32 33 (font-lock-fontified t fontified t org-category "foo" rear-nonsticky (mouse-face highlight keymap invisible intangible help-echo org-linked-text htmlize-link) org-no-flyspell t mouse-face highlight face font-lock-comment-face keymap (keymap (follow-link . mouse-face) (mouse-3 . org-find-file-at-mouse) (mouse-2 . org-open-at-mouse))) 33 34 (fontified t org-category "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 comment

        2013-02-07  Bastien Guerry  <bzg@gnu.org>

                * org-exp.el (org-export-normalize-links): Don't match links
                within tags.

along with this code change:

        === 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-normalized-link t))
             (goto-char (point-min))
             (while (re-search-forward re-plain-link nil t)
        -      (unless (get-text-property (match-beginning 0) 'org-normalized-link)
        +      (unless (or (get-text-property (match-beginning 0) 'org-normalized-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.10)
 of 2013-02-22 on kimr-e6410
Package: Org-mode version 7.9.3e (7.9.3e-3-gb07a9b @ /u/kimr/src/emacs/emacs-trunk_latest/lisp/org/)

current state:
==============
(setq
 org-export-preprocess-before-selecting-backend-code-hook '(org-beamer-select-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)
 )

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Bug: error on html export [7.9.3e (7.9.3e-3-gb07a9b @ /u/kimr/src/emacs/emacs-trunk_latest/lisp/org/)]
  2013-02-23 18:41 Bug: error on html export [7.9.3e (7.9.3e-3-gb07a9b @ /u/kimr/src/emacs/emacs-trunk_latest/lisp/org/)] Richard Kim
@ 2013-02-26 10:52 ` Bastien
  0 siblings, 0 replies; 2+ messages in thread
From: Bastien @ 2013-02-26 10:52 UTC (permalink / raw)
  To: Richard Kim; +Cc: emacs-orgmode

Hi Richard,

Richard Kim <emacs18@gmail.com> writes:

> 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:

I cannot reproduce this error with Org 7.9.3f, it should
have been fixed.

Please upgrade to the last public release and let us know.

Thanks,

-- 
 Bastien

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-02-26 10:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-23 18:41 Bug: error on html export [7.9.3e (7.9.3e-3-gb07a9b @ /u/kimr/src/emacs/emacs-trunk_latest/lisp/org/)] Richard Kim
2013-02-26 10:52 ` Bastien

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).