URL: <http://gna.org/bugs/?12860>
Summary: <src lang="haskell"> fails unless haskell-doc-show-global-types is nil Project: Emacs Muse Submitted by: None Submitted on: Thursday 01/15/2009 at 12:17 CET Category: muse Severity: 3 - Normal Priority: 5 - Normal Status: None Privacy: Public Assigned to: None Originator Email: nanoth...@gmail.com Open/Closed: Open Discussion Lock: Any _______________________________________________________ Details: For an input file: # File: Scratch.muse <src lang="haskell"> module Main where main = putStrLn "hello world" </src> If the following file is published (C-c C-t) and _haskell-doc-show-global-types_ is nil, then everything works correctly. However, if haskell-doc-show-global-types is t, then the following error occurs: Warning (muse): An error occurred while publishing Scratch: (wrong-type-argument stringp nil) Set debug-on-error to `t' if you would like a backtrace. The backtrace is: Debugger entered--Lisp error: (wrong-type-argument stringp nil) expand-file-name(nil) ad-Orig-find-file-noselect(nil nil nil nil) (setq ad-return-value (ad-Orig-find-file-noselect filename nowarn rawfile wildcards)) (let (ad-return-value) (setq ad-return-value (ad-Orig-find-file-noselect filename nowarn rawfile wildcards)) (folding-find-file-noselect) ad-return-value) find-file-noselect(nil) (set-buffer (find-file-noselect f)) (lambda (f) (set-buffer (find-file-noselect f)) (imenu--make-index-alist) (cons f (mapcar ... ...)))(nil) mapcar((lambda (f) (set-buffer (find-file-noselect f)) (imenu--make-index-alist) (cons f (mapcar ... ...))) (nil)) (save-current-buffer (mapcar (lambda ... ... ... ...) filelist)) haskell-doc-rescan-files((nil)) (setq haskell-doc-index (haskell-doc-rescan-files (haskell-doc-imported-list))) haskell-doc-make-global-fct-index() (and haskell-doc-show-global-types (haskell-doc-make-global-fct-index)) (progn (push (current-buffer) haskell-doc-buffers) (if (fboundp ...) (unless haskell-doc-timer ...) (add-hook ... ... nil ...)) (and haskell-doc-show-global-types (haskell-doc-make-global-fct-index)) (haskell-doc-install-keymap) (run-hooks (quote haskell-doc-mode-hook))) (if haskell-doc-mode (progn (push ... haskell-doc-buffers) (if ... ... ...) (and haskell-doc-show-global-types ...) (haskell-doc-install-keymap) (run-hooks ...))) (when haskell-doc-mode (push (current-buffer) haskell-doc-buffers) (if (fboundp ...) (unless haskell-doc-timer ...) (add-hook ... ... nil ...)) (and haskell-doc-show-global-types (haskell-doc-make-global-fct-index)) (haskell-doc-install-keymap) (run-hooks (quote haskell-doc-mode-hook))) turn-on-haskell-doc-mode() run-hooks(haskell-mode-hook) apply(run-hooks haskell-mode-hook) run-mode-hooks(haskell-mode-hook) haskell-mode() funcall(haskell-mode) (if (functionp mode) (funcall mode) (fundamental-mode)) (save-current-buffer (set-buffer temp-buffer) (insert text) (if (functionp mode) (funcall mode) (fundamental-mode)) (font-lock-fontify-buffer) (when (fboundp ...) (htmlize-region-for-paste ... ...))) (with-current-buffer temp-buffer (insert text) (if (functionp mode) (funcall mode) (fundamental-mode)) (font-lock-fontify-buffer) (when (fboundp ...) (htmlize-region-for-paste ... ...))) (unwind-protect (with-current-buffer temp-buffer (insert text) (if ... ... ...) (font-lock-fontify-buffer) (when ... ...)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))) (let ((temp-buffer ...)) (unwind-protect (with-current-buffer temp-buffer ... ... ... ...) (and ... ...))) (with-temp-buffer (insert text) (if (functionp mode) (funcall mode) (fundamental-mode)) (font-lock-fontify-buffer) (when (fboundp ...) (htmlize-region-for-paste ... ...))) (let* ((mode ...) (text ...) (htmltext ...)) (save-restriction (narrow-to-region ... ...) (insert htmltext) (goto-char ...) (re-search-forward "<pre\\([^>]*\\)>\n?" nil t) (replace-match "<pre class=\"src\">") (goto-char ...) (muse-publish-mark-read-only ... ...))) (if (condition-case nil (progn ... ...) (error nil t)) (muse-publish-example-tag beg end) (muse-publish-ensure-block beg end) (let* (... ... ...) (save-restriction ... ... ... ... ... ... ...))) muse-html-src-tag(1 #<marker at 1 in *muse-temp*<2>> (("lang" . "haskell"))) apply(muse-html-src-tag (1 #<marker at 1 in *muse-temp*<2>> (("lang" . "haskell")))) (let ((muse-inhibit-style-tags nil)) (apply (nth 4 tag-info) args)) (let ((args ...)) (if (nth 2 tag-info) (nconc args ...)) (let (...) (apply ... args))) (progn (setq end (point-marker)) (delete-region start beg) (goto-char start) (let (...) (if ... ...) (let ... ...)) (set-marker end nil)) (if tag-info (progn (setq end ...) (delete-region start beg) (goto-char start) (let ... ... ...) (set-marker end nil))) (when tag-info (setq end (point-marker)) (delete-region start beg) (goto-char start) (let (...) (if ... ...) (let ... ...)) (set-marker end nil)) (let ((closed-tag ...) (start ...) (beg ...) end attrs) (when (nth 2 tag-info) (let ... ...)) (if (and ... ...) (if ... ... ...)) (when tag-info (setq end ...) (delete-region start beg) (goto-char start) (let ... ... ...) (set-marker end nil))) (progn (let (... ... ... end attrs) (when ... ...) (if ... ...) (when tag-info ... ... ... ... ...))) (if (and tag-info (not ...)) (progn (let ... ... ... ...))) (when (and tag-info (not ...)) (let (... ... ... end attrs) (when ... ...) (if ... ...) (when tag-info ... ... ... ... ...))) (let ((tag-info ...)) (when (and tag-info ...) (let ... ... ... ...))) muse-publish-markup-tag() funcall(muse-publish-markup-tag) (cond ((and ... ...) (funcall func)) ((functionp repl) (funcall repl)) ((symbolp repl) (symbol-value repl)) (t repl)) (let* (func (text ...)) (if (stringp text) (replace-match text t))) (if (and (> ... 0) (match-beginning group) (get-text-property ... ...)) nil (let* (func ...) (if ... ...))) (unless (and (> ... 0) (match-beginning group) (get-text-property ... ...)) (let* (func ...) (if ... ...))) (while (and regexp (setq pos ...)) (if (and verbose ...) (message "Publishing %s...%d%%" name ...)) (unless (and ... ... ...) (let* ... ...)) (if (and muse-publishing-last-position ...) (if ... ... ...)) (setq muse-publishing-last-position pos)) (let ((regexp ...) (group ...) (repl ...) pos) (setq muse-publishing-last-position nil) (if (symbolp regexp) (setq regexp ...)) (if (and verbose ...) (message "Publishing %s...%d%%" name ...)) (while (and regexp ...) (if ... ...) (unless ... ...) (if ... ...) (setq muse-publishing-last-position pos))) (while rules (goto-char (point-min)) (let (... ... ... pos) (setq muse-publishing-last-position nil) (if ... ...) (if ... ...) (while ... ... ... ... ...)) (setq rules (cdr rules) base (+ base ...))) (let* ((case-fold-search nil) (inhibit-read-only t) (limit ...) (verbose ...) (base 0)) (while rules (goto-char ...) (let ... ... ... ... ...) (setq rules ... base ...)) (if (and verbose ...) (message "Publishing %s...done" name))) muse-publish-markup("Scratch" ((1000 "\\(\\`\n+\\|\n+\\'\\)" 0 "") (1100 "[[:blank:]]+$" 0 "") (1200 "\\`#\\([a-zA-Z-]+\\)\\s-+\\(.+\\)\n+" 0 directive) (1250 "^;\\(?:[[:blank:]]+\\(.+\\)\\|$\\|'\\)" 0 comment) (1300 muse-tag-regexp 0 tag) (1400 muse-explicit-link-regexp 0 muse-publish-mark-link) (1600 "\\(^\\|[-[[:blank:]<('`\"\n]\\)\\(=[^=[:blank:]\n]\\|_[^_[:blank:]\n]\\|\\*+[^*[:blank:]\n]\\)" 2 word) (1700 "^\\(\\*+\\)\\s-+" 0 heading) (1800 "\\.\\.\\.\\." 0 enddots) (1850 "\\.\\.\\." 0 dots) (1900 "^----+" 0 rule) (1950 "~~" 0 no-break-space) (2000 "^Footnotes:?\\s-*" 0 fn-sep) (2100 "\\[\\([1-9][0-9]*\\)\\]" 0 footnote) (2200 "^[[:blank:]]*\\(\\([^\n[:blank:]].*?\\)?::\\(?:[[:blank:]]+\\|$\\)\\|[[:blank:]]-[[:blank:]]*\\|[[:blank:]][0-9]+\\.[[:blank:]]*\\)" 0 list) (2300 "^[[:blank:]]*\\+\\(-*\\+\\)+[[:blank:]]*\n\\(\\(.*[[:blank:]]+\\(|+\\)\\(?:[[:blank:]]\\|$\\).*\n\\)+\\([[:blank:]]*\\+\\(-*\\+\\)+[[:blank:]]*\\)\\(\n\\|\\'\\)\\)+" 0 table-el) (2350 "\\(\\([[:blank:]]*\n\\)?\\(\\(?:.*[[:blank:]]+\\(|+\\)\\(?:[[:blank:]]\\|$\\).*\\|[[:blank:]]*|[-+]+|[[:blank:]]*\\)\\(?:\n\\|\\'\\)\\)\\)+" 0 table) (2400 "^\\([[:blank:]]+\\).+" 0 quote) (2500 "\\(^\\|[[:blank:]]*\\)---?\\($\\|[[:blank:]]*\\)" 0 emdash) (2600 "^[[:blank:]]*> " 0 verse) (2700 "^\\(\\W*\\)#\\(\\S-+\\)\\s-*" 0 anchor) (2900 muse-explicit-link-regexp 0 link) (3000 muse-url-regexp 0 url) (3100 muse-wiki-interwiki-regexp 0 link) (3200 muse-wiki-wikiword-regexp 0 link) (3250 muse-wiki-project-file-regexp 0 link) (3300 "''''" 0 "") (3500 "\\([^[]\\)[-a-za-z0-9....@\\([-a-zA-z0-9_]+\\.\\)+[a-zA-Z0-9]+" 0 email) (10000 "\\(\\(\n\\(?:[[:blank:]]*\n\\)*\\([[:blank:]]*\n\\)\\)\\|\\`\\s-*\\|\\s-*\\'\\)" 3 muse-html-markup-paragraph))) (let ((muse-publish-generate-contents nil)) (unless muse-publish-inhibit-style-hooks (muse-style-run-hooks :before style)) (muse-publish-markup title (sort ... ...)) (unless muse-publish-inhibit-style-hooks (muse-style-run-hooks :before-end style)) (muse-publish-escape-specials (point-min) (point-max) nil (quote document))) (save-restriction (narrow-to-region beg end) (let (...) (unless muse-publish-inhibit-style-hooks ...) (muse-publish-markup title ...) (unless muse-publish-inhibit-style-hooks ...) (muse-publish-escape-specials ... ... nil ...)) (goto-char (point-max))) muse-publish-markup-region(1 83 "Scratch" ("html" :base "html" :path "u:/home/david/.emacs.d/muse-output/html/notes/Home" :include "/Home/[^/]+$")) (let ((style-header ...) (style-footer ...) (muse-publishing-current-style style) (muse-publishing-directives ...) (muse-publishing-p t) (inhibit-read-only t)) (run-hooks (quote muse-update-values-hook)) (run-hooks (quote muse-before-publish-hook)) (muse-publish-markup-region (point-min) (point-max) title style) (goto-char (point-min)) (when style-header (muse-insert-file-or-string style-header title)) (goto-char (point-max)) (when style-footer (muse-insert-file-or-string style-footer title)) (muse-style-run-hooks :after style) (run-hooks (quote muse-after-publish-hook))) muse-publish-markup-buffer("Scratch" ("html" :base "html" :path "u:/home/david/.emacs.d/muse-output/html/notes/Home" :include "/Home/[^/]+$")) (save-current-buffer (set-buffer temp-buffer) (muse-insert-file-contents file) (muse-publish-markup-buffer (muse-page-name file) style) (when (muse-write-file output-path) (muse-style-run-hooks :final style file output-path target))) (with-current-buffer temp-buffer (muse-insert-file-contents file) (muse-publish-markup-buffer (muse-page-name file) style) (when (muse-write-file output-path) (muse-style-run-hooks :final style file output-path target))) (if debug-on-error (with-current-buffer temp-buffer (muse-insert-file-contents file) (muse-publish-markup-buffer ... style) (when ... ...)) (condition-case err (with-current-buffer temp-buffer ... ... ...) (error ...))) (unwind-protect (if debug-on-error (with-current-buffer temp-buffer ... ... ...) (condition-case err ... ...)) (when (buffer-live-p temp-buffer) (with-current-buffer temp-buffer ...) (unless debug-on-error ...))) (let ((temp-buffer ...)) (buffer-disable-undo temp-buffer) (unwind-protect (if debug-on-error ... ...) (when ... ... ...))) (muse-with-temp-buffer (muse-insert-file-contents file) (muse-publish-markup-buffer (muse-page-name file) style) (when (muse-write-file output-path) (muse-style-run-hooks :final style file output-path target))) (progn (if (and muse-publish-report-threshhold ...) (message "Publishing %s ..." file)) (muse-with-temp-buffer (muse-insert-file-contents file) (muse-publish-markup-buffer ... style) (when ... ...)) t) (if (or force (file-newer-than-file-p file target)) (progn (if ... ...) (muse-with-temp-buffer ... ... ...) t)) (when (or force (file-newer-than-file-p file target)) (if (and muse-publish-report-threshhold ...) (message "Publishing %s ..." file)) (muse-with-temp-buffer (muse-insert-file-contents file) (muse-publish-markup-buffer ... style) (when ... ...)) t) (if (not threshhold) (message "Please save %s before publishing" file) (when (or force ...) (if ... ...) (muse-with-temp-buffer ... ... ...) t)) (let* ((output-path ...) (output-suffix ...) (muse-publishing-current-file file) (muse-publishing-current-output-path output-path) (target ...) (threshhold ...)) (if (not threshhold) (message "Please save %s before publishing" file) (when ... ... ... t))) muse-publish-file("u:/home/david/.emacs.d/muse/notes/Home/Scratch.muse" ("html" :base "html" :path "u:/home/david/.emacs.d/muse-output/html/notes/Home" :include "/Home/[^/]+$") "u:/home/david/.emacs.d/muse-output/html/notes/Home" (4)) (if (muse-publish-file buffer-file-name style output-dir force) nil (message (concat "The published version is up-to-date; use" " C-u C-c C-t to force an update."))) (unless (muse-publish-file buffer-file-name style output-dir force) (message (concat "The published version is up-to-date; use" " C-u C-c C-t to force an update."))) (let* ((style ...) (output-dir ...) (muse-current-output-style ...)) (unless (muse-publish-file buffer-file-name style output-dir force) (message ...))) (if (not muse-current-project) (if (interactive-p) (call-interactively ...) (muse-publish-this-file nil nil force)) (let* (... ... ...) (unless ... ...))) (let ((muse-current-project ...)) (if (not muse-current-project) (if ... ... ...) (let* ... ...))) muse-project-publish-this-file((4)) call-interactively(muse-project-publish-this-file) recursive-edit() That option isn't necessary for highlighting the text, a easy fix could be to just disable that option for course of the muse-project-publish-this-file . _______________________________________________________ Reply to this item at: <http://gna.org/bugs/?12860> _______________________________________________ Message sent via/by Gna! http://gna.org/ _______________________________________________ Muse-el-commits mailing list Muse-el-commits@gna.org https://mail.gna.org/listinfo/muse-el-commits