Skip to content

Commit

Permalink
Prepare for release.
Browse files Browse the repository at this point in the history
* lisp/muse.el (muse-version): Increment to 3.02.

* *.el: Fix first header line.

* examples/mwolson/muse-init.el: Sync with my config.
  (my-muse-pdf-make-links-absolute): New function that makes relative
  links absolute in a hard-coded way.
  (my-muse-pdf-prepare-buffer): Add `my-muse-pdf-make-links-absolute' to
  publishing transforms.

* NEWS: Update.
git-archimport-id: mwolson@gnu.org--2005/muse--main--1.0--patch-236
  • Loading branch information
mwolson committed Sep 16, 2005
1 parent 76bda03 commit 3ab68e5
Show file tree
Hide file tree
Showing 26 changed files with 215 additions and 30 deletions.
35 changes: 35 additions & 0 deletions ChangeLog
Expand Up @@ -2,6 +2,41 @@
# arch-tag: automatic-ChangeLog--mwolson@gnu.org--2005/muse--main--1.0
#

2005-09-16 06:57:44 GMT Michael Olson <mwolson@gnu.org> patch-236

Summary:
Prepare for release.
Revision:
muse--main--1.0--patch-236

* lisp/muse.el (muse-version): Increment to 3.02.

* *.el: Fix first header line.

* examples/mwolson/muse-init.el: Sync with my config.
(my-muse-pdf-make-links-absolute): New function that makes relative
links absolute in a hard-coded way.
(my-muse-pdf-prepare-buffer): Add `my-muse-pdf-make-links-absolute' to
publishing transforms.

* NEWS: Update.

new files:
experimental/.arch-ids/muse-cite.el.id
experimental/muse-cite.el

modified files:
ChangeLog Makefile.defs NEWS examples/mwolson/muse-init.el
experimental/muse-message.el experimental/muse-xml.el
lisp/muse-blosxom.el lisp/muse-book.el lisp/muse-colors.el
lisp/muse-convert.el lisp/muse-docbook.el lisp/muse-html.el
lisp/muse-http.el lisp/muse-journal.el lisp/muse-latex.el
lisp/muse-mode.el lisp/muse-poem.el lisp/muse-project.el
lisp/muse-protocols.el lisp/muse-publish.el
lisp/muse-regexps.el lisp/muse-texinfo.el lisp/muse-wiki.el
lisp/muse.el muse.texi


2005-09-16 06:33:11 GMT Michael Olson <mwolson@gnu.org> patch-235

Summary:
Expand Down
2 changes: 1 addition & 1 deletion Makefile.defs
Expand Up @@ -20,6 +20,6 @@ INSTALLINFO = install-info --info-dir=$(INFODIR)
#INSTALLINFO = install-info --section "Emacs" "emacs" --info-dir=$(INFODIR)

# Useful only for the maintainer
VERSION = 3.01.arch.201
VERSION = 3.02
LASTUPLOAD = 3.01.arch.201-2
BUILDOPTS =
5 changes: 5 additions & 0 deletions NEWS
Expand Up @@ -157,10 +157,15 @@ this is helpful.

*** Bring up-to-date with latest features.

*** Massively update Common Elements section.

*** New Directives section.
This describes the use of #title and #author, as well as other
directives that may be used.

*** New Comments section.
Describes the use of "; comment text".

** Publishing

*** The order of rules should be much improved.
Expand Down
24 changes: 21 additions & 3 deletions examples/mwolson/muse-init.el
Expand Up @@ -21,6 +21,7 @@
(require 'muse-blosxom) ; load blosxom module
(require 'muse-docbook) ; load DocBook publishing style
(require 'muse-html) ; load (X)HTML publishing style
(require 'muse-texinfo) ; load Info/PDF publishing styles
(require 'muse-wiki) ; load Wiki support
(require 'muse-xml) ; load experimental XML support
;;(require 'muse-message) ; load message support (experimental)
Expand All @@ -35,6 +36,9 @@
(muse-derive-style "my-blosxom" "blosxom-xhtml"
:final 'my-muse-blosxom-finalize)

(muse-derive-style "my-pdf" "pdf"
:before 'my-muse-pdf-prepare-buffer)

(muse-derive-style "my-xhtml" "xhtml"
:header "~/personal-site/muse/header.html"
:footer "~/personal-site/muse/footer.html"))
Expand Down Expand Up @@ -70,7 +74,7 @@
:force-publish ("WikiIndex")
:default "WelcomePage")
(:base "my-xhtml"
:path "~/proj/notmine/notes-out"))
:path "~/personal-site/site/notes"))

("Plans"
("~/proj/wiki/plans/"
Expand All @@ -91,6 +95,21 @@

;;; Functions

;; Turn relative links into absolute ones
(defun my-muse-pdf-make-links-absolute (str &rest ignored)
"Make relative links absolute."
(when str
(save-match-data
(if (string-match "\\`[/.]+" str)
(replace-match "http://www.mwolson.org/" nil t str)
str))))

;; Make sure my interproject links become absolute when published in
;; PDFs
(defun my-muse-pdf-prepare-buffer ()
(set (make-local-variable 'muse-publish-url-transforms)
(cons 'my-muse-pdf-make-links-absolute muse-publish-url-transforms)))

;; Switch to the given project and prompt for a file
(defun my-muse-project-find-file (project)
(interactive)
Expand Down Expand Up @@ -167,7 +186,7 @@ If FILE is not specified, use the published version of the current file."
(global-set-key "\C-cpL" #'(lambda () (interactive)
(my-muse-project-find-file "Blog")))
(global-set-key "\C-cpn" #'(lambda () (interactive)
(my-muse-project-find-file "Notes")))
(my-muse-project-find-file "MyNotes")))
(global-set-key "\C-cpr" #'(lambda () (interactive)
(my-muse-project-find-file "Projects")))
(global-set-key "\C-cpw" #'(lambda () (interactive)
Expand All @@ -178,7 +197,6 @@ If FILE is not specified, use the published version of the current file."

(custom-set-variables
'(muse-blosxom-base-directory "~/proj/wiki/blog/")
'(muse-blosxom-publishing-directory "~/personal-site/site/blog")
'(muse-colors-autogen-headings (quote outline))
'(muse-file-extension "muse")
'(muse-html-charset-default "utf-8")
Expand Down
127 changes: 127 additions & 0 deletions experimental/muse-cite.el
@@ -0,0 +1,127 @@
;;; muse-cire.el --- smart citations for Muse

;; Copyright (C) 2005 Free Software Foundation, Inc.

;; This file is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 2, or (at your option)
;; any later version.

;; This file is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.

;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs; see the file COPYING. If not, write to the
;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.

;;; Commentary:

;; This file is currently in experimental state. I found it in an old
;; pre-release version of Muse and thought it might come in handy.

;;; Contributors:

;;; Code:

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; Muse Smart Citations
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;;; Commentary:

;; If a footnote is of the general form "AUTHOR, TITLE, PAGES", this
;; module offers a function to more intelligently markup such
;; citations. For LaTeX, it italicizes the TITLE and inserts correct
;; spacing and endashes in PAGES. For HTML, it is able to convert the
;; TITLE or PAGES into a link, given knowledge of where to find known
;; texts by certain authors.
;;
;; To use this module -- since it only rewrites markup, and is not
;; particular to any style -- modify `muse-before-publish-hook':
;;
;; (require 'muse-publish)
;; (require 'muse-cite)
;; (add-hook 'muse-before-publish-hook 'muse-cite-munge-footnotes)

(require 'muse-publish)

(defgroup muse-cite nil
"Offers functionality for marking up smart citations."
:group 'muse-publish)

(defcustom muse-cite-titles nil
"An alist of authors and the titles they've written.
This is how titles are recognized, and marked up as links to the
title and to the specific pages referenced.
This variable is an alist of the form:
((AUTHOR . TITLE-LIST)
...)
Where AUTHOR is a string, and TITLE-LIST is a list of the form:
((TITLE URL [PAGE-URL])
...)
Where TITLE is a string, URL is a URL string, and PAGE-URL can be
nil or a URL string with %d somewhere in it -- which is substituted
with the first page number mentioned in the reference."
:type '(alist :key-type (string :tag "Author")
:value-type
(repeat (list (string :tag "Title")
(string :tag "URL")
(choice (string :tag "Page URL")
(const :tag "No Page URL" nil)))))
:group 'muse-cite)

(defun muse-cite-rewrite (citation)
"Rewrite an 'Author, Title, Pages' CITATION as an intelligent reference."
(when (string-match
(concat "\\([^,]+\\), *\\([^,]+\\), *"
"\\(pp?\\. *\\([0-9]+\\)\\(-+[0-9]+\\)?\\)") citation)
(let* ((author (match-string 1 citation))
(title (match-string 2 citation))
(pages (match-string 3 citation))
(page (match-string 4 citation))
(author-entry (assoc author muse-cite-titles))
(book-entry (and author-entry
(assoc title (cdr author-entry))))
(book-url (car (cdr book-entry)))
(book-page (car (cddr book-entry))))
(cond
((null book-url)
(format "%s, *%s*, %s" author title pages))
((or (null book-page)
(not (string-match "%d" book-page)))
(format "%s, [[%s][%s]], %s" author book-url title pages))
(t
(setq book-page (replace-match page nil t book-page))
(format "%s, [[%s][%s]], [[%s][%s]]"
author book-url title book-page pages))))))

(defun muse-cite-munge-footnotes ()
"Munge the footnote citations in the current buffer.
The author/title definitions given in `muse-cite-titles' are used
to change the citations automagically into hyperlinks.."
(goto-char (point-max))
(when (re-search-backward "^Footnotes" nil t)
(while (re-search-forward "^\\[[0-9]+\\][ \t]+\\(.+\\)" nil t)
(let ((end (copy-marker (match-end 0) t))
(rewrite (save-match-data
(muse-cite-rewrite (match-string 1)))))
(when rewrite
(goto-char (match-beginning 1))
(delete-region (match-beginning 1) (match-end 1))
(insert rewrite))
(goto-char end))))
nil)

(provide 'muse-cite)

;;; muse-cite.el ends here
2 changes: 1 addition & 1 deletion experimental/muse-message.el
@@ -1,4 +1,4 @@
;;; muse-message.el --- Publish a file as an email message.
;;; muse-message.el --- publish a file as an email message

;; Copyright (C) 2004, 2005 Free Software Foundation, Inc.

Expand Down
2 changes: 1 addition & 1 deletion experimental/muse-xml.el
@@ -1,4 +1,4 @@
;;; muse-xml.el --- Publish XML files.
;;; muse-xml.el --- publish XML files

;; Copyright (C) 2005 Free Software Foundation, Inc.

Expand Down
2 changes: 1 addition & 1 deletion lisp/muse-blosxom.el
@@ -1,4 +1,4 @@
;;; muse-blosxom.el --- Publish a document tree for serving by (py)Blosxom
;;; muse-blosxom.el --- publish a document tree for serving by (py)Blosxom

;; Copyright (C) 2004, 2005 Free Software Foundation, Inc.

Expand Down
2 changes: 1 addition & 1 deletion lisp/muse-book.el
@@ -1,4 +1,4 @@
;;; muse-book.el --- Publish entries into a compilation.
;;; muse-book.el --- publish entries into a compilation

;; Copyright (C) 2004, 2005 Free Software Foundation, Inc.

Expand Down
2 changes: 1 addition & 1 deletion lisp/muse-colors.el
@@ -1,4 +1,4 @@
;;; muse-colors.el --- Coloring and highlighting used by Muse
;;; muse-colors.el --- coloring and highlighting used by Muse

;; Copyright (C) 2004, 2005 Free Software Foundation, Inc.

Expand Down
2 changes: 1 addition & 1 deletion lisp/muse-convert.el
@@ -1,4 +1,4 @@
;;; muse-convert.el --- Convert a LaTex file into a Muse file.
;;; muse-convert.el --- convert a LaTex file into a Muse file

;; Copyright (C) 2004, 2005 Free Software Foundation, Inc.

Expand Down
2 changes: 1 addition & 1 deletion lisp/muse-docbook.el
@@ -1,4 +1,4 @@
;;; muse-docbook.el --- Publish DocBook files.
;;; muse-docbook.el --- publish DocBook files

;; Copyright (C) 2004, 2005 Free Software Foundation, Inc.

Expand Down
2 changes: 1 addition & 1 deletion lisp/muse-html.el
@@ -1,4 +1,4 @@
;;; muse-html.el --- Publish to HTML and XHTML.
;;; muse-html.el --- publish to HTML and XHTML

;; Copyright (C) 2004, 2005 Free Software Foundation, Inc.

Expand Down
2 changes: 1 addition & 1 deletion lisp/muse-http.el
@@ -1,4 +1,4 @@
;;; muse-http.el --- Publish HTML files over HTTP.
;;; muse-http.el --- publish HTML files over HTTP

;; Copyright (C) 2004, 2005 Free Software Foundation, Inc.

Expand Down
2 changes: 1 addition & 1 deletion lisp/muse-journal.el
@@ -1,4 +1,4 @@
;;; muse-journal.el --- Keep and publish a journal.
;;; muse-journal.el --- keep and publish a journal

;; Copyright (C) 2004, 2005 Free Software Foundation, Inc.

Expand Down
2 changes: 1 addition & 1 deletion lisp/muse-latex.el
@@ -1,4 +1,4 @@
;;; muse-latex.el --- Publish entries in LaTex or PDF format.
;;; muse-latex.el --- publish entries in LaTex or PDF format

;; Copyright (C) 2004, 2005 Free Software Foundation, Inc.

Expand Down
2 changes: 1 addition & 1 deletion lisp/muse-mode.el
@@ -1,4 +1,4 @@
;;; muse-mode.el --- Mode for editing Muse files; has font-lock support.
;;; muse-mode.el --- mode for editing Muse files; has font-lock support

;; Copyright (C) 2004, 2005 Free Software Foundation, Inc.

Expand Down
2 changes: 1 addition & 1 deletion lisp/muse-poem.el
@@ -1,4 +1,4 @@
;;; muse-poem.el --- Publish a poem to LaTex or PDF.
;;; muse-poem.el --- publish a poem to LaTex or PDF

;; Copyright (C) 2004, 2005 Free Software Foundation, Inc.

Expand Down
2 changes: 1 addition & 1 deletion lisp/muse-project.el
@@ -1,4 +1,4 @@
;;; muse-project.el --- Handle Muse projects.
;;; muse-project.el --- handle Muse projects

;; Copyright (C) 2004, 2005 Free Software Foundation, Inc.

Expand Down
2 changes: 1 addition & 1 deletion lisp/muse-protocols.el
@@ -1,4 +1,4 @@
;;; muse-protocols.el --- URL protocols that Muse recognizes.
;;; muse-protocols.el --- URL protocols that Muse recognizes

;; Copyright (C) 2005 Free Software Foundation, Inc.

Expand Down
2 changes: 1 addition & 1 deletion lisp/muse-publish.el
@@ -1,4 +1,4 @@
;;; muse-publish.el --- Base publishing implementation.
;;; muse-publish.el --- base publishing implementation

;; Copyright (C) 2004, 2005 Free Software Foundation, Inc.

Expand Down
2 changes: 1 addition & 1 deletion lisp/muse-regexps.el
@@ -1,4 +1,4 @@
;;; muse-regexps.el --- Define regexps used by Muse.
;;; muse-regexps.el --- define regexps used by Muse

;; Copyright (C) 2004, 2005 Free Software Foundation, Inc.

Expand Down
2 changes: 1 addition & 1 deletion lisp/muse-texinfo.el
@@ -1,4 +1,4 @@
;;; muse-texinfo.el --- Publish entries to Texinfo format or PDF.
;;; muse-texinfo.el --- publish entries to Texinfo format or PDF

;; Copyright (C) 2004, 2005 Free Software Foundation, Inc.

Expand Down
2 changes: 1 addition & 1 deletion lisp/muse-wiki.el
@@ -1,4 +1,4 @@
;;; muse-wiki.el --- wiki features for muse
;;; muse-wiki.el --- wiki features for Muse

;; Copyright (C) 2005 Free Software Foundation, Inc.

Expand Down

0 comments on commit 3ab68e5

Please sign in to comment.