emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Arne Babenhauserheide <arne_bab@web.de>
To: emacs-orgmode@gnu.org
Subject: 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/)]
Date: Mon, 25 Nov 2013 23:03:26 +0100	[thread overview]
Message-ID: <87siuk9m1d.wl%arne_bab@web.de> (raw)


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

             reply	other threads:[~2013-11-25 22:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-25 22:03 Arne Babenhauserheide [this message]
2013-11-25 22:39 ` 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/)] Nicolas Goaziou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87siuk9m1d.wl%arne_bab@web.de \
    --to=arne_bab@web.de \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).