[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Koutliner export... struggling
From: |
Jean Louis |
Subject: |
Koutliner export... struggling |
Date: |
Mon, 9 Nov 2020 02:06:02 +0300 |
User-agent: |
Mutt/2.0 (3d08634) (2020-11-07) |
* Robert Weiner <rsw@gnu.org> [2020-11-09 01:33]:
> With regard to exporting a Koutline, there was an improper ordering of
> changes applied to the master branch that inadvertently reverted the fix
> that Mats had applied. It is not re-applied and if you update your quelpa
> package install of Hyperbole, and reload the kexport file, it should work
> now.
Thank you.
With it, did you export with success the EXAMPLE.kotl?
I have git pull-ed, and reloaded files. Tried to export EXAMPLE.kotl
and got:
Debugger entered--Lisp error: (wrong-type-argument integer-or-marker-p nil)
goto-char(nil)
(if (not (setq found (kproperty:get (1- (point)) 'kcell))) (goto-char
(kproperty:previous-single-change (point) 'kcell)))
(let ((found)) (if (not (setq found (kproperty:get (1- (point)) 'kcell)))
(goto-char (kproperty:previous-single-change (point) 'kcell))) (goto-char (setq
found (kproperty:previous-single-change (point) 'kcell))) (if found (point)
(error "(kcell-view:to-label-end): Can't find end of curre...")))
(cond ((null kview) (error "(kcell-view:to-label-end): Invalid kview; try
{M-x...")) (t (let ((found)) (if (not (setq found (kproperty:get (1- ...)
'kcell))) (goto-char (kproperty:previous-single-change (point) 'kcell)))
(goto-char (setq found (kproperty:previous-single-change (point) 'kcell))) (if
found (point) (error "(kcell-view:to-label-end): Can't find end of
curre...")))))
kcell-view:to-label-end(nil)
(+ (kcell-view:to-label-end pos) (or label-sep-len
(kview:label-separator-length kview)))
(save-excursion (+ (kcell-view:to-label-end pos) (or label-sep-len
(kview:label-separator-length kview))))
kcell-view:start()
(goto-char (kcell-view:start))
kotl-mode:beginning-of-buffer()
(save-excursion (kotl-mode:beginning-of-buffer) (kcell-view:contents))
(setq title (save-excursion (kotl-mode:beginning-of-buffer)
(kcell-view:contents)))
(let* ((export-buf-name (cond ((or (bufferp export-from) (get-buffer
export-from)) (buffer-name (get-buffer export-from))) ((get-file-buffer
export-from) (buffer-name (get-file-buffer export-from))) ((stringp
export-from) (buffer-name (find-file-noselect export-from))) (t (error
"(kexport:html): `%s' is an invalid `export-from' a..." export-from))))
(font-lock-auto-fontify) (font-lock-mode-disable-list '(html-mode))
(font-lock-mode-enable-list) (html-mode-hook) (hm--html-mode-hook)
(psgml-mode-hook) (output-to-buf-name (cond ((or (bufferp output-to)
(get-buffer output-to)) (buffer-name (get-buffer output-to))) ((get-file-buffer
output-to) (buffer-name (get-file-buffer output-to))) ((stringp output-to)
(buffer-name (find-file-noselect output-to))) (t (error "(kexport:html): `%s'
is an invalid `output-to' arg..." output-to)))) (standard-output (get-buffer
output-to-buf-name)) title) (set-buffer standard-output) (setq buffer-read-only
nil kexport:output-filename buffer-file-name) (erase-buffer) (set-buffer
export-buf-name) (setq kexport:input-filename buffer-file-name) (setq title
(save-excursion (kotl-mode:beginning-of-buffer) (kcell-view:contents))) (if
(string-match "\n" title) (setq title (substring title 0 (match-beginning 0))))
(if (called-interactively-p 'interactive) (setq title (read-string (format
"Title for %s: " output-to-buf-name) title))) (princ "<HTML><HEAD>\n\n") (princ
"<A ID=\"top\"></A><A ID=\"k0\"></A>\n") (princ (format "<TITLE>%s</TITLE>\n"
title)) (if kexport:html-description (princ (format "<META ID=\"description\"
CONTENT=\"%s\">\n" kexport:html-description))) (if kexport:html-keywords (princ
(format "<META ID=\"keywords\" CONTENT=\"%s\">\n" kexport:html-keywords)))
(princ "</HEAD>\n\n") (princ (format "<BODY %s>\n\n"
kexport:html-body-attributes)) (princ (format
"<CENTER><H1>%s</H1></CENTER>\n\n" title)) (let* ((separator
(hypb:replace-match-string ">" (hypb:replace-match-string "<"
(kview:label-separator kview) "<") ">")) i level label contents)
(kview:map-tree #'(lambda (kview) (setq level (kcell-view:level) i level)
(while (> i 1) (princ "<UL>") (setq i (1- i))) (princ "<TABLE><TR>\n") (setq
label (kcell-view:label)) (princ (format "<A ID=\"k%s\"></A>" label)) (princ
(format "<A ID=\"k%s\"></A>\n" (kcell-view:idstamp))) (princ "<TD WIDTH=2%
VALIGN=top><PRE>\n") (princ (format "<FONT %s>%s%s</FONT></PRE></TD>\n"
kexport:label-html-font-attributes label separator)) (princ "<TD>") (setq
contents (kcell-view:contents)) (if (string-match
"\\`\\([-_$%#@~^&*=+|/A-Za-z0-9 ]+\\):.*\\S-" contents) (princ (format "<A
ID=\"%s\"></A>" ...))) (setq contents (kexport:html-markup contents)) (if
soft-newlines-flag (princ contents) (princ "<PRE>") (princ contents) (princ
"</PRE>")) (princ "</TD>\n") (princ "</TR></TABLE>") (setq i level) (while (> i
1) (princ "</UL>") (setq i (1- i))) (terpri) (terpri)) kview t t)) (princ
"</BODY></HTML>\n") (set-buffer standard-output) (save-buffer))
kexport:html("/home/data1/protected/EXAMPLE.kotl"
"/home/data1/protected/EXAMPLE.html" nil)
funcall-interactively(kexport:html "/home/data1/protected/EXAMPLE.kotl"
"/home/data1/protected/EXAMPLE.html" nil)
call-interactively(kexport:html nil nil)
command-execute(kexport:html)