emacs-wiki-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [emacs-wiki-discuss] Re: Help resolving warning on publish


From: Seth Falcon
Subject: Re: [emacs-wiki-discuss] Re: Help resolving warning on publish
Date: Sun, 28 Aug 2005 10:32:57 -0700

Hi again,

Been trying to debug my publish problem, but not having much success. 
If I'm reading the backtrace correctly (see below), the error is that
fine-name-nondirectory is getting called with a nil argument.

The emacs-wiki-page-name function makes a call to
file-name-nondirectory, but I can't tell from the backtrace that it is
getting called.  The code is:

(defun emacs-wiki-page-name (&optional name)
  "Return the canonical form of the Wiki page name.
All this means is that certain extensions, like .gz, are removed."
  (save-match-data
    (unless name
      (setq name (or emacs-wiki-current-file
                     buffer-file-name
                     (concat default-directory (buffer-name)))))
    (if name
        (let ((page (file-name-nondirectory name)))
          (if (string-match emacs-wiki-ignored-extensions-regexp page)
              (replace-match "" t t page)
            page)))))

And so it seems to me that the if part prevents the possibility of
passing in  a nil arg.  I don't have much experience working with
elisp.  If someone can suggest some experiments that I can try that
might help pinpoint the issue, I will give them a go.

Thanks!

+ seth  

Backtrace:
------------------------------------------
Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  file-name-nondirectory(nil)
  set-visited-file-name("/Users/seth/Notebook/web/Plans/TingAgenda.html" t)
  write-file("/Users/seth/Notebook/web/Plans/TingAgenda.html")
  (let ((backup-inhibited t) (buffer-file-coding-system ...)
(find-file-literally t)) (when (eq buffer-file-coding-system ...)
(setq buffer-file-coding-system emacs-wiki-coding-default))
(write-file output-path))
  emacs-wiki-write-buffer("/Users/seth/Notebook/web/Plans/TingAgenda.html")
  (let ((emacs-wiki-publishing-p t) (emacs-wiki-current-file file))
(insert-file-contents file) (cd (file-name-directory file))
(emacs-wiki-maybe) (setq emacs-wiki-current-file file) (setq
buffer-file-name nil) (unless (string-match emacs-wiki-image-regexp
...) (emacs-wiki-replace-markup)) (emacs-wiki-write-buffer
output-path))
  (save-current-buffer (set-buffer temp-buffer) (let (... ...)
(insert-file-contents file) (cd ...) (emacs-wiki-maybe) (setq
emacs-wiki-current-file file) (setq buffer-file-name nil) (unless ...
...) (emacs-wiki-write-buffer output-path)))
  (with-current-buffer temp-buffer (let (... ...)
(insert-file-contents file) (cd ...) (emacs-wiki-maybe) (setq
emacs-wiki-current-file file) (setq buffer-file-name nil) (unless ...
...) (emacs-wiki-write-buffer output-path)))
  (if debug-on-error (with-current-buffer temp-buffer (let ... ... ...
... ... ... ... ...)) (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 ...)) (unwind-protect (if debug-on-error ... ...)
(when ... ... ...)))
  (emacs-wiki-with-temp-buffer (let (... ...) (insert-file-contents
file) (cd ...) (emacs-wiki-maybe) (setq emacs-wiki-current-file file)
(setq buffer-file-name nil) (unless ... ...) (emacs-wiki-write-buffer
output-path)))
[SNIP]
------------------------------------------




reply via email to

[Prev in Thread] Current Thread [Next in Thread]