~ubuntu-branches/ubuntu/oneiric/muse-el/oneiric

« back to all changes in this revision

Viewing changes to experimental/muse-split.el

  • Committer: Bazaar Package Importer
  • Author(s): Michael W. Olson (GNU address)
  • Date: 2008-01-09 15:51:46 UTC
  • mto: This revision was merged to the branch mainline in revision 6.
  • Revision ID: james.westby@ubuntu.com-20080109155146-vkc4ohnzv96spdpm
Tags: upstream-3.11
ImportĀ upstreamĀ versionĀ 3.11

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
 
9
9
;; Emacs Muse is free software; you can redistribute it and/or modify
10
10
;; it under the terms of the GNU General Public License as published
11
 
;; by the Free Software Foundation; either version 2, or (at your
 
11
;; by the Free Software Foundation; either version 3, or (at your
12
12
;; option) any later version.
13
13
 
14
14
;; Emacs Muse is distributed in the hope that it will be useful, but
105
105
        (muse-publish-presplit-publish file)
106
106
        ;; start a temp buffer for main data
107
107
        (muse-with-temp-buffer
108
 
          (insert-file-contents file)
 
108
          (muse-insert-file-contents file)
109
109
          (let ((mainbuffer (current-buffer))
110
110
                (subcontents))
111
111
            (mapc
130
130
 
131
131
(defun muse-publish-presplit-publish(file)
132
132
  (muse-with-temp-buffer
133
 
    (insert-file-contents file)
 
133
    (muse-insert-file-contents file)
134
134
    (let ((muse-publish-markup-regexps muse-publish-presplit-markup-regexps)
135
135
          (muse-publish-markup-functions muse-publish-presplit-functions)
136
136
          (muse-publishing-styles)
203
203
 
204
204
(defun muse-publish-no-split-function (file)
205
205
  (muse-with-temp-buffer
206
 
    (insert-file-contents file)
 
206
    (muse-insert-file-contents file)
207
207
    (list `(,(file-name-sans-extension file) . (1 ,(point-max))))))
208
208
 
209
209
(defun muse-publish-split-file (file)
342
342
(defun muse-journal-split-by-entry (file)
343
343
  "Split a muse journal file into days"
344
344
  (muse-with-temp-buffer
345
 
    (insert-file-contents file)
 
345
    (muse-insert-file-contents file)
346
346
    (let* ((split-alist)
347
347
           (root-name (file-name-sans-extension file))
348
348
           (split-regexp "^\\* \\([0-9]\\{8\\}\\)")
383
383
This function makes the assumption that the entries are sorted. If
384
384
it isn't then it some of the entries will appear not to be published."
385
385
  (muse-with-temp-buffer
386
 
    (insert-file-contents file)
 
386
    (muse-insert-file-contents file)
387
387
    (let* ((split-alist)
388
388
           (root-name (file-name-sans-extension file))
389
389
           (split-regexp (concat "^\\* \\([0-9]\\{4\\}\\)\\([0-9]\\{2\\}\\)"