* Bug: ox-publish: opaque error message when giving a nonexisting file [8.2.1 (8.2.1-dist @ /usr/share/emacs/site-lisp/org-mode/)]
@ 2013-11-25 22:03 Arne Babenhauserheide
2013-11-25 22:39 ` Nicolas Goaziou
0 siblings, 1 reply; 2+ messages in thread
From: Arne Babenhauserheide @ 2013-11-25 22:03 UTC (permalink / raw
To: emacs-orgmode
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 you set a publishing project which :include 's a non-existant
file, the error message is
+: Wrong type argument: integerp, nil
This should instead be something like “specified nonexstient file”.
The function responsible to this is
(defun org-publish-cache-ctime-of-src (file)
"Get the ctime of FILE as an integer."
(let ((attr (file-attributes
(expand-file-name (or (file-symlink-p file) file)
(file-name-directory file)))))
(+ (lsh (car (nth 5 attr)) 16)
(cadr (nth 5 attr)))))
(file-attributes <nonexistent-file) returns nil. So this should be
checked to return a clear error message.
my example config:
(setq org-publish-project-alist
'(("guile-basics"
:base-directory "~/.emacs.d/private/journal"
:publishing-directory "/tmp/public_html"
:base-extension "org"
:publishing-function org-html-publish-to-html
:section-numbers nil
:with-toc t
:html-preamble t
:exclude ".*"
:include ["2013-09-03-Di-guile-basics.org"])))
Emacs : GNU Emacs 24.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.8.2)
of 2013-10-14 on fluss
Package: Org-mode version 8.2.1 (8.2.1-dist @ /usr/share/emacs/site-lisp/org-mode/)
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)
outline-minor-mode-hook '((lambda nil (require (quote outline-magic)))
(lambda nil (require (quote outline-magic))
(define-key outline-minor-mode-map [(f10)] (quote outline-cycle)))
)
org-latex-classes '(("copernicus_discussions"
"\\documentclass{copernicus_discussions}\n [NO-DEFAULT-PACKAGES]\n [EXTRA]"
("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" . "\\subsection*{%s}")
("\\subsubsection{%s}" . "\\subsubsection*{%s}") ("\\paragraph{%s}" . "\\paragraph*{%s}")
("\\subparagraph{%s}" . "\\subparagraph*{%s}"))
("copernicus_discussions"
"\\documentclass{copernicus_discussions}\n [NO-DEFAULT-PACKAGES]\n [PACKAGES]\n [EXTRA]"
("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" . "\\subsection*{%s}")
("\\subsubsection{%s}" . "\\subsubsection*{%s}") ("\\paragraph{%s}" . "\\paragraph*{%s}")
("\\subparagraph{%s}" . "\\subparagraph*{%s}"))
("brief"
"\\documentclass{scrlttr2}\n\\usepackage[ngerman]{babel}\n\\setlength{\\parindent}{0cm}\n\\KOMAoptions{paper=a4}"
("\n\\vspace{3mm}\\hspace*{10mm}\\textbf{%s}\n\\vspace{3mm}" .
"\n\\vspace{3mm}\\hspace*{10mm}\\textbf{%s}\n\\vspace{3mm}")
("\n\\vspace{3mm}\\hspace*{5mm}\\textit{%s}\n\\vspace{3mm}" .
"\n\\vspace{3mm}\\hspace*{5mm}\\textit{%s}\n\\vspace{3mm}")
("\n\\vspace{3mm}\\hspace*{5mm}\\textit{%s}\n\\vspace{3mm}" .
"\n\\vspace{3mm}\\hspace*{5mm}\\textit{%s}\n\\vspace{3mm}")
("\n\\vspace{3mm}\\hspace*{5mm}\\textit{%s}\n\\vspace{3mm}" .
"\n\\vspace{3mm}\\hspace*{5mm}\\textit{%s}\n\\vspace{3mm}")
("\n\\vspace{3mm}\\hspace*{5mm}\\textit{%s}\n\\vspace{3mm}" .
"\n\\vspace{3mm}\\hspace*{5mm}\\textit{%s}\n\\vspace{3mm}")
)
("leaflet" "\\documentclass{leaflet}\n\\setlength{\\parindent}{0cm}"
("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" "\\newpage" "\\subsection*{%s}" "\\newpage")
("\\subsubsection{%s}" . "\\subsubsection*{%s}") ("\\paragraph{%s}" . "\\paragraph*{%s}")
("\\subparagraph{%s}" . "\\subparagraph*{%s}"))
("protokoll" "\\documentclass{scrartcl}\n\\setlength{\\parindent}{0cm}"
("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" "\\newpage" "\\subsection*{%s}" "\\newpage")
("\\subsubsection{%s}" . "\\subsubsection*{%s}") ("\\paragraph{%s}" . "\\paragraph*{%s}")
("\\subparagraph{%s}" . "\\subparagraph*{%s}"))
("beamer" "\\documentclass[presentation]{beamer}\n[DEFAULT-PACKAGES]\n[PACKAGES]\n[EXTRA]"
("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" . "\\subsection*{%s}")
("\\subsubsection{%s}" . "\\subsubsection*{%s}"))
("article" "\\documentclass[11pt]{article}" ("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
("\\paragraph{%s}" . "\\paragraph*{%s}") ("\\subparagraph{%s}" . "\\subparagraph*{%s}"))
("report" "\\documentclass[11pt]{report}" ("\\part{%s}" . "\\part*{%s}")
("\\chapter{%s}" . "\\chapter*{%s}") ("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}"))
("book" "\\documentclass[11pt]{book}" ("\\part{%s}" . "\\part*{%s}")
("\\chapter{%s}" . "\\chapter*{%s}") ("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}"))
)
org-latex-default-packages-alist '(("AUTO" "inputenc" t) ("T1" "fontenc" t) ("" "fixltx2e" nil) ("" "graphicx" t)
("" "longtable" nil) ("" "float" nil) ("" "wrapfig" nil) ("" "soul" t)
("" "textcomp" t) ("" "marvosym" t) ("" "wasysym" t) ("" "latexsym" t) ("" "amssymb" t)
("" "amstext" nil) ("" "hyperref" nil) "\\tolerance=1000")
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-agenda-start-on-weekday nil
org-confirm-shell-link-function 'yes-or-no-p
org-time-stamp-custom-formats '("<%Y-%m-%d %a>" . "<%Y-%m-%d %a %H:%M>")
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-latex-pdf-process '("pdflatex -interaction nonstopmode -shell-escape -output-directory %o %f" "bibtex $(basename %b)"
"pdflatex -interaction nonstopmode -shell-escape -output-directory %o %f"
"pdflatex -interaction nonstopmode -shell-escape -output-directory %o %f")
org-export-date-timestamp-format "%Y-%m-%d"
org-export-latex-after-initial-vars-hook '(org-beamer-after-initial-vars)
org-agenda-skip-scheduled-if-done t
org-agenda-custom-commands '(("o" "Agenda and TODOs" ((tags "KANBAN") (agenda nil) (todo ""))))
org-latex-format-headline-function 'org-latex-format-headline-default-function
org-default-notes-file "~/.emacs.d/private/org/emacs-remember-mode.org"
org-capture-templates '(("t" "A simple task" entry (file+headline "~/plan.org" "Aufgaben Sammeln") "** ❢ %?")
("n" "Notes" entry (file "~/.emacs.d/private/org/emacs-remember-mode.org") "* %T %?" :prepend t))
org-agenda-include-diary t
org-after-todo-state-change-hook '(org-clock-out-if-current)
org-from-is-user-regexp nil
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-remember-templates '(("todo" 116 "❢: %?\n" "~/.emacs.d/private/org/emacs-plan.org" nil nil)
("Note" 110 "%?\n" nil nil nil))
org-export-copy-to-kill-ring t
org-beamer-column-view-format "%45ITEM %10BEAMER_env(Env) %10BEAMER_envargs(Env Args) %4BEAMER_col(Col) %8BEAMER_extra(Extra)"
org-mode-hook '(org-mode-reftex-setup
#[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-extend-today-until 4
org-export-with-tags 'not-in-toc
org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point org-babel-execute-safely-maybe)
org-directory "~/.emacs.d/private/org"
org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers org-cycle-hide-inline-tasks
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-first-hook '(org-beamer-initialize-open-trackers)
org-export-with-drawers nil
org-link-abbrev-alist '(("bib" . "~/aufschriebe/ref.bib::%s") ("notes" . "~/aufschriebe/papers.org::#%s")
("papers" . "~/aufschriebe/papers/%s.pdf"))
org-latex-packages-alist '(("" "color") ("" "minted") ("" "color" t) ("" "minted" t) ("" "parskip" t))
org-babel-tangle-lang-exts '(("python" . "py") ("C++" . "cpp") ("emacs-lisp" . "el"))
org-confirm-elisp-link-function 'yes-or-no-p
org-metadown-hook '(org-babel-pop-to-session-maybe)
outline-mode-hook '((lambda nil (require (quote outline-magic))))
org-latex-listings 'minted
org-ditaa-jar-path "~/.emacs.d/private/org/ditaa0_9/ditaa0_9.jar"
org-agenda-skip-deadline-if-done t
org-babel-load-languages '((C . t) (R . t) (asymptote) (awk) (calc) (clojure) (comint) (css) (ditaa . t) (dot . t)
(emacs-lisp . t) (fortran) (gnuplot . t) (haskell) (io) (java) (js) (latex) (ledger) (lilypond)
(lisp) (matlab) (maxima) (mscgen) (ocaml) (octave) (org . t) (perl) (picolisp) (plantuml)
(python . t) (ref) (ruby) (sass) (scala) (scheme . t) (screen) (sh . t) (shen) (sql) (sqlite))
org-latex-to-pdf-process '("pdflatex -interaction nonstopmode -shell-escape -output-directory %o %f"
"bibtex $(basename %b)"
"pdflatex -interaction nonstopmode -shell-escape -output-directory %o %f"
"pdflatex -interaction nonstopmode -shell-escape -output-directory %o %f")
org-agenda-files '("~/plan.org" "~/dr/Doktorarbeit-Notizen/plan.org")
org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
org-publish-project-alist '(("guile-basics" :base-directory "~/.emacs.d/private/journal" :publishing-directory
"/tmp/public_html" :base-extension "org" :publishing-function org-html-publish-to-html
:section-numbers nil :with-toc t :html-preamble t :exclude ".*" :include
["2013-09-03-Di-guile-basics.org"])
)
org-export-latex-classes '(("article" "\\documentclass[11pt]{scrartcl}" ("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
("\\paragraph{%s}" . "\\paragraph*{%s}") ("\\subparagraph{%s}" . "\\subparagraph*{%s}"))
("report" "\\documentclass[11pt]{scrreprt}" ("\\part{%s}" . "\\part*{%s}")
("\\chapter{%s}" . "\\chapter*{%s}") ("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
("\\paragraph{%s}" . "\\paragraph*{%s}") ("\\subparagraph{%s}" . "\\subparagraph*{%s}"))
("book" "\\documentclass[11pt]{scrbook}" ("\\part{%s}" . "\\part*{%s}")
("\\chapter{%s}" . "\\chapter*{%s}") ("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}"))
("beamer" "\\documentclass{beamer}" org-beamer-sectioning))
)
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Bug: ox-publish: opaque error message when giving a nonexisting file [8.2.1 (8.2.1-dist @ /usr/share/emacs/site-lisp/org-mode/)]
2013-11-25 22:03 Bug: ox-publish: opaque error message when giving a nonexisting file [8.2.1 (8.2.1-dist @ /usr/share/emacs/site-lisp/org-mode/)] Arne Babenhauserheide
@ 2013-11-25 22:39 ` Nicolas Goaziou
0 siblings, 0 replies; 2+ messages in thread
From: Nicolas Goaziou @ 2013-11-25 22:39 UTC (permalink / raw
To: arne_bab; +Cc: emacs-orgmode
Hello,
Arne Babenhauserheide <arne_bab@web.de> writes:
> When you set a publishing project which :include 's a non-existant
> file, the error message is
>
> +: Wrong type argument: integerp, nil
>
> This should instead be something like “specified nonexstient file”.
>
> The function responsible to this is
>
> (defun org-publish-cache-ctime-of-src (file)
> "Get the ctime of FILE as an integer."
> (let ((attr (file-attributes
> (expand-file-name (or (file-symlink-p file) file)
> (file-name-directory file)))))
> (+ (lsh (car (nth 5 attr)) 16)
> (cadr (nth 5 attr)))))
>
> (file-attributes <nonexistent-file) returns nil. So this should be
> checked to return a clear error message.
Thank you for the detailed report. This should be fixed.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-11-25 22:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-25 22:03 Bug: ox-publish: opaque error message when giving a nonexisting file [8.2.1 (8.2.1-dist @ /usr/share/emacs/site-lisp/org-mode/)] Arne Babenhauserheide
2013-11-25 22:39 ` Nicolas Goaziou
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.