[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/hyperbole b7b7793 3/6: kexport:html - Allow only Koutli
From: |
ELPA Syncer |
Subject: |
[elpa] externals/hyperbole b7b7793 3/6: kexport:html - Allow only Koutline buffers and files |
Date: |
Sun, 12 Sep 2021 11:57:13 -0400 (EDT) |
branch: externals/hyperbole
commit b7b779338a1c89375c279d6ad2cd34a1383b306a
Author: Bob Weiner <rsw@gnu.org>
Commit: Bob Weiner <rsw@gnu.org>
kexport:html - Allow only Koutline buffers and files
Also stop centering HTML title since often ends up to far to the right.
---
ChangeLog | 6 ++++++
kotl/kexport.el | 20 +++++++++++++-------
2 files changed, 19 insertions(+), 7 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 03e5ba5..7f7ff8d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2021-09-05 Bob Weiner <rsw@gnu.org>
+
+* kotl/kexport.el (kexport:html): Fix export-from parameter checks to
+ allow only Koutline buffers and files. Stop centering title since
+ often places it too far right.
+
2021-08-19 Mats Lidell <matsl@gnu.org>
* test/hbut-tests.el (hbut-tests:should-match-tmp-folder): Add check for
diff --git a/kotl/kexport.el b/kotl/kexport.el
index 34be7cc..c8cbd1d 100644
--- a/kotl/kexport.el
+++ b/kotl/kexport.el
@@ -225,14 +225,20 @@ hard newlines are not used. Also converts Urls and
Klinks into Html hyperlinks.
STILL TODO:
Make delimited pathnames into file links (but not if within klinks).
Copy attributes stored in cell 0 and attributes from each cell."
- (interactive "fKoutline buffer/file to export: \nFHTML buffer/file to save
to: \nP")
+ (interactive (list (read-file-name
+ "Koutline buffer/file to export: " nil buffer-file-name t)
+ (read-file-name "HTML buffer/file to save to: ")
+ current-prefix-arg))
(let* ((export-buf-name
- (cond ((or (bufferp export-from)
- (get-buffer export-from))
- (buffer-name (get-buffer export-from)))
- ((get-file-buffer export-from)
+ (cond ((get-file-buffer export-from)
(buffer-name (get-file-buffer export-from)))
- ((stringp export-from)
+ ((and (or (bufferp export-from)
+ (get-buffer export-from))
+ (kotl-mode:is-p))
+ (buffer-name (get-buffer export-from)))
+ ((and (stringp export-from)
+ (string-match "\\.kotl$" export-from)
+ (file-readable-p export-from))
(buffer-name (find-file-noselect export-from)))
(t (error
"(kexport:html): `%s' is an invalid `export-from' argument"
export-from))))
@@ -291,7 +297,7 @@ STILL TODO:
;; HTML
(princ "</head>\n\n")
(princ (format "<body %s>\n\n" kexport:html-body-attributes))
- (princ (format "<center><h1>%s</h1></center>\n\n" title))
+ (princ (format "<h1>%s</h1>\n\n" title))
(let* ((separator
(hypb:replace-match-string
">" (hypb:replace-match-string
- [elpa] externals/hyperbole updated (a2e7eb1 -> 9113e1b), ELPA Syncer, 2021/09/12
- [elpa] externals/hyperbole 2349505 1/6: Add Rolo key tests (#115), ELPA Syncer, 2021/09/12
- [elpa] externals/hyperbole 493c5bb 4/6: Merge branch 'master' of hyperbole, ELPA Syncer, 2021/09/12
- [elpa] externals/hyperbole b5ecd11 2/6: Remove native compiler warnings (#113), ELPA Syncer, 2021/09/12
- [elpa] externals/hyperbole b7b7793 3/6: kexport:html - Allow only Koutline buffers and files,
ELPA Syncer <=
- [elpa] externals/hyperbole 90f003c 5/6: Use browse-url--browser-defcustom-type for customization (#117), ELPA Syncer, 2021/09/12
- [elpa] externals/hyperbole 9113e1b 6/6: Merge branch 'master' of hyperbole, ELPA Syncer, 2021/09/12