comparison lisp/hyperbole/kotl/kimport.el @ 70:131b0175ea99 r20-0b30

Import from CVS: tag r20-0b30
author cvs
date Mon, 13 Aug 2007 09:02:59 +0200
parents c53a95d3c46d
children 8619ce7e4c50
comparison
equal deleted inserted replaced
69:804d1389bcd6 70:131b0175ea99
6 ;; KEYWORDS: data, outlines, wp 6 ;; KEYWORDS: data, outlines, wp
7 ;; 7 ;;
8 ;; AUTHOR: Bob Weiner & Kellie Clark 8 ;; AUTHOR: Bob Weiner & Kellie Clark
9 ;; 9 ;;
10 ;; ORIG-DATE: 15-Nov-93 at 11:57:05 10 ;; ORIG-DATE: 15-Nov-93 at 11:57:05
11 ;; LAST-MOD: 6-Mar-97 at 01:18:33 by Bob Weiner 11 ;; LAST-MOD: 1-Nov-95 at 23:19:09 by Bob Weiner
12
13 ;;; ************************************************************************ 12 ;;; ************************************************************************
14 ;;; Other required Elisp libraries 13 ;;; Other required Elisp libraries
15 ;;; ************************************************************************ 14 ;;; ************************************************************************
16 15
17 ;; kfile.el requires kotl-mode.el which requires kimport.el. 16 ;; kfile.el requires kotl-mode.el which requires kimport.el.
132 nil 131 nil
133 (kotl-mode:to-valid-position)) 132 (kotl-mode:to-valid-position))
134 (message "Imported %d of %d Augment statements." count total))) 133 (message "Imported %d of %d Augment statements." count total)))
135 134
136 ;;; 135 ;;;
137 ;;; Emacs outliner style files, leading `*' cell delimiters 136 ;;; Emacs outliner style files, leading '*' cell delimiters
138 ;;; 137 ;;;
139 138
140 ;;;###autoload 139 ;;;###autoload
141 (defun kimport:star-outline (import-from output-to &optional children-p) 140 (defun kimport:star-outline (import-from output-to &optional children-p)
142 "Insert star outline nodes from IMPORT-FROM into koutline OUTPUT-TO. 141 "Insert star outline nodes from IMPORT-FROM into koutline OUTPUT-TO.
212 an explanation of where imported cells are placed. 211 an explanation of where imported cells are placed.
213 212
214 Text paragraphs are imported as a sequence of same level cells. Koutlines 213 Text paragraphs are imported as a sequence of same level cells. Koutlines
215 are imported with their structure intact. 214 are imported with their structure intact.
216 215
217 The variable, `paragraph-start,' is used to determine paragraphs." 216 The variable, 'paragraph-start,' is used to determine paragraphs."
218 (interactive "FImport from text/koutline buffer/file: \nFInsert cells into koutline buffer/file: \nP") 217 (interactive "FImport from text/koutline buffer/file: \nFInsert cells into koutline buffer/file: \nP")
219 (let ((klabel "1") (output-level 1) (count 0) initially-empty-output 218 (let ((klabel "1") (output-level 1) (count 0) initially-empty-output
220 no-renumber orig-point total) 219 no-renumber orig-point total)
221 ;; Don't change the order of import-from and output-to inits here. 220 ;; Don't change the order of import-from and output-to inits here.
222 (setq import-from (kimport:copy-and-set-buffer import-from) 221 (setq import-from (kimport:copy-and-set-buffer import-from)
539 First cell is inserted with KLABEL at OUTPUT-LEVEL, as the sibling of the 538 First cell is inserted with KLABEL at OUTPUT-LEVEL, as the sibling of the
540 previous cell, with the COUNT of inserted paragraphs starting at 0. TOTAL is 539 previous cell, with the COUNT of inserted paragraphs starting at 0. TOTAL is
541 the total number of paragraphs in IMPORT-FROM, used to show a running tally 540 the total number of paragraphs in IMPORT-FROM, used to show a running tally
542 of the imported paragraphs. 541 of the imported paragraphs.
543 542
544 The variable, `paragraph-start' is used to determine paragraphs." 543 The variable, 'paragraph-start' is used to determine paragraphs."
545 (set-buffer import-from) 544 (set-buffer import-from)
546 (let* ((count 0) start end contents) 545 (let* ((count 0) start end contents)
547 ;; Next line is needed when importing into an existing kview. 546 ;; Next line is needed when importing into an existing kview.
548 (goto-char (point-min)) 547 (goto-char (point-min))
549 ;; Move past blank lines at point. 548 ;; Move past blank lines at point.