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