Re: [Orgmode] Bug: Export buffer w/o filename to ASCII errors out (patch attached) [6.34trans (release_6.34c.221.gadb2)]
Applied, thanks. - Carsten On Mar 24, 2010, at 9:51 PM, David Maus wrote: Remember to cover the basics, that is, what you expected to happen and what in fact did happen. You don't know how to make a good report? See http://orgmode.org/manual/Feedback.html#Feedback Your bug report will be posted to the Org-mode mailing list. When exporting a buffer without associated filename and no #+TITLE set to ASCII using C-c C-e A Org errors out with "Wrong type argument: stringp, nil". The problem is that `org-export-as-ascii' tries to obtain the document's title and falls back to (buffer-file-name) -- what is nil for a buffer w/o associated file. Steps to reproduce: - create shiny new buffer C-x b *test* RET - turn on Org M-x org-mode RET - maybe insert something - C-c C-e A Attached patch fixes this by using (buffer-file-name) only if there is one and falls back to UNTITLED. -- David Emacs : GNU Emacs 24.0.50.1 (i486-pc-linux-gnu, GTK+ Version 2.18.7) of 2010-03-11 on elegiac, modified by Debian Package: Org-mode version 6.34trans (release_6.34c.221.gadb2) current state: == (setq org-log-done 'time org-wl-nntp-prefer-web-links t org-export-latex-default-class "scrartcl" org-export-latex-after-initial-vars-hook '(org-beamer-after-initial- vars) org-todo-keyword-faces '(("TODO" :foreground "red" :weight bold) ("MAYB" :foreground "orange red" :weight bold) ("WAIT" :foreground "firebrick" :weight bold) ("DONE" :foreground "green") ("IDEA" :foreground "gold" :weight bold) ("CANC" :foreground "LightSlateGrey")) org-wl-shimbun-prefer-web-links t org-agenda-custom-commands '(("R" "Refile new tasks and notes" tags "LEVEL=1+REFILE")) org-agenda-files '("~/org/" "~/org/priv/" "~/org/pg/" "~/org/tec/") org-blocker-hook '(org-block-todo-from-children-or-siblings-or-parent) org-agenda-tags-column -120 org-checklist-export-function 'org-export-as-ascii org-after-todo-state-change-hook '(org-clock-out-if-current org- checklist) org-agenda-todo-ignore-scheduled t org-export-latex-format-toc-function 'org-export-latex-format-toc- default org-log-redeadline 'time org-export-preprocess-hook '(org-export-blocks-preprocess) org-tab-first-hook '(org-hide-block-toggle-maybe) org-src-mode-hook '(org-src-mode-configure-edit-buffer) org-confirm-shell-link-function 'yes-or-no-p org-export-first-hook '(org-beamer-initialize-open-trackers) org-wl-link-remove-filter t org-todo-keywords '((sequence "TODO(t)" "WAIT(w)" "|" "DONE(D)") (sequence "IDEA(i)" "MAYB(m)" "|" "CANC(C)")) org-agenda-before-write-hook '(org-agenda-add-entry-text) org-default-notes-file "/home/david/org//bucket.org" org-directory "/home/david/org/" org-log-reschedule 'time 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-classes '(("scrartcl" "\\documentclass[paper=a4,12pt]{scrartcl}\n \ \usepackage[utf8]{inputenc}\n \\usepackage[T1]{fontenc} \n \\usepackage[ngerman]{babel}\n \\usepackage{graphicx} \n \\usepackage{longtable}\n \\usepackage{float}\n \\usepackage{wrapfig}\n \\usepackage{soul}\n \ \usepackage{amssymb}\n \\usepackage{microtype}\n \ \usepackage{lmodern}\n \\parskip 6pt\n \ \usepackage[autocite=footnote,style=authoryear]{biblatex}\n \ \usepackage{hyperref}" ("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" . "\ \subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}") ("\ \paragraph{%s}" . "\\paragraph*{%s}") ("\\subparagraph{%s}" . "\\subparagraph*{%s}")) ) org-publish-project-alist '(("ictsoc-web" :base-directory "~/www/ ictsoc.de/" :base-extension "org" :publishing-directory "~/www/ictsoc.de/" :publishing-function org-publish-org-to- html :author "David Maus" :email "dm...@ictsoc.de" :author-info t :creator-info t :timestamp nil :headline-levels 4 :section-numbers nil :recursive t) ("ictsoc-feed" :base-directory "~/www/ictsoc.de/" :base- extension "org" :publishing-directory "~/www/ictsoc.de/" :publishing-url "http:// ictsoc.de/" :auto-index t :recursive t :index-filename "feed.atom" :index-function org-atom- publish-feed-index :feed-map-entries "LEVEL=1" :feed-id "109b1796-d619-424d-a339-596093767737") ("ictsoc" :components ("ictsoc-web"))) org-export-preprocess-before-normalizing-links-hook '(org-remove- file-link-modifiers) org-email-link-description-format "%m" org-mode-hook '((lambda nil (org-add-hook (quote change-major-mode-hook) (quote org-show- block-all) (quote append) (quote local))) ) org-refile-targets '((org-agenda-file
[Orgmode] Bug: Export buffer w/o filename to ASCII errors out (patch attached) [6.34trans (release_6.34c.221.gadb2)]
Remember to cover the basics, that is, what you expected to happen and what in fact did happen. You don't know how to make a good report? See http://orgmode.org/manual/Feedback.html#Feedback Your bug report will be posted to the Org-mode mailing list. When exporting a buffer without associated filename and no #+TITLE set to ASCII using C-c C-e A Org errors out with "Wrong type argument: stringp, nil". The problem is that `org-export-as-ascii' tries to obtain the document's title and falls back to (buffer-file-name) -- what is nil for a buffer w/o associated file. Steps to reproduce: - create shiny new buffer C-x b *test* RET - turn on Org M-x org-mode RET - maybe insert something - C-c C-e A Attached patch fixes this by using (buffer-file-name) only if there is one and falls back to UNTITLED. -- David Emacs : GNU Emacs 24.0.50.1 (i486-pc-linux-gnu, GTK+ Version 2.18.7) of 2010-03-11 on elegiac, modified by Debian Package: Org-mode version 6.34trans (release_6.34c.221.gadb2) current state: == (setq org-log-done 'time org-wl-nntp-prefer-web-links t org-export-latex-default-class "scrartcl" org-export-latex-after-initial-vars-hook '(org-beamer-after-initial-vars) org-todo-keyword-faces '(("TODO" :foreground "red" :weight bold) ("MAYB" :foreground "orange red" :weight bold) ("WAIT" :foreground "firebrick" :weight bold) ("DONE" :foreground "green") ("IDEA" :foreground "gold" :weight bold) ("CANC" :foreground "LightSlateGrey")) org-wl-shimbun-prefer-web-links t org-agenda-custom-commands '(("R" "Refile new tasks and notes" tags "LEVEL=1+REFILE")) org-agenda-files '("~/org/" "~/org/priv/" "~/org/pg/" "~/org/tec/") org-blocker-hook '(org-block-todo-from-children-or-siblings-or-parent) org-agenda-tags-column -120 org-checklist-export-function 'org-export-as-ascii org-after-todo-state-change-hook '(org-clock-out-if-current org-checklist) org-agenda-todo-ignore-scheduled t org-export-latex-format-toc-function 'org-export-latex-format-toc-default org-log-redeadline 'time org-export-preprocess-hook '(org-export-blocks-preprocess) org-tab-first-hook '(org-hide-block-toggle-maybe) org-src-mode-hook '(org-src-mode-configure-edit-buffer) org-confirm-shell-link-function 'yes-or-no-p org-export-first-hook '(org-beamer-initialize-open-trackers) org-wl-link-remove-filter t org-todo-keywords '((sequence "TODO(t)" "WAIT(w)" "|" "DONE(D)") (sequence "IDEA(i)" "MAYB(m)" "|" "CANC(C)")) org-agenda-before-write-hook '(org-agenda-add-entry-text) org-default-notes-file "/home/david/org//bucket.org" org-directory "/home/david/org/" org-log-reschedule 'time 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-classes '(("scrartcl" "\\documentclass[paper=a4,12pt]{scrartcl}\n \\usepackage[utf8]{inputenc}\n \\usepackage[T1]{fontenc}\n \\usepackage[ngerman]{babel}\n \\usepackage{graphicx}\n \\usepackage{longtable}\n \\usepackage{float}\n \\usepackage{wrapfig}\n \\usepackage{soul}\n \\usepackage{amssymb}\n \\usepackage{microtype}\n \\usepackage{lmodern}\n \\parskip 6pt\n \\usepackage[autocite=footnote,style=authoryear]{biblatex}\n \\usepackage{hyperref}" ("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}") ("\\paragraph{%s}" . "\\paragraph*{%s}") ("\\subparagraph{%s}" . "\\subparagraph*{%s}")) ) org-publish-project-alist '(("ictsoc-web" :base-directory "~/www/ictsoc.de/" :base-extension "org" :publishing-directory "~/www/ictsoc.de/" :publishing-function org-publish-org-to-html :author "David Maus" :email "dm...@ictsoc.de" :author-info t :creator-info t :timestamp nil :headline-levels 4 :section-numbers nil :recursive t) ("ictsoc-feed" :base-directory "~/www/ictsoc.de/" :base-extension "org" :publishing-directory "~/www/ictsoc.de/" :publishing-url "http://ictsoc.de/"; :auto-index t :recursive t :index-filename "feed.atom" :index-function org-atom-publish-feed-index :feed-map-entries "LEVEL=1" :feed-id "109b1796-d619-424d-a339-596093767737") ("ictsoc" :components ("ictsoc-web"))) org-export-preprocess-before-normalizing-links-hook '(org-remove-file-link-modifiers) org-email-link-description-format "%m" org-mode-hook '((lambda nil (org-add-hook (quot