muse-el-3.20+dfsg/0000755000175000017500000000000012070124143013232 5ustar taffittaffitmuse-el-3.20+dfsg/Makefile.defs.default0000644000175000017500000000233311331353120017234 0ustar taffittaffit# -*- Makefile -*- # # If you wish to modify this file, first copy it to a file called # Makefile.defs. The resulting Makefile.defs file may then be # modified. # Emacs options EMACS = emacs SITEFLAG = --no-site-file # XEmacs users will probably want the following settings. #EMACS = xemacs #SITEFLAG = -no-site-file # Installation options # PREFIX is only used here. DESTDIR = PREFIX = /usr/local ELISPDIR = $(DESTDIR)$(PREFIX)/share/emacs/site-lisp/muse INFODIR = $(DESTDIR)$(PREFIX)/share/info # Command to use to install the Info dir entry install_info = install-info --info-dir=$(INFODIR) $(1) || : # If you're using Debian or Ubuntu, uncomment the following rule and # comment out the previous rule. # #install_info = install-info --section "Emacs" "emacs" --info-dir=$(INFODIR) \ # $(INFODIR)/$(1) || : # If you're using XEmacs, use something like the following instead of # the above two rules. # #install_info = install-info --section "XEmacs 21.4" $(1).info \ # $(INFODIR)/dir || : # Useful only for the maintainer PROJECT = muse VERSION = 3.20 MANUAL = muse # Location of Emacs Lisp Package Archive entries ELPADIR = ../../elpa # Description of ELPA package ELPADESC = Authoring and publishing tool muse-el-3.20+dfsg/ChangeLog.10000644000175000017500000003015311331353120015143 0ustar taffittaffit2004-12-30 Michael Olson * muse.el (muse-link-regexp): Allow spaces in the first part of links. * muse-colors.el, muse-convert.el, muse-docbook.el: Use customizable alternatives to extended character classes. * muse-html.el, muse-mode.el, muse-publish.el: Ditto. 2004-12-29 Michael Olson * Makefile: Change path to `publish' script. * muse.el: Change Copyright notice to FSF. Change Maintainer to myself. Update URL. * muse-regexps.el: New file that implements regexp handling. Generalized regexp options will be moved to it eventually. * contrib/pcomplete.el: New file that is used by Muse without actually being a part of it: hence its location in the contrib directory. * contrib/cgi.el, contrib/httpd.el: New location. * examples/muse-johnw.el, examples/publish-johnw: Ditto. * scripts/publish, scripts/publish-project: Ditto. 2004-12-11 Michael Olson * muse-project.el (muse-project-save-buffers): Attempt to fix Emacs CVS-ism in use of `save-some-buffers-action-alist'. Since it looks like this is somewhat optional, only use it if it is bound. 2004-12-06 Michael Olson * muse-mode.el: Do not use the third argument of `require' since it seems to be an Emacs CVS-ism. 2004-11-30 Michael Olson * muse.el (muse-tag-regexp, muse-link-regexp): Replace use of " \t\n(\r)" with "[:space:]" and " \t" with "[:blank:]". This should fix the problem reported by Pascal Quesseveur concerning processing of emphasized text. * muse-colors.el (muse-colors-verbatim, muse-colors-markup) (muse-colors-custom-tags): Ditto. * muse-convert.el (muse-write-citation): Ditto. * muse-docbook.el (muse-docbook-markup-regexps) (muse-docbook-markup-table): Ditto. * muse-html.el (muse-html-markup-regexps) (muse-html-insert-anchor, muse-html-markup-footnote): Ditto. * muse-mode.el (muse-current-word, muse-link-at-point): Ditto. * muse-publish.el (muse-publish-markup-regexps) (muse-publish-markup-tag, muse-publish-markup-footnote) (muse-publish-surround-text, muse-forward-paragraph) (muse-publish-markup-list): Ditto. 2004-11-17 Michael Olson * muse-latexcjk.el (muse-latexcjk-transform-content-type): Use `muse-latexcjk-encoding-default' instead of `muse-latexcjk-coding-default'. Thanks to Kenneth Geisshirt for reporting this. 2004-10-26 Michael Olson * muse-html.el (muse-html-style-sheet): Make part of "muse-html" group, not "muse-message" group. 2004-10-14 Li Daobing * muse-latexcjk.el: New file that provides LaTeX publishing with CJK support. 2004-10-09 Li Daobing * muse-html.el (muse-html-encoding-map): Add entries for mule-utf8, chinese-iso-8bit, and chinese-gbk. (muse-html-transform-content-type): Change use of cadr to cdr so that the content type is chosen correctly. 2004-04-27 Sandra Jean Chua (Sacha) * muse-colors.el (muse-link-face): If a file has no project, check for links in the current directory. * muse-mode.el (muse-visit-link): Find file if nonexistent. 2004-03-24 John Wiegley * muse-texinfo.el (muse-texinfo-markup-table): Fixed table markup. * muse-latex.el (muse-latex-markup-table): Fixed table markup. * muse-html.el: Removed the tag. (muse-html-markup-table): Fixed table markup. 2004-03-24 John Wiegley * muse-html.el, muse-latex.el, muse-publish.el, muse-texinfo.el: Change the way the tag is handled. It is handled now during :after (for HTML), or in the -header (for other styles), and not before the buffer is marked up. * muse-html.el (muse-html-contents-tag): Don't generate contents for section titles that have been marked read-only (such as those within an example section). * muse-mode.el (muse-mode-hook): Added `turn-on-auto-fill' to the :options section. * muse-colors.el (muse-colors-verbatim): Improved end check. (muse-colors-markup): Improved verbatim regexp. 2004-03-23 John Wiegley * Many changes, mostly as part of sweeping through and adding documentation and cleaning up. Also, markup-rules are no longer a list of three element vectors, but a list of three element lists. There was no reason to be using vectors, and it just complicated things. 2004-03-22 John Wiegley * muse-colors.el (muse-colors-emphasized): Corrected bugs. * muse-book.el (muse-book-publish-chapter): Don't process tags a second time, since no header or footer has been inserted. (muse-book-publish-project): Don't process tags for the whole book; now `muse-insert-file-or-string' will do it for just the header/footer. * muse-project.el (muse-project-delete-output-files): Added a command to cleanup all the output files of a project. Dangerous! * muse-journal.el (muse-journal-anchorize-title): Remove tags and quoting characters from anchor titles in the RDF file. * muse-publish.el (muse-publish-comment-tag): Added a "comment" tag, which just deletes the text within the comment. (muse-publish-markup-tags): Added "comment" tag. (muse-publish-markup-buffer): Don't process tags for entire file after inserting the header and footer. (muse-insert-file-or-string): Instead, only process the tag for just the text in the header and footer. * muse-journal.el (muse-journal-html-munge-buffer): Added local binding for `datestamp'. * muse-colors.el (muse-colors-emphasized): Rewrote this function, which is now hundreds of times faster. Removed `muse-colors-ok-context-p', since I could not figure out what it was doing, and it was slowing things down tremendously (to the point of making font-lock unusable in larger buffers). (muse-colors-underlined): Rewrite. (muse-colors-verbatim): Rewrite. 2004-03-22 John Wiegley * muse-html.el (muse-html-markup-paragraph): Use `looking-at', rather than just checking `char-after'. * muse-journal.el (muse-journal-anchorize-title): Call save-match-data, or else infinite loops occur. 2004-03-21 John Wiegley * muse-journal.el (muse-journal-html-munge-buffer): Simplified, since :before-end is now used to call the function. * muse-html.el (muse-html-markup-rules): Fixed rule for adding final

. * muse-poem.el (muse-poem-prepare-buffer): Make sure to set `muse-poem-longest-line' as a local variable. 2004-03-20 John Wiegley * muse-html.el (muse-html-header): Corrected author reference in header. * muse-docbook.el (muse-docbook-markup-table): Removed reference to `muse-docbook-table-attributes', which doesn't exist. * muse-publish.el (muse-publish-markup-footnote): Improved functionality so that, if the style supports it, it can handle footnote references. * muse-latex.el (muse-latex-markup-rules): Use `muse-publish-markup-footnote'. (muse-latex-markup-strings): Added footnote markup strings. (muse-latex-prepare-buffer): Removed initialization of `muse-latex-footnotes', which is now gone. 2004-03-20 John Wiegley * muse-texinfo.el (muse-texinfo-markup-rules): Use general footnote facility. (muse-texinfo-markup-strings): Added footnote markup strings. * muse-publish.el (muse-publish-markup-buffer): Added :before-end style hook, which gets run after markup is done, but before the header and footer are inserted. (muse-publish-markup-footnote): Added a generic form of footnote markup, which all the styles will use. * muse-mode.el (muse-mode-hook): Removed support for `table' package. (muse-html-markup-table): ditto. * muse-html.el (muse-html-markup-rules): Removed support for `table' package. * muse-docbook.el: Added new publishing style. * muse-colors.el (muse-colors-markup): Highlight #title even if not at beginning of buffer (not really a speed hit). * muse-publish.el (muse-publish-markup-buffer): Default "author" to (user-full-name). * muse-book.el (muse-book-latex-header): "author" directive now defaults to (user-full-name). * muse-latex.el (muse-latex-header): "author" directive now defaults to (user-full-name). * muse-poem.el (muse-chapbook-latex-header): "author" directive now defaults to (user-full-name). * muse-texinfo.el (muse-texinfo-header): "author" directive now defaults to (user-full-name). 2004-03-20 John Wiegley * muse-mode.el (muse-visit-link): Was missing the string argument in call to `substring'. Also, if an anchor was specified in the link name, search for it (if it exists). (muse-mode-map): Bind C-c C-a to `muse-index'. (muse-index): Added back project index generation code. * muse-colors.el (muse-mode-local-map): Added back the old local-map, which allows hitting RET on link names in a Muse buffer. * muse-publish.el (muse-publish-file): Use `muse-page-name' instead of `file-name-nondirectory'. (muse-publish-output-name): Use `muse-page-name'. 2004-03-20 John Wiegley * muse-publish.el (muse-publish-markup-buffer): Remove leading trailing whitespace from a buffer before marking it up. (muse-publish-get-output-dir): Corrected insertion of :path. * muse-texinfo.el, muse-latex.el, muse-html.el: Removed default directories. Use project definitions to set directories! * muse-arabic.el: Changed "arabic" tool to "atranslit". * muse-latex.el (muse-latex-markup-rules): Only join like tables and lists; before, it was joining tables to lists. * muse-project.el (muse-project-publish-file): Changed :regexp to :include/:exclude. * muse-mode.el (muse-mode-hook): Initialize with nil. 2004-03-19 John Wiegley * muse-colors.el (muse-link-face): Strip anchors before checking if a project page exists. * muse-arabic.el: Added new module for rendering Arabic text within Muse pages. * muse-http.el (muse-http-render-page): Set `muse-publishing-current-file' before marking up buffer. * muse-project.el (muse-project-set-variables): Changed `make-local-var' to `make-local-variable'. Avoid byte compiler warnings from use of `make-local-hook'. * muse-journal.el (muse-journal-latex-munge-buffer): Use a let form to avoid free variable. * muse-book.el (muse-book-publish-project): Set `muse-current-project' when publishing a book. * muse-publish.el (muse-publish-markup-list-or-quote): Removed extraneous code I had added long ago for handling indented paragraphs; but it messes up handling of single line quotations. * muse-poem.el (muse-poem-markup-tag): Added "nohead" attribute. Also, add "poem" tag to `muse-publish-markup-tags'. * muse-colors.el (muse-colors-markup): Removed '''', and only highlight title if it begins the buffer. (muse-colors-region): Removed some extraneous code. (muse-link-face): Added `save-match-data', and use of `muse-file-regexp'. (muse-colors-link): match-string was called with 0, should be 2. * muse-journal.el: Added anchor generation (for RDF). (muse-journal-latex-munge-buffer): Make sections and subsections within a journal enter into the tableofcontents as chapters and sections. * muse-book.el (muse-book-publish-chapter): Set `muse-publishing-current-file' to the file which is being inserted as a chapter. This helps the hooks know which file the contents has come from, which may influence stylistic decisions. * muse-journal.el: Added a first approach at creating journals; it still needs to be cleaned up and better architected, but is at least working and proving the concept. Still too hackish, though. Also, "rdf" is available as a style, which can convert journal pages into an RDF that represents a summary of the content in that page. 2004-03-18 John Wiegley * muse-publish.el (muse-publish-output-name): First argument is now optional, defaults to current file. 2004-03-18 Sacha Chua * muse-project.el (muse-project-set-variables): New. Sets buffer-local variables based on :set keyword. Use like this: :set (sym val sym val ...). * muse-mode.el (muse-mode): Set variables. (muse-visit-link): Allow override of `visit-link-function' using the new :visit-link keyword. ;; Local Variables: ;; coding: utf-8 ;; End: muse-el-3.20+dfsg/etc/0000755000175000017500000000000011331353120014003 5ustar taffittaffitmuse-el-3.20+dfsg/etc/emacs-wiki-migration.txt0000644000175000017500000001245011331353120020566 0ustar taffittaffit This document describes the process of migrating from emacs-wiki to Muse. Features ======== Muse only --------- Features that exist in Muse, but not emacs-wiki: - Nested lists. - Publishing to multiple other formats, such as LaTeX and Docbook. - Escaping special characters automatically throughout the entire document, so that you don't have to. - Ability to use a different header and footer in different projects, by creating your own publishing style. - Ability to surround some Muse markup with the tag, which causes is to not be treated as markup. This is useful for publishing the "|" character as-is, without turning the current line into a table. - Improved detection of paragraphs, which results in HTML that meets various W3C standards. - Journalling mode that is capable of publishing to RSS 2.0 or RSS 1.0 (RDF). - Embedding LaTeX code into a document by turning it into an image. This is in muse-latex2png.el. emacs-wiki only --------------- The reason that most of these have not been implemented is lack of demand. If you want to see these features implemented, please send an email to the muse-el-discuss mailing list, describing a good use case for them. - Publishing bookmarks in XBEL format. The bk2site program -- available separately -- does an adequate job, so this was not implemented for Muse. - Macros, i.e. keywords like %this%, that expand to some text upon publishing. - Global IDs. - Menu generation. - PGP encryption of regions with the and tags. - The tag. - Publishing of ChangeLog files. - The keybinding `C-c C-r': rename wiki link at point. - The keybinding `C-c C-D': delete wiki link at point. - The #style directive. - Using the title of the page in a generated index page, rather than the filename of the page. Specifying Projects =================== Here is an example emacs-wiki-projects setting. (setq emacs-wiki-projects '(("WebWiki" . ((emacs-wiki-directories . ("~/WebWiki")) (emacs-wiki-project-server-prefix . "/web/") (emacs-wiki-publishing-directory . "~/public_html/web"))) ("ProjectsWiki" . ((emacs-wiki-directories . ("~/ProjectsWiki")) (emacs-wiki-project-server-prefix . "/projects/") (emacs-wiki-publishing-directory . "~/public_html/projects"))))) And here is the corresponding muse-project-alist setting. (setq muse-project-alist '(("Website" ("~/WebWiki" :default "WelcomePage") (:base "html" :path "~/public_html/web")) ("Projects" ("~/ProjectsWiki" :default "WelcomePage") (:base "html" :path "~/public_html/projects")))) Note that there is no need to specify a prefix. Muse will automatically figure out what the relative paths in links to Muse files should be. If you want to be able to link to another project entry that is on a different domain, then you must use :base-url in every project entry. An example of this follows. (setq muse-project-alist '(("Website" ("~/WebWiki" :default "WelcomePage") (:base "html" :base-url "http://web.example.org/web" :path "~/public_html_1/web")) ("Projects" ("~/ProjectsWiki" :default "WelcomePage") (:base "html" :base-url "http://projects.example.org/projects" :path "~/public_html_2/projects")))) Special Topics ============== Including multiple directories ------------------------------ With emacs-wiki, this was done by setting the `emacs-wiki-recurse-directories' option to non-nil. With Muse, this can be accomplished by including an entry in your muse-project-alist setting that causes entries for a directory and all subdirectories to be created. This does not work when using the customize interface to set `muse-project-alist'. Here is an example: ("Blog" (,@(muse-project-alist-dirs "~/Blog") :default "index") ;; Publish this directory and its subdirectories. Arguments ;; are as follows. The above `muse-project-alist-dirs' part ;; is also needed, using Argument 1. ;; ;; 1. Source directory ;; 2. Output directory ;; 3. Publishing style ;; remainder: Other things to put in every generated style ,@(muse-project-alist-styles "~/Blog" "~/public_html/blog" "blosxom")) Generating an Index page ------------------------ In emacs-wiki, the page specified by `emacs-wiki-index-page' is an automatically generated index page. Muse does not automatically create this file. If you want an automatic index file to be generated, then create a file and place the following contents (between the lines of underscores) in it. _____ #title Index (muse-index-as-string t t t) _____ Then, add a :force-publish tag to the paths part of the project entry in muse-project-alist. Example: ("Website" ("~/Web/" :force-publish ("WikiIndex") :default "WelcomePage") (:base "xhtml" :base-url "http://mydomain.org/" :path "~/public_html")) License ======= This file may be used, distributed, and modified without restriction. muse-el-3.20+dfsg/etc/muse.rnc0000644000175000017500000002042711331353120015465 0ustar taffittaffitnamespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" namespace rng = "http://relaxng.org/ns/structure/1.0" # Emacs Muse RELAX NG Schema v. 1.2 # Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 # Free Software Foundation, Inc. # Author: Brad Collins (brad AT chenla DOT org) # Maintainer: Michael Olson # This 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 3 of the License, or # (at your option) any later version. This material 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 this file; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA # 02111-1307, USA. # Commentary: # # RelaxNG Compact syntax can be converted into RelaxNG XML Syntax, # DTD format and XML Schema language using free tools. # # Emacs users are encouraged to use James Clarke's nxml-mode for # editing and validating XML files. If you are in nxml-mode use the # command C-c C-s C-f to point to this schema file, say yes if you # are asked if you want to copy the file to your location, and then # C-c C-s C-a can be used to reload the schema if you make changes # to the file. # History: # # Version 0.1: # - Original version by Brad Collins. # # Version 0.2: # - Hacked it to the point of working with Muse's QuickStart # document. # # Version 0.3: # - Permit lists to be nested. # # Version 1.0: # - Permit paragraph-level markup, such as links, to appear in # table lines. # - Support multiple definitions in a definition list. # - Permit a list to be nested inside of a definition. # - Permit a link to be inside of a title. # - Permit emphasis to be inside of other emphasis. # # Version 1.1: # - Add the tag. # # Version 1.2: # - Add the
tag. # - Don't allow tags inside of format elements. # Contributors: # Schema: start = MUSE ## root element MUSE = element MUSE { muse.element.pageinfo? & muse.element.section* & muse.element.p* & muse.element.blockquote* & muse.element.table* & muse.element.list* & muse.element.hr* & muse.element.image* & muse.element.example* & muse.element.verse* } # ------------------------------------------------ # Pageinfo elements # ------------------------------------------------ ## pageinfo element used for metadata ## for the page muse.element.pageinfo = element pageinfo { muse.element.title? & muse.element.author? & muse.element.maintainer? & muse.element.pubdate? }? ## page title element muse.element.title = element title { muse.element.link* & text }? ## page author element muse.element.author = element author { text }? ## page maintainer element muse.element.maintainer = element maintainer { text }? ## page publication date element muse.element.pubdate = element pubdate { text }? # ------------------------------------------------ # Block elements # ------------------------------------------------ muse.element.section = element section { muse.attribute.type? & muse.attribute.level? & muse.element.section* & muse.element.title* & muse.element.p* & muse.element.blockquote* & muse.element.table* & muse.element.list* & muse.element.hr* & muse.element.image* & muse.element.example* & muse.element.verse* & text }? ## blockquote element muse.element.blockquote = element blockquote { muse.element.title? & muse.element.p* }? ## paragraph element muse.element.p = element p { muse.element.br* & muse.element.code* & muse.element.cite* & muse.element.format* & muse.element.image* & muse.element.link* & muse.element.image* & muse.element.anchor* & muse.element.footnote* & text }? ## example element muse.element.example = element example { text }? ## verse element muse.element.verse = element verse { muse.element.line* }? ## verse line element muse.element.line = element line { muse.element.br* & muse.element.code* & muse.element.cite* & muse.element.format* & muse.element.image* & muse.element.link* & muse.element.image* & muse.element.anchor* & muse.element.footnote* & text }? # ------------------------------------------------ # Unordered list elements # ------------------------------------------------ muse.element.list = element list { muse.attribute.type? & muse.element.item* }? muse.element.item = element item { muse.element.term? & muse.element.definition* & muse.element.br* & muse.element.code* & muse.element.cite* & muse.element.format* & muse.element.image* & muse.element.link* & muse.element.p* & muse.element.blockquote* & muse.element.table* & muse.element.example* & muse.element.verse* & muse.element.list* & text }? # ------------------------------------------------ # Definition list elements # ------------------------------------------------ muse.element.term = element term { muse.element.br* & muse.element.code* & muse.element.cite* & muse.element.format* & muse.element.image* & muse.element.link* & muse.element.image* & text }? ## def muse.element.definition = element definition { muse.element.br* & muse.element.code* & muse.element.cite* & muse.element.format* & muse.element.image* & muse.element.link* & muse.element.image* & muse.element.list* & text }? # ------------------------------------------------ # Inline elements # ------------------------------------------------ ## format element ## used for emphasis, underlining, and centering paragraphs muse.element.format = element format { muse.attribute.type? & muse.attribute.level? & muse.element.code* & muse.element.format* & text }? ## cite element ## used for citing sources muse.element.cite = element cite { muse.attribute.type? & text }? ## code element ## used for small pieces of monospace text, like commands muse.element.code = element code { text }? muse.element.image = element image { muse.attribute.href? }? ## horizontal rule element muse.element.hr = element hr { empty }? ## footnote element muse.element.footnote = element footnote { text }? ## anchor element muse.element.anchor = element anchor { muse.attribute.id }? ## link element muse.element.link = element link { muse.attribute.type? & muse.attribute.href & text }? # ------------------------------------------------ # Attributes # ------------------------------------------------ ## type attribute muse.attribute.type = attribute type { text }? ## level attribute muse.attribute.level = attribute level { text }? ## href attribute -- must have valid URI muse.attribute.href = attribute href { xsd:anyURI }? ## id attribute muse.attribute.id = attribute id { text }? # ------------------------------------------------ # Table elements # ------------------------------------------------ ## table element muse.element.table = element table { muse.element.tbody* & muse.element.thead* & muse.element.tfoot* }? ## table body element muse.element.tbody = element tbody { muse.element.tr* }? ## table header element muse.element.thead = element thead { muse.element.tr* }? ## table footer element muse.element.tfoot = element tfoot { muse.element.tr* }? ## table row element muse.element.tr = element tr { muse.element.td* & muse.element.th* }? ## td element muse.element.td = element td { muse.element.br* & muse.element.code* & muse.element.cite* & muse.element.format* & muse.element.image* & muse.element.link* & muse.element.image* & muse.element.anchor* & muse.element.footnote* & text }? ## th element muse.element.th = element th { muse.element.br* & muse.element.code* & muse.element.cite* & muse.element.format* & muse.element.image* & muse.element.link* & muse.element.image* & muse.element.anchor* & muse.element.footnote* & text }? muse-el-3.20+dfsg/etc/IDEAS.muse0000644000175000017500000000673011331353120015531 0ustar taffittaffitThis is the "Ideas" page for Emacs Muse. It lists various ideas for future enhancements to Emacs Muse. It also serves to keep track of various changes that the maintainer would like to merge into Muse at some point. * Pending code This is code that may or may not be already approved, but should be checked out at some point. ** Waiting for a new release - Jim Ottaway - jeho-latex.el: a rewrite of muse-latex.el which should replace it at some point. - muse-latex-labels.el: addition of cross-references to LaTeX. Should be merged into muse-latex.el after replacing with jeho-latex.el. - David D. Smith - dds-emphasis-bits.el - New syntax for explicitly specifying emphasis: {[_-=*] some emphasized text}. Also, {** some text **} and {*** some text ***} should work. - Using -strike- to do strikethrough. * Ideas without code ** After 3.10 release None of these ideas has been finalized yet. *** Support for different source markup formats For any of these to be done, we have to write functions that call the right program to do the publishing for us. If the markup format has some project-aware tools, write Elisp wrappers for those at the project-publish level. - Markdown: http://daringfireball.net/projects/markdown/ mwolson: I hate this format, but it's popular. - reStructuredText: http://docutils.sourceforge.net/rst.html mwolson: I like this format from an initial glance. - AsciiDoc: http://www.methods.co.nz/asciidoc/index.html Git uses this, but it has heavy dependencies. - Org Mode: http://orgmode.org/ Just use org-publish functions. - Like Muse's default markup, but allow tags to be specified in Texinfo style: namely, "@tagname{contents}" instead of "contents" for small regions and "@tagname\ncontents\n@end tagname" for large regions. This might be a pain to implement, and only one person has asked for it. - Take markup features from phpBB and make a format out of it. This could interest the forum crowd in our work. mwolson: I do not have interest in making a new markup format at the moment. *** Publishing to plain text - The file experimental/muse-message.el also needs some attention, so that it can do plain text. Maybe it should be renamed to muse-plain-text.el. - People have requested being able to publish Muse format to other stuff like rst and markdown. mwolson: I'm not in any hurry to implement this. *** Make tags for every "main" Muse markup syntax The idea is to have something to fall back on. One use case is putting a list into a table. *** Allow pages made by M-x muse-index to be refreshed automatically The idea is to update the contents of the index page whenever a new page is saved. This should be controlled by a new customizable option called `muse-index-update', which is either nil or non-nil. `muse-index' should be modified to add the generated buffer into a new variable called `muse-index-buffers'. A new function called `muse-index-update-buffers' should be made, which goes through the list `muse-index-buffers', doing the following. It must check `muse-index-update' first to see whether it should do anything. It must take no arguments. (let ((index (muse-index-as-string as-list exclude-private))) (dolist (buffer muse-index-buffers) (with-current-buffer buffer (erase-buffer) (insert index) (current-buffer)))) This function should be added to after-save-hook in muse-mode.el. muse-el-3.20+dfsg/scripts/0000755000175000017500000000000011331353120014717 5ustar taffittaffitmuse-el-3.20+dfsg/scripts/muse-build.el0000644000175000017500000000514511331353120017314 0ustar taffittaffit(add-to-list 'load-path "../contrib") (add-to-list 'load-path "../experimental") (add-to-list 'load-path "../lisp") ;; Avoid interference from VC.el (setq vc-handled-backends nil) (defun muse-elint-files () (require 'elint) (elint-initialize) (defvar nomessage t) (load "muse" nil nomessage) (dolist (dir '("../lisp" "../contrib" "../experimental")) (dolist (file (directory-files dir nil "\\.el$")) (setq file (substring file 0 (string-match "\\.el$" file))) (load file nil nomessage))) (add-to-list 'elint-standard-variables 'current-prefix-arg) (add-to-list 'elint-standard-variables 'command-line-args-left) (add-to-list 'elint-standard-variables 'buffer-file-coding-system) (add-to-list 'elint-standard-variables 'save-some-buffers-action-alist) (add-to-list 'elint-standard-variables 'emacs-major-version) (add-to-list 'elint-standard-variables 'emacs-minor-version) (add-to-list 'elint-standard-variables 'emacs-version) (add-to-list 'elint-standard-variables 'window-system) (add-to-list 'elint-standard-variables 'muse-mode-abbrev-table) (dolist (file command-line-args-left) (find-file file) (message "Checking %s ..." file) (elint-current-buffer) (with-current-buffer (elint-get-log-buffer) (goto-char (point-min)) (forward-line 2) (while (not (or (eobp) (looking-at "^Linting complete"))) (message (buffer-substring (muse-line-beginning-position) (muse-line-end-position))) (forward-line 1))) (kill-buffer (current-buffer)))) (defun muse-generate-autoloads () (interactive) (defvar autoload-package-name) (defvar command-line-args-left) (defvar generated-autoload-file) (require 'autoload) (setq backup-inhibited t) (setq generated-autoload-file (expand-file-name "muse-autoloads.el")) (setq command-line-args-left (mapcar #'expand-file-name command-line-args-left)) (if (featurep 'xemacs) (progn (setq autoload-package-name "muse") (batch-update-autoloads)) (find-file generated-autoload-file) (delete-region (point-min) (point-max)) (insert ";;; muse-autoloads.el --- autoloads for Muse ;; ;;; Code: ") (save-buffer 0) (batch-update-autoloads) (find-file generated-autoload-file) (goto-char (point-max)) (insert ?\n) (insert "(provide 'muse-autoloads) ;;; muse-autoloads.el ends here ;; ;; Local Variables: ;; version-control: never ;; no-byte-compile: t ;; no-update-autoloads: t ;; End: ") (insert ?\n) (save-buffer 0) (kill-buffer (current-buffer)))) muse-el-3.20+dfsg/scripts/publish0000755000175000017500000000043011331353120016310 0ustar taffittaffit#!/bin/bash style=$(echo $1 | sed 's/^--//') shift $EMACS -q $SITEFLAG -batch -l ../scripts/muse-build.el \ -l muse-regexps.el -l muse.el -l muse-publish.el \ -l muse-html.el -l muse-latex.el -l muse-texinfo.el \ -f muse-batch-publish-files $style --output-dir=. "$@" muse-el-3.20+dfsg/experimental/0000755000175000017500000000000011331353120015725 5ustar taffittaffitmuse-el-3.20+dfsg/experimental/muse-split.el0000644000175000017500000004165011331353120020357 0ustar taffittaffit;;; muse-split.el --- split published Muse files ;; Copyright (C) 2006 Free Software Foundation, Inc. ;; Author: Phillip Lord ;; This file is part of Emacs Muse. It is not part of GNU Emacs. ;; Emacs Muse 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 3, or (at your ;; option) any later version. ;; Emacs Muse 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 Emacs Muse; see the file COPYING. If not, write to the ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;;; Status: ;; This works now, except that anchors will get broken, as they may ;; well point to the wrong thing. ;; Anchors are mostly working, some crashes in caching code. Have ;; realised that could just circumvent the anchors problem by always ;; pointing toward the full length entry which all of my split ;; functions generate now. Given the complexity that this has ;; introduced taht might not have been a bad idea. ;; These functions directly over-write the original versions in ;; muse-publish. (require 'muse-publish) (require 'assoc) (eval-when-compile (require 'cl)) ;; this code duplicates that in muse-publish-markup-regexps and should ;; be factored out. I use this style to pull directives from the front ;; of file. (defvar muse-publish-presplit-markup-regexps `( ;; Handle any leading #directives (1200 "\\`#\\([a-zA-Z-]+\\)\\s-+\\(.+\\)\n+" 0 directive) ;; define anchor points (1500 "^\\(\\W*\\)#\\(\\S-+\\)\\s-*" 0 anchor))) (defvar muse-publish-presplit-functions '((directive . muse-publish-presplit-directive) (anchor . muse-publish-presplit-anchor))) ;; oh dear, this function used to be so simple and now has got so ;; nasty. I'm sure I can amalgamate some of the let bindings and ;; lambda function. (defun muse-publish-file (file style &optional output-dir force) "Publish the given file in list FILES. If the argument FORCE is nil, each file is only published if it is newer than the published version. If the argument FORCE is non-nil, the file is published no matter what." (interactive (cons (read-file-name "Publish file: ") (muse-publish-get-info))) (setq style (muse-style style)) (let* ((output-path (muse-publish-output-file file output-dir style)) (output-suffix (muse-style-element :osuffix style)) (muse-publishing-current-file file) (muse-publishing-style-in-use style) (muse-publish-split-file-split-values nil) (muse-publish-presplit-directive-store "") (muse-publish-presplit-anchor-location nil) (muse-publishing-targets-alist (muse-publish-split-file file)) (target-list (mapcar (lambda(elem) (if output-suffix (concat (file-name-sans-extension (cdr (car elem))) output-suffix) output-path)) muse-publishing-targets-alist))) (when (or force ;; update if any of the files are out of date. (let ((outofdate nil)) (mapc (lambda(elem) (if (file-newer-than-file-p file (car elem)) (setq outofdate t))) muse-publishing-targets-alist) outofdate)) (if (and muse-publish-report-threshhold (> (nth 7 (file-attributes file)) muse-publish-report-threshhold)) (message "Publishing %s ..." file) ;; need to grab the directives. (muse-publish-presplit-publish file) ;; start a temp buffer for main data (muse-with-temp-buffer (muse-insert-file-contents file) (let ((mainbuffer (current-buffer)) (subcontents)) (mapc (lambda(elem) (muse-with-temp-buffer ;; not handling the directives yet. (save-excursion (set-buffer mainbuffer) (setq subcontents (buffer-substring-no-properties (cadr elem) (caddr elem)))) ;; insert the directives afresh. (insert muse-publish-presplit-directive-store) (insert subcontents) (muse-publish-markup-buffer (muse-page-name file) style) (let* ((backup-inhibited t)) (write-file (muse-publish-output-file (car elem) output-dir style))) (muse-style-run-hooks :final style file (car elem)))) muse-publishing-targets-alist))) t)))) (defun muse-publish-presplit-publish(file) (muse-with-temp-buffer (muse-insert-file-contents file) (let ((muse-publish-markup-regexps muse-publish-presplit-markup-regexps) (muse-publish-markup-functions muse-publish-presplit-functions) (muse-publishing-styles) (muse-publish-presplit-splitting-file file)) ;; great an empty style. The name is just wierd, so that ;; it won't preexist (which makes muse crash). The let ;; binding should mean that it disappears. (muse-define-style "ThePurposeIsNotToDescribeTheWorldButToChangeIt") (muse-publish-markup-buffer (muse-page-name "temp") "ThePurposeIsNotToDescribeTheWorldButToChangeIt")))) (defun muse-publish-prepare-url (target &rest ignored) "Transform anchors and get published name, if TARGET is a page." (save-match-data (unless (or (string-match muse-url-regexp target) (string-match muse-image-regexp target) (string-match muse-file-regexp target)) (setq target (if (string-match "#" target) ;; is this a simple anchor, we need to check ;; where it will be published. (if (eq (aref target 0) ?\#) (concat (muse-publish-link-name (muse-publish-split-file-for-anchor muse-publishing-current-file (substring target 1))) target) ;; it's not anchor simple anchor, so we need to ;; put in the extension (let ((file (substring target 0 (match-beginning 0))) (anchor (substring target (match-end 0)))) (concat (muse-publish-link-name (muse-publish-split-file-for-anchor (concat (file-name-directory muse-publishing-current-file) file "." muse-file-extension) anchor)) "#" anchor))) ;; it's not an anchor at all. (muse-publish-link-name target)))) target)) ;; these are support functions ;; we currently have to store a lot of state to get this to work, ;; which is rather dissatisfying. All of it is let bound from ;; muse-publish-file. Wey hey for dynamic scoping. (defvar muse-publish-presplit-directive-store nil "Stores directives from main file during splitting") (defvar muse-publish-presplit-anchor-location nil "Stores anchors during publishing.") (defvar muse-publish-split-file-split-values nil "Cache the values of split locations in files, during publish") (defvar muse-publishing-targets-alist nil "Stores the targets to be published to. Changing this will cause bad things to happen. ") (defvar muse-publishing-style-in-use nil "Stores the style currently being published") (defvar muse-publish-presplit-splitting-file nil "The file that we are current publishing for presplit") (defun muse-publish-no-split-function (file) (muse-with-temp-buffer (muse-insert-file-contents file) (list `(,(file-name-sans-extension file) . (1 ,(point-max)))))) (defun muse-publish-split-file (file) "Calculate where to split the FILE. FILE is the file to be split This should return an alist of form (position . output-file) where position is the last position that should appear in output-file" (let* ((split-function (muse-get-keyword :split muse-publishing-style-in-use t)) (split-alist (if (not split-function) (muse-publish-no-split-function file) (funcall split-function file)))) (aput 'muse-publish-split-file-split-values file split-alist) split-alist)) (defun muse-publish-presplit-directive (&optional name value) (unless name (setq name (match-string 1))) (unless value (setq value (match-string 2))) ;; store the directives. (setq muse-publish-presplit-directive-store (format "%s#%s %s\n" muse-publish-presplit-directive-store name value))) (defun muse-publish-presplit-anchor() "Stores the location and names of anchors" (let ((alist (aget muse-publish-presplit-anchor-location muse-publish-presplit-splitting-file))) (add-to-list 'alist `(,(match-string 2) . ,(match-beginning 2))) (aput 'muse-publish-presplit-anchor-location muse-publish-presplit-splitting-file alist))) ;; ;;(setq muse-publish-split-file-split-values nil) ;; (setq muse-publish-split-file-split-values ;; '(("d:/home/src/ht/home_website/journal-split/journal.muse" ;; ("d:/home/src/ht/home_website/journal-split/journal-20060226" 875 1592) ;; ("d:/home/src/ht/home_website/journal-split/journal-20060228" 417 874) ;; ("d:/home/src/ht/home_website/journal-split/journal-20060303" 27 416) ;; ("d:/home/src/ht/home_website/journal-split/journal-20060220" 1593 2957) ;; ("d:/home/src/ht/home_website/journal-split/journal-all" 1 2957) ;; ("d:/home/src/ht/home_website/journal-split/journal" 1 2957)))) ;; ;; muse-publish-presplit-anchor-location's value is shown below. ;; ;; Value: ;; ;; (setq muse-publish-presplit-anchor-location nil) ;; (setq muse-publish-presplit-anchor-location ;; '(("d:/home/src/ht/home_website/journal-split/journal.muse" ;; ("semantic_enrichment" 1642) ;; ("title" 2)) ;; ("d:/home/src/ht/home_website/journal-split/simple.muse" ;; ("anchor7" 189) ;; ("anchor3" 173) ;; ("anchor2" 162) ;; ("simple_anchor" 15)))) ;; get the anchor locations ;; (muse-publish-presplit-publish file) ;; get the split locations ;; (muse-publish-split-file file)) (defun test1() (interactive) (message "%s" (muse-publish-split-file-for-anchor "d:/home/src/ht/home_website/journal-split/journal.muse" "semantic_enrichment"))) (defun muse-publish-split-file-for-anchor (base-file anchor) "Given a base file and an anchor, return the file into which the anchor will be output" (let* ( ;; this should be an alist, keyed on the anchor, valued on ;; either numbers, or file-locations (anchor-alist (or (aget muse-publish-presplit-anchor-location base-file) (progn (muse-publish-presplit-publish base-file) (aget muse-publish-presplit-anchor-location base-file)))) ;; this should be a list of triples: file, start, stop. (split-list (or (aget muse-publish-split-file-split-values base-file) (muse-publish-split-file base-file))) ;; this should be either the position of the anchor in a ;; buffer as an int, or a output file location (anchor-position-or-location (aget anchor-alist anchor)) ;; this should definately be the output file location (anchor-output (if (stringp anchor-position-or-location) anchor-position-or-location (car (delete nil (mapcar (lambda(elem) (if (and (> anchor-position-or-location (cadr elem)) (< anchor-position-or-location (caddr elem))) (car elem))) split-list)))))) ;; ensure that we put the location back into the stored list so ;; that we don't have to work it out next time (aput 'anchor-alist anchor anchor-output) (aput 'muse-publish-presplit-anchor-location base-file anchor-alist) (file-name-nondirectory anchor-output))) ;; this is an example of why I would want to use the code. (muse-derive-style "journal-html-by-day" "journal-html" :split 'muse-journal-split-by-entry) (muse-derive-style "journal-html-by-month" "journal-html" :split 'muse-journal-split-by-month) (defun muse-journal-split-by-entry (file) "Split a muse journal file into days" (muse-with-temp-buffer (muse-insert-file-contents file) (let* ((split-alist) (root-name (file-name-sans-extension file)) (split-regexp "^\\* \\([0-9]\\{8\\}\\)") (current-position (if (re-search-forward split-regexp nil t) (- (match-beginning 0) 1))) (entry-name (match-string 1)) (entry-location (match-beginning 0))) (while (re-search-forward split-regexp nil t) (setq entry-location (match-beginning 0)) (add-to-list 'split-alist `(,(concat root-name "-" entry-name) ,current-position ,(- entry-location 1))) (setq current-position entry-location entry-name (match-string 1))) (add-to-list 'split-alist `(,(concat root-name "-" entry-name) ,current-position ,(point-max)) t) (add-to-list 'split-alist `(,root-name ,(cadr (car (last split-alist))) ,(caddr (car (last split-alist)))) t) (add-to-list 'split-alist `(,(concat root-name "-all") 1 ,(point-max)) t)))) (defun muse-journal-split-by-month (file) "Split a muse journal file into months. This function makes the assumption that the entries are sorted. If it isn't then it some of the entries will appear not to be published." (muse-with-temp-buffer (muse-insert-file-contents file) (let* ((split-alist) (root-name (file-name-sans-extension file)) (split-regexp (concat "^\\* \\([0-9]\\{4\\}\\)\\([0-9]\\{2\\}\\)" "\\([0-9]\\{2\\}\\)")) (current-position (if (re-search-forward split-regexp nil t) (- (match-beginning 0) 1))) (entry-name (muse-journal-split-by-month-name)) (entry-location (match-beginning 0))) ;; for a new entry, if the name has changed (while (and (re-search-forward split-regexp nil t) (not (equal entry-name (muse-journal-split-by-month-name)))) (setq entry-location (match-beginning 0)) (add-to-list 'split-alist `(,(concat root-name "-" entry-name) ,current-position ,(- entry-location 1))) (setq current-position entry-location entry-name (muse-journal-split-by-month-name))) ;; add last entry (add-to-list 'split-alist `(,(concat root-name "-" entry-name) ,current-position ,(point-max))) ;; add some duplicate entries in. Add these last, so that ;; anchors go to one of the others. ;; ;; duplicate last entry as current (add-to-list 'split-alist `(,root-name ,(cadr (car (last split-alist))) ,(caddr (car (last split-alist)))) t) ;; add all entry (add-to-list 'split-alist `(,(concat root-name "-all") 1 ,(point-max)) t)))) (defun muse-journal-split-by-month-name() (concat (match-string 1) (match-string 2))) (defun test2() (interactive) (message "%s" (muse-journal-split-by-entry "journal.muse"))) (provide 'muse-split) ;; muse-split.el ends here muse-el-3.20+dfsg/experimental/muse-message.el0000644000175000017500000002037211331353120020646 0ustar taffittaffit;;; muse-message.el --- publish a file as an email message ;; Copyright (C) 2004, 2005 Free Software Foundation, Inc. ;; This file is part of Emacs Muse. It is not part of GNU Emacs. ;; Emacs Muse 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 3, or (at your ;; option) any later version. ;; Emacs Muse 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 Emacs Muse; 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 in experimental status due to unimplemented features. ;; ;; To make use of this file, put (require 'muse-message) in your .emacs. ;; ;; By default, the way to mark up an email message is to do the ;; following. ;; ;; - Enter Message mode. This is usually done automatically when you ;; compose an email message using your Emacs mail client of choice. ;; ;; - Use standard Muse markup instead of plain text for your message. ;; ;; - When you are ready to see what the email message will look like, ;; do `M-x muse-message-markup'. This will make two versions of ;; your message: plaintext and HTML. ;; ;; - If you want to do further editing, simply undo your changes, ;; edit some more, and run `muse-message-markup' when you're ready ;; to send. ;; ;; - Send the message. ;; ;; If you wish the markup to be automatic at the time of sending you ;; message (a risky proposition), just add `muse-message-markup' to ;; `message-send-hook'. ;;; Contributors: ;;; Code: ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; Muse E-Mail Publishing (via alternative/html) ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (require 'message) (require 'footnote) (require 'muse-publish) (require 'muse-html) (defgroup muse-message nil "Options controlling the behavior of Emacs Wiki Mail Markup." :group 'hypermedia :group 'muse-publish) (defcustom muse-message-publishing-style "message" "Style used for publishing the alternative/text section of a message." :type 'string :group 'muse-message) (defcustom muse-message-html-publishing-style "message-html" "Style used for publishing the alternative/html section of a message." :type 'string :group 'muse-message) (defcustom muse-message-indent " " "String used to pad indentend text." :type 'string :group 'muse-message) (defcustom muse-message-style-sheet "body { background: white; color: black; margin-left: 3%; margin-right: 7%; } p { margin-top: 1% } p.verse { margin-left: 3% } .example { margin-left: 3% } h2 { margin-top: 25px; margin-bottom: 0px; } h3 { margin-bottom: 0px; }" "Text to prepend to a Muse mail message being published. This text may contain markup tags." :type 'string :group 'muse-message) (defcustom muse-message-html-header " <lisp>(muse-publishing-directive \"title\")</lisp> user-mail-address\"> \n" "Text to prepend to a Muse mail message being published. This text may contain markup tags." :type 'string :group 'muse-message) (defcustom muse-message-html-footer "\n \n" "Text to append to a Muse mail message being published. This text may contain markup tags." :type 'string :group 'muse-message) (defcustom muse-message-markup-functions '((link . muse-message-markup-link)) "An alist of style types to custom functions for that kind of text. For more on the structure of this list, see `muse-publish-markup-functions'." :type '(alist :key-type symbol :value-type function) :group 'muse-message) (defcustom muse-message-markup-strings '((rule . " * * * *") (begin-verse . " ") (end-verse-line . "\n ") (verse-space . " ") (end-verse . "") (begin-underline . "_") (end-underline . "_") (begin-literal . "`") (end-literal . "'") (begin-emph . "/") (end-emph . "/") (begin-more-emph . "*") (end-more-emph . "*") (begin-most-emph . "*/") (end-most-emph . "/*")) "Strings used for marking up message text." :type '(alist :key-type symbol :value-type string) :group 'muse-message) (defcustom muse-message-markup-tags '(("example" t nil muse-message-example-tag) ("contents" nil t muse-message-contents-tag)) "A list of tag specifications, for specially marking up text. See the documentation for `muse-publish-markup-tags'." :type '(repeat (list (string :tag "Markup tag") (boolean :tag "Expect closing tag" :value t) (boolean :tag "Parse attributes" :value nil) function)) :group 'muse-message) (defcustom muse-message-markup-specials nil "A table of characters which must be represented specially." :type '(alist :key-type character :value-type string) :group 'muse-message) (defun muse-message-markup-link () (let ((desc (match-string 2)) (url (match-string 1))) (save-match-data (delete-region (match-beginning 0) (match-end 0)) (when desc (insert desc)) (save-excursion (Footnote-add-footnote) (insert url)) ""))) (defun muse-message-example-tag (beg end) "Mark up example and code by simply indenting them." (muse-publish-escape-specials beg end) (kill-line 1) (goto-char end) (kill-line -1) (string-rectangle beg (point) muse-message-indent) (muse-publish-mark-read-only beg (point))) ;; Copied from `muse-publish-contents-tag'. ;; FIXME: Make this do something worthwhile. (defun muse-message-contents-tag (beg end attrs) (set (make-local-variable 'muse-publish-generate-contents) (cons (copy-marker (point) t) (let ((depth (cdr (assoc "depth" attrs)))) (or (and depth (string-to-number depth)) 2))))) ;;;###autoload (defun muse-message-markup () "Markup a wiki-ish e-mail message as HTML alternative e-mail. This step is manual by default, to give the author a chance to review the results and ensure they are appropriate. If you wish it to be automatic (a risky proposition), just add this function to `message-send-hook'." (interactive) (save-excursion (message-goto-body) (let ((text (buffer-substring-no-properties (point) (point-max))) (subject (message-fetch-field "subject")) (encoding (muse-html-encoding))) (delete-region (point) (point-max)) (insert "<#multipart type=alternative>\n" "<#part type=text/plain charset=\"" encoding "\" nofile=yes>\n" (with-temp-buffer (insert text) (muse-publish-markup-buffer subject muse-message-publishing-style) (buffer-substring-no-properties (point-min) (point-max))) "\n<#part type=text/html charset=\"" encoding "\" nofile=yes>\n" (with-temp-buffer (insert text) (muse-publish-markup-buffer subject muse-message-html-publishing-style) (buffer-substring-no-properties (point-min) (point-max))) "<#/multipart>\n")))) (muse-define-style "message" :functions 'muse-message-markup-functions :strings 'muse-message-markup-strings :tags 'muse-message-markup-tags) (muse-derive-style "message-html" "html" :header 'muse-message-html-header :footer 'muse-message-html-footer) (muse-derive-style "message-xhtml" "xhtml" :header 'muse-message-html-header :footer 'muse-message-html-footer) (provide 'muse-message) ;;; muse-message.el ends here muse-el-3.20+dfsg/experimental/muse-mathml.el0000644000175000017500000001224611331353120020505 0ustar taffittaffit;;; muse-mathml.el --- provide MathML support for Muse ;; Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc. ;; Author: Li Daobing (lidaobing AT gmail DOT com) ;; Keywords: Muse mathml hypermedia ;; This file is part of Emacs Muse. It is not part of GNU Emacs. ;; Emacs Muse 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 3, or (at your ;; option) any later version. ;; Emacs Muse 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 Emacs Muse; see the file COPYING. If not, write to the ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;;_* Commentary ;;;_ + Startup ;; 1. Get a copy of itex2MML and install it to `/usr/bin' or ;; `/usr/local/bin'. ;; ;; You can get a copy from ;; `http://pear.math.pitt.edu/mathzilla/itex2mml.tar.gz'. ;; 2. Copy `itex2MML.py' to `/usr/bin' or `/usr/local/bin', if you ;; do not have this file, create it and do a `chmod a+x itex2MML.py'. ;; Its content is the following. ;; #!/usr/bin/env python ;; """A wrap for itex2MML ;; ;; Delete the extra blank line. ;; ;; You can use it as itex2MML. ;; ;; For example: ;; ;; echo '$a_b$' | itex2MML.py ;; """ ;; ;; import sys ;; import os ;; ;; def main(): ;; fin, fo = os.popen2('itex2MML') ;; fin.write(sys.stdin.read()) ;; fin.close() ;; for line in fo: ;; line = line.strip() ;; if line: ;; print line ;; ;; if __name__ == '__main__': ;; main() ;; 3. Put `muse-math.el' into your `load-path'. ;; 4. Add the following to your .emacs file. ;; ;; (require 'muse-mathml) (require 'muse-html) (require 'muse-publish) (defgroup muse-mathml nil "Options controlling the behavior of Muse XHTML+MathML publishing. See `muse-html' for more information." :group 'muse-publish) (defcustom muse-mathml-extension ".xhtml" "Default file extension for publishing XHTML+MathML files." :type 'string :group 'muse-mathml) (defcustom muse-mathml-style-sheet muse-xhtml-style-sheet "Store your stylesheet definitions here. This is used in `muse-mathml-header'. You can put raw CSS in here or a tag to an external stylesheet. This text may contain markup tags. An example of using is as follows. " :type 'string :group 'muse-mathml) (defcustom muse-mathml-header " (muse-html-encoding)\"?> <lisp> (concat (muse-publishing-directive \"title\") (let ((author (muse-publishing-directive \"author\"))) (if (not (string= author (user-full-name))) (concat \" (by \" author \")\"))))</lisp> muse-html-meta-http-equiv\" content=\"muse-html-meta-content-type\" /> (let ((maintainer (muse-style-element :maintainer))) (when maintainer (concat \"\"))) muse-xhtml-style-sheet

(concat (muse-publishing-directive \"title\") (let ((author (muse-publishing-directive \"author\"))) (if (not (string= author (user-full-name))) (concat \" (by \" author \")\"))))

\n" "Header used for publishing XHTML+MathML files. This may be text or a filename." :type 'string :group 'muse-mathml) (defcustom muse-mathml-footer " \n" "Footer used for publishing XHTML+MathML files. This may be text or a filename." :type 'string :group 'muse-mathml) (defcustom muse-mathml-command (if (or (featurep 'executable) (load "executable" t t)) (executable-find "itex2MML.py")) "Program to use to convert Latex text to MathML." :type 'string :group 'muse-mathml) (defun muse-publish-mathml-tag (beg end) (if muse-mathml-command (muse-publish-command-tag beg end (list (cons "interp" muse-mathml-command))) (muse-publish-example-tag beg end))) ;; Add the tag (add-to-list 'muse-publish-markup-tags '("mathml" t nil muse-publish-mathml-tag) t) ;; Register the Muse MathML Publisher (muse-derive-style "mathml" "xhtml" :suffix 'muse-mathml-extension :header 'muse-mathml-header :footer 'muse-mathml-footer) (provide 'muse-mathml) ;;; muse-mathml.el ends here muse-el-3.20+dfsg/experimental/Makefile0000644000175000017500000000147111331353120017370 0ustar taffittaffit.PHONY: all experimental clean realclean distclean fullclean install .PHONY: install-uncompiled .PRECIOUS: %.elc DEFS = $(shell test -f ../Makefile.defs && echo ../Makefile.defs \ || echo ../Makefile.defs.default) include $(DEFS) EL = $(wildcard *.el) ELC = $(patsubst %.el,%.elc,$(wildcard *.el)) all: experimental experimental: $(ELC) $(PROJECT)-build.elc: ../scripts/$(PROJECT)-build.el @echo $(PROJECT)-build.el is not byte-compiled %.elc: %.el @$(EMACS) -q $(SITEFLAG) -batch -l ../scripts/$(PROJECT)-build.el \ -f batch-byte-compile $< clean realclean distclean fullclean: -rm -f *.elc *~ install: $(ELC) install -d $(ELISPDIR)/experimental install -m 0644 $(EL) $(ELC) $(ELISPDIR)/experimental install-uncompiled: install -d $(ELISPDIR)/experimental install -m 0644 $(EL) $(ELISPDIR)/experimental muse-el-3.20+dfsg/experimental/muse-cite.el0000644000175000017500000001124011331353120020140 0ustar taffittaffit;;; muse-cite.el --- smart citations for Muse ;; Copyright (C) 2005 Free Software Foundation, Inc. ;; This file is part of Emacs Muse. It is not part of GNU Emacs. ;; Emacs Muse 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 3, or (at your ;; option) any later version. ;; Emacs Muse 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 Emacs Muse; 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 muse-el-3.20+dfsg/experimental/muse-protocol-iw.el0000644000175000017500000000501211331353120021472 0ustar taffittaffit;;; muse-protocol-iw.el --- implement an interwiki protocol handler ;; Copyright (C) 2006 Free Software Foundation, Inc. ;; Author: Phillip Lord ;; This file is part of Emacs Muse. It is not part of GNU Emacs. ;; Emacs Muse 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 3, or (at your ;; option) any later version. ;; Emacs Muse 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 Emacs Muse; 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 defines a new url type, which is like the interwiki support of ;; muse-wiki. You can also publish to a different directory structure ;; from the file space (which I do for historical reasons). So a link ;; like ;; [[iw:home\emacs][hello]] will work from any of the individual muse ;; projects that I have. (require 'muse-protocols) (add-to-list 'muse-url-protocols '("iw:" muse-browse-url-iw muse-resolve-url-iw)) (defvar muse-interwiki-protocol-alist '(("home" "/" "~/src/ht/home_website") ("silly" "/silly/" "~/src/ht/home_website/silly") ("energy" "/energy/" "~/src/ht/home_website/energy") ("journal" "/journal/" "~/src/ht/home_website/journal"))) (defun muse-resolve-url-iw (url) (when (string-match "\\`iw:\\([a-zA-Z]*\\)\\\\\\(.+\\)" url) (let* ((wiki-resolve (assoc (match-string 1 url) muse-interwiki-protocol-alist)) (publish-resolve (nth 1 wiki-resolve))) (concat publish-resolve (match-string 2 url))))) ;; this doesn't handle anchors properly yet. (defun muse-browse-url-iw (url) (when (string-match "\\`iw:\\([a-zA-Z]*\\)\\\\\\(.+\\)#?\\(.*\\)" url) (let* ((wiki-resolve (assoc (match-string 1 url) muse-interwiki-protocol-alist)) (browse-resolve (or (nth 2 wiki-resolve) (nth 1 wiki-resolve)))) (find-file (concat browse-resolve "/" (match-string 2 url) ".muse"))))) (provide 'muse-protocol-iw) ;; muse-protocol-iw.el ends here muse-el-3.20+dfsg/README0000644000175000017500000002113711331353120014114 0ustar taffittaffit -*- Text -*- This is the README file for Emacs Muse. The terms "Emacs Muse", "Emacs-Muse", and "Muse" are used interchangeably throughout this document to refer to this software. Synopsis ======== Emacs Muse is an authoring and publishing environment for Emacs. It simplifies the process of writings documents and publishing them to various output formats. Emacs Muse consists of two main parts: an enhanced text-mode for authoring documents and navigating within Muse projects, and a set of publishing styles for generating different kinds of output. Directory contents ================== The directory structure is as follows. etc :: Miscellaneous files like the emacs-wiki migration guide, the list of ideas for the future, and a RelaxNG schema for Muse XML. contrib :: Files that are not a part of Muse proper, but are useful enough to be bundled with Muse. examples :: Example configuration files for use with Muse, a publishable quickstart guide, and miscellaneous helper stuff. experimental :: Source code that is not yet considered stable. lisp :: Muse source code. scripts :: Scripts that are used when compiling Muse and publishing the QuickStart document; they might prove useful if you want to automate the building of Muse documents. texi :: The manual (muse.texi) and any supplemental sections. Getting started =============== Prerequisites ------------- You need either Emacs (21.1 or greater), XEmacs (21.4 or greater), or SXEmacs (warning: Muse has not been tested with SXEmacs). The current maintainer recommends using Emacs. Compilation ----------- This is an optional step, since Emacs Lisp source code does not necessarily have to be byte-compiled. It may yield a slight speed increase, however. A working copy of Emacs or XEmacs is needed in order to compile the Emacs Muse. By default, the program that is installed with the name `emacs' will be used. If you want to use the `xemacs' binary to perform the compilation, you must copy `Makefile.defs.default' to `Makefile.defs' in the top-level directory, and then edit `Makefile.defs' as follows. You can put either a full path to an Emacs or XEmacs binary or just the command name, as long as it is in the PATH. EMACS = xemacs SITEFLAG = -no-site-file # Edit the section as necessary install_info = install-info --section "XEmacs 21.4" $(1).info \ $(INFODIR)/dir || : Running `make' in the top-level directory should compile the Muse source files in the `lisp' directory, and generate an autoloads file in `lisp/muse-autoloads.el'. Installation ------------ Muse may be installed into your file hierarchy by doing the following. Copy `Makefile.defs.default' to `Makefile.defs' in the top-level directory, if you haven't done so already. Then edit the `Makefile.defs' file so that ELISPDIR points to where you want the source and compiled Muse files to be installed and INFODIR indicates where to put the Muse manual. You may use a combination of DESTDIR and PREFIX to further determine where the installed files should be placed. As mentioned earlier, you will want to edit EMACS and SITEFLAG as shown in the Compilation section if you are using XEmacs. If you are installing Muse on a Debian or Ubuntu system, you might want to change the value of INSTALLINFO as specified in `Makefile.defs'. If you wish to install Muse to different locations than the defaults specify, edit `Makefile.defs' accordingly. Run `make' as a normal user, if you haven't done so already. Run `make install' as the root user if you have chosen installation locations that require this. Insinuation ----------- Two things need to happen in order for Muse to be usable with your version of Emacs or XEmacs. 1. The location of the Muse directory needs to be added to the load path so that your variant of Emacs can find it. 2. You need to load whichever Muse files you wish to make use of. A quick example that accomplishes both of these follows. ;; Add this to your .emacs or .xemacs/init.el file. (setq load-path (add-to-list 'load-path "/path/to/muse")) (require 'muse-mode) (require 'muse-publish) (require 'muse-html) ;; and so on Documentation ------------- The Muse manual may be generated by running `make doc'. It will produce two files: an Info file called `muse.info' and an HTML document called `muse.html'. Both of these will be created in the `texi' directory. This manual is also available online in several forms. - PDF: http://mwolson.org/static/doc/muse.pdf - HTML (single file): http://mwolson.org/static/doc/muse.html - HTML (multiple files): http://mwolson.org/static/doc/muse/ QuickStart ---------- Type "make examples" to generate a quickstart guide for Muse. An HTML document called QuickStart.html, an Info document called QuickStart.info, and a PDF file called QuickStart.pdf will be created in the `examples' directory. If you do not have a working LaTeX installation with the proper fonts, the PDF file will not be successfully generated. To see the document that is interpreted in order to generate these files, take a look at `examples/QuickStart.muse'. To view the generated Info document from within Emacs, try the following. C-u M-x info RET /path/to/muse/examples/QuickStart.info RET Further Documentation ===================== Please consult http://www.emacswiki.org/cgi-bin/wiki/EmacsMuse to find more information on bugs, unimplemented features, and user-contributed tweaks. The current maintainer's webpage for Muse is at http://mwolson.org/projects/EmacsMuse.html. If you wish to participate in the development of Muse, or track the latest development changes, please read the `Development' section of the Muse manual (in the `Obtaining Muse' chapter) for instructions. Mailing Lists ============= Mailing lists for Muse exist. muse-el-announce :: Low-traffic list for Muse-related announcements. You can join this mailing list (muse-el-announce@gna.org) using the subscription form at http://mail.gna.org/listinfo/muse-el-announce/. This mailing list is also available via Gmane (http://gmane.org/). The group is called gmane.emacs.muse.announce. muse-el-discuss :: Discussion, bugfixes, suggestions, tips, and the like for Muse. This mailing list also includes the content of muse-el-announce. You can join this mailing list (muse-el-discuss@gna.org) using the subscription form at http://mail.gna.org/listinfo/muse-el-discuss/. This mailing list is also available via Gmane with the identifier gmane.emacs.muse.general. muse-el-logs :: Log messages for commits made to Muse. You can join this mailing list (muse-el-logs@gna.org) using the subscription form at http://mail.gna.org/listinfo/muse-el-logs/. This mailing list is also available via Gmane with the identifier gmane.emacs.muse.scm. muse-el-commits :: Generated bug reports for Emacs Muse. If you use our bug-tracker at https://gna.org/bugs/?group=muse-el, the bug reports will be sent to this list automatically. You can join this mailing list (muse-el-commits@gna.org) using the subscription form at http://mail.gna.org/listinfo/muse-el-commits/. This mailing list is also available via Gmane with the identifier gmane.emacs.muse.cvs. License ======= Emacs Muse 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 3, or (at your option) any later version. Emacs Muse 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 Emacs Muse; see the file COPYING. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. The Muse manual is available under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, and with the Front-Cover texts and Back-Cover Texts as specified in the manual. A copy of the license is included in the section entitled "GNU Free Documentation License" in the Muse manual. All Emacs Lisp code contained in the manual may be used, distributed, and modified without restriction. The PNG images included in the examples/ directory may be used, distributed, and modified without restriction. The contents of the contrib/blosxom and contrib/pyblosxom directories are available under the terms of other licenses. Please consult the header of each file for the appropriate license text. muse-el-3.20+dfsg/ChangeLog.50000644000175000017500000003541111331353120015151 0ustar taffittaffit2008-11-23 Michael Olson * examples/ikiwiki/IkiWiki/Plugin/muse.pm: Loop in Muse closer to the beginning of the publishing process, so that other HTML-producing Ikiwiki plugins can do their thing after we are done with the document. Otherwise, we would end up escaping their HTML. Detect Muse-style directives. Treat #tag, #tags, and #category directives like an Ikiwiki tag directive. Treat every other directive as an Ikiwiki meta directive. * lisp/muse-docbook.el (muse-docbook-markup-paragraph): Honor the muse-no-paragraph property. Use muse-end-list as the property name rather than end-list. * lisp/muse-html.el (muse-html-markup-paragraph): Honor the muse-no-paragraph property. Use muse-end-list as the property name rather than end-list. * lisp/muse-ikiwiki.el (muse-ikiwiki-markup-regexps) (muse-ikiwiki-markup-directive): Pass through Ikiwiki directives during publishing without modifying them. * lisp/muse-xml.el (muse-xml-markup-paragraph): Honor the muse-no-paragraph property. Use muse-end-list as the property name rather than end-list. * lisp/muse.el (muse-forward-paragraph, muse-forward-list-item): Use muse-end-list as the property name rather than end-list. 2008-11-01 Michael Olson * examples/ikiwiki/IkiWiki/Plugin/muse.pm (import): Add hook for getsetup. (getsetup): New function that provides info about this plugin. * lisp/muse-colors.el (muse-unhighlight-region): Reset muse-no-flyspell property. * lisp/muse-ikiwiki.el (muse-colors-ikiwiki-directive): Fix some logic errors with quote detection. Remove flyspell overlays and set a property to inhibit them. * lisp/muse-mode.el (muse-mode-flyspell-p): Don't highlight at point if muse-no-flyspell property present. 2008-10-30 Michael Olson * lisp/muse-ikiwiki.el (muse-ikiwiki-directive): New face for coloring Ikiwiki directives. (muse-colors-ikiwiki-directive): Colorize ikiwiki directives. (muse-ikiwiki-insinuate-colors): Stuff to do when both muse-ikiwiki and muse-colors are loaded. * lisp/muse-wiki.el: Move some code out of eval-after-load statement. 2008-10-13 Michael Olson * lisp/muse-colors.el (muse-colors-regexp, muse-colors-vector): Remove. (muse-colors-highlighting-registry) (muse-colors-make-highlighting-struct) (muse-colors-highlighting.regexp, muse-colors-highlighting.vector) (muse-colors-highlighting.remaining) (muse-colors-highlighting-entry) (muse-colors-find-highlighting, muse-colors-define-highlighting): New scheme for separating highlighting rules according to major-mode. (muse-configure-highlighting, muse-use-font-lock): Use muse-colors-define-highlighting. (muse-colors-region): Permit the vector to contain more than one rule. Handle case where we have rules that are not in the vector and do not have the same function handler. Make sure that the match data exactly corresponds to the regexp that goes with the rule. (muse-colors-custom-tags, muse-colors-explicit-link): No need to explicitly call `looking-at', because the match data will be correct. (muse-colors-implicit-link): Use match-string 0 instead of match-string 1, now that the match data is accurate. * lisp/muse-wiki.el (muse-wiki-update-project-file-regexp) (muse-wiki-wikiword-regexp): Call muse-colors-define-highlighting. (muse-wiki-update-interwiki-regexp): Only update the highlighting if the value has changed. 2008-10-12 Michael Olson * lisp/muse.el (muse-write-file): Make nomessage argument optional. 2008-10-09 Michael Olson * examples/ikiwiki/IkiWiki/Plugin/muse.pm: Move here from examples/ikiwiki/muse. Encode/decode UTF-8 properly. Take pains to remove the temp file. Die on errors. Remove test sub. * examples/ikiwiki/muse-init-project.el: Remove server stuff. * lisp/muse-ikiwiki.el (muse-ikiwiki-publish-file): Set font-lock-verbose to nil to avoid spurious messages when publishing. Silence the "Wrote file" message. * lisp/muse-publish.el (muse-batch-publish-files): Set font-lock-verbose to nil to avoid spurious messages when publishing. * lisp/muse.el (muse-write-file): Take NOMESSAGE argument. * texi/muse.texi (Ikiwiki): Add instructions for using IkiWiki::Plugin::muse. 2008-09-30 Clinton Ebadi * muse-latex2png (muse-latex2png): Use call-process rather than shell-command-to-string, so that filenames with spaces in them are handled correctly. 2008-09-28 Michael Olson * lisp/muse-publish.el (muse-publish-this-file): Handle style arguments that are strings. 2008-09-18 Michael Olson * lisp/muse-publish.el (muse-publish-markup): Do not skip past the beginning of the buffer even if the first character is read-only. This fixes a bug where the first paragraph would not be published properly if it started with a link. 2008-09-17 Michael Olson * lisp/muse-project.el (muse-project-alist-styles): If output directory is a remote path, do not try to expand it. This fixes a bug where Tramp could be invoked during startup if this function is used in the definition of muse-project-alist. 2008-09-13 Wang Diancheng * lisp/muse-publish.el (muse-publish-markup-regexps): Use muse-table-el-line-regexp. * lisp/muse-regexps.el (muse-table-el-line-regexp): New regexp that represents lines in table.el style tables. 2008-08-07 Michael Olson * lisp/muse-latex.el (muse-latex-slide-tag): Mark all frames as fragile, so that works. This may be slower, but it is always correct, and requires no additional work on my end. * lisp/muse-project.el (muse-project-publish-this-file): Correctly pass style to muse-publish-this-file. This fixes a bug when using C-c C-v on a file not part of any project. 2008-07-28 Michael Olson * examples/ikiwiki/muse: New file that provides a plugin for Ikiwiki that allows it to publish Muse files. * examples/ikiwiki/muse-init-project.el: Sample Muse init file that provides project-aware publishing of single files for Ikiwiki. * examples/ikiwiki/muse-init-simple.el: Sample Muse init file that provides basic single-file publishing support for Ikiwiki. * texi/muse.texi (Ikiwiki): Finish documenting Ikiwiki support. 2008-07-22 Michael Olson * lisp/muse-latex.el (muse-latex-pdf-program): New option that determines the program to use when browsing a PDF file. (muse-latex-pdf-browse-file): Use it. * lisp/muse-mode.el (muse-browse-result): Support styles that use an output suffix, such as PDF. * texi/muse.texi (LaTeX): Document muse-latex-pdf-browser. 2008-07-21 Michael Olson * lisp/muse-html.el (muse-html-src-allowed-modes): Docfix. * lisp/muse-ikiwiki.el: New file that supports integration with Ikiwiki. * texi/muse.texi (Ikiwiki): Document new options and style. 2008-07-20 Michael Olson * lisp/muse-mode.el (muse-browse-result): Publish page before viewing it. This addresses Bug #5172. * lisp/muse-project.el (muse-project-publish-this-file): Accept a new STYLE argument to specify which publishing style to use. 2008-07-09 Michael Olson * lisp/muse-latex.el (muse-latex-slide-tag): Make sure tags inside of a tag get published. Thanks to Philipp Grau for the report. 2008-05-18 Michael Olson * texi/muse.texi (Tag Summary): Document the
tag. 2008-05-18 Alex Ott * lisp/muse-html.el (muse-html-div-tag): New function which publishes a
tag. (muse-html-markup-tags): Add entry for "div". * lisp/muse-publish.el (muse-publish-markup-tags): Add entry for "div". (muse-publish-div-tag): By default, ignore
tags. 2008-04-16 Michael Olson * Makefile.defs.default (DEBNAME, LASTUPLOAD, BUILDOPTS) (DISTRIBUTOR): Remove obsolete variables. * Makefile (debclean, debprepare, debbuild, debinstall, deb): Remove obsolete targets. 2008-03-31 Michael Olson * lisp/muse-colors.el (muse-make-faces-default): Improve docstring for muse-header-{1-3} faces. 2008-03-26 Michael Olson * lisp/muse-project.el (muse-project-publish-this-file): Make sure that we follow the same rules as muse-project-publish-file, including creating the publishing directory if it does not exist. Thanks to Peter Jones for the report and initial patch. 2008-03-25 Michael Olson * lisp/muse-project.el (muse-current-project-global): New variable that saves the value of muse-current-project across temporary buffers when publishing. (muse-project-publish-this-file, muse-project-publish): Save muse-current-project. (muse-project-save-buffers): Save the current buffer, so that this does not throw off publishing. (muse-project-set-variables): Set muse-current-project if it is nil and there is a saved value for it. Thanks to Peter Jones for the report. * lisp/muse-publish.el (muse-batch-publishing-p) (muse-publishing-p): Docfix. (muse-inhibit-before-publish-hook): New variable that indicates whether muse-before-publish-hook should be inhibited. (muse-publish-markup-buffer): Use it. (muse-publish-file): Call muse-before-publish-hook here, so that we can run it before checking for file-local variables, since values set by the latter should overlay values set by the former. Bind muse-inhibit-before-publish-hook to t so that we do not call the hook twice. 2008-03-16 Michael Olson * lisp/muse-journal.el (muse-journal-html-munge-buffer) (muse-journal-latex-munge-buffer, muse-journal-rss-munge-buffer): Use nil instead of current-time-zone to fix a bug where dates could be interpreted incorrectly. We don't allow the user to specify the hour or minute, so it does not make sense to take the current time zone into account. Thanks to Xin Shi for the report. * lisp/muse-publish.el (muse-publish-markup): When point is on a read-only character, skip to the next non-read-only character. This works around a weird edge case with the table-el rule, and seems like a good thing to do in general. Thanks to Suno Ano for the report. (muse-publish-table-el-table): Only proceed with table generation if we have located a non-read-only "|" character. 2008-02-23 Michael Olson * lisp/muse-wiki.el (muse-wiki-project-files-with-spaces): Fix bug. 2008-02-22 Michael Olson * lisp/muse-project.el (muse-read-project-file): Delete duplicates before calling muse-completing-read-function, since ido-completing-read does not do this. * lisp/muse.el (muse-delete-dups): New compatibility function. 2008-02-19 Michael Olson * lisp/muse-html.el (muse-html-src-allowed-modes): New option that specifies the modes that we permit the tag to colorize. (muse-html-src-tag): Use it. Use intern-soft instead of intern. * lisp/muse-latex2png.el (muse-publish-latex-tag) (muse-publish-math-tag): * lisp/muse-poem.el (muse-poem-markup-tag): * lisp/muse-publish.el (muse-publish-literal-tag) (muse-publish-lisp-tag, muse-publish-command-tag) (muse-publish-perl-tag, muse-publish-php-tag) (muse-publish-python-tag, muse-publish-ruby-tag) (muse-publish-include-tag, muse-publish-mark-up-tag): Mark these tags as potentially dangerous for text written by untrusted contributors. * lisp/muse-publish.el (muse-publish-mark-up-tag): Use intern-soft instead of intern. (muse-publish-enable-dangerous-tags): New option that determines whether to publish tags that can call external programs or expose sensitive information. This is useful to set to nil for publishing files from untrusted sources. 2008-02-10 Michael Olson * lisp/muse-publish.el (muse-publish-enable-local-variables): New option that determines whether to interpret local variables when publishing. The default is not to do so. (muse-publish-file): Interpret local variables if the user wants this. Thanks to Sebastian Tennant for the idea. * texi/muse.texi (Extending Muse): Flatten nodes by removing Common Elements and grouping its subsections under this chapter. (Style Elements): Use @defun. Fix arguments to muse-define-style. Thanks to Sebastian Tennant for the report. Explain the arguments of the function for :final. (Deriving Styles): Use @defun. Fix argument names. (Embedded Lisp): Drop mention of this being the only tag allowed in headers and footers. Thanks to Phillip Lord for the suggestion. (Tag Summary): Mention muse-publish-markup-header-footer-tags. 2008-02-02 Michael Olson * Makefile.defs.default (INFODIR): Place files in .../share/info, rather than .../info. Thanks to gour for the suggestion. 2008-01-29 Michael Olson * lisp/muse.el (muse-insert-file-contents): Fix bug where end of line conversion was not happening on Windows. Thanks to Sacha Chua for the report. 2008-01-28 Michael Olson * Release Emacs Muse 3.12. * NEWS: Update. * Update copyright years. * examples/mwolson: Update init file, stylesheets, and templates. * etc/muse.rnc: Add support for the
tag. Don't allow tags inside of format elements. * lisp/muse-groff.el (muse-groff-markup-strings) * lisp/muse-html.el (muse-html-markup-strings) (muse-xhtml-markup-strings): * lisp/muse-latex.el (muse-latex-markup-strings) * lisp/muse-texinfo.el (muse-texinfo-markup-strings) * lisp/muse-xml.el (muse-xml-markup-strings): Add markup string for line-break. * lisp/muse-project.el (muse-project-of-file): Fix bug where directory names without slashes in projects were not being recognized. Thanks to Mirko Vukovic and ktneely for the report. 2008-01-23 Michael Olson * lisp/muse-latex.el (muse-latex-header) (muse-latex-slides-header, muse-latex-lecture-notes-header): Default to using UTF-8, rather than latin1. * lisp/muse-publish.el (muse-publish-url): Add comments. Move target detection higher. Use unescaped description for image links, so that they don't get erroneously escaped. Thanks to Suno Ano for the report. 2008-01-15 Michael Olson * Makefile.defs.default (DESTDIR): New variable which allows the destination directory to be easily set. Thanks to gour for the suggestion. (ELISPDIR, INFODIR): Use it. * README (Compilation): Don't mention PREFIX, ELISPDIR, and INFODIR here. (Installation): Mention DESTDIR and PREFIX. * texi/muse.texi: Update copyright year. (Installation): Don't mention PREFIX, ELISPDIR, and INFODIR in the compilation step. Do mention DESTDIR and PREFIX in the installation step. 2008-01-06 Michael Olson * lisp/muse.el (muse-with-temp-buffer): Don't keep track of undo information. Update documentation. See ChangeLog.4 for earlier changes. ;; Local Variables: ;; coding: utf-8 ;; End: muse-el-3.20+dfsg/ChangeLog0000644000175000017500000000204511331353120015003 0ustar taffittaffit2009-08-05 Michael Olson * lisp/muse.el (muse-insert-file-contents): Cause epa-file-handler to be ignored. 2009-06-18 Michael Olson * lisp/muse-latex.el (muse-latex-slides-header) (muse-latex-lecture-notes-header): Handle images. Generate title page correctly. Generate table of contents page if requested. 2009-06-17 Michael Olson * lisp/muse-latex.el (muse-latex-pdf-cruft): Remove additional cruft files from beamer. 2009-01-03 Michael Olson * contrib/ikiwiki/Ikiwiki/Plugin/muse.pm: Move here from examples/ikiwiki/IkiWiki/Plugin/muse.pm. * contrib/Makefile (htmlize-hack.elc): Don't byte-compile htmlize-hack.el, since it is only useful if htmlize.el is installed. * contrib/cgi.el: Add compatibility functions for calendar, so that it works with both Emacs 21 and Emacs 23. Thanks to Brent Goodrick for the report. * texi/muse.texi (Using Muse Mode): Fix typo. See ChangeLog.5 for earlier changes. ;; Local Variables: ;; coding: utf-8 ;; End: muse-el-3.20+dfsg/NEWS0000644000175000017500000015247311331353120013743 0ustar taffittaffitEmacs Muse NEWS --- History of user-visible changes -*- outline -*- * Changes in Muse 3.20 ** Fix bug with duplicates in completing-read of wiki page names. ** Mark some tags as dangerous for text by untrusted contributors. ** Implement
tag. ** When viewing a page, publish it first. ** Include non-working alpha of Ikiwiki publishing. ** Make it easier to browse published PDF files. ** Fix bug with C-c C-v on a file not part of any project. ** Add workaround for Emacs 23 and htmlize issue. ** muse-latex2png: Fix handling of filenames with spaces in them. ** muse-colors: Separate highlighting rules according to major mode. ** muse-latex: Make lecture notes and slides work with images, title page, and table of contents. ** Publishing *** Fix end-of-line conversion bug when using Windows. *** Fix bug where dates in journal entries could be published incorrectly. *** Preserve the value of muse-current-project. *** Conditionally interpret local variables. *** Values set by file-local variables trump project variables. *** muse-latex: Fix publishing of tags inside of tags. *** Render correctly in slides. *** Fix bug in publishing of table.el style tables. *** Fix bug where the first paragraph would not be published properly if it started with a link. ** Build system *** Makefile.defs.default (INFODIR): Place files in .../share/info. ** Manual *** Miscellaneous updates. * Changes in Muse 3.12 ** New interactive function `muse-update-values': Call this after changing muse-project-alist, in order to update various autogenerated values. ** Tag attributes may now span multiple lines. ** Don't keep track of undo data when publishing. This should yield a speed-up. ** Build system *** Add support for the DESTDIR variable, which allows the destination directory to be easily set. ** Muse Mode highlighting (lisp/muse-colors.el) *** Display message when muse-colors-toggle-inline-images is called. ** ConTeXt publishing (lisp/muse-context.el) *** Fix publishing bug in Windows. ** HTML publishing (lisp/muse-html.el) *** Fix bug where nested class tags were not working. *** Fix error that occurred when a class tag had no name element. In this case, we do not publish the tag at all. ** LaTeX publishing (lisp/muse-latex.el) *** Escape specials in image filenames properly Previously, it was not possible to escape "/", "#", or "|" in image filenames. In order to make this work, be certain that you have the following LaTeX code in your header. \def\museincludegraphics{% \begingroup \catcode`\|=0 \catcode`\\=12 \catcode`\#=12 \includegraphics[width=0.75\textwidth] } *** Escape specials in the title string in headers In order to achieve this effect in custom headers, replace \title{(muse-publishing-directive "title")} with \title{(muse-publish-escape-specials-in-string (muse-publishing-directive "title") 'document)} in your headers. *** Default to using UTF-8 rather than latin1 in headers. *** Fix publishing bug in Windows. *** Escape backslash as \textbackslash{} in monospace regions. ** Publish embedded LaTeX content to a PNG file (lisp/muse-latex2png.el) *** Detect whether the tag ends at the end of a line. If not, do not use "$$" to publish it. ** Muse Mode (lisp/muse-mode.el) *** New option: `muse-insert-url-initial-input' specifies the initial text to use when reading a URL. *** Fix bug with browsing anchors that come after a link to them. *** Fix bug involving filling and paragraphs next to headings. *** Fill definition lists with two initial spaces in lines after the definition list term. ** Project support (lisp/muse-project.el) *** Fix issue that occurred when saving several files at once, where only one of them would make it into the project file-alist. *** If the PAGE argument to `muse-project-page-file' is nil, then return the first directory of the project. *** Fix bug where directory names without slashes in projects were not being recognized. ** Publishing (lisp/muse-publish.el) *** New tag
represents a line break when publishing. This is supported in all publishing styles except for DocBook, which has no notion of line breaks without stylesheet hacks. *** Treat "---" as an mdash. Before, it would publish as an mdash followed by a single dash. *** Escape specials properly in footnotes in several styles. *** Fix bug with publishing plain URLs. *** Fix bad escaping of image links. *** Save match adta in `muse-publish-classify-url'. ** Wiki-like behavior (lisp/muse-wiki.el) *** Display tags correctly. *** Publish tags correctly. * Changes in Muse 3.11 ** Update my example settings in examples/mwolson. ** Fix several bugs with setting muse-file-extension to something else. If you have both muse-file-extension set to some string, and muse-mode-auto-p set to non-nil, please set muse-mode-auto-p to nil from now on. This was a workaround that some people used to deal with a bug that has now been fixed. ** Support for serving published Muse files with Blosxom. See the end of the Blosxom Requirements section of the Muse manual for details. ** The metadate plugin for PyBlosxom is now included with Muse in contrib/pyblosxom/metadate.py. ** Compatibility fixes for Emacs21 and XEmacs *** Use copy-tree instead of copy-alist. *** Correctly require derived.el. *** Deal with the lack of a `delete-and-extract-region' function in XEmacs by making `muse-delete-and-extract-region'. *** Fix XEmacs and Texinfo publishing bug. *** Deal with lack of autoloads for the `man' function in some Emacs variants. *** Fix XEmacs compilation error in muse-import-xml.el. ** Muse Mode highlighting (lisp/muse-colors.el) *** Fix display bug where emphasis becomes unhighlighted when moving around the buffer. ** ConTeXt publishing (lisp/muse-context.el) *** Add support for #module directive. Consult the ConTeXt section of the Muse manual for details. ** DocBook publishing (lisp/muse-docbook.el) *** Fix bug with paragraphs after tags. ** HTML publishing (lisp/muse-html.el) *** Fix bug with links not being interpreted in titles. This fix also takes care of some additional escaping issues that were addressed in the previous release by a different means. ** Journal (lisp/muse-journal.el) *** Fix bug with title anchors and CJK. *** Fix bug with summarized entries. ** LaTeX publishing (lisp/muse-latex.el) *** Remove footnote references from headings. The reason for this is that LaTeX will throw errors during the publishing process if they exist. ** Publishing (lisp/muse-publish.el) *** Fix serious bug in definition list publishing. We were skipping past the initial indented line, and that was causing an erroneous blockquote to be inserted. *** Revert fix for escaping bug involving headings and the tag, because it was buggy. This is instead handled by muse-html.el now. ** Texinfo publishing (lisp/muse-texinfo.el) *** Make url, link, and link-and-anchor output look better in texi2html output, for people who want to run that command on texi output produced by Muse. ** XML publishing (lisp/muse-xml.el) *** Add support for tag. *** Bump the version of etc/muse.rnc to 1.1 to reflect support for . ** Muse Manual (texi/muse.texi) *** Document support for citations in new Citations section. *** Document how to use the Pyblosxom metadate plugin in the Blosxom Requirements section. * Changes in Muse 3.10 ** Relicense to GPLv3. ** Muse's source code development is now being managed with git. Instructions for participating in Muse development using git are available in the "Development" section of the Muse manual. This yields not only speed improvements, but also space efficiency improvements. One person has found that Arch took 300MB to store one of Muse's branches, but git takes only 4MB. The information to store the entire Muse development history only takes up 8.6MB. If you are a Muse developer, please consult http://emacswiki.org/cgi-bin/wiki/MuseDevelopment for instructions on using git, and how to gain access to the shared Muse repository. ** Remove unused markers when we are done with them. This can speed up the publishing process. ** Build system *** Rename Makefile.defs to Makefile.defs.default. Now, there is a Makefile.defs.default file included with Muse, rather than Makefile.defs. If you want to make changes to this file, first copy it to Makefile.defs, and then make your changes there. If you do not need to make any changes, there is no need to copy the file. *** Indicate dependencies between Emacs Lisp files, so that Muse can be recompiled without running "make clean" after an update. *** Don't activate VC when publishing files. This avoids some annoying messages when building QuickStart in the examples directory. *** Make installing info files easier for XEmacs users. There is now a commented-out install-info definition in Makefile.defs.default, along with commented instructions. ** Quickstart guide (examples/QuickStart.muse) *** Fix some typos. ** Core functionality (lisp/muse.el) *** Work around a bad bug in color-theme.el involving its overwriting of the `replace-in-string' function. *** Fix a bug where Muse would lock up if muse-project-alist is nil. *** New option: muse-completing-read-function. Function to call when prompting user to choose between a list of options. This should take the same arguments as `completing-read'. One possible value for this is 'ido-completing-read. The default value is 'completing-read. *** Make inserting file contents and writing files to be faster. This involves defining the functions `muse-insert-file-contents' and `muse-write-file'. Consult their documentation for details. ** Muse Mode highlighting (lisp/muse-colors.el) *** Comments are now colored. *** Fix bug with using tags in #title directives. Now any tags in #title directives are guaranteed to be evaluated after any other tags that are nearby. ** ConTeXt publishing (lisp/muse-context.el) *** New file courtesy of Jean Magnan de Bornier that publishes files in the ConTeXt format. See the ConTeXt section of the Muse manual for details on its use. ** Journal (lisp/muse-journal.el) *** Fix bug causing RDF output to have invalid syntax. *** Make RSS output look nicer by adding some newlines. *** Allow and tags to be used in entry templates. *** Fix escaping bugs in entry template text, quote-of-the-day, and title. *** Mark up the tag as if it were used. *** New style journal-rss-entry indicates how we are to mark up individual RSS and RDF entries. *** Set `muse-journal-rdf-summarize-entries' to nil by default. ** HTML publishing (lisp/muse-html.el) *** Add xhtml1.0 style, which is an alias for the xhtml style. *** Add xhtml1.1 style for those who want XHTML 1.1 compliant output. *** When publishing , only strip links from titles, rather than every tag. ** Muse Mode (lisp/muse-mode.el) *** Add new minor mode called muse-list-edit-minor-mode. See the "Muse List Edit Minor Mode" section of the manual for details. *** Don't try to indent line before inserting a comment. ** Publish embedded LaTeX content to a PNG file (lisp/muse-latex2png.el) *** Support ConTeXt. ** Project settings (lisp/muse-project.el) *** Handle nested projects correctly. Now it is possible to have the directories of a project be the subdirectories of another project. Previously, it depended on the order that the projects were defined. *** Set project-specific variables at publish time as well as display time. Previously, the variable settings specified by the :set attribute in muse-project-alist projects were being ignored at publish time, but applied in Muse mode. Now they are applied at both times. *** Fix bug when publishing a file that has multiple styles. *** Fix bug when trying to publish a file in a project with multiple directories. *** Fix bug where links between files did not work if muse-file-extension is nil. *** Ignore .git metadata directories when looking for project files. ** Publishing (lisp/muse-publish.el) *** Add tag. See "Tag Summary" in the manual for details on its use. *** Fix bug where Muse locks up when trying to publish a malformed table. *** Fix bug where tags other than and were being acted on in headers and footers. *** Fix bug involving use of inside of an file. *** Fix bug with nested list items that have an extra blank in front. This was causing Muse to lock up when publishing some files. *** Fix bug with definition list publishing when there are empty terms. *** Fix bug where output from did not match output from verse syntax. *** Fix bug where directives were leaking out of regions. *** Fix escaping bug involving headings and the tag. *** [Developers] Automatically widen before evaluating contents. ** Wiki (lisp/muse-wiki.el) *** Fix a bug with three-part links that have descriptions. *** (muse-wiki-resolve-project-page): If the project argument is nil, default to the current project instead of the first project entry in muse-project-alist. ** Common functionality used by XML-based styles (lisp/muse-xml-common.el) *** Don't escape parentheses in URLs. * Changes in Muse 3.03 ** An emacs-wiki migration guide is available in etc/emacs-wiki-migration.txt. ** Ideas for the future and planned time of implementation can be found in etc/IDEAS.muse. ** Core functionality (lisp/muse.el) *** Fix an XEmacs beta byte-compiler issue. *** Fix failure to recognize the .muse file extension. Handle the case where the user customizes the file extension. *** It is now easier to indicate that Muse should not use a file extension. Just do the following. (setq muse-file-extension nil muse-mode-auto-p t) If you visit a Muse file in your .emacs, however, and do not want a file extension, then you must still do the following beforehand. (add-hook 'find-file-hooks 'muse-mode-maybe) *** Allow tab characters in explicit links. *** Escape brackets in links, and then un-escape them when displaying the link in a buffer of publishing it. This allows brackets to be safely used in link descriptions and links, as long as you use `C-c TAB l', `C-c TAB u', `C-c C-e', or automatic Planner annotations. *** Ensure that no recursive load situation can take place. ** Blosxom publishing (lisp/muse-blosxom.el) *** New option: muse-blosxom-use-tags. This specifies whether or not we are using tags. Tags allow a page to belong to multiple categories, but they do not rely on the directory structure for categorization. *** Use `find-file' as the browsing function. *** New example script: contrib/pyblosxom/make-blog. This shows how to invoke contrib/pyblosxom/getstamps.py. ** Book publishing (lisp/muse-book.el) *** It is now possible to publish a book using a muse-project-alist entry. See the "Book" section of the manual for details and an example. ** DocBook publishing (lisp/muse-docbook.el) *** A bug with multiple-stanza verses has been fixed. ** HTML publishing (lisp/muse-html.el) *** Make sure spaces in URLs get escaped properly. *** Make the Table of Contents CSS easier to customize. For an example, see examples/mwolson/stylesheets/screen.css. *** Make Table of Contents publishing work with Planner. *** Fix a paragraph detection bug for paragraphs that occur after verses. *** New tag: This tag is used to colorize (using HTML) source code of any language for which Emacs has a mode available. The "lang" attribute determines the mode to call on the region. Muse will look for the LANG-mode function, call it, and then call htmlize. You will need htmlize 1.34 or later for this to work. If a non-HTML publishing style is used, this will be published the same as an region. ** Importing LaTeX documents (lisp/muse-import-latex.el) *** Rename from muse-convert.el, since Muse can now import other formats as well. ** Journal (lisp/muse-journal.el) *** New option: muse-journal-rss-heading-regexp. Determine the regexp to use when searching for an RSS heading. *** Make sure that the date is in a format that RSS readers can handle. ** LaTeX publishing (lisp/muse-latex.el) *** New publishing styles: slides and slides-pdf. This allows you to use Beamer to publish slides. *** New publishing styles: lecture-notes and lecture-notes-pdf. These are similar to the slides styles, but are suitable for publishing lecture notes. *** New option: muse-latex-pdf-program. The program to call in order to generate PDF content from LaTeX content. *** New option: muse-latex-pdf-cruft. The extensions of files to remove after generating PDF output successfully. *** Improve escaping of specials. *** Use \label{} and \ref{} for anchors and anchor references. *** Emphasize table elements. *** Improve table generation. *** Use \url{} to publish bare URLs. *** Handle case where a Muse page begins with a quote character. *** Handle case where the path to the Muse source contains a tilde character in one of the parent directories. It is still possible to run into this problem if you publish outside of a directory that has a tilde, but with a source file that does have one -- this was deemed to be a very unlikely case. *** Display footnotes when we have both a URL and description. This makes the URLs show up on printed documents in a sensible fashion. *** Escape the "@" character in the entire document. *** Make images take up 75% of the width of the page. *** New option: muse-latex-permit-contents-tag. This specifies whether we should take action on the tag. *** Allow for definitions to be separated from their terms, much like the way HTML does it by default, if the user puts a blank line or a line break between the term and the definition. If the term and definition are on the same line, they will be that way in the output as well. *** Publish comments using the "%" character, rather than a custom Latex command. ** Publish embedded LaTeX content to a PNG file (lisp/muse-latex2png.el) *** The tag has been modified to work with styles other than just HTML. It will even leave the region alone if you are publishing a Latex-based publishing style. *** New tag: The tag acts similarly to the tag, except that it surrounds the region with "$" characters first, and makes the resulting image inline. If the first line of the tag begins with 6 spaces, then surround the region with "$$" (or an equivalent markup) instead. This has the effect of "centering" the output on its own line. ** Muse Manual (muse.texi) *** Re-license under the GFDL instead of the GPL. The rationale for this is that Muse may one day be included with Emacs, so it should use the same manual license that Emacs itself uses. At this point, the matter is not open to debate, unless the FSF brings it up. *** Use better style for subsections. *** Make sure the PDF file for the manual is properly generated. *** Implicit Links **** Mention how to customize the WikiName recognition. *** Extending Muse **** Move "Common Elements" and "Deriving Styles" chapters here. *** Tag Summary **** Mention new tags and updated syntax for some tags. ** Muse Mode (lisp/muse-mode.el) *** `C-c TAB' now inserts an object, prompting the user for which type. `C-c TAB l' inserts a relative link. `C-c TAB t' inserts a Muse tag. `C-c TAB u' inserts a URL. These keybindings may be modified by editing `muse-insert-map'. Note that the prompt you get when you hit `C-c TAB' will not change. *** New list-oriented keybindings: `M-RET' inserts a list item. `C->' increases list item indentation. `C-<' decreases list item indentation. *** Slightly improved speed of flyspell integration *** Implement searching through Muse files. **** `C-c C-s' performs a search through Muse files. **** New option: muse-grep-command. Customize this to specify the command used for searching. In particular, "glimpse" is handy. Check the documentation for this command for details. *** Changed keybindings: `C-c C-b' is now `muse-find-backlinks' `C-c C-v' is now `muse-browse-result' *** The `C-c C-M-t' keybinding can be used in place of `C-c C-S-t', since the latter is not available on some terminals. *** Remove the C-c C-c keybinding, since it conflicts with other modes like Planner. *** Don't require muse-publish.el, since publishing and viewing Muse files are supposed to be completely separable. *** Speed up searching for next and previous references. *** Make filling definition lists work better. *** Make editing existing links with `C-c C-e' work better. *** Make browsing the resulting page with `C-c C-v' work better. *** Don't throw an error if doing flyspell or following link at beginning of buffer. *** When publishing a file with `C-c C-t', consult muse-project-alist and use its publishing styles to intelligently prompt the user as to the publishing style and output directory. The old behavior of allowing the file to be published anywhere and with any style has been moved to `C-c C-T'. *** Clicking `mouse-2' now does the right thing when mouse-yank-at-point is non-nil. ** Muse Mode highlighting (lisp/muse-colors.el) *** New option: muse-colors-inline-images. This determines whether or not to inline an image when viewing Muse source. The default is to enable this behavior. This feature is currently considered to be in a beta state, because finding the real paths of images consistently has not been worked out. **** New option: muse-colors-inline-image-method. This determines how to find an image that we want to inline. The default is to look in the current directory. If set to 'muse-colors-use-publishing-directory, it will look in the directory where the current page will be published. **** New function: muse-colors-toggle-inline-images. This toggles whether images are inlined. *** Make links blue by default, like most other Emacs modes do. *** Don't cause a long delay when highlighting remote (Tramp, ange-ftp) links. *** Make faces conform the namespace better. `muse-link-face' is renamed to `muse-link'. `muse-bad-link-face' is renamed to `muse-bad-link'. `muse-verbatim-face' is renamed to `muse-verbatim'. *** Handle muse-emphasis faces better. *** Source-level change: The regexps in `muse-colors-markup' are now permitted to have non-shy groupings. ** New modules *** lisp/muse-backlink.el -- Provide backlink support for Muse. *** lisp/muse-groff.el -- This introduces the publishing styles "groff" and "groff-pdf". *** lisp/muse-import-docbook.el -- Convert Docbook XML into Muse format. *** lisp/muse-import-xml.el -- Helper file for muse-import-docbook.el. *** lisp/muse-latex2png.el -- Publish embedded LaTeX content to a PNG file. This introduces the tag. *** lisp/muse-xml-common.el -- Common functionality used by XML-based publishing styles, such as HTML, XML, and DocBook. *** experimental/muse-mathml.el -- This introduces the "mathml" publishing style and the tag. *** experimental/muse-protocol-iw.el: Implements a simpler URL-like interwiki protocol that handles subdirectories. *** experimental/muse-split.el -- Splits published Muse files into several smaller files. ** Project settings (lisp/muse-project.el) *** Introduce the `with-muse-project' macro, which makes it easier to switch to a given Muse project and execute some code. *** Fix an error with `custom-quote'. *** Ignore buffers that have no associated filename. This fixes an annoyance where Muse prompts to save BBDB and ERC buffers before publishing. *** If we cannot find a project to publish, indicate this in an error message. This fixes an infinite loop. *** Update the file-alist whenever a Muse file is saved. *** Prevent infinite recursion when updating the file alist. *** In addition to Arch and CVS metadata directories, also ignore these for Darcs, SVN, Mercurial, and Bazaar. Also, don't erroneously ignore files with "#" in them. *** Make links to subdirectories work. The idea is to include as much of the path that is needed in order to disambiguate the link. For example: "web/TestPage". *** New variable: muse-current-output-style. This holds the output style that is currently being used to publish a file. *** Permit non-Muse files in projects to be linked to. *** Handle relative links to other Muse pages. Relative links are prefixed with "./" or "../". *** New option: muse-project-publish-private-files If this is non-nil (the default), files will be published even if they have "o-r" permissions set (that is, if no one except the owner and possibly group are allowed to read them). To get back the old behavior, set this to nil. *** Publishing functions can now be customized on per-project basis You can now use :publish-project and :publish to specify what function to call for publishing entire projects or just a single file. :publish-project is meant to be specified in the first part of a project entry, along with the directories. :publish is meant to be used in a (optionally derived) publishing style: after specifying such a style, use its name in the latter part of a project entry. ** Publishing (lisp/muse-publish.el) *** Implement escaping of specials throughout the entire document. This makes it much easier to publish documents to multiple kinds of formats, since you no longer have to worry about putting around specials. *** Make escaping of specials context-sensitive. Muse now realizes that URLs, normal document text, regions, and the like have different special characters to escape. *** Support nested lists. Muse now determines the nested level of a list by its initial whitespace. Ordered lists, unordered lists, and definition lists can all be nested. It is even possible to force a line break in a list item by inserting a blank line on the same level between the lines. Blockquotes may also be nested inside of a list. *** It is now possible to force images to not be inlined. To accomplish this, place the text "URL:" immediately in front of the link text. Example: [[URL:http://example.org/image.png]] *** New interactive function: muse-publish-region. This command publishes the current region, prompting for the title of the page (if any) and the style to use. This is handy for firing off quick blog entries and pasting the result into a web browser -- for this use case, it is recommended to use the blosxom-html or blosxom-xhtml styles, as they omit the large header and footer. *** Additional arguments for tag. The optional "style" and "exact" attributes may now be specified, which cause text to only be included if the current publishing style matches some criteria -- the text will be removed otherwise. Omitting these attributes causes to behave the same as usual. *** Table improvements **** Support orgtbl-mode style tables. Here is a quick example of what they look like. For additional information, consult the Org Mode manual. | Name | Phone | Age | |------+-------+-----| | Pete | 1234 | 25 | | Sara | 4321 | 22 | If you are used to the way that Org Mode publishes these tables, then customize `muse-html-table-attributes' to: border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides" in order to get a similar kind of output. **** Support table.el-style tables. If you have table.el somewhere in your load-path, Muse will publish tables that are in the format used by table.el. Currently, table.el tables can only be published for publishing styles based on HTML, LaTeX, or DocBook. **** Allow empty elements in tables. **** Allow initial and trailing whitespace in tables, but strip it out of the published result. **** If the #disable-tables publishing directive exists on the current Muse page, do not generate a table. *** Require at least once space after "::" in definition lists, so we avoid an ambiguity with interwiki link syntax. *** Handle nested emphasis types better. It should now publish exactly the way it looks in Muse Mode. *** Preserve whitespace around emdash. This allows for more flexibility, since some people seem to prefer to have the emdash directly against the surrounding text, while others like it to be spaced. *** Fix paragraph detection when block-level markup comes immediately after a paragraph. Examples of block-level markup are: , verses, lists. *** Allow the tag to take the "markup" attribute. see the Tag Summary section in the manual for details. *** Publish image links with descriptions as captioned images. This has been implemented for all Muse publishing styles. The major change is that image links with descriptions will be centered and the description will be displayed just below the image as a "caption". Thus, it is meant to only be used as its own paragraph, not surrounded by other text. Images without descriptions may still have surrounding text. *** Make comments higher priority than tags when publishing, so that Muse comments within tags get stripped out. *** Handle properly comments that have no text. *** Distinguish links and footnotes better. *** Do the right thing when a footnote reference exists but has no corresponding footnote. *** Simplify markup string for anchors. *** Allow text like "%N%" in markup strings. This makes it much easier to re-use the same text or put strings in a different order. *** Create parent directories when publishing for the first time. *** Handle case where we are trying to publish a file that has not been saved. *** Fix XEmacs issue where text at beginning of buffer is read-only. *** Allow publishing styles to specify a function to use for escaping specials in a particular context. This is especially handy for HTML URLs, since they have a larger subset of special characters than normal characters. See `muse-xml-decide-specials' in muse-xml-common.el for details. This functionality already exists for escaping specials in strings. *** Don't give an error when trying to define or derive an existing style. Just replace it. *** Get rid of a warning that occurs when batch publishing. *** Ignore list items that are part of higher-priority constructs like emphasis. *** Don't markup emdash in a link, since otherwise it will be incorrectly escaped. *** Improve the published descriptions for implicit links and explicit links with no provided description. *** For headers and footers, use a better algorithm to detect whether we have been given a filename or the real contents. *** New option: muse-publish-date-format. Format string of the date used when publishing files. *** New option: muse-publish-markup-header-footer-tags. This specifies which tags may be used when publishing headers and footers. *** New option: muse-publish-contents-depth. This specifies the maximum depth of headings to include with tags. *** Allow `muse-publish-markup-buffer' to work even if the buffer is not associated with a file. *** Fix a compilation bug with XEmacs beta. *** Source-level change: Use 'image instead of 'image-link to indicate images without descriptions. Use 'image-link instead of 'url-with-image to indicate URLs that have an image as their description. *** Self-nested tags are now supported. Tags with the same name can now be nested inside one another. This only applies to the new tag and the tag currently, but it may be useful for custom tags as well. To activate this, set the 4th element in a `muse-publish-markup-tag' to non-nil. Note that this involved a change to the structure of `muse-publish-markup-tag', so be sure to change any custom tags appropriately. *** Fix bug with WikiName link descriptions and PDF output. *** New convenience function: muse-style-derived-p The new muse-style-derived-p function allows you to make custom tags or inline code that acts differently depending on whether the current style is derived from (or equal to) another style. For an example of its use, see `muse-publish-latex-tag' in lisp/muse-latex2png.el. *** New tags, see the Tag Summary section in the manual for details **** -- Designate entire regions as comments. **** -- Insert the given file at publish time. **** -- Mark up the text between the initial and ending tags. **** -- Evaluate perl code. **** -- Evaluate python code. **** -- Publish the region as a blockquote. **** -- Evaluate ruby code. ** Texinfo publishing (lisp/muse-texinfo.el) *** Escape commas in URLs. *** Make it so that links to other info or PDF documents use the proper suffix. *** Publish table headings properly. *** Handle case where the path to the Muse source contains a tilde character in one of the parent directories. It is still possible to run into this problem if you publish outside of a directory that has a tilde, but with a source file that does have one -- this was deemed to be a very unlikely case. ** URL protocols (lisp/muse-protocols.el) *** Add support for DOI's. DOI's (digitial object identifiers) are a standard identifier used in the publishing industry. *** Add support for "dict:" URLs. This is used to look up terms on the Wikipedia website. **** New option: muse-wikipedia-country. This specified the country code to use for Wikipedia. *** Add support for "woman:" URLs. "woman" links are opened with Emacs' internal manpage viewer. ** Wiki (lisp/muse-wiki.el) *** Three-part links (example: Project::File#anchor) now work. *** New option: muse-wiki-wikiword-match-project-files. Whether to extend WikiName functionality to also match existing filenames, regardless of whether they are named in WikiWord format. If non-nil, Muse will color and publish implicit links to any file in your project. The default is nil. *** New option: muse-wiki-ignore-implicit-links-to-current-page. Whether to ignore implicit links to the current page. If non-nil, Muse will not recognize implicit links to the current page, both when formatting and publishing. *** For interwiki links, prefer files that have the same file extension as the current file. *** Check the entire explicit link for a project name or complete interwiki link, not just part of it. This allows page names with invalid WikiName characters to be referred to by using an explicit link. *** If the document does not have a valid title string, use the empty string. *** Take the value of `muse-wiki-hide-nop-tag' into account. *** Match filenames in the project before the general WikiWord regexp. *** Fix some bugs. ** XML publishing (lisp/muse-xml.el) *** The Muse XML schema has been moved from examples/muse.rnc to etc/muse.rnc. *** Update muse.rnc to handle nested list items. *** Fix table generation when some attributes are not given. * Changes in Muse 3.02.8 ** Building Muse *** Compile the contents of the contrib directory. *** The debian/ directory has been moved into its own branch. It is now available at mwolson@gnu.org--2006/muse--debian--0. *** Further parametrize the build system, so that it can be easily used by other Emacs Lisp projects. *** Include autoloads file (lisp/muse-autoloads.el) with releases. ** CGI library (contrib/cgi.el) *** Make this not depend on cl.el at runtime. *** Re-add the example calendar application. ** HTTP daemon (contrib/httpd.el) *** Update this to work with newer versions of Emacs. * Changes in Muse 3.02.7 ** Muse Mode highlighting (lisp/muse-colors.el) *** Fix bug that caused Muse not to work with recent builds of Emacs 22. * Changes in Muse 3.02.6 ** Building Muse *** Autoloads for Muse are now generated in the muse-autoloads.el file at build time. ** HTML publishing (lisp/muse-html.el) *** Don't escape "%" and "+" in URLs. ** Muse Mode (lisp/muse-mode.el) *** tags are now evaluated at display time. The actual contents of the buffer will not change, just the displayed text. To toggle this behavior, set `muse-colors-evaluate-lisp-tags'. ** Publishing (lisp/muse-publish.el) *** When errors happen during publishing, a more explanatory message is displayed. *** It is now possible to specify non-breaking-space with "~~" (two tildes). This helps prevent proper names from being split up in the output. *** Escape specials in all forms of emphasis. *** Escape "[" and "]" in links that are entered using muse-make-link. *** Errors from invalid lisp code in a tag will be published as a comment. If you have `muse-publish-comments-p' set to nil, the effect is to remove the error message. *** Fix several publishing issues involving comments and numbered lists. ** Wiki (lisp/muse-wiki.el) *** Interwiki links in extended links that have special characters are now handled properly. ** XML publishing (lisp/muse-xml.el) *** The XML publishing style is now considered stable. Its schema is available in `examples/muse.rnc'. * Changes in Muse 3.02.5 ** LaTeX publishing (lisp/muse-latex.el) *** Use a better algorithm for determining how many times we need to call pdflatex for publishing. Anything with a Table of Contents needs 2 passes. ** Muse Mode (lisp/muse-mode.el) *** The 3 levels of emphasis now have corresponding muse-emphasis-N faces. This permits the user to customize them, which may be useful if a font does not have italic and/or bold versions. *** Visiting pages with anchors works better. *** Fix fill bug with semicolons in the middle of paragraphs. *** Fix a bug with editing the link at point. *** Fix a display bug with text like ==. ** Project settings (lisp/muse-project.el) *** Fix an edge case that yielded a stringp: nil error. *** Prevent auto-save files from being recognized as Muse files. ** Wiki (lisp/muse-wiki.el) *** By default, WikiWords can have consecutive capital letters. *** Fix an error that occurs when muse-colors is not loaded. *** It is now possible to specify a suffix for WikiWord links. For example: WikiName''''s. The WikiName part will be displayed and colored as a link, but the "s" will be left alone. * Changes in Muse 3.02.02 ** Configuration *** A bug with customizing `muse-project-alist' has been fixed. *** We use a file extension for Muse files by default. To obtain the old behavior, set `muse-file-extension' to nil and `muse-mode-auto-p' to t. To go along with the new behavior, be sure to rename all of your Muse files to have a ".muse" extension. *** New option: `muse-wiki-ignore-bare-project-names'. This causes Muse to ignore bare project names if specified. The default is to turn bare project names into links. *** New option: `muse-publish-comments-p'. This causes Muse to publish comments as markup. The default is to remove comments before publishing rather than trying to mark them up. *** New option: `muse-wiki-allow-nonexistent-wikiword'. Enabling this will cause WikiWords with no corresponding file to be colored as bad links. The default is not to color them and turn them into links. ** Muse Mode (lisp/muse-mode.el) *** An error with intangible links has been fixed. *** Visiting a page with an anchor works better than before. *** Flyspell behaves better with Emacs21 than before. *** Links to nonexistent files will be colored red by default. This happened previously, but the algorithm was buggy and didn't cover implicit links. ** Project handling (lisp/muse-project.el) *** A convenience macro called `with-muse-project' has been added. This allows a code block to be executed after changing the current Muse project. It is analogous to emacs-wiki's `with-emacs-wiki-project' function. ** Publishing (lisp/muse-publish.el) *** An issue involving anchors at the end of a line has been addressed. *** Non-word characters are now allowed before an anchor. *** Comments may now be published, if desired. This behavior may be controlled with the `muse-publish-comments-p' option. The default is to remove comments before publishing rather than trying to mark them up. *** Publishing directives may now include a dash character. ** LaTeX publishing (lisp/muse-latex.el) *** A bug with footnotes has been addressed. An attempt has been made to make generated footnote markup look more "natural" to experienced LaTeX users. *** Table headers are underlined and table footers are overlined. *** PDF publishing will cause pdflatex to be called as needed. The previous behavior was to always call pdflatex twice. Currently, if pdflatex succeeds, it will not be called again. Otherwise, call it up to three times. *** Escaping of special characters should be drastically improved. An attempt has been made to get escaping done right in most contexts. The only quirk is that you must surround dollar signs with equal signs to ensure escaping. This makes publishing PDF documents much more useful. ** Texinfo publishing (lisp/muse-texinfo.el.el) *** An attempt was made to hone some of the markup. * Changes in Muse 3.02.01 ** Muse Mode (lisp/muse-mode.el) *** Links should no longer prevent moving the point, and help text for links should no longer cause errors to occur. ** Project handling (lisp/muse-project.el) *** `muse-project-alist' -- This variable should now save customizations to the correct form in the .emacs file. Before, it was saving an intermediate form of the variable. If you have used the customize interface in the previous release of Muse to set `muse-project-alist', please do the following to import your settings. - Open your .emacs file. - Move the point to where `muse-project-alist' is set. - Type `M-: (setq muse-project-alist-using-customize t) RET'. - Type `C-M-x'. - Type `M-x customize-save-variable RET muse-project-alist RET'. *** `muse-project-alist' -- A bug involving the deleting of items using Emacs21 and XEmacs21 has been fixed. ** Publishing (lisp/muse-publish.el) *** If 2 or more blank lines separate list or table items, each item will be published in a separate list or table. *** The #date directive is now populated by default with the last modified time of each file, rather than the current time of day. To use this value, add '(muse-publishing-directive "date")' to your header or footer. ** HTML publishing (lisp/muse-html.el) *** `muse-xhtml-style-sheet' -- New option that indicates the style settings to use for XHTML documents. This may be either a filename or a string of stylesheet settings. * Changes in Muse 3.02 ** New modules *** lisp/muse-wiki.el --- Provide automatic linking for WikiWords and InterWiki links. These words are clickable and publish as links. Project names from `muse-project-alist' are available for InterWiki linking by default. The list of InterWiki names and handlers may be customized through `muse-wiki-interwiki-alist'. WikiWords that do not correspond with real files will not be displayed as links nor published as links. It is expected that this behavior will be made optional in future versions of Muse. **** This module includes a few helper functions that may be added to `muse-publish-desc-transforms' in order to modify link descriptions at publish time. **** The concept of "implicit links" and "explicit links" has been introduced. Explicit links are surrounded by brackets, i.e. [[http://blah.org][this is a explicit link]]. Implicit links are URLs and email addresses that are not surrounded by brackets: they will not be colorized or published if surrounded by double-quotes. ***** `muse-wiki-publish-pretty-title' causes words to be Title-cased, ignoring words like `the' and `at' which should not be changed. ***** `muse-wiki-publish-pretty-interwiki' changes the delimiter of interwiki links according to the text of the `muse-wiki-interwiki-replacement' option. *** lisp/muse-protocols.el --- URL protocols that Muse recognizes. This automatically-included module provides an easily customizable list of URL protocols, how to browse them, and how to resolve them for publishing. Customize `muse-url-protocols' to add and remove protocols. ** Compatibility fixes *** Muse has been tested with XEmacs 21.4, both Mule and non-Mule versions. There are no known problems remaining. To make things work by default, the iso-8859-1 charset is used as a default option in some places. ** Configuration *** `muse-file-extension' -- New option that allows the file extension for Muse files to be specified. For example, setting this to "muse" assumes that you have renamed your Muse files with a ".muse" extension. Using this (and setting `muse-mode-auto-p' to nil) will prevent miscellaneous non-Muse files from being accidentally opened in Muse Mode. *** `muse-ignored-extensions' -- New option that determines which file extensions to omit from the ending of a Muse page name. *** `muse-ignored-extensions-regexp' -- This is no longer customizable. It will be automatically generated from `muse-file-extension' and `muse-ignored-extensions'. *** `muse-project-alist' -- The customize interface for this option has been greatly improved, and much effort has been spent in order to make this user-friendly. *** The `:force-publish' tag may be specified in `muse-project-alist'. This causes a particular list of files to be re-created every time the publishing process is invoked, even if they haven't been changed according to their timestamps. One use for this is to keep an index of available pages by adding the following to a file in this list. (muse-index-as-string t t t) *** `muse-project-ignore-regexp' -- By default, version control directories are now included in this regexp so that they don't appear when you hit C-c C-f to browse files in a project. *** The `muse-project-alist-styles' and `muse-project-alist-dirs' functions may be used in `muse-project-alist' to recursively add styles and directory listings for a given directory. The following is an example. We use a backtick instead of a single quote to begin the list. (setq muse-project-alist `(("Blog" (,@(muse-project-alist-dirs "~/proj/wiki/blog") ;; base dir :default "guestbook") ,@(muse-project-alist-styles "~/proj/wiki/blog" ;; base dir ;; output dir "~/personal-site/site/blog" ;; style "my-blosxom")))) Note that if you use the customize interface for `muse-project-alist', you will still have to manually add information for any new sub-directories. ** Debian packaging *** Debian packages for Muse have entered Debian unstable, thanks to Romain Francoise, my sponsor. It is possible to roll your own Muse packages if you want to do so. Packages may be built by using `make debrelease', once the proper options in Makefile.defs are set. Revisions may be built using `make debrevision'. The manual and relevant documentation files have been included with the Debian package for Muse. ** Muse Mode (lisp/muse-mode.el) *** Allow use of Muse with outline-minor-mode. *** Filling text does the right thing with list items and footnotes. List items and footnotes will no longer be concatenated when hitting M-q in the midst of consecutive items. *** Links will never be split in the middle when using Fill. *** Some flyspell crash issues were addressed. Using intangible text can cause strange problems with flyspell mode. Hence, by default, the intangible property will be ignored. A new option called `muse-mode-intangible-links' indicates whether this should be the case. *** Links will no longer be highlighted by flyspell. If you're using XEmacs or Emacs 22, flyspell will ignore links, including link text. This keeps flyspell from making the links unclickable. If you're using Emacs 21, flyspell will continue to interfere with links. If you know how to fix this, please send a patch! *** A few edge cases for emphasis and underlining have been addressed. *** , , and =surrounded text= are now colored using the new face `muse-verbatim-face'. *** All marked up text properties, like emphasis and underlining, will be removed for the text between , , , , and tags. *** Links to temporary files may be visited. A "temporary file" in this case is a buffer that is not associated with any file. For some dynamic content import scripts with Planner, this is helpful. *** Typing "#title" should never crash Emacs anymore. ** Muse manual (muse.texi) *** Fix problem with producing a PDF version of the manual. *** Document WikiNames. *** 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 (lisp/muse-publish.el) *** The order of rules should be much improved. This means that emphasis characters like `*' and `_' will never be interpreted as such if they are within links. *** The user will be notified when `muse-publish-this-file' fails to publish the current file. This happens when the timestamp of the current file indicates that it is up-to-date. *** Special characters are escaped in link descriptions and links on a more consistent basis. What defines a "special character" varies according to the publishing style. *** Errors that occur during publish time will cause a warning to be displayed prominently, rather than being ignored. It should no longer be possible to mess up a Muse source file by tweaking the Muse publishing process. *** Errors in tags cause a warning to be displayed and return "". Muse will try to continue publishing the page. *** An emdash ("--") can now be used after a list, as long as there is a blank line between the end of the list and the emdash. *** The tag has been introduced. It does the same thing that =equal signs= do: escape specials and publish as teletype text. Use it for short command snippets and the like. is a better choice for large blocks of code, since it preserves whitespace. *** An edge case involving links at the beginning of a paragraph has been addressed. *** An edge case involving consecutive directives of the same size has been addressed. *** Every publishing style is now capable of specifying strings to use for sections beyond the third level. *** Every publishing style may specify an end-of-section string. This is used, for example, by the experimental XML style and the DocBook style. *** Every publishing style may specify a method of handling "internal link" markup. An internal link is a link that refers to an anchor on the current page. *** Every publishing style may specify a link suffix to use. This allows the file extensions in links to other Muse files to be different from their actual extension. Blosxom makes use of this (since its published files are .txt and the dynamically-generated output is .html), and it could come in handy for PHP stuff. If a link suffix is not specified via :link-suffix, the value of :suffix will be used. ** Blosxom publishing (lisp/muse-blosxom.el) *** muse-blosxom-new-entry: A #category directive is added by default. Nothing is done with this yet, but it could be handy for tag-based (multiple category) blogging, once we figure out a good way to do that in both Muse and Pyblosxom. Ideas are welcome, and patches even more so. ** DocBook publishing (lisp/muse-docbook.el) *** The markup has been comprehensively improved. Published documents will now pass validation tests and look better in general. *** It is now possible to specify the encoding of DocBook documents. The default encoding is utf-8. *** Footnotes will be embedded into paragraphs, since this is The DocBook Way. *** Tables will be sorted by section. Headers first, then footers, then the rest of the table. *** Anchors are now handled correctly and publish to the best available form. Links to anchors are published with the tag. ** HTML publishing (lisp/muse-html.el) *** Fix minor issue with anchors. *** Paragraph publishing will no longer insert
tags before images. This was causing too much hassle for some programs that were trying to extend Muse, like the Muse port of Planner. *** The `&', `<', and '>' characters will be escaped using their specific HTML escape codes, rather than with "&#NNN;". This makes the published output display correctly in more web browsers. *** Use HTML 4.0 Transitional by default for `muse-html-header'. *** Include empty alt element in markup string for images that lack a description. *** Tables will be sorted by section. Headers first, then footers, then the rest of the table. *** `muse-xhtml-extension' -- The default extension for XHTML publishing. This is a new option. ** Journal publishing (lisp/muse-journal.el) *** Use "div class=..." rather than "div id=..." for sections. ** LaTeX publishing (lisp/muse-latex.el) *** A newline will be appended to the default footer for the latex and latexpdf publishing styles. This keeps the PDF-building process from failing due to lack of a newline at end of file. *** Anchors and links to them now work properly. *** When generating PDF files, call pdflatex twice. This should ensure that the table of contents gets generated, if one is due to be published. *** PDF files with spaces may be published. A bug preventing this has been fixed. *** Teletype text is now published using \\texttt{...}. *** An attempt has been made to escape special characters more consistently. ** Texinfo publishing (lisp/muse-texinfo.el) *** Fix a fatal error that occurs when publishing tables. *** Generate the contents in the header by default rather than the footer. This is the way that most Texinfo manuals do it. *** The info-pdf publishing style currently produces the best PDF output on the maintainer's machine, so it is now used to publish the PDF version of the Muse Manual. *** The characters `{' and `}' will be treated as special characters that need to be escaped at publish-time. *** Improve dots and enddots markup strings. *** Surround underlined text with "_" since Texinfo doesn't seem to have any better options for producing underlined text. *** Anchors and links to them now work properly. muse-el-3.20+dfsg/examples/0000755000175000017500000000000011331353120015046 5ustar taffittaffitmuse-el-3.20+dfsg/examples/publish-project0000755000175000017500000000046311331353120020111 0ustar taffittaffit#!/bin/bash # # This is an example script that shows how to publish a project from # the commandline. # # Make sure that you have a file named `muse-init.el' that contains # your custom Muse settings. It should add Muse to the load path. emacs -q -batch -l muse-init.el -f muse-project-batch-publish "$@" muse-el-3.20+dfsg/examples/QuickStart.muse0000644000175000017500000003643411331353120020045 0ustar taffittaffit#author John Wiegley and Michael Olson #title The Emacs Muse Emacs Muse is an authoring and publishing environment for Emacs. It simplifies the process of writing documents and publishing them to various output formats. Muse consists of two main parts: an enhanced text-mode for authoring documents and navigating within Muse projects, and a set of publishing styles for generating different kinds of output. * About this document This document provides an example of Muse markup and also functions as a quickstart for Muse. To see what it looks like when published, type =make examples=. You will then get an Info document, an HTML document, and a PDF document (provided you have an implementation of LaTeX installed with the necessary fonts). * Getting Started To use Muse, add the directory containing its files to your =load-path= variable, in your =.emacs= file. Then, load in the authoring mode, and the styles you wish to publish to. For example: (add-to-list 'load-path "") (require 'muse-mode) ; load authoring mode (require 'muse-html) ; load publishing styles I use (require 'muse-latex) (require 'muse-texinfo) (require 'muse-docbook) (require 'muse-project) ; publish files in projects Once loaded, the command =M-x muse-publish-this-file= will publish an input document to any available style. If you enable =muse-mode= within a buffer, by typing =M-x muse-mode=, this command will be bound to =C-c C-t=. * Creating a Muse project Often you will want to publish all the files within a directory to a particular set of output styles automatically. To support, Muse allows for the creations of "projects". Here is a sample project, to be defined in your =.emacs= file: (setq muse-project-alist '(("website" ("~/Pages" :default "index") (:base "html" :path "~/public_html") (:base "pdf" :path "~/public_html/pdf")))) The above defines a project named "website", whose files are located in the directory =~/Pages=. The default page to visit is =index=. When this project is published, each page will be output as HTML to the directory =~/public_html=, and as PDF to the directory =~/public_html/pdf=. Within any project page, you may create a link to other pages using the syntax =[[pagename]]=. * Markup rules A Muse document uses special, contextual markup rules to determine how to format the output result. For example, if a paragraph is indented, Muse assumes it should be quoted. There are not too many markup rules, and all of them strive to be as simple as possible so that you can focus on document creation, rather than formatting. ** Paragraphs Separate paragraphs in Muse must be separate by a blank line. For example, the input text used for this section is: Separate paragraphs in Muse must be separate by a blank line. For example, the input text used for this section is: ** Centered paragraphs and quotations A line that begins with six or more columns of whitespace (either tabs or spaces) indicates a centered paragraph. This is centered But if a line begins with whitespace, though less than six columns, it indicates a quoted paragraph. ** Headings A heading becomes a chapter or section in printed output -- depending on the style. To indicate a heading, start a new paragraph with one to three asterices, followed by a space and the heading title. Then begin another paragraph to enter the text for that section. * First level ** Second level *** Third level ** Horizontal rules Four or more dashes indicate a horizontal rule. Be sure to put blank lines around it, or it will be considered part of the proceeding or following paragraph! ---- The separator above was produced by typing: ---- ** Emphasizing text To emphasize text, surround it with certain specially recognized characters: *emphasis* **strong emphasis** ***very strong emphasis*** _underlined_ =verbatim and monospace= The above list renders as: *emphasis* **strong emphasis** ***very strong emphasis*** _underlined_ =verbatim and monospace= ** Adding footnotes A footnote reference is simply a number in square brackets[1].[1] To define the footnote, place this definition at the bottom of your file. =footnote-mode= can be used to greatly facilitate the creation of these kinds of footnotes. Footnotes: [1] Footnotes are defined by the same number in brackets occurring at the beginning of a line. Use footnote-mode's C-c ! a command, to very easily insert footnotes while typing. Use C-x C-x to return to the point of insertion. ** Verse Poetry requires that whitespace be preserved, but without resorting to monospace. To indicate this, use the following markup, reminiscent of e-mail quotations: > A line of Emacs verse; > forgive its being so terse. The above is rendered as: > A line of Emacs verse; > forgive its being so terse. You can also use the == tag, if you prefer: A line of Emacs verse; forgive its being so terse. ** Literal paragraphs The == tag is used for examples, where whitespace should be preserved, the text rendered in monospace, and any characters special to the output style escaped. There is also the == tag, which causes a marked block to be entirely left alone. This can be used for inserting a hand-coded HTML blocks into HTML output, for example. If you want some text to only be inserted when publishing to a particular format, use the =style= attribute for the == tag. Some examples follow. You are reading the HTML PDF Info version of this document. Produces: You are reading the HTML PDF Info version of this document. LaTeX was used in the publishing of this document. Produces: LaTeX was used in the publishing of this document. ** Lists Lists are given using special characters at the beginning of a line. Whitespace must occur before bullets or numbered items, to distinguish from the possibility of those characters occurring in a real sentence. The supported kinds of lists are: - bullet item one - bullet item two 1. Enumerated item one 2. Enumerated item two Term1 :: A definition one Term2 :: A definition two These are rendered as a bullet list: - bullet item one - bullet item two An enumerated list: 1. Enum item one 2. Enum item two And a definition list: Term1 :: This is a first definition And it has two lines; no, make that three. Term2 :: This is a second definition Lists may be nested inside of one another. The level of nesting is determined by the amount of leading whitespace. - Level 1, bullet item one 1. Level 2, enum item one 2. Level 2, enum item two - Level 1, bullet item two This is rendered as: - Level 1, bullet item one 1. Level 2, enum item one 2. Level 2, enum item two - Level 1, bullet item two ** Tables Simple tables are supported. The syntax is: Double bars || Separate header fields Single bars | Separate body fields Here are more | body fields Triple bars ||| Separate footer fields The above is rendered as: Double bars || Separate header fields Single bars | Separate body fields Here are more | body fields Triple bars ||| Separate footer fields Double bars || Separate header fields Single bars | Separate body fields Here are more | body fields Triple bars ||| Separate footer fields It is also possible to make tables that look like: | Single bars | Separate body fields | | Here are more | body fields | This publishes as: | Single bars | Separate body fields | | Here are more | body fields | If you are familiar with Org-mode style tables, simple variants (no column groups or autogenerated formulas) will publish fine. Also, table.el style tables will be published, provided that the output format is something that table.el supports. ** Anchors and tagged links #example If you begin a line with "#anchor" -- where "anchor" can be any word that doesn't contain whitespace -- it defines an anchor at that point into the document. This point can be referenced using "page#anchor" as the target in a Muse link (see below). Click [[#example][here]] to go back to the previous paragraph. ** URLs and E-mail addresses A URL or e-mail address encountered in the input text is published as a hyperlink if the output style supports it. For example, the latest Muse source can be downloaded at http://download.gna.org/muse-el and mail may be sent to mwolson@gnu.org. ** Images If a URL has an extension of a known image format, it will be inlined if possible. To create a link to an image, rather than inlining it, put the text "URL:" immediately in front of the link. This is an inlined image example: Made with [[muse-made-with.png]] Emacs Muse. This publishes as: Made with [[muse-made-with.png]] Emacs Muse. Here is an example of a captioned image: [[emacs-muse.png][Emacs Muse, the publishing choice of (a subset of) Great Thinkers]] This publishes as: [[emacs-muse.png][Emacs Muse, the publishing choice of (a subset of) Great Thinkers]] The following will be published as a link only. The Muse logo: [[URL:http://mwolson.org/static/logos/emacs-muse.png]]. The Muse logo: [[URL:http://mwolson.org/static/logos/emacs-muse.png]]. ** Links A hyperlink can reference a URL, or another page within a Muse project. In addition, descriptive text can be specified, which should be displayed rather than the link text in output styles that supports link descriptions. The syntax is: [[link target][link description]] [[link target without description]] Thus, the text: Muse can be downloaded [[http://download.gna.org/muse-el/][here]], or at [[http://download.gna.org/muse-el/]]. Publishes as: Muse can be downloaded [[http://download.gna.org/muse-el/][here]], or at [[http://download.gna.org/muse-el/]]. ** Source code If you have htmlize.el version 1.34 or later installed, you can publish colorized HTML for source code in any major mode that Emacs supports by using the == tag. If not publishing to HTML, the text between the tags will be treated like an == tag. Here is some example C code. Muse takes the =lang= element and appends ="-mode"= to it in order to determine which major mode to use when colorizing the code. #include char *unused; int main (int argc, char *argv[]) { puts("Hello, world!\n"); } Here is the colorized output. This may look different if you have customized some faces. Also, it may look different depending on whether you are publishing from Emacs on the console, or Emacs on X -- what you see when viewing (in this case) a C file is what you get. #include char *unused; int main (int argc, char *argv[]) { puts("Hello, world!\n"); } ** Embedded Lisp, Perl, Ruby, Python, or Shell Arbitrary kinds of markup can be achieved using the == tag, which is the only Muse tag supported in a style's header and footer text. With the == tag, you may generated whatever output text you wish. The inserted output will get marked up, if the == tag appears within the main text of the document. (concat "This form gets " "inserted") The above renders as: (concat "This form gets " "inserted"). It is also possible to treat the output as if it were surrounded by the ==, ==, or == tags, by specifying ="example"=, ="src"=, or ="verse"= as the =markup= attribute of the tag. For example: (concat "Insert" " me") The output is: (concat "Insert" " me") This =markup= attribute can also be passed to the ==, ==, ==, and == tags, which interpret Perl, Ruby, Python, and Shell code, respectively. * Publishing styles One of the principle features of Muse is the ability to publish a simple input text to a variety of different output styles. Muse also makes it easy to create new styles, or derive from an existing style. ** Deriving from an existing style To create a new style from an existing one, use =muse-derive-style=: (muse-derive-style DERIVED-NAME BASE-NAME STYLE-PARAMETERS) The derived name is a string defining the new style, such as "my-html". The base name must identify an existing style, such as "html" -- if you have loaded =muse-html=. The style parameters are the same as those used to create a style, except that they override whatever definitions exist in the base style. Most often, this will come in handy for using a custom header, footer, and/or stylesheet for a project. Here is one such example. (setq my-different-style-sheet (concat "")) (muse-derive-style "my-xhtml" "xhtml" :header "~/.emacs.d/muse/different-header.html" :footer "~/.emacs.d/muse/different-footer.html" :style-sheet my-different-style-sheet) Many parameters support being partially overridden. As an example: with =:functions=, if a markup function is not found in the derived style's function list, the base style's function list will be queried. If a parameter takes the name of a function, then returning non-nil from that function causes no further processing to be done. If the function returns nil, any other functions in the base style will be called. ** Creating a new style To create a new style, use =muse-define-style=: (muse-define-style NAME STYLE-PARAMETERS) If you want to create a new style, it is best to examine the source code for other styles first, to get an idea of what needs to be done. Each output format should have its own file, containing all styles based on it. For example. the =latex=, =latex-slides=, and =pdf= styles are all contained in =muse-latex.el=. If you are willing to sign copyright papers for the Free Software Foundation (we will help you with this step), the Muse authors may be interested in including your work in future versions of Muse. * License This QuickStart document may be redistributed and/or modified under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. Footnotes: [1] This is a footnote. [2] Another footnote, this one unreferenced. muse-el-3.20+dfsg/examples/Makefile0000644000175000017500000000162011331353120016505 0ustar taffittaffit.PHONY: all examples clean realclean distclean fullclean .PRECIOUS: %.html %.pdf %.info DEFS = $(shell test -f ../Makefile.defs && echo ../Makefile.defs \ || echo ../Makefile.defs.default) include $(DEFS) EXAMPLES = QuickStart.html QuickStart.pdf QuickStart.info all: examples examples: $(EXAMPLES) %.html: %.muse @echo Generating HTML for $<... EMACS=$(EMACS) SITEFLAG=$(SITEFLAG) ../scripts/publish html $< %.pdf: %.muse @echo Generating PDF for $< ... EMACS=$(EMACS) SITEFLAG=$(SITEFLAG) ../scripts/publish pdf $< %.info: %.muse @echo Generating Info for $< ... EMACS=$(EMACS) SITEFLAG=$(SITEFLAG) ../scripts/publish info $< clean: rm -f missfont.log QuickStart.texi *~ realclean distclean fullclean: clean rm -f $(EXAMPLES) rm -f QuickStart.aux QuickStart.log QuickStart.out QuickStart.tex rm -f QuickStart.cp QuickStart.fn QuickStart.ky QuickStart.pg rm -f QuickStart.tp QuickStart.vr muse-el-3.20+dfsg/examples/mwolson/0000755000175000017500000000000011331353120016544 5ustar taffittaffitmuse-el-3.20+dfsg/examples/mwolson/stylesheets/0000755000175000017500000000000011331353120021120 5ustar taffittaffitmuse-el-3.20+dfsg/examples/mwolson/stylesheets/common.css0000644000175000017500000001111711331353120023123 0ustar taffittaffit/* Michael Olson's tweaked Muse stylesheet Common elements. License: Modification and propagation of this document is permitted. Attribution of credit to me is optional. */ /* Normal elements */ a.nonexistent { background-color: white; color: red; font-weight: bold; } a.nonexistent:visited { background-color: white; color: red; } a:link.top, a:visited.top { color: #F5DEB3; /* wheat */ line-height: 90%; position: relative; text-decoration: none; top: -13px; } a:link:hover, a:visited:hover { background-color: #F5F5F5; /* white smoke */ } h1 a:link:hover, h1 a:visited:hover { background-color: #708090; /* slate gray */ } a:visited { color: #556B2F; /* dark olive green */ } a:link { color: #0000CD; /* blue */ } blockquote { border-left: 2px solid #CCCCCC; /* gray80 */ padding: 5px; font-style: italic; margin: 5px 20px; } body { background-color: #E5E5E5; /* gainsboro */ color: black; margin-left: 2%; margin-right: 2%; margin-top: 1%; } code { margin-left: 3px; margin-right: 3px; } dt { font-weight: bold; margin-top: .5em; padding: 3px; } em { font-style: italic; } h1 { background-color: #2F4F4F; /* dark slate gray */ color: #F5DEB3; /* wheat */ border: 1px solid black; font-size: large; overflow: hidden; /* don't crowd the menu */ padding: 0; white-space: nowrap; } h2 { border-bottom: solid 2px #708090; /* slate gray */ clear: left; font-size: large; margin-top: 2.5em; margin-bottom: .5em; overflow: hidden; /* don't crowd the menu */ padding-right: 6px; } h3 { border-bottom: solid 1px #708090; /* slate gray */ border-right: solid 2px #E5E5E5; /* gainsboro */ font-size: medium; margin-top: 2em; margin-bottom: .5em; overflow: hidden; /* don't crowd the menu */ padding-right: 6px; } h4 { border-bottom: dashed 1px #BEBEBE; /* light gray */ border-right: solid 2px #E5E5E5; /* gainsboro */ margin-top: 1.5em; margin-bottom: .7em; overflow: hidden; /* don't crowd the menu */ padding-right: 6px; } hr { clear: both; } img { border: 0; } li { line-height: 1.2em; margin-top: .7em; } p.verse { clear: left; line-height: 2em; margin-left: 3%; } p { line-height: 120%; } pre.example { margin-left: 3%; margin-top: 1.2em; margin-bottom: 1.2em; /* clear: right; */ } pre.src { margin-left: 0%; margin-top: 1.2em; margin-bottom: 1.2em; /* clear: right; */ } pre.verse { font-family: inherit; line-height: 2em; margin-left: 3%; } pre { font-family: monospace; margin-left: 3%; white-space: pre; } span.footdate { color: #556B2F; /* dark olive green */ font-weight: bold; } strong { font-weight: bold; } table { overflow: hidden; /* don't crowd the menu */ } table.image { clear: right; } ul { list-style-type: disc; margin-bottom: 1.5em; } /* Menu */ .menu { background-color: #CDCDCD; /* gray/gainsboro */ border: 1px solid black; display: inline; float: right; clear: both; margin-left: 10px; margin-bottom: 5px; padding: 3px; } .menuitem { background-color: #E5E5E5; /* gainsboro */ margin: 0; padding-top: 2px; padding-bottom: 3px; padding-left: 2px; padding-right: 2px; text-align: left; } .menuitem a:link, .menuitem a:visited { color: #0000CD; /* blue */ display: block; margin: 0; padding-top: 2px; padding-bottom: 3px; padding-left: 2px; padding-right: 2px; } .menuitem a:link:hover, .menuitem a:visited:hover { background-color: #F5F5F5; /* white smoke */ } .menuother { padding-left: 2px; padding-right: 2px; } #tooltipbox { float: right; visibility: hidden; } #tooltip { color: #006400; /* dark green */ } /* Footnote */ .navfoot hr { margin-top: 20px; margin-bottom: 2px; padding: 0; height: 4px; } .navfoot a img { padding-top: 2px; padding-right: 0; padding-bottom: 0; padding-left: 2px; } .navfoot table { border-spacing: 0; border-width: 0; clear: right; margin: 0; padding: 0; } .navfoot td { border-spacing: 0; border-width: 0; margin: 0; padding: 0; } .navfoot td.iconbox { background-color: #F5F5F5; /* white smoke */ border-spacing: 0; border-width: 1; border-left: 1px solid black; border-top: 1px solid black; border-right: 1px solid #D3D3D3; /* light gray */ border-bottom: 1px solid #D3D3D3; /* light gray */ margin: 0; padding-top: 2px; padding-right: 5px; padding-bottom: 2px; padding-left: 2px; } muse-el-3.20+dfsg/examples/mwolson/stylesheets/print.css0000644000175000017500000000136611331353120022774 0ustar taffittaffit/* Michael Olson's tweaked Muse stylesheet Elements used when printing. License: Modification and propagation of this document is permitted. Attribution of credit to me is optional. */ html { font-family: Times, serif; font-size: 12pt; } body { margin-left: 1.5cm; margin-right: 1.5cm; margin-top: 1.5cm; margin-bottom: 1.5cm; } .menu, .menuitem, .navfoot, #tooltip, #tooltipbox { display: none; } a, a:visited, a.nonexistent, a.badinterwiki { color: black; text-decoration: none; } a:hover { text-decoration: underline; } dd { line-height: 2em; } h1 { border-right: 0; } h2 { border-right: 0; } h3 { border-right: 0; } h4 { border-right: 0; } img { display: none; } p { line-height: 2em; } muse-el-3.20+dfsg/examples/mwolson/stylesheets/screen.css0000644000175000017500000000267311331353120023121 0ustar taffittaffit/* Michael Olson's tweaked Muse stylesheet Elements for most of my web site. License: Modification and propagation of this document is permitted. Attribution of credit to me is optional. */ /* Table of Contents */ .contents { clear: left; float: left; background-color: #D3D3D3; /* light gray */ border: 1px solid black; margin-top: 0; margin-right: 5px; margin-left: 0; margin-bottom: 15px; padding: 3px; } .contents dl { background-color: #F5F5F5; /* white smoke */ display: block; float: left; font-size: small; margin-top: 0; margin-bottom: 0; padding-bottom: 5px; } .contents dt { clear: left; display: block; padding-right: 5px; padding-left: 5px; text-align: left; } .contents dd dt { display: list-item; } .contents a:hover { background-color: #D3D3D3; /* light gray */ } /* Planner */ .taskA { color: red } .taskB { color: green } .taskC { color: navy } .taskX { color: #696969; /* dim gray */ text-decoration: line-through; } /* Source coloring */ .builtin { /* font-lock-builtin-face */ color: #9370db; } .comment { /* font-lock-comment-face */ color: #b22222; } .constant { /* font-lock-constant-face */ color: #b8860b; } .doc { } .function-name { /* font-lock-function-name-face */ color: #0000ff; } .keyword { /* font-lock-keyword-face */ color: #a020f0; } .string { /* font-lock-string-face */ color: #228b22; } muse-el-3.20+dfsg/examples/mwolson/stylesheets/blog.css0000644000175000017500000000515611331353120022564 0ustar taffittaffit/* Michael Olson's tweaked pyblosxom stylesheet Elements for my blog. License: Modification and propagation of this document is permitted. Attribution of credit to me is optional. */ td { } th { } li.spaced { } .update { color: #ff0000; font-weight: bold; } .header { font-size: 9pt; text-align: center; font-weight: bold; } .data { font-size: 9pt; } .keyword { color: #0000ff; font-weight: bold; } .number { color: #ff00ff; } .string { color: #ff0000; } .comment { color: #000088; } .symbol { } .normal { } .function { font-weight: bold; } .input { color: #0000ff; } .code { font-family: monospace; font-size: 0.9em; } .path { font-family: monospace; font-size: 0.9em; } .rightMenu { font-size: 10pt; font-weight: bold; color: black; /*#336699;*/ } /* Blosxom registry stuff */ .blosxomRegistryHeader { border: 1px solid #999; margin: 0px; padding: 0px; font-weight: bold; } /* Blosxom calendar stuff */ .blosxomCalendar { border: 1px solid #999; margin: 0px; padding: 0px; } .blosxomCalendarBlogged { background: #bbbbff; text-align: center; color: #000000; } .blosxomCalendarCell { background: #ddddff; text-align: center; color: #000000; } .blosxomCalendarToday { background: #ffffcc; color: #000000; } .blosxomCalendarSpecificDay { background: #ffffcc; text-align: center; color: #000000; } /* Blosxom stuff */ .blosxomDayDiv { float: left; width: 100%; } .blosxomEntry { width: 100%; margin-top: 1em; margin-bottom: 2em; padding: 0; } .blosxomEntrySummary { width: 100%; /* margin-top: 1em; */ /* margin-bottom: 2em; */ padding: 0; } .blosxomBody { padding-left: 1em; padding-right: 1em; } .blosxomStoryLinks { /* background: #eeeeee; */ /* text-align: right; */ } .blosxomComments { margin-top: 2em; border-top: 1px dashed #444444; } .blosxomCommentForm { clear: right; } .blosxomTitle { /* font-size: 13pt; */ font-weight: bold; color: #000000; } .blosxomDate { border-bottom: 1px solid #888888; font-size: 11pt; font-weight: bold; color: #336699; } .blosxomEntryDate { font-weight: bold; font-size: 100%; color: #aaaaaa; } .blosxomTime { text-decoration: italicize; color: #336699; } /* Blosxom comment stuff */ .blosxomComment { background: #eeeeee; border-top: dashed 1px #444444; padding: 0.2em; padding-bottom: 1em; } .blosxomCommentInfo { font-size: smaller; } .blosxomCommentBody { margin-left: 0.5em; } .blosxomCommentForm { margin-top: 1em; } #blosxomCommentStatus { font-size: larger; color: blue; margin-left: 0.5em; font-weight: bold; } muse-el-3.20+dfsg/examples/mwolson/templates/0000755000175000017500000000000011331353120020542 5ustar taffittaffitmuse-el-3.20+dfsg/examples/mwolson/templates/generic-footer.html0000644000175000017500000000010011331353120024327 0ustar taffittaffit muse-el-3.20+dfsg/examples/mwolson/templates/generic-header.html0000644000175000017500000000165611331353120024302 0ustar taffittaffit (muse-html-encoding)"?> <lisp> (let ((current-project (car (muse-project-of-file muse-publishing-current-file)))) (concat (when current-project (concat current-project " - ")) (muse-publishing-directive "title")))</lisp>

(muse-wiki-publish-pretty-title)

muse-el-3.20+dfsg/examples/mwolson/templates/footer.html0000644000175000017500000000727211331353120022736 0ustar taffittaffit muse-el-3.20+dfsg/examples/mwolson/templates/header.tex0000644000175000017500000000402111331353120022511 0ustar taffittaffit\documentclass (or (and (muse-publishing-directive "latex-twocolumn") "[twocolumn]") "") { (or (muse-publishing-directive "latex-document-class") "article")} \usepackage[english]{babel} \usepackage{amsfonts, amsmath, amssymb} \usepackage{ucs} % I'd love to be able to use CB fonts for Greek letters instead, as % the ucs docs recommend, but i couldn't figure it out \SetUnicodeOption{mathletters} % define Unicode "middle dot" to be TeX \cdot \DeclareUnicodeCharacter{183}{\ensuremath{\cdot}} % declare Unicode "maplet" to be TeX \mapsto \DeclareUnicodeCharacter{8614}{\ensuremath{\mapsto}} % declare Unicode "leftwards arrow with hook" to be TeX \hookleftarrow \DeclareUnicodeCharacter{8617}{\ensuremath{\hookleftarrow}} % declare Unicode "downwards double arrow" to be TeX \Downarrow \DeclareUnicodeCharacter{8659}{\ensuremath{\Downarrow}} % define Unicode "white circle" to be TeX \circ \DeclareUnicodeCharacter{9675}{\ensuremath{\circ}} \usepackage[utf8x]{inputenc} \usepackage[T1]{fontenc} \usepackage{hyperref} \usepackage[pdftex]{graphicx} \def\museincludegraphics{% \begingroup \catcode`\|=0 \catcode`\\=12 \catcode`\#=12 \includegraphics[width=0.75\textwidth] } % One-inch margins \usepackage{fullpage} % A more PDF-friendly font \usepackage{lmodern} % An alternate, blockier font, should I ever want it % \renewcommand{\familydefault}{\sfdefault} \sf (when (muse-publishing-directive "latex-block-paragraphs") "\\setlength{\\parindent}{0pt} \\setlength{\\parskip}{4pt}") % For two-column documents, increase center margin to something readable \setlength{\columnsep}{.25in} \begin{document} (unless (muse-publishing-directive "latex-omit-title") (concat "\\title{" (muse-publish-escape-specials-in-string (muse-wiki-publish-pretty-title) 'document) "} \\author{" (muse-publishing-directive "author") "} \\date{" (muse-publishing-directive "date") "} \\maketitle")) (and muse-publish-generate-contents "\\tableofcontents \\clearpage") muse-el-3.20+dfsg/examples/mwolson/templates/header.html0000644000175000017500000000502511331353120022662 0ustar taffittaffit (muse-html-encoding)"?> <lisp>(concat (car (muse-project)) " - " (muse-wiki-publish-pretty-title))</lisp> (muse-style-element :style-sheet muse-publishing-current-style)

" style="text-decoration: none;"> mwolson.org logo (concat (car (muse-project)) " - " (muse-wiki-publish-pretty-title))

muse-el-3.20+dfsg/examples/mwolson/muse-init.el0000644000175000017500000003472611331353120021014 0ustar taffittaffit;;; muse-init.el --- Initialize Emacs Muse ;; This file is part of Michael Olson's Emacs settings. ;; The code in this file may be used, distributed, and modified ;; without restriction. ;; I use initsplit.el to separate customize settings on a per-project ;; basis. ;; In order to see the scripts that I use to publish my website to a ;; remote webserver, check out ;; http://mwolson.org/projects/SiteScripts.html. ;;; Setup ;; Add to load path (add-to-list 'load-path "/home/mwolson/proj/emacs/muse/git-muse/lisp") (add-to-list 'load-path "/home/mwolson/proj/emacs/muse/git-muse/experimental") ;; Initialize (require 'outline) ; I like outline-style faces (require 'muse) ; load generic module (require 'muse-colors) ; load coloring/font-lock module (require 'muse-mode) ; load authoring mode (require 'muse-blosxom) ; load blosxom module (require 'muse-docbook) ; load DocBook publishing style (require 'muse-html) ; load (X)HTML publishing style (require 'muse-latex) ; load LaTeX/PDF publishing styles (require 'muse-latex2png) ; publish tags (require 'muse-project) ; load support for projects (require 'muse-texinfo) ; load Info publishing style (require 'muse-wiki) ; load Wiki support (require 'muse-xml) ; load XML support ;;(require 'muse-message) ; load message support (experimental) ;; Setup projects ;; Here is an example of making a customized version of your favorite ;; publisher. All this does is run `my-muse-blosoxm-finalize' on the ;; published file immediately after saving it. (muse-derive-style "my-blosxom" "blosxom-xhtml" :final 'my-muse-blosxom-finalize) ;; This turns relative links into absolute links (muse-derive-style "my-pdf" "pdf" :before 'my-muse-pdf-prepare-buffer) ;; This uses a different header and footer than normal (muse-derive-style "my-xhtml" "xhtml" :header "~/personal-site/muse/header.html" :footer "~/personal-site/muse/footer.html") ;; Define a draft style which provides extra space between sections (defvar muse-latex-draft-markup-strings '((chapter . "\\bigskip\n\\bigskip\n\\chapter{") (section . "\\bigskip\n\\bigskip\n\\section{") (subsection . "\\bigskip\n\\bigskip\n\\subsection{") (subsubsection . "\\bigskip\n\\bigskip\n\\subsubsection{")) "Strings used for marking up Latex draft text.") (muse-derive-style "latex-draft" "latex" :strings 'muse-latex-draft-markup-strings) (muse-derive-style "pdf-draft" "latex-draft" :final 'muse-latex-pdf-generate :browser 'muse-latex-pdf-browse-file :link-suffix 'muse-latex-pdf-extension :osuffix 'muse-latex-pdf-extension) ;; Define a style with unnumbered titles (defvar muse-latex-uh-markup-strings '((chapter . "\\chapter*{") (section . "\\section*{") (subsection . "\\subsection*{") (subsubsection . "\\subsubsection*{")) "Strings used for marking up Latex text with unnumbered headings.") (muse-derive-style "latex-uh" "latex" :strings 'muse-latex-uh-markup-strings) (muse-derive-style "pdf-uh" "latex-uh" :final 'muse-latex-pdf-generate :browser 'muse-latex-pdf-browse-file :link-suffix 'muse-latex-pdf-extension :osuffix 'muse-latex-pdf-extension) ;; Here is my master project listing. (setq muse-project-alist `( ("Website" ("~/proj/wiki/web/" "~/proj/wiki/web/testdir/" :force-publish ("WikiIndex") :default "WelcomePage") (:base "my-xhtml" :base-url "http://mwolson.org/web/" :include "/web/[^/]+" :path "~/personal-site/site/web") (:base "my-xhtml" :base-url "http://mwolson.org/web/" :include "/testdir/[^/]+" :path "~/personal-site/site/web/testdir") (:base "my-pdf" :base-url "http://mwolson.org/web/" :path "~/personal-site/site/web" :include "/\\(CurriculumVitae\\|BriefResume\\)[^/]*$")) ("Projects" ("~/proj/wiki/projects/" :force-publish ("WikiIndex" "MuseQuickStart") :default "WelcomePage") (:base "my-xhtml" :base-url "http://mwolson.org/projects/" :path "~/personal-site/site/projects")) ("Blog" (,@(muse-project-alist-dirs "~/proj/wiki/blog") :default "index") ;; Publish this directory and its subdirectories. Arguments ;; are as follows. The above `muse-project-alist-dirs' part ;; is also needed. ;; 1. Source directory ;; 2. Output directory ;; 3. Publishing style ;; remainder: Other things to put in every generated style ,@(muse-project-alist-styles "~/proj/wiki/blog" "~/personal-site/site/blog" "my-blosxom" :base-url "http://blog.mwolson.org/")) ("MyNotes" ("~/proj/wiki/notes/" :force-publish ("index") :default "index") (:base "xhtml" :base-url "http://mwolson.org/notes/" :path "~/personal-site/site/notes") (:base "my-pdf" :base-url "http://mwolson.org/notes/" :path "~/personal-site/site/notes")) ("Private" ("~/Documents" :default "movielist") ,@(muse-project-alist-styles "~/Documents" "~/Documents" "pdf")) ("Classes" (,@(muse-project-alist-dirs "~/proj/wiki/classes") :default "index") ,@(muse-project-alist-styles "~/proj/wiki/classes" "~/personal-site/site/classes" "xhtml")) ("MA366" ("~/proj/classes/ma366") (:base "pdf-uh" :path "~/proj/classes/ma366")) ("ENGL238" ("~/proj/classes/engl238") (:base "pdf-uh" :path "~/proj/classes/engl238")) ("CS426" ("~/proj/classes/cs426") (:base "pdf-uh" :path "~/proj/classes/cs426")) ("Plans" ("~/proj/wiki/plans/" :default "TaskPool" :major-mode planner-mode :visit-link planner-visit-link) (:base "planner-xhtml" :path "~/proj/notmine/planner-out")) )) ;; Wiki settings (setq muse-wiki-interwiki-alist '(("PlugWiki" . "http://wiki.purduelug.org/") ("EmacsWiki" . "http://www.emacswiki.org/cgi-bin/wiki/") ("ArchWiki" . "http://gnuarch.org/gnuarchwiki/") ;; abbreviations ("CERIAS" . "http://www.cerias.purdue.edu/") ("PlannerMode" . "http://www.emacswiki.org/cgi-bin/wiki/PlannerMode") ("RememberMode" . "http://www.emacswiki.org/cgi-bin/wiki/RememberMode") ("GP2X" . "http://www.gp2x.co.uk/") ("UbuntuLinux" . "http://ubuntulinux.org/") ("PLUG" . "http://purduelug.org/") ("PAC" . "http://web.ics.purdue.edu/~pac/"))) ;;; 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://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) (let ((muse-current-project (muse-project project))) (call-interactively 'muse-project-find-file))) (defun my-muse-blosxom-finalize (file output-path target) ;; (my-muse-prepare-entry-for-xanga output-path) ;; For now, do nothing. ) ;; Make the current file display correctly in Xanga ;; I call this using C-c p x now. (defun my-muse-prepare-entry-for-xanga (file) "Mangle FILE so that Xanga doesn't bug out, saving to X clipboard. If FILE is not specified, use the published version of the current file." (interactive (list (expand-file-name (concat (muse-page-name) muse-blosxom-extension) (muse-style-element :path (car (muse-project-applicable-styles buffer-file-name (cddr (muse-project-of-file)))))))) (save-match-data (muse-with-temp-buffer (muse-insert-file-contents file) ;; surround first line in

(goto-char (point-min)) (insert "

") (end-of-line) (insert "

") ;; treat example regions properly (let (beg end) (while (re-search-forward "]*>" nil t) (setq beg (match-end 0)) (setq end (if (re-search-forward "" nil 1) (match-beginning 0) (point))) (save-restriction (narrow-to-region beg end) ;; change initial spaces to   (goto-char (point-min)) (while (re-search-forward "^ +" nil t) (replace-match (apply 'concat (make-list (length (match-string 0)) " ")))) ;; change newline to
(goto-char (point-min)) (while (re-search-forward "\n" nil t) (replace-match "
"))))) ;; get rid of 2 spaces together and merge lines (goto-char (point-min)) (while (re-search-forward (concat "[" muse-regexp-blank "\n]+") nil t) (replace-match " ")) ;; remove trailing space (goto-char (point-min)) (while (re-search-forward " *

*" nil t) (replace-match "

")) ;; make relative links work (goto-char (point-min)) (while (re-search-forward "href=\"[/.]+" nil t) (replace-match "href=\"http://mwolson.org/" nil t)) ;; copy entry to clipboard (clipboard-kill-ring-save (point-min) (point-max)) (message "Copied blog entry to clipboard")))) ;; Turn a word or phrase into a clickable Wikipedia link (defun my-muse-dictize (beg end) (interactive "r") (let* ((text (buffer-substring-no-properties beg end)) (link (concat "dict:" (replace-regexp-in-string " " "_" text t t)))) (delete-region beg end) (insert "[[" link "][" text "]]"))) (defun my-muse-surround-math (&optional beg end) "If a region is higlighted, surround it with .... If no region is highlighted, insert and leave the point between the two tags." (interactive (list (ignore-errors (mark)) (point))) (if (and beg end) (save-restriction (narrow-to-region beg end) (goto-char (point-min)) (insert "") (goto-char (point-max)) (insert "")) (insert "") (save-excursion (insert "")))) (defun my-muse-cdotize-region (beg end) (interactive "r") (save-restriction (narrow-to-region beg end) (goto-char (point-min)) (while (re-search-forward " *\\* *" nil t) (replace-match " \\\\cdot ")))) ;;; Key customizations (global-set-key "\C-cpl" 'muse-blosxom-new-entry) (global-set-key "\C-cpL" #'(lambda () (interactive) (my-muse-project-find-file "Blog"))) (global-set-key "\C-cpi" #'(lambda () (interactive) (my-muse-project-find-file "Private"))) (global-set-key "\C-cpm" #'(lambda () (interactive) (my-muse-project-find-file "MA453"))) (global-set-key "\C-cpn" #'(lambda () (interactive) (my-muse-project-find-file "MyNotes"))) (global-set-key "\C-cpp" #'(lambda () (interactive) (my-muse-project-find-file "Plans"))) (global-set-key "\C-cpr" #'(lambda () (interactive) (my-muse-project-find-file "Projects"))) (global-set-key "\C-cps" #'(lambda () (interactive) (my-muse-project-find-file "Classes"))) (global-set-key "\C-cpw" #'(lambda () (interactive) (my-muse-project-find-file "Website"))) (global-set-key "\C-cpC" #'my-muse-cdotize-region) (global-set-key "\C-cpM" #'my-muse-surround-math) (global-set-key "\C-cpW" #'my-muse-dictize) (global-set-key "\C-cpx" #'my-muse-prepare-entry-for-xanga) ;;; Custom variables (custom-set-variables '(muse-blosxom-base-directory "~/proj/wiki/blog/") '(muse-colors-autogen-headings (quote outline)) '(muse-colors-inline-image-method (quote muse-colors-use-publishing-directory)) '(muse-completing-read-function (quote ido-completing-read)) '(muse-html-charset-default "utf-8") '(muse-html-encoding-default (quote utf-8)) '(muse-html-footer "~/personal-site/muse/generic-footer.html") '(muse-html-header "~/personal-site/muse/generic-header.html") '(muse-html-meta-content-encoding (quote utf-8)) '(muse-html-style-sheet " ") '(muse-latex-header "~/personal-site/muse/header.tex") '(muse-mode-hook (quote (flyspell-mode footnote-mode))) '(muse-publish-comments-p t) '(muse-publish-date-format "%b. %e, %Y") '(muse-publish-desc-transforms (quote (muse-wiki-publish-pretty-title muse-wiki-publish-pretty-interwiki muse-publish-strip-URL))) '(muse-wiki-publish-small-title-words (quote ("the" "and" "at" "on" "of" "for" "in" "an" "a" "page"))) '(muse-xhtml-footer "~/personal-site/muse/generic-footer.html") '(muse-xhtml-header "~/personal-site/muse/generic-header.html") '(muse-xhtml-style-sheet " ")) (custom-set-faces '(muse-bad-link ((t (:foreground "DeepPink" :underline "DeepPink" :weight bold))))) ;;; muse-init.el ends here muse-el-3.20+dfsg/examples/emacs-muse.png0000644000175000017500000007167611331353120017634 0ustar taffittaffit‰PNG  IHDR¸\R„è pHYs  šœtIMEÖ8¼e…ðtEXtCommentCreated with The GIMPïd%n IDATxÚL¼i³dIræ[Ľ73ßR¯ö®Þ»g††³Ðp@Ñ$£%Hf2“dFê\Å!þ ò“DŠ‹6RF€¤‘2b†˜Ì L÷Lw-]]]õê­¹ÝY@[xõÞË—7#<ÜŸs<ðg?ûˆ@Í„¹Ô&ªæîf†ˆÂÜT@˜ÍÌÜãkW3VÕø'3¹»;”ÖÜÌܽÔ&̈8•ÊD¿Œî€MµK ¼6ÍIT ܉Xxš 33¡;Ô¦ ̳¡#D3wwfjMÍ='€ø#€ÀDînîL¤fLÔT…¹5EDDŒ×ª!@S%ÜýNm-ç4M%§ÄLc©LT[‹¿ ˆµ63etwfVU"t‡q*CŸÍÌÔ,ž jmÌ\jÍIˆˆˆT•ˆ¼Ï9vÄÜZ3p$RµÚZkÚTkmîàÀLfFDÀDnæf†D9‰›¥¢ùþûˆ±Ñ`æÌØçìîD¤fÀDæ^ksw5ßÿüçð'þÛŽ…ã“ÄòÅÞ—Úr’XŽÚq÷ÓR[q3#Â$RjCD33óÚÔ¦]N­)3bSáÍvá>g5Uu‰M""b¢¦¶Ûu‹e‚œ$6Û=–˜â›D;”’ìׄy÷ ÝüUè˜{<!™"2Q„”»ÇÚÅ_`"fŠì¥Tw躻3àÀLˆ8•‚ˆà€„XjEÄÖ4çDˆˆhnµ©ª™YœœÅjkI$V&'f5kj€L¨f„ÄLˆ'SU™¹Ô[€qD¸5úÜšBk±)»AÀˆæ^›ÖÚìO,ö]æ©ÔøƒæîîqT¨5u÷X)3aŽÃªj¥¶Wñ±‘‘KÀ÷ Æ}w¾ZÓ$¬ªjÖTãU‘KâX›ïÂŽã ¦Ò!âÏ̉(ö T5Rˆ0Gb3÷R[)5"#ÒR¼ªšªµ¦L4•ºË1DÌ”„#Ú"a0‚¿:@L^›:¸ªæ$ˆØTãi#_Æ6€‰@k-§$Ì,Üšªi¼o—€GdצïÒÔ°”ÆD9%DˆˆÜ€ˆÌ$‘< q*UÕ¦R_…þ8Ü<œ$%‰0³”¤6D&F„? ¬M[ÓÄ ˆ)‰»Ïg½0 QžÝÐw±2C—Q˜…h躜¤KI<ÊJ¬!–Ò†>› ¤$‘ɼ5߉31ÕZjKÂ̬Uã½Á (Ò®Cm [k­5™jÍ"Dˆ‰(ƒ;Œ¥ÄAŸJ#ÂØ ¢8@JDæ¥ÊÌUÍÁ™šª9¼JãT˜ À‘ÉÌÌH$NšÕ.§¬(j1æ®fìæ@;{&Ì`®L¼Ï¬ÀB¦&¾ÿ\Dèî9¥R+EòˆÕ"⦚“45mêà"Õ-2qõVj‹¿F„Û±ä$¦ÐÁ I„ÕT˜Kkˆ¨¶–“0ÑØâ]T8€š2ïžsw´Ì‰"ÑÁ§Z‡.75f¦Yß9€kSff"@p÷8W±ÀÌ’Döÿ Ö‘0"`œj¤D ÈHˆqX‰È˜ˆÀ]’̇a1ÌOfHr}½œ¶åüêºÔVj1s@0w"$"Gˆ*C„yµÔ_ }63f3Gô¦êæCŸ›"&DwŸJe&k¡ìîHyÅÌssW5xU=9E©™‹¯_ÁfbæÖ”"'2© ˆH`‚)lÇÖ’“ ‚»O¥‰PDƒ™¥Ä„ËHDCŸ£Xï‘S @WwaÞ(/µÅéË)‰Ø8ÕÚÔÙ‡.#¡¹g3ër*µSD¤0GV!Ô]yŠHMS­Q:!D@&Vm"œ„ͬ6M²O¼‘sÀÜ… "Æ“pìÇ8•@›qÚŽe;Mñµ™©{Îý°8èCkÔ* ç|t|xrã(ÊR<3Eä©™;L¥Å/­‰pmmšjüÚTj¤P7'Â(U}—›!šY”¡HcjÖå„€IvqïæI8’n¤\ÜGj€rU¥=æ.§Xw0s ¨MM5RK 3‹Ò©fµµx°ÚZŸS—¤KâæDÄLÛ± `àª=*ÚA“¡ïæ³ÞP˜"}R æ86ª†ˆæ»¬/̈ j‹Y¹J)­K v%ÌS&rssËYÞ"âlè‡.3SÝÕ,K5w `…X›2íZ–¾K¤j¯2ÿ­ÿáoQ< êmEHšy¬oÀÕ¦ÚÔ(ñdxµ-“­&mªC†¾„ífÚŽ%¥¼jÎy>ï»”u÷9ÇyÀZ[JâæÂÌÌÛ±pÀ÷ø‘ª 3 ¸EÞ@°ø ‡œ% G¢šbS-µ’ƒk€H"5v00Pì"ªÄôˆDŒFÌÁ›B ¤X÷èá *㫬ÐÀsJû‚4“p—DÍ 0c4YÌ„ÑÅ[´Œú€S©µ55‹såL˜›Z„Kt^€Øå$¼o9ÝÛîó¸$N"Q^¥Œ“(XÕ„)%ŽoÆv#aäÚ·N€hj²om¬™3º{¼,šÀ$R[k¥mZÝ4»\Nn$™Ix}9γ¹_O7s‡9£8:ÖV£‡É}Ô÷Ãz;F º5%¦R[‰èûoÆï³8IHˆ»öϽ¶ÆŒ"šî·º;ø8U"z…9Ô´K2Õæîc© Ì¥Öâž“”Úd£§ÈI"}D+g»Hõ¨nM-vºzKI’ÈXjbf¦©6ŠJ;–J„±÷„HD9ÉfœÌ‘ÐQÕ^±c)„4N%€ª6EáiwîQÍ¡5%4pG"05Üc;sG6Û wH"lùjOs3Ÿç¤fÛbaݽ5 žbœÊ8 â  `N äÈš¾}Sig›õùª½x±4­óÙüÖí®Þ'jµvC¶fW«õáú@„·Ó4ôªcABUuì» œVKkµDø»Z¢(4%‹”¦ˆØuIÕÀ½ª1#ávœ„9‰D/‡>"£Ô†€‘>#ålÇ2tÙÁ#Í@ŸÓf;å,K\[s€@!YTՉ̌™¸Ô¦}NÀŒ¯šü8‹îæ“ÖhbÍ\µE7‡È»#¨fÂp’‰ˆ(‰Ä¹7ÓèÉø‘£×ÖÌ<¢§5MIÜ U-‰’Zà0ŒfSMÍ¢#Í"S­įº9F"$so­DîŒHJÂàG‚™Ý @÷» ŒÄÜM=:õØ?Ä]ç½üæç×Ë?_.76£×íˆ.Ý$ ±µíÔ ¯·ãËË«ÅáAJyšj­ ™›kŸ³ƒw,¦i:¿ZæÄÁ="/Mq_)w¬Tm Ƀô3‡†Ƚ6 0wP73sަ,Ú«8Mµ5¡íXrNq‚‰¨5E´¨ÇQ„¹îWÐÌ…(6;¾ 8H¶¾K¥Ö,)*ˆ¹«*Š˜;˜‘ˆÂØsHœ–R!0S,q{•bKÄ€,æ;þ3>¬ªE©í»´£Rª‰p<@SDfêRrðY߸yÅÖ¦„Öšæ,—c— ž-€—™3ÃÐå±D B„]N2•º˜õãT"¯Ä™y<("~üèñÿèávŠæ™˜X7ÛUóÏfÝzµ¦Ú6ƒŒ£-–›ÃÅAɉX¸ÔÚå4,ºÍftp2†Yß÷¹KË庴f±Ù{dÐZK"„ä{¤=€ìYè»”¶Syuâ q3•>'Sca335%«µÑþµ¨M Q¬58¤ÄÁB3‘¹E4¸¹ð®v$áÈüñF »^)‰š2³5 ÞÙ™™Æ©DªppD`fhªVwŒel@ ñà¦Í<ˆw D!v€=Y¼ë•aÿæ,µi—$ÀÐk q† p"ššJ0oDØåÔT#»C—Sm*ÙÊyGü$áÖT"VÜA„#©ŒSa戒õvüèÑãåjlMç³9§äÎW×ãz]oܹ%-Õ²½q|°9»ääÎñÍ4={öÅXÚÍ›GGóy?m:t”R·ÓȲ88hS¹^¯‘ЪʼnQ¢ òžàÉIjÓqª9‰ª–,µE¢nMkS$DUúìî³YÄÕjÛœS:8˜-3s›¦‚Dî¾^®ÍòáBÒÖäó-â.v€Èp‘ó ±™e‘Rªš™±+|}&"--˜xsŸJí²D»¼¹ ‰;$j¥5³œRmÍÌÌRaªª]’$þôÉ/¿÷¦ð"R®›¯·cᨵ)Z8癌Ó:Ú3Ue”W­l.¥ª{œ¼ÿÖ£{!K‰zÕ Ý¾y,I˜¨“f‹ER3HL9÷àÄB}ߣÙÕr}½\Éaî9íÙ+:? «FSjfIDU›j¢à器ÖöJÇØŒSßef$ä ¶s’((;É <²#`ü(ÂnÎD)ÉÀ1ÊLµª™‰0ÍsÚ•¡=/»ƒçàbMÕFÏUC„q¯µåœ‚ÅÙ1 ‘´Òޱ֩TD Ä.§Í8™¹”R‡>#bm™Ý¼ïr°R?{øèÿû½Ÿ”Šý0ŒÕ¦qºuܽÿþƒÃ_‘ûwîþ?ÿòßþå_úºô}B$a~³"¨ZIØT›Ã8bjM=ÔIKi­µY?ØÝÅfã89øv;Um Æ„[ÒNÁÔ…×å4N…yGí»;ÒÁ|88\PJHä »œ)¡‚á´.Â< ;loŽD]ÑrrëFŸ»³ó«ßvŠàžS.‘KÜö¥BîŒcÇñ´¦!2T«¯äº¢–„qœJ0@M5‹äì;AÄµÏ ˜£AKÌÞw9š¯X“Ä£ÈTjŽ–>Ð}ó&ÌQ•Æ©Ì$ìsªQë…K­ó¡o´ÓXܽ™ŠPÙålèâãa EÄ9!c¬DmúðÉéùé¶¹HñÄ6ä$]jŽ'Üýõw¿µž úYÇ\jE¢qšúÜINVôä`ñÓO•†wnu1óTªõ9›ÚÔ ¸ÒÜŒcéº$]ïwŽ¶ã¶¶ºZoã¨! Œ¥Æ¢DyMÎÝ%ÉÁbÖ÷½š—fbFÂã‚€!&D5Ê ƒ¤H,¥øÁáÑÐ÷ËÍFk[n6}N›j‰Š£„¤nˆXJ뺮ÖÖ‚¨P³¨ã‘s’õvìr ÊqÇhŽìΦö'åî`œ…yª- —Ö’°›S,Z) g}Žã]jË)ÅDD®jÅn÷GJ5‡@c! ³ª1cÙ«ß;„\…šåXsB‰ÏIgH“D §ËüágÄØ1" ˜úÕjªŸ½¸Ü¶Ÿ|²~ñùG¹Ëk8Híh1ŸåT±9"ß<ú%~çñ“ç7çséêègWë›7æY`úc~ b}û.›ûf*Ä)×Z¢fEV¦. hÈîÌ|p´PÅq«†žsZn&Ä*„ó¡;™Å,Ì]—UwTzJ"€‘“ܾ}«ŽÓz»mM‘0ÈJ"D$woѸ`°mMÕ|×ˆh@÷©43s"XoFDÇaQ@Ä$i*5È=wÏ"; •§Z³gØeiÍDh'5U4"&u¯MÁ@ƒ“¥½œ²†àLÈD¥ÖWÜc´î ¸ê•FÛÔÃ}ºîܵ5þóoƺ—Öp,%,)?þÙãÇ?ÿ<#¤Ü9"˜ =  º®·åãŸ=Ñq³^­/Ï®·›eåí×_'ä¡ÏH8ô8BmÞu™ùÇ?øéãg—óþ`1ë¯Ëô“^ÔÖˆ©”jn}—‡¾kªµiÕ†HSmóùÐ]îR˜V|Vˆhš&GK›ÆºÙLëq2§Ú¼ÕJh€°˜Ï ,Š!º›0×Ú‚’ú.DttDâR[×å‡óZëTZä‡].̾ç¶d„o8¢Ã§ˆ¥6DPs& ©!rCPÌÑÏGÆKÙ‘„ÀY"‚…w¢#xq€°­ÔÛ”ClsE <ÚÇDiêM5% íЂbœ„!î-!ªDž{%lx hŸ’ð_ýk£” ÁUjûþ|Ô6Îd”š;2³*¶Íùu§ÑGm¥€•.Áƒ÷ïÝ»ÉÄ(²ÚLµÙäò»üԋݽu³ø­7î_ž^ü_÷ƒ?üpûÑ£å|çÇ/:;žs—[±N¤µVj­E}Ï!"‘œ_n†a˜Í‡ív$bKyzq®”·Í›ù¼ëZkˆÞš¢ÇQR',Ó8¹;ŒSBBÌIH÷û…™¡ë»¾“ëåú• Ñ)Ri-"&`U«µ ¨Z3#@f63mÊD}—Ì,è,pO"$p¯™-ODIà•¨îþêp@ NkRݵ?Pˆ0ËŽ‚jj;¡¢±ÙI!WcÚ)>QÐC/{eÒ0wþÍ¿ú×v]øÞ0€Ÿ<þâç=A2àTQ¨!xu-äµÏÔe·­y˘–qùâë_ÿz3Õþþ?ûøû?|ñù‹ëÿ÷·þÃOÿÝÃïüøñý[G‡G‹ûoÞâ…þðG®Ög7NÊÝ7øk_ûªäîñó³¾OÈÜ&Ÿ¦ n9¥fŠë©œž_98ŠlÖkÍŸ]l>{vqv¾GÛn+ Îg˜VÕ.wnª¦8MRDGDâ§ÝA—S ƓȀðøh~u½ B3=ÁÛ‚{(JÁ¦$;3EÔò”p*%ÜU‘ÿwæ€>'DTw7o¦±£îˆM­é.4Ó(ëÍHLP[SU(-¸Ü°r@]û}b2óðÍ}Öˆ¦ºwoíÐ^Èþ%Á²ò¾‹ Žžù…}Ü)$ü×ÿúßpŠœêÌþðÓë«+$÷.7vshLž%ç.9e`„Ü‹Wç7î¾>?:¸Ø´¿û¿|ç¿óÝzùE»<•¼9{yùÃÿð»¿xzçöpçÞ-Ï×W/^"ûÙvû䬞/§gÏž½8[.·ëÍý{ÇáÂ7‡‹ëíåØÊ¸Ý^öäùò“_<:ýâ¼” ޵֫ë­s.€ËQ%1³¨äVkÎR§M©–º®Ë91Mµºzx·’Pôá@L!­%ID|qyi{5.‰„á!Ò»ðÞwÒt·Ç{¡#:Ÿ,‚HãTÔÜ܃ú<äžZ52JìâTjN)~z™sk-Úª-ÀÐÞŸµ×/ñZR³=L‚W‚sj!“¹C¨€£‘Ø^áÖp¥½ÒžÂS¸ÓPAöªºcH„MõüòÊÁ›¢!±8»"³:‹ xóZL…݇ù»ßûS¿ú­O?9?{øð]¯ž]¸©A>˜ó=yþµ¯½~ç¨kÖÞx÷­?üÁãérÃCÿì>»8zÚž?ý¥_ºóú¯½ëÓ4ÕfZk£$¥ùh¶©z±‚‹³—V[ݎ˳k!³Ëó«D~róèô‹3é»ÙbXfYn´ËÔJ=>Xäî`*Óf¹L~ÜЋ®hs¥j Š˜$Ñ4pG$ÒVÍ#÷…Z›î•gC ½}çCˆSé=¶!§µ¶¡ëÜ}*%H9ð¦Ñ8ï¥ÚyÿvÞÂ@Í;‰Ñ|§cŽì»4• ¶¦©cÛÙ¦T„Í K ] ÷6l'ÂîV[S5"Jª ’¸ï÷òr ‘¤6uo¡Kè}yvUV#¸!±•¸£É !"šc8§…°Æ2Êw÷'/N7ëç›þúqw‚}ŸŸ_]ÌàˆW~õÙ'Ÿ~óWþìpÇÓ«¾gݪ«‰6Öìõõ¯œ¼ÿ/s×i3ÜŽã0ôçËñôzóÅé,//—×TÖ#˜;rk&,]'î;%%3öÂëÕX9—‹. ‰Ó0kn«Õ™H`½¹^­¯g³ƒÙl@õù¢Á…… Ì¢yôÒL}c­˜X÷²ö|èÇiÿEÈ}I€@ˆ3M‰ÁTJ)U£m!¦ÖÚÐç½°Œ¾³^³»WµpPˆ0oÇ^“ð2ŠP¼*‚l;•Ö4À‡O%¨úH Iø•¯ÏÌÜ£& FÞÝQÍ¢[Þ}@ssEfâßü+-T1Ü).@„>qP$¨µ$q30#4"70mJDnÎ}Ç áêùúþÑŸ_;o±MLÜ(ƒüÑ/VzÛ†îåé…ðôâéçŽÉØa¶È‡wNŒRÊ W« !ªáXíÅÕª†VËúªL›6VlN†„Ž®ž»d„)uˆ>¸ë™Z³M©óÌÍÔ¬âX¦:MµlÁ­Lãf³jê‹ù¬“\ZÍ)c©åââ2l\;¡ Ú®XÄðO…]Ç¢žÑÎño»Ì-«ï “‡R˜‘ˆ™„%€dH3)‰‰H¼0§ÐÿB"¶.ç°”¡ïü.fdXÌz@ NOÍ[k]NˆßÙS,8ôÝÎ%BˆAs¸*ïÈ_ækïˆæÚ4ÌôHhfGóa–ÚV›1“WEòÍzB4C»¾X/Ž2ç”:J©Um—O>;É›‹ãq}5Yë ¶:ÎòAÑææýÉâÞ~ÿ{Ÿüü“¯}ýî›ï½õÓïÿ‘ Ë@¤I8÷ãTW›ÉÁ-u¹ýâìú“Ÿ}šˆg3‘Œ’I'uB`Gt·í¶t`ƒô:m——>]=D°l¦q³É}î˜Rr‚õÑ|&"ŠªÍ8që]ŸÏ/×]oÝ:ÚŒ£»w9¿ÒA€xg(®µEÞŠ.#<áf;+q`Ãx•ª©yJÌ3ÝQ!ç„­i—SUEDU•½?1;CÐwoÄ„ª̇ ‰°—‡;:¦ŠŽ˜SŠçÉ¡f„/‡ÃË ò®õ 7`ðæá=eæbïLBÙÙNÕF«I¸ïòz;¢6¯NSEkÕj;{þ|kµ†ëëëéüDM‰Ã*Ž3a z7HŽèdCó+¥íJ]¸–œ0p1s&oT„E©MD´ißç:º—¥^q*ˆ(Á;q̨1¹yNrçøèâŹºŸ?ûì`ÞK‚{÷nUõ|p#¥Þ ãrUÇ:L×W‹Yž/˜Œ››7†ºrjrî§6^œ>“< 3&®fŸzêÅ»a»Y–íU鿬ÀV—ãµ5cÉÓTî޾ѧŒ„‹a˜̺Y®S‰.ÐT‰2«:ÄæÙ|ž»Äî`µÖååUÙLóƒù0ëêTêf"ÀR6Ý «©ºé0ðbvpëxqûö­ÔåÍf|òâù­zãÖÍ#SÝùÑZÈ¥èz½&æÈØÁd¨©›Zku7ëÕj½Þ¬×Ûq|ðà5ÄhOªìP!>ïÜ$Iº,¥´.'3¶-WSTI8pR x {ú+ȕЄÍ<üãTDxç'r÷RZŒü´ý¤RÌå$jž ¹ 1¥ÝTT°>!>½2“ÿ÷¿ùWCÜ 3@ðÖwnŸ´Ó‹—§Z¯YWÒÉíÝÁa†ÄÉQÖ×ÛÄ–‡ÜP»œÏ®W£5åæ,ÎfÞuØ #$fÝbJ—Ï®ž>z´YM>²0Ô6UhÂÜKô™ZʸގóÅ¢”ˆÕ¡Œ“– ƒY1CÉFì€ê†û\OŒ)1º9¸¹Y­uª¥ëè$BÌÀ„fS+ëÙ¬çw^ðÆåjSøÓÇž>ë{™ÏçDpqy©8X_€£¤„ˆëõª5†žIú®ëºþèèp¾XÜ¿wïÖíÛj&,'7o C·k`·Ü!>GÚw)ŒÐ}—‡.Åð@NÉ<œMM›ún¾Ä ¼ya§òÝÔÏÎúªÞ‘î-qx_rN"²wJ¸™ï†|'qÄHo”Å õw¶U5ƒ âX)ÆIBÝôÕ_úÓgW/.Ïæåjb†ùÉíÔÏ,õuk¥jÑ&s¶• ýâ†å° IDATèhý|©c#¨Ì)9å¼­u6Ÿ§î€Ñ«–Ì8­ÆÕú³7Þ¸×uÛk,…j2O^r›êåØOzÓú葽ýö[6¹ÖÒjÑÚò¬«­¡ˆ!ºƒª‚º:‚«êªXÁ¡7OàÔ's¬elÓ–„{L,Èä%;µÄi[Ú³Ó—?ÿøé“§O¯/λË4ç/½õFÉ‚½žJî7Æ‚–ËåÕÕuÎéððˆrÞÍHçœ#] ÓññáÐw±÷{#ÇQd¢q*aLa"Î;UÃH†€­!qÞÙütïnê»Tk+b\u?*ÍðÎh;༛͉¼¨;?EZ*¥Dq8géÕ!‰áøû²ÞND¾›°ëEÞ3‡_þÊW?ÿüiK”R/2§Ä ÐÔ«Òdt½Ír¼­ÓíÛs<š]Ÿ®¹ºW—ãZGåÜANiȺm¼ÕmÙ^ϼüé_ùSè£?xâ¨ÞZBd¬ã47ËÏ>{zóÖÍ.13EMABNÒ”£èøÎ®g¬JVt¹),d™§MI½A—¹S5ï»îpžfóáÁ›÷NnÞ{ñü|»}y8‡º¹˜ÖׇG7½–'ÏÎçyGB"àTw³Ó°¸¼¼¼¸¸X,1ÆFˆN¤ª}Çá'ºyó3C¿Wk9& †¾ƒ˜-%úã©Áà#öó i4á»®¤µ ©Ã€æáF!0hª}—#k!akÆÌµjT±Úvw ÄÿˆƒDØe FNuÇÛΆn§qîÍ”q¯€0‹ªª¢ÇÜ ‚™Õºãgú®ºT­Î’$wÙå9—u•®ž_-ŸÚߜ޽U*–±VÕÒÌ MËj ª¹ë¬*Qƺü•?ÿ­·Þ_$ Ëø7ÿÎüØ\S—¬Žˆ˜’­.Öîp|gÑZÝlk×w㪘1:8€5'@0rÐbê*ÖÚ¨>“aHu*åjä¦5ÃÔ \­g‹Ù4¥»'73Õ6ÎÝýû¯ýÞïÿh¼Z¶ ë·_<}ê_}óFèÀÐÌæÃTª6e¦çÏŸ_\\ }£šC³¡[­7Ð÷ý­›'Ñ Gþä³Ï6ëõT#žÜ¼5ŸÏNOOÏÎΓÐÁÁáýû÷º¾wÇív{zúòâ⢵vrãÆÝ{÷†a‚?Ú¥Ý À¸Ý¾xù²N[::>:::*Ó´Z^wýp°˜«Z—wã<1l?Žãv³^­Vã8"ÑÉ“›7o"!Ǹ맟~òá‡~öÙ“iš†.¿ûÞû¿þëß~ûí·kkL sw0$®µ™Y¡³f³ùÑÁ¢æÁªç¾ VõNÖÏ.W×GsJmóüÑ£´˜+{³†T‘APÆ6±C×RÚNµKI€n½vçݯÿÚl~ØùÞëoÒbnK2³iª=#IŠy€Í²m³Âu{^ZÙv=Zxc ÈÑÌšÖ¦šR/­Øå‹ õ0^®ŽïÏ€¨¶«Ív¹ZötÿÖÉ|~°\­·S¹<_ÿ臟þþ¿ýÉW¿ñKÖÚHÖ?ùÅûw¿¶»‚7Û)%î²ä”ž<~<•úúƒ°ë<‘ Kmçç„xóÖ­”R˜lÀ¡¶úòôåéË—çççÓ4~ãëß8=;_.¯÷¦rv~þî»ïª¶G/WëR¦ÍzýðÑã÷Þ[~éK_ú~cC`zöòå§ÕÖó3¿<=]­V}ß Ñb±ˆ¦f­ Xk——n¡FáõrùñGm¶ãíÛ·ÿÛÿæ¿v÷q»ýÇÿøýðû~é½÷Þ{ï}DüÅ/~þ÷þÞßÿÿàü“úO…ÁÂ'EFÒe‰k×”ª¯nIPµ¹L‰S7MêØ6›5” Ñ ’‹ÞÔ×£¶¤mÊ=÷sÞnªcÖjh“t$„eÞg.ÛÕ­7ÞËÃb3iÑrµ©Eaªå õck^Ë€”ˆ›kxöx{ùb<º7¶Ëõá1AŸÝ)œHN€î†}ZÙÔ©z—6ge«ã0gz¹† ¯N¯N^›w Y>;kc={çõ·HLµL$«éx˜M[ºÜ’×bæµÕ.§©ìü>¥4fºººþìégL\j].¯™˜º”DøÅ‹Ó[·nšíÆ¡“HSE¤/å+·nßþÞ÷¾·Y¯>}øð½÷Þý•o|]Dž?þÑÇþô©ª³ùí;wß{ïÀÜ>úèãO~ñ‹ç_|q÷Î]Dbæ¬föâùóŸÿâ)¥/½÷îÑñ13___?þ|Ýêáá¡0ç$­©˜éÕÕõv»Î)ß¿w¯6ÍYnß¾…¿õÛ¿=zÜl6ÿâÿþ­¾óÁoüÆoü¿ñŸ3 "Žã¸˜Ïÿ·ÿýÿH"µ6gw÷¾Ëµ6™J‹É ‹I^¡5ûåoþÅŸüøã8©j±i,ÓŸ>]Ÿ>=>\¼÷Η×çÏ`>ö7nwsF’í¹Ú¦f¨Jå¦iqSf©5ó6j'ÃÏž_Hʉ@¢@&¤±)VRoV9zC¶Vàüñ8ˆúÑ¡™[3Æ„în ¤jj ¦ŠS+µp¡V¬–‚ Û¥Õ•C¥ÏÏž¯ëá›ïÝÑu9~íäüåò?ýù¬“,Ý“§Ï~ÿw¿›R¾¾Ú.úlq²Ê]ßÏRL/×[¨qá³¹?~òÙÕÕ’?øàƒýèG]ßÏú®ïºÔuf~ró¤6íº×“ ¢¶îˆøÆo¼ýÖÛÃ0„‚ÿèÑ×/OS×}åÎÝÛ·oaz||,)¯7ÛÕfsrr"LLT›ž¾|ùÉÇÓ8¾ñÆë·ïÜqf:88X¯W/_žô};¯___Ÿ2óët]‡ÜTm6›¿ýÖ[nvt|ln—×ÿê_þÎ4Žþ?þóóù"šöÙlø³ßþö?ù'ÿ§»s̠Ljsf ƒ0ÃnXcÖ9õó¯¿÷£(BWç×ýìçÏÏ:h™*_õŒxtï5ìNä®ý‚J•2MÞ´()ḧÉࣟü r/ÂÇ'ÇSµ«åû ÚÈóa³{ß¶:ébvÈ]µ©€6´6#pE@hÕÝ8qGŽâ&îbŒNh«ÍV­’ù0Ÿo¯®F«Ãl¡S¹||zt︻}p~¾Tzt|rx°X\¼x®«óùÉͺ¾Î‡«çWÓêÌí¿Ú³‡lVj °ùèÉ“««ËÃÃÃo}ë[)w1Ï"ççŸ?ûœ%ÅÈtŽF5åj½nÚnÞ¼yçήïSÚq£Ó4mÖë¯|ù+÷ïÝa‘h²¼Õ°£ç ©–RÏÏ^>ýìÉ›o¼þÚýû¯Œ"]NLÜZu³0J Óv³yúäq©õí·ß†Á’Bs€ƒƒƒo}ë[ï½ÿ%Øn×/^¼èºî£~öÚk÷›ª›e‘?óÕ?ó?ýÏO5|ÿ»aéÚTÂM‰°sÑ#¤fVjø&oÜ8´6NFÛõšÆõÝa¾žÖ µ‘ ©æ¾¯MÑ 3[ÝÌg‡`¾ºDrHÀ 9wÏ.ξûï¨:~í¿›ß½s›™˜°T;]º~ø á/t]GDóÙüàððåééßù;çƒ>øsî׿ùÍoöÇ7ú¾{ýõ7ÔŒ h—QâH¨™©æ$Òå0É¥$ÐwYÕ0÷ÿÉúŸ}÷÷þí­Û7~ùù'Ÿ‰¹cï&¬nÊÕ¹Z›VW¹álq€H’Å­QÇ4H@ ÷ ê.§‹fð“}¬• c-¬^iÔ‘Ü€°ïSQ€Ñ×›Óë³^îL7AgÂwJa\øC„HÈ`¥¡¡3’ φ\»Œe´©ml ;^ 7ç¡þÉùò|­ Zqq·-¯×ÝÁ‚æôYµ¨N†f¥Ö Ø¦R-y·ÓÒàçt}uyëäd†.g@@¤ÖôàððÝ÷¿$’Âê·ë ‚7CÀÕòz§['7sÚ ‡gç«åu×å¾ïw×Ç©%áåõÕÅùÙo¼±XÌãº,"º¸¼üâù)3³yŸs¤7$\.——×µµùÐõ]®­­¦ññãGW——‡‡‹¦V›Æ59%O)w]®UoÞ<ù+¿ù›ÿðþ£>úÙËÓßûÞ÷†.ÿʯþê_úËùí·Þnfµ¢•RSv’hÀófœ6GcˆñHyöå/ÿ™Ëçä‹'ÙÝrm¸8:îoÞØl7×Óe¢&ÝŒâFÜeX-“Ö&]oÐÀ úÅLÚÄesåîœ`šŠdÁ8õ£i¦”q¬šÕnÜ"h€èÄ΄@à1;£äªªÕ¬$AnV¤ïº~‘f,æCžK)jêççç——¼1›Í¢’ô]zyvqyy±Ùng³aè®Mç}·Z^Ÿž¾¸{çÎÑÁÁþÒEwƒRÊõå…·šr­`»Ý~úéÃq»®+qýC4ðA–Ðî/€oûÛï¼óöÇ}üï|ç÷¾û{Ÿ=y|zvöýïÿüÛûý÷Þ |´(µiS‰[íBh‹(ìÅ嘜sw7½s÷Í»÷Þ¼ÿîêÅÓÕgT㎎ԕû–rN³ÅI«¥l ˜uó#çܦê‰H2©!š6³‘H@r—¤´±áؤRŒ¡ ÕÉ‘;ì9¥¶ÝÝD@@4µ"Œ"®jØ<§¬ã4–‚œ»^Y|6HŸ6Å­LÛ2ÖÒ$™/f—žY³õZ»D˜Ø«˜tÚLrŠyãi,)q¸O¦R?}øhªUÍßzóM7ߎÓ|èm¤”ö7ºj‹Û—Ô ÑÏÎί–«”{fQµæ» Ðóó—××˯|ežsgî‚X›®V˳³3éû>çÔšö9™ûv»½8?¿{÷nJéÕÐ|—S™ÆÏ?zrrc6›Åå{›ÍæÙ³ÏsîD¤K²³/ —Z‰Ðl7¢zaN³·ß~çÞ½{ßüæ7þ»¿ü—þÕ¿þ×ÿèýãÕrùoÿÍ¿ùÒûï'áÝe…! †-Pôu€à¼¿7%¢R3õýðàÝwž?úâöƒ×ììéj¾ètÚÌÝ7Z=¥®¡m¯¯!õZÍMœÜA¡”±:€"RÊæ“”íŠÐ3’­Æ2ÕҬݜh2÷N[iت±¤˜TÓàPÀ[m¥BU2NîˆÀK[Üœß~pëÝ_}kyv½^–Rªš’ÛÁq÷`œ­&]—&"¥–ìÁÁJqèvs7}—Ý!fÖ“ð'Ÿ|RKéûáÆ@¢©VSóph×öÛ¿ó;‹Åü×~õ׋yiE„KiϾxq½\Ý¿{pwñšªÓt~v¾Z­ç‹ƒÙ|†û‘ÃËË‹óó‹¾ïû~¨û«ÅRâÖÚ8Ž­Öx¯°8­×›§O?{öìó“dzٜpçfÚn¶Ó8š¶˜_|å”~òäéïüÎoÿ©¯|ù×ýÏ=ùì³?øƒïÿÆoü—óY? ÃáÁÁÝ»woœœ|ç;ßùÙýÑf½ŠËwTwS"L¡JoÇ)ŒLãT6ÛišêTÛXJ¤©¦;PÝšÞ¹w«?>\.s±¬áìlýòt©Þ!²¤áÜðp;5‚®6NªFR§@ȉY¤¶+Dsoý¸*6Ž €šPgœ–Ó´1Úš×mÈû`èH è„fÞ¶ëÉ«B³:¶0”sL:N[ðÒͺáàøøÁ=u-SA„a ãÛÃ{ßþê­Ç ­ÕÂ]¢p¶cÎb% Šb¤.U-µ=|øïß¿Ÿr6³ÒÚv,1.?Ne³?üÞ÷./.öÓ_=§/ž_^\Ìçs"Þ_z‹/^œ^-W,2ŸÏ’H´™ˆøâÅéÙùù0Ìöa\<Ùu3]^\¬VËÚÂôêŸþôÃ?Ün6á‚Ôuy>Ÿ½|ùòéçÏbj:NûõÕÕoýÖ¿øàƒnܸQjùÁ|ÿŸÿ³>ŽÛ0Þýz||¼ÝnSοö}+Ìxˆ°ÊTjS•Ý(}N!.°°Ç½\]JS©Qk›êTjyûí×¾úí_>;ÛnVÐÌæóþz½|yq~|ã¹CJ †ÜHqÚV¬›mᤘµV7uZº£8tÂ¥µ.÷ó~>*ŒãÈš7º.K”fZ1¯KÙl–iq#0@5F@7ÓZ n4àÌ’;FÂñòzÈ0?92µÕõÊÀŽïÇmfL½kÎO_ž3P×u9e´B©FUß]Gûëh±ÖöôéÓOÿ¦Þëɲë:ó\kmsÌ5é«2ËÀHeµ\ËÇ´b"ºßçaþé¿¡æe:b¢¥‘F¡ É5’H ‚ ,Qpå2+3oºëÎ9Û¬5ëܤð 2ëÞsö^æû~ß§wuÖ¹þè5gmÄETºì|1?<:\ßøuç¬n_-f>888;=Æ£á@A™ùðèèüìt8ÔU­ÌĘ3îîíÍfÓÅb>Q0ç¼»»{íÚõoß~ãõŸìlmñhøÁíÛ¯ÿä'“ɤ뺮ëN&“ÍÍ¢(¶·¶¿üüó?ÿùÏüÚ¾ü¥/=óÌ3„xx|üw÷wÿúƒüοûw·žx¢m»nß¾sçÓï~ç;ú§ZUeŒi29úë¿þo~ó7¾ù•¯E!cŒua¹LŒl¤ §!¥AQu,ä0¦X:/™»œb ÖUå",Gi­w¤0ˆA…í䔄-еà}1¬º‹¹ã´sëÆpmÄ™P˜}áÉå8_\,ÛE3¬!°ä$ŽD¢+‡hPó2Õe‘rnºžÅýñ'ŸþÕ_ýÕÑñ±ˆìïüßû·DDdrŽ9%ë<3ó|>ßÞÞ‰Y¤‹d¦ç'§'!ĵµ±±'“ÉÅtvmow0¨€C×MNNæ‹ÅÏö³ý~÷w÷·ë·2gï̵k×¾ú•¯<|xðÿô/ï¾÷ ïÝöÖæÎÎŽ³îðèè{ßûÇÉdòGü'7®_[[ý…N&“W^yå?ÿçÿmww×X~qá¬ùó?ÿ‹o~ó×us¾~íÚææÖûëÿëÕ×^ÛÜØ]ûðáÃf¹üÿé?ýñÿq]VîYñyÿËýÕ"‚êðÚ˜emX7]°Æ…K)¯`Ë=ðn:›¾ñÚ[·ßÿ¨rtåÆ#1°¯¬[„Úжt|ç˜2fÄÇ@mY/#.Ñ%¶°\£Xz3ËrÖ[!x_ç®uDÀ­S›Â¬•îæÞí‘8×F@$ˆœÏYL…¬Šº4ˆÓhì‘À:‡À¡cÎÙx2†¬³ |ò‹÷ß}ûãQU |mHÈf_ÅÚ:`GÎpÀÿ§*+ ³v:=xprD$ü%€U)7ÖônÓG}|c}MÉXDÂwïÞ‹1<öØcëkc 1—…;:>><<†;;WêºÒ± ÜðàääÄ€k{×¶w¶U9àœLNïÞ½óɧwº¶ÙØØ¸uëñ­ÍÍét:NEd4]¿~£(T8-ggg~øÑ»wfóEáìæÖÖµë7oÞ¸1Ô;rq~~÷þƒã££Éd’S´ÆŒ×Ö{ìÑÝݽ½½«ie[TŠlO¶úßÿÏ¿ËÌ–(ÄÔóÓŒ¡AU†•Å£\‰”óÊ”E$tÝt:ûà·h4 RHdñü|Êm€D‡g'¥ñäêÈyÆWó”šf»¥ät•ÒŸyâ©^,‡Ãn¹»sý‰'‹¢Bc1 ì=~ å½gžúbøæéÁÃ~ö*£l?z#æ¬_ŸÌÑKìPXbLççÍôaƒÙní\™ÍÎf¼Lh² 3  D"±–2§Øµ(É’Xg'§eÑ*ï+Kß5u¿Æ2.cÈUé) "±#°Ä‰³e‹™AX¿E"QÉ»^‘¯ßbL}Ö³=èFgå9sÓÖfÛ‰’,z‡‘‚ UšjSΔ0s? @kMQQžÆgÁÉœSf’Þ`q™±R$&ç¬Î{œ³è,€RǹNUž}Y¤_ºsD çeR%%Ę”¬¯ „ž½A„Y2"†Ð‡{èÑeÕr"bñÎeΊUURiˆé`ÿÜ–Þ’˜×v†ë›;Mâ8]5 (TX]uó©§·o<Ú´ „˜»•BX‰u…³J\Š1¿÷Þ!zoGÐ-Ãñ•ÐM¨ª %¤Ô x‹DÌÙÌ9µË– Ãh©íbA ƒ­ue5L)‚k]J0.,:Êì½Ã â<`H94!miÁ‚%uB\K±Â ã G#ú"bΠðKAèÝ Z:\Ö³:‹Y©h5ìÊ’^ }–ºÞÕ¯=&b/NUSF‰ÐŠÌ=8%yßÓr{zì%8ÉPˆ‰E˜Wàæ¬ÀãUI+§"ž.³ bL—0«Ž¦ Þ9–¬B ¥Ô_æ ©D2¥„+ݯFÍÍlº0Y¤rà·®®Û¢\´1ÄvÖF@SnsdDËÌ‘‘­¯Æ~9[dCVÆk¨é‚!Ê1¿öƒf/v«› ˜Îèšñ•=².FH—‹œµd ¡1`-IŒ 9u!I–Ú‘5)v)¹…ðââXR& Öµm iyz>(GF#û¢Œ™ 7hKìR»H†J^åv¨µîÒóETȨxàˤ2öÎéf$¯>"}•{x! ¨C‹Ð¦ eá$„¤Cp]¤”…×Fìb4†BJ+¬¨…LuÍ…× §ª ìžÿ–£Ššc²JŽÐq""ŠZ!¹”ìkÈ›"}ÉÑvÁ K’wVZÙAï IDAT~•V`­b“ÙZc„ú˜ ¬–…çÓù'w\e ©ªÝúÆš¯ê¶ËËå¢iUQÏfó³ÉE=UõpckœmºP6†uXv˜šžž{£Ê¢i¿ÿOo<8Õ¾†³ÉühöðêÖÕzk˜Ð$œR6äªÂC ÎYÉ"FXbÎÂóó¶[„jàbHÕ  Í25sªÇêºîüä ÂšËÂú*v©¨k`°¦Š1ˆH±0fD§³Ç”Ôº«¥†ò65ÆÈ­¢Ö2sUzyè­_Å쪡7¦ìÉÀ²i³mÛMÄcÎ)Cÿ³²ž7!4D$ WfÑ9:Fõ˜ÑçCÅ «À´œ3[Kúd¯Ì°ù²9Wr‡!´Ö@Ê"h¡çFáÚ㻇£ñ`cwç“îþìÍ· ï,¹­Ý½$x~úpwgís_xöðÎ]ÙØZK)+ø6„ðúOÞ›žÏ«ÒÐÅérÑE<UD )FëK‹$™$GÉ1A Â9…;>;¿¹aŠÞU7oÝ09×#§ø $Z´!;¯Ú$G¡ M“ZB(2V§j-Ðýâu„ª—‘w€« 6Eœu!¬–b¿Œ§Ò«V^åË]¢òÓA¬µ)ç.$Ó÷ ¤w„.±'óšžó.¢Ú3çLI}¯zècwé°å©\G/¥y•R¢-ñ%ûâÂY˺ýK‘Ö5½¡(ó%ð_/¸RúÂ9¢Âæ” HU;É’“DÌ]ˆyrhÝ›&žžÍÚ)•´èóÙ´Û®ë+m Ökë=Zw||Æ‚ÆV ½¢?‡`+‘»¦I6Áp4ì“LÈW¿ ¦6ÄÕ‡£D-æ x0DMÛ•…ו™%ÒºNÈœrÔ¹¥ˆBøz†€Ñܺœ9çÌ¢q#쬹Ì%Ó:´?ï‰Ú.hÖ`ˆÉ‚ZVy…Hé •ÎÚž¸D&ÆÈ,E_ÇdöcCB#=‡+ÆÔÅXx×CiE´`ÒD¹>b13;K"¨. Tå²UŸ;[kbLúÜNÎ/.Âpà×w¶º”Û•9c-vm3=k!w÷Âz]/›3;€ñZÕÈÜzß.›;ï¾Û,–‘›¿ý›¿¿vãéá¸üÜg¯_\Ì,1["kg‹˜ƒ³X9ウΨ€´Ιؗ™0§EÓ.Úû‡ó––Á8”ÐmãysÖu‹îâ§ËGŸ~¼ „yztD9[G,Öú™ B„,Î8ñÈÖ82zööjHt1eï0¥øÎ;ïè¬Xà¹gŸ!c çÔê§nï¶ÓÃÐàÜ>==S 4ܺuk0)‚A±ŽÆPÎVÿ½ªôgC†•‹¡ˆzºrf0 ËÂÅ”-czЀ>JÌÖë¯ ‘Y¸í *5D•Yꪸ„+ßJ˲Þ]fúHë]VjR^G—½“ŽêõÉÒG›Eº.N& ^+¶®nƒ1Íl‰œ$ÅnPWë››Óóå’yÞ-‡Þd1 صŒ¸d“s×àµAµ¾>úä“Ch?¾ý6b~ðñõë×wXˆÉŸ7ÓæÌ¨ëÊ0gC ¶ð€€^žtóYÃgÍ B&[fîRÎ sáÐ`†Ô…ÐtlÒùÅ™'д¹m­´>gI©Ë¡«À@arJˆh‰œ1…s°Jk;=;ý§?]{|<>¶Àæ3ŸÑ9fæì¬ébòÖ„”«Â“¡Û·?úûÿþÿÜ¿w·ªêº®ÃÑÚúÆÆæ¦ž:ku}¦×™2Üzöˆuéu€“V!ý\TI¼wZ–* RÏ@$ì(mfµM¹l§ 2Ô´ÁP_ÑeJñÊÑØ£VztùJÖ­*% èdæ(=½Tƒ rΚޒ ÃlÞ„&Vž¶wÖ«A hÒÑY;[ĦE#¹Y 7×FCqú1?™1>7óÄqkk{P óÉуÅÉt÷ÚãW·¯œ/BËŒÝrÚ͇¦°ˆ¦Y6Î Ûå´®x8ùÂ"l¬%²,¢øFÉ,Y‚`“Ä•CL È){Ϙ“Pá˲Bè[úg³eÓ´=ÒРf"Av$ TƒQ1àœP0ÄT>‹‚5dr–µÑðK_üÂ|6ÿéOÿ¶mœ/Þyû­Ç ÀiàÌe:ªwÎY3Í^yå•×~ôêbÙ|ík_ûâ—¾´¶¶¶½µ¹ê;PµÓ=ÚU³~’(ä¸/lUƒYŒ¿œLö³zÖ»œ3d(Äh1Îô´>Á¬·•£ygõÜòÎc–M'œÍ é¬eÎÚtY¾XÊÂÞÙSfî—„+–°H ±,üeÌ­¡¶ †IDöNHr=ùº¶ÖÐÆÆèl9' ƃ1!ÝxìÑãã{ŸXÛ«Ï/f§r:뜉;W¯n=vmcïÆSB¯þóRÈâýÇå¼Ý?8b¶P†ll[°B6‰ t]3(Ðû—¦,¼³&i|ʺËUâ§wîcŸ~êÉ7ßüùñäôèx2 ¬µ™¹‡f}ðñ¿þðÕíííÙ|1ŸËÎööæúš}ÿÉRxÇ«(RDÌ1ëlZEæQx'Âeás¾œŒ3!rãå—zgU ££ÛœrZlt9YK†È:§¦ êôä€ÄLL™“³Vs…t&¤«âÕº­úÄ ³â_t ƒ?D,œ#BgŒµ†‹6 ET#ÿ¸®å`º+»7ȹóÓófÙãºEc¨Î]h<ü´²nÝ`íìÑÝê­Ý+{óÉéÉé±këaÛͽ«Œw˜Á[J[RbI1›Ú‹`Ÿ*ÉqWlõ`PÔÅÍÏ^›<8šž¬]ßAã&'g‹Y×vÁ¢“$Gí!Ÿç<n»³+KÄ Y‰»ff Úñ𫏵Æpæ;œ½´üß¿ïÊÕ«_ùÊW?¸ýáb±øè£®]ÛSØ«5Æ[›)Ïçóï}ï{Eá?þøãÑh¸¹±NýDx>›³ˆ³æÚõëëëë9emsfóùÙÉIJñÊ•«ÃÑHô4m&v݇·oìïÏæ BŽF»»»×¯_‡}Pˆ·vÞ´çg§}üñÙÙ™£›7oܺuk8¨ô«¬Š>ùRÜëúÕºœ¹ïy‘q¥ñË̶iƒÎÖÔ*¢Â‹ª,”`¦·’’¨˜! [(\N.ªºõEQú¡s–P0v‘»`­98<ñηÊМ3‹¤¨Ä)lÃííÏ|õ«ËåòÍ×~²l_½VՃ㇩mëÍÍ$™ÀüHƒ¶Ù×@vdDP„0ÆUŒ @6¯ï6׉3/Î.NŽfI0‡´>\kó¼‹Ë¡÷^È2Á D9”a=î2 Z«7íôx×@ßýýýk×®ß|ä‘áp¸X,~ñ‹_üÚ×¾VW•Οºñ?øádrü¿ÿ?þñ›åòÑÇ«ª WyžóÙôÕWôᇷۦ-«òOþøOÆ£±1¦@´Ö<Üßå{ßãœ^~ùw>¿¹ýÏܽ{÷û?øÁý{÷­sÎÙ®mÏÏÏàóÏ<óÍoþÆÞÞ®žLǓɫ?úÑÛo½B ‡)ç“ÓSkí¯ýê¯~ëåoy_èQç¶:¾ë…˜¤áˆý¹ ˆí±‰3ëà˜Ô@ˆ z$­°¨E¬P×?ƒè,æ”ÉVÚ¦I¡µë²(+oY¿;=;ØÆm®í4ÍrÞµ6Æñ`tíæçöž|j8^kÚnÃÐ`P¾÷ÖÛÇ>· qæÚõ+““éél2,F•GKˆÌÆXCÌêÔ®FÎH³\€0‘+‹@šù2n.ÂÉÑ1‘ÍÞ@S¸Qh‰¥4ÑEf F#m6+¤ÚW(°5dMǬÚwôÂ¥/¦³gŸûÂæúúÍ7N&“»÷î]L§ëëc½bÊ}ôÑ믿þåç¿òø­Ç¿ýïÄœ÷övGÃ!T¥!1àc=zxøðg?}}sk»í:e‰$¸{ïîO~üãë7n¤œM[—Ef~ð`ÿ;ßþΛo¾ùùgŸýÊóÏׯ!„wßy÷•ï}o¹|ý¹/|iww·éÂd2yå•W~ôê«[[[/ýúK»»{ üÞûïÿÃ?üý»wÆkk/½ôbÎŒ€9'ZMáRΆT] ï2²Žþ€YÃa”Ža‹u™$P.?#Nl qê­iuUn®¯Ot[AH‘ó|¾4ˆèúµkqPœµ_ý•ç/ö<ö¥_K0ŸÍëá ,«eÛÍ–MálJyóêõÏ‚ ×gÓåfÓOå ,Îãºr ÆçÄä…u&.Òk5%/§šïLÖ9ã\œeBBk!ÏçRálÓÍCšjÿ2ØXDzBaÛ§Ùf*È–58ñÞ0æØ‡Ð‘¡¶‹º93DB`ÑäœtÊBd0…à¬ÉYtÎt9'í'"ÆPÕa Ίç,ÆX\ùyU΂€ÎúS¼s«˜rKÆØÞ²Ê:îcc¬ó…rn5¾‘¬óÐ'2@Î"¡k‹¢$"å±·9h‚{Ê ?"êºèœYåõá ÖPOkÒC¢mƒÎy´rQ*è]ÿ°²2sQ–# ‰³ÊQíºÄ)ÌgËzP…˜œó<~ëx0Ô–AДÃQf麠9ºE’˜ŠªmoålxËŽ9uÛ76‡óAs>e”™-‘°ä˜ÅV…ä¬Ríkˆ(#Bƒ ÒìŽvRKi2AYŠÂPUpÆ—¦.)'™Ï€\;›¹r2x±ArÎ9ë¼KÍÃ*/RI}ŒéÆõkƘ'Ÿzòí·ß^,÷îßßÚÚÖÈ¥‹éôÿûǼzåÊó_þ²ˆœLŽçÓéÞÞ5ë|L+°¾¾öë/½t2™¼ñÆ;;;kkcgMÓõi “““³³Ó'ŸüÌh¼bÔÒûï¿÷ýïÿÑG}ùw~çæšº¶¾qrr29>¾ze'¥ÿy¥ulmïìï|÷üï~÷»/½ô¢Æp_æ#v!j†§~õ¢é1ŠüpVDz&¦D:2Ñ \çÓ]8³J1RÎúXÅ”tàhêá HhšvÑ çÜt¡Q /þÌÚÆ¶îâSÿ0ôÀnpÖh©ˆBèª [,»ùÙ²™w’ÄH×V…#aä ,C^mHØ”uYjB0»¦SN‰ ’År\~öÙç†ëu„%c®‡kƸ€®cJH¡[¶]ÇŒH>¶­µ¥ ĘC”…Sî/iμš²‚3æèðÐZ»»»SzüñÇsˆøÞ»ï1k˜¿öÚk“Éñ‹/~c}}ãààa(«êÊÕ«k㑱F%·Hˆ>\,–;;Ûëkkaw1›Ÿžž.‹íí+›*bZ6̓Ü¿¯Ë¿¾5´¾¾þ /üæoþæp8Ê9ß¹sç;ßýnÛ.¿ñâ7žþÜ3cçý#=–Rº{÷îéé¹é™r}^Jœ3§Ì]ˆ!$}VÐvV;EëkCÐp-]©åʵ]ìwˆË¶ÓÀúÚÚl6†8,5¦~)4!„ºªrbDC†«ª ]`áAUè/Ñ«éo7Ïli«QÅœÛ&§ù1:ïýp„‚ÂR ¼_BL)¦ÜbåBÛáœ3p&aAAk‹q…³y¶¹0Î%(r–f›ºðÆô`ÿ íÂÕݽñÚ¸  šLŽONN¶¶¶Æã±NnŒ!CæÉ§žü‹?û³Ÿ¼þú;w÷þåŸÿ™ŸzúsßøÆ7~åW¾ZWõt:{pÿ~U×W¯^-JRM?vÎ?ñÄO<ñ™ÍÍõª®5üIAl™™™5B1§ÜèÆ[' ðº£µÖ:k‰­¨~à2pž‰ªa¡ƒ|ï­*òµ]¬Ë"¦¼³µspx@ÖZ`!ÒiX>=¬­­±êh)‡˜«²º˜ÎÕíQxo­‰Q2s]WeQ,9§˜›å‚ÐX3‰­7¶‚#݃£AM+AæœcDW0!8K@}ŽÄœšù2E><>êr(œq C朤C2€®ËÁ u±Ëœ]N À¡%c Sé-‘†L¤œ«U”ìáÑqˆqïÚ ~²òÈÍ›W®\Ýßßûw»¶ùýßÿƒG¹IÆ0ËÅtv1c¯^½DJI„ wÖš£ããÓÖÖVYVÆš® ÙCtxt<›Í>ûÙÏnnn\J¥”ÍSOîÖOÜðàÃÛ·?øàöí?|ï½÷RJ»»WŸxâ³!tççç[ÛÛ/½øâ7ã7ôrW-Kbé>÷™ùÒºœ뉢‡Zõv…}Äd å,1å¦ dúmr®ËÂY£l~TÇ}le¼‹I‰Å!¥œsQÔ¨QHJü·hˆ5]úèx¢9ò…w…óuU‘u'çŽ8Õ0¢£žœ²/<§¼hFÔeiEC®²¦´€„H½@ŠÂVÃÚzßu-QJ9tÄÈ)“1)Î|<™],šiîB9A“š&GÉ,‹é"´óéE»œ¡7¬©öTQ’=ÉAô“Y6]ˆé`ÿç¬-OL™EŠ¢xüñÇñþ½{Ï<óì³Ï~ÞX«zƒ££cE;ï\¹Z•¥íãL å¼lº“Ó³ù|¶¶¶^%3…ÏÌÇ“ÉþþAÛ¶Û[[››RjÚvÿøèˆ™­uOܺõòË/ÿå_þå /¼PVÕl6;::V9Y犢PF‹JUBL‹åòíwß{óçoµmcêMç‰CŒ]Œ+g?iN¦>—ÂÒ†¨sdÕ÷;åÌZc4ÞYÓvQ× Îí  QÛE%jE¦Bߪ,Ë¢lºVPXÑñ’³\4Ͳ ÀY`PVí\Þÿô™'‡O<~]@º—m(¼+KOf|÷νL`,BIYrZ_Ûô•Go¬·Þ 52gCä1–²¤sF2ÆèctLaMQû“I›CW£ !Ì{ô ÆJ¢Úff­™rL© ¤ò±ró r9çÒ;¶äRÊãar¾ÿÁ`0ÆÚÖ9kRÎ_xîÙƒýeU¿ôë/!ÙÙ¢qƤœON&mÛ †Ãª*cJmˆ…ë!_ËÅb¹Xxïìª Š)½ùæ›|ð~Îicsc}mÌ"‹ù4¦üÏÿòÏu=üÖËßò^x´¶vãæMï\UÕë…weYmnn¶M3›Ï™%ö;?fæƒýý¿ÿûÿ¾¹µõøã·¬³¨¥kL¹p}b¸2,{Û}/íFM–ÄœÙ;ksïzêKˆQû ëP{ˆè²PQ6HصÿÂÚúöòá}UÙ 1¢ÉóÙr¼6¼X6ëãáé¼=8> éþSïìîÞŒUÎ˲ Œ)03¢Pä\–Õp\ÛÒo Áx\­¯¯žMÏÏÈ•Dʶ@1€cÊΊxïI„­¯&‡÷:±P ã1J€Ž9ÂÍzì|= K(‹¦Á‘)…rÛ¡E"bɺ€UgéÝbÙ4ÍòÞ½»;;;óż a8¨zþñ[OüþþÑpP_½r‘rÎMÓ4mwpð°mÛá`SšÏçÖúªð°ª­óeUOîÝ»ï½Ï)=ØðÆoœžœ®¯oXkOÎÎÇ£áÁÁC|ëço G£/}é‹»{{'?9ž|úɧηnݺõøã)óööÖÓO?ýêøáG}ùË_ÞØØl»(œ?½s÷ÕWx1½øÆ‹/’Q”æKá3³äKK¢¬D )g:¸ï÷ÏàÀüOÿóTë[ˆ*ÖͺRXâØW>ÊÔ›OcÔaƒ !ÄÕn£”;â)±±E:8¾xxtNÎ †6vñühf- Fµ1äfTà§ŸBΜ“1…·åúÎF9*Œ1ºÍ\_‡ƒª./¦Î;ç,s¸Ê«ÑÁXke拳Å'w˜ª9X„Ê#?(}]¸rkkwskÏWkÖÕu9^„8‘€·…C+IfóEä _ù¢ŠÍT5|rvöýùþ»ï¾ëœ_.›®ë®\¹¢âA@Z___[_S‘sÓ¶?þñküñ‡~¨«»œòl>ßÚÜÒVH!ãóÅâáÃÃ÷ïO§Óƒý}òÉÁÁA a:›…Љ@Ji¼6žÍæ,ü‹_|p÷îÝél¶\.>üäÓ;?ûÙŸÞ¹ûØc½ôâ×w÷ö±(ʪ,NNϦ³Ùb±88xxûÃÛo½ýÎùùù¯ýÚ¯=ÿüóZ6¨MZ; !$ÕÜ÷bì̚ѮÏLˆQ%`þèÏÿƒš•-¦.&Ýq_fšê¯®Ìÿ˜³"0TKŒd›åPuâ‚,œƒ)¦3N1s´ÆºÂ^\t§ûçÖÉx}¨yá˶;;:§À†¬qnmk­Dä,••÷…c]Y•ç3Ñ4^H„À}S@ ,hȤ ï½y{ºì²`ŒK¢Œ%ùÁpXºÒk«"tËÅô"åÜHÝÒæhÑäÔGâ<}ùWµ7æÌ‹ÅìÝwÞ¹ruw4wm;®\½Jƨ"D³qTßuÝûï¿qqQÕÕîÕÝí«êá¸~í:’Qv#3Çcg s^ÌuU}íWåÚõëÎûÍ­-B¬ªòÆõ[[›U=¨«Ò:2™Ü¿ÿþý÷ïÝM™?÷¹§_zñŽk׉úW´ ö®]K)œœÞ¿÷øøøôôlc}ýë/¼ðìsÏé€U±úLw]Du®7mP…”ÚÃTä Þ92cFü/ÿõozË®txª±ßz!@Ó¥ŒfÎ+ùAï&jÚåéé1!± °¬LÚÈFÖÄQÚŒu¦mãül—‹¯}ýsEYC“³ù½ïr@DïÀ«;ªª crL)ç|Q׳³©HªJ« ~Ö@QöÚaáœÉàééüÍ7Þê:&kR˜²àدÜÀ!šÂÇ.¬ï¬OÏO–MÃgmNE×å £”®`‘ÿð¿þ/ÊÄÓ$W­»—MWN„”2³8k1ç¬E’бÕ7¥²{õÔhvŠ~*ý±Öˆ\sNIDAT(œb1_Te±½³]…Êc™Å’!} ûôí”&'§ÓœSY–[[›ÎZ®ˆ!£ùæD”R:>žt]‹DãѨ(«ÞèjŒVÍ]ŠÂë–x¾l ‘s.ˆZp«¥Ïj¾nÊlqeÏ"Æ%íD¡ã,©o©i%öϹ·³v1ªa˜¬q®0Æ2'£9jêûL!.–­Ñˆ$BtÀFC²pqŒ¯ýëOžùâ3£µõ,XŒ«ØeNBÎ’³DhÉÌ]9¦ÚÃÓ㢠ÇpʉIb’²,Ô$"1DWú‹ÙL ±dŽ Éz ¦›‹€LóYBN6/f'À(rUúA1¢d‚°DáÄ=Mh%87Mˆ„¨úÖ¾B$êmÎÚ6""•62†Ôk®ëK*¨sG5lÎfØÜÜÚÞÞ. /,ˆýòE•ýÒ¯?1¦¬ýíúúúúú:®|©1e½TîN@ª_4Ælnm)`A¯‚¶ UéµÄÔøì”²µ”’è>K{±> t€D[åÉB`!DcÒŸ­ÔåþöÒÀ–K&"j¡¨þ¨í:³24ÔƒñtzH 9¶Ñ–ΘLd¼‘®ËHà “¹ 61¢é†¯¾öö#?VÖE¬'ã-jý‘bŠ]6Èh¨Ö¥·d@XÈ dCÂ)„èœ3„MD$%9;9të£åbÈ‹’SŽ 3“»˜Ê„Œ€ŽÁec²0g±D`Ù:¯‰ŽÊñîeñΈ€wFŸ]Ë¥˜’†®VʨcM}ÂxµM$5zeI":¯ÓÿIUx5¢ö6ï2ë–±3+oѲ +Ù!6‰{á~?¤—Ì9ëy Ž5†9§,)e¥$ö:WÌv:S­úr¬¥¦ ˆ¨§)'nZý²Æ§ö^NBìTª`Lï”×+F‡BÖöttÚ8gõ×e–²¨4È`0g1ˆDÆe–PBk"“ˆÕæh“¹]6HÆ v–)D!cŠŠD j‹’P4G bH„`™0Y;=›µíÂ[BæÊùœŠæ˜fób›ÚÒ•¥÷3 ‰LYº˜Û†¬I) À ‡Ð…¨ÙNΚØeY4­!Š‘tÖ®lÝ•˜Ëœ/Ä_ŠÄˆbÊ} 6D¨†ãè"6¯j Ò¾ðÎYÛt!§l¬éaJp@ÐXí^1e57!°HY8ý¾ ±?ábJ„˜R¯»Ö]Ï%éɬ eÐ.šVm«ô:«fW•àö×¢ª5•ª«µ^r*cQÊhQÛ"ôbí•«‡‡ØF•,ÀXṯa`dHÌ‚â@Œ† ˆ!B  f.«ÒX—f³Ð¶¡MÞÙªôóóÖš0 ")òòbY–êA"‹ñž{ˆEiÈÙ˜’MERåÊzwÜå‹.tˆuqXÛó¶ÍÒÅ6D`— oܼi1ñp´©AŸÌ¹‹R8«n½wTÑîŒÑ‹Xå´ ~þª@¯•C‚Œ~†ºÙwNX˜{·¦>1}æ0BˆI˦3Ö0³±&ösNV»½s]êã´ÖpÎý3´h‚³6¥¬[ß”²²Ú˜¼³ÞÚ.¦Kްæí˜•· DT&BJ†«Â…¼w!&{ÉÑE ¶Ä†h¶hœ³ºg×Á‹æ"BU–œYí}1f]´UÃáh6½Ðç—³ft‰1"VRÊ) gĶÍÃÊ‚0 Õp?|À¦k—gç󋆈Œ¯)6áüx¾yeÀ™5…8.Ú´hqXé=˜ÔJ•Zgùw~ÿ3s×vo¿ñ³¸l‡Æ…®cààrµ~¥Œa1m–MÄ=Ò<¥–ɘl|LÑxc%ÌB†Jã5dXDªÂ÷L€˜­1‰ÙªØ=+Ÿ¢usÖÞe„˜Ò *Û4mXëÝ\öù É!œ…ûÿ߄ޯæV}´aRf†ÊÝsT;qŸo(ÆÔ7D]¿Ña&¹¬cÔ1t™éÀÌ—MéþJž­ºPÕb¬K=´.›,ô»lÒ§µpîÒõj ¢úZ™YtÃêÊoº [Çë‹ÅLˆ(Gd 0†Ä gæ²PyP…'"@2©²bœÊ#rŒq¹ìºe[y²Î–uÁ‰Ïg†ÐW..ƒhÖJãu¤¹¶™%¶±Õ'v÷nee¬a¼¾q¼¸ à«ÁŒ[,g]+ÃÑaÙ„&u¡r¸Xߤ䲪$SYxÝŠ¥œËÂi÷««ÔK ’Úzûc À/™¼ˆZØ©·¡áŽˆBˆ–Hm|*·ÐƒxgRêãÖ/óìÕÃ,BÀ,šÏ¤ Tßs™>E 5$÷Úgg{p—Æ=hʶ>"b…”œ5:†¯J¯Iß,l ‰®Ts€õ±œ³t1UØ3_&ÀëöYã‚.34µ[Ö¥U°ŠðT•3Œ.fS"#,‚†„ D, ƒ- £0»Ò!èÚ˜¡*§‚œ÷)p3íe}³.Kg Î&³”"’5„9Kkk³»ŸÜ¼ùˆ s¼wŸÿâs'{Û½ûèà lÅ`Oæ“QÓŒ\^Ôçl´lÈ•nh„šAQ{_Z)ŒA"õÅÁå~ ÊÂ3³¡>š2k~¨³]ŒÞÚ¬ƒ&Rê‹Þ/csÒg‹1¡!2¥Ïš ˆØ´zMvÎÂê[½¢ •@ˆ)%îûXR\«Q)ˆ1†…Õù·²*ö­wÞ¨X‰™ ¡®ÖËÒ#€èÞ1sî//`GD«óOÇ*mm\ý}ôÔâžt™nbÊYD)SØËz¸JMç–Þµ] Æ‹å4"aê"'#œ¤¨½ó8бDÎ’ –´ž1§›€D¾.Sçç]Œ²¾3 K`6ÞÌ›¥?öyÙDD®=u‹Ò…ÌP8ë½BbL£Ñ`8|âl:ûèÎÝÉù½á`C¦íYaÊí+Öñiœ.šŒ€‘f^/7,ú$›©F­yk/ ‹5©yÈš¯¢LkHu€ˆ¨ž\M£ÖÏ7åÜu‘\+Î÷žu=@X¤KYß{°Öt!Öe¡B]ý*t½Ú´VR&%Z`fFÂ’îù5ÚŸ:k4ŠT§b—ʵ)ªNJùmè%IJp)ç.FïmßOÅ”zà QŒÙ[›.ãD4I^ ÚŒ)ˆKeóe£GŽ^…³!%fgæÁ`m6;#äL-‹GB µÊ ó•3žûHE$0Æç0_䆛Cn¬íT~PĘºys~q¶h.0„ʘñ¸Ž›;»M³l›–CrÆbêÅ‹¨âЫ;W¯_½69=&K&×"áfQû*¯Ù¦óËÆUËmD ©Õ–xí,´ÖëÁ2ÖjI«_@%BTe¡õB Ê@ˆ½—8…˜œ3†H 臤‡7³¤œ¤* í“u*1bˆ‘¬5)³°$fBŒ9_/×ûe¡œ3h›Nßü¤ ¿Ê„Y4TY<„£n7m“]Ý­9sÄÞ¯•$l~ïÿ\—ËêƒEеao«ÏœW+Ĭ|D¤~üzùN¬Hßý)WeŒmŒ DÈ yA#DÖë ²0öƒÅcÓvÓ¹uÆW–3“_Øz<È™—ç‹ùôb¹˜QŽ’£Íx÷Êps½,+ChÏ''»7+«J@óQYûµ²ª®^ßÔxPÛÊ{æPlY£1–2ФØÎSj%#1¤—~ã½24·IýÀ¥¥PÎý›2'fom¯¡G$Bc(Æœ™½³™sá5Ô† TíoÑ9Ë"+NÆ”ú‘¨€êØõ-Z!×Dg]úM_òmT.É"΢^0¤š~{ÉùɺÙá˺xÅ0¾«”N]«0›zg¼Ä˜¬b[ÑYÒl­ŸAz7rJÑZ 1‹HÓ= ræ˜sUøÔ唳·Ö8«v)f®«ÑbÑ‹9þÿM»]IÆëÑÝçÞ;3kyw±ÅJ@¶" c!¤%!"áïu€éfd‹,²ñÊöxæžsºëAðõ½Ú‰&˜¹3:§U_Uý>#bJ&©”¤¬’D®F‰úzÞÆØ˜M´ÜJç´ÖŠˆR {Äfë;ëÍÝÓ±žO/¿ÐÓ)“#½;‘ÊãºnN—çЬ9àX777¿ýú÷Ìl}ÿË«WÃû~N[müìîp83ðBô°žµ:ÚPT¦Ÿ é ºI(ÓGz‘„yëýòä ¿â€4íæPè!gkȓ鷄#J]y01f¢n†7½Ôbhú Ḃ*™¥Å…O{x\q°e¦ÇLó^¹4ÍÚ…ˆÙÄDÓ¡~ÛÇT3 ²2¤a¨äMJ-—ú¡šÑ,<^ý7«*þ³viž–ª§ÓÍ¡½ëÖKk‘¡rÛHÖ,MKåý|~|¿F7.!dZ §1k©Â”fÃ×órªÙâîöpw»,OŸ¼ýÏcû»ÿ½9Þöam9¾}óæÙ“Ûò\ŸÝ$Zv'^÷~s<8¶ŽT-Ÿäè¡5ýQ¤—ª´˜ÅQœÖñäÁó¶ã†Eù+áâÌI03kPÊåÊÓ¢Ì)™ªíJЄ-©rÎwX÷^¦|5¿®ÈÉYp¨E—Z#G5˜ø¬{?Ì?Ç[K­°BÙöí°´mïD26DvÜ ‘áΤ"!¤"}˜‡Àg”¹ -°O4y WP!É ÝÎXgPc±¬à/VTŒH罋CÏÐçL2MÊL¼óííÝûûwL©œ), †¢ÄÊ1zïd«âxH& ©GPöR“#–ÃBç•­´òì³O)õÍÛïÚñøü{Êñ°<ûñK¼ᘠ¸3?f}x)Ëþá…Ø³”Û^{ßzmÇCeóá¬ÇF4sßz{c/­”$‚Nøm {´d(Pº/3åvݲ}˜€O‘„d 4`]áŽÂÜjÁ*Ç|ø^z:Û¢'åºíèWÄúSYU[)ëÞ¯É 0ÁÓe ìv1î]×¾´Ò‡·ª$BÈÛõúóUÆbo­ }ëÚ (Θ : /Ñ:oâÌ»Oî~ùÕo„øßß~甡§B<¸ Ùèž–ªº Ä;.mLzê@QzDQ=¶tÏ)&™ãÊí‡IÄŒ1 ÎQkQ¢9¯›R*xà89Š*äSçmÿ!›U m{¦¤\æ÷ŒÒêDÛÞ{µê^-¢IäîsÊ"`0s¯ª}úNp«Š EªHJ³hµ–ZUdfî‘!$@ñEýEñiÑ®*e²b:še.K²63=üþñ¼~ÜjÑd"­ÂÊÃÝ¢›mƨ¬šÁ6\9kmLžžÞ“‚²;1¥sºíï•$%ûG b]bï^òó/~1YBD˜Êœ(Ç+ñ=©T½´IÈp[§_}ý‡Ÿùúïß|óæõ{ëÙÅšÔš:вÑ;&å°æ.\W‰)blÐô9¤[<ºD!|A0²Ðñ° }7ËTº3EeXÈ8caÀ<}’ÑРèàC~øw3³ÛT„1å¹n]^®4Ìǰe©R+Æ…ˆôBÂE'›gŠ(¢xpôa;Ó‡1SÁ.™âŒj&A“„¢¢*>æ*²v J­!LÑ´`faé6îï¿ýž³,K!¦„“1ÂFšq††GŽ.éR¸’J {ø8ïæçZôx÷íþÑ÷})‹eZz[N4⼯õ¶ ‹èìÛCÖuœ‰1'ÍxâZã!aùüåËÏ^¼èëöÏ|ûê¯ ªºm(ìBýê ÎO §3'ˆîõLF J&1jÌÄžâŒiÝ-FÛîB„ \&µZÂIÍ(îžÂBPT…I®ÉmDâ½ X8StšIµ»_Ý…ö>¬ô ˜¸DЭ­pM#îá¥Vb²ˆü¾—É7ßÎöIEND®B`‚muse-el-3.20+dfsg/examples/johnw/0000755000175000017500000000000011331353120016173 5ustar taffittaffitmuse-el-3.20+dfsg/examples/johnw/publish-johnw0000755000175000017500000000036211331353120020713 0ustar taffittaffit#!/bin/bash # # Example publishing script for johnw's configuration style=$(echo $1 | sed 's/^--//') shift emacs -q -batch -L $(dirname $0) \ -l muse-build.el -l muse-johnw.el \ -f muse-batch-publish-files $style --output-dir=. "$@" muse-el-3.20+dfsg/examples/johnw/muse-init.el0000644000175000017500000003575711331353120020450 0ustar taffittaffit(require 'muse) (require 'muse-mode) (require 'muse-colors) (require 'muse-project) (require 'muse-book) (require 'muse-html) (require 'muse-latex) (require 'muse-texinfo) (require 'muse-journal) (require 'muse-poem) (require 'muse-message) (require 'muse-http) ;;(require 'muse-arabic) ;;(require 'muse-cite) (eval-after-load "whitespace" '(add-to-list 'whitespace-modes 'muse-mode)) (defun muse-maybe-convert-poem () (if (string-match "/poems/" muse-publishing-current-file) (muse-poem-prepare-buffer))) (defun muse-insert-reset-chapter () (insert "\n\\setcounter{chapter}{1}\n")) (defun muse-insert-all-poems-header () (insert "\n\\renewcommand{\\poemtoc}{chapter} \\settocdepth{chapter}\n")) ;; I use my own sectioning commands in conjunction with memoir.cls (setcdr (assq 'chapter muse-latex-markup-strings) "\\mychapter{") (setcdr (assq 'section muse-latex-markup-strings) "\\mysection{") (setcdr (assq 'subsection muse-latex-markup-strings) "\\mysubsection{") (setcdr (assq 'subsubsection muse-latex-markup-strings) "\\mysubsubsection{") ;; Relocate the images directory ;(setcdr (assq 'image-with-desc muse-latex-markup-strings) ; "\\includegraphics[width=\\textwidth]{../%s}") (setcdr (assq 'image-with-desc muse-latex-markup-strings) "\\includegraphics[scale=0.6]{../%s}") (setcdr (assq 'image-link muse-latex-markup-strings) "\\includegraphics[scale=0.6]{../%s}") (setcdr (assq 'url-with-image muse-latex-markup-strings) "%% %s\n\\includegraphics[scale=0.6]{../%s}") (muse-derive-style "site-html" "html" :maintainer "jwiegley@hotmail.com" :before 'muse-maybe-convert-poem :after 'muse-my-html-finalize-buffer :final 'muse-site-html-set-mode :header "~/Documents/site/header.html" :footer "~/Documents/site/footer.html") (muse-derive-style "site-journal-html" "journal-html" :maintainer "jwiegley@hotmail.com" :before 'muse-my-journal-find-entries :after 'muse-my-journal-insert-contents :final 'muse-site-html-set-mode :header "~/Documents/site/header.html" :footer "~/Documents/site/footer.html") (muse-derive-style "newartisans-html" "html" :maintainer "johnw@newartisans.com" :header "~/Sites/newartisans/header.html" :footer "~/Sites/newartisans/footer.html") (muse-derive-style "newartisans-journal-html" "journal-html" :maintainer "johnw@newartisans.com" :header "~/Sites/newartisans/header.html" :footer "~/Sites/newartisans/footer.html") (custom-set-variables '(muse-project-alist (quote (("website" ; my various writings (:book-part "Essays" :book-funcall muse-insert-reset-chapter "~/Documents/essays" :book-part "Stories" :book-funcall muse-insert-reset-chapter "~/Documents/stories" :book-part "Journal" :book-style "journal-book-pdf" :book-funcall muse-insert-reset-chapter "~/Documents/journal/early" "~/Documents/journal/summer2003" "~/Documents/journal/j2003" "~/Documents/journal/j2004" "~/Documents/journal/j2005" "~/Documents/journal/journal" "~/Documents/journal/pending" :book-part "Poems" :book-style "chapbook-pdf" :book-funcall muse-insert-all-poems-header :book-funcall muse-insert-reset-chapter :nochapters t ; do automatically add chapters :book-chapter "Mystical" "~/Documents/poems/mystical" :book-chapter "Romance" "~/Documents/poems/romantic" :book-chapter "Nature" "~/Documents/poems/natural" :book-chapter "Melancholoy" "~/Documents/poems/melancholy" :book-chapter "Commentary" "~/Documents/poems/commentary" :book-end t "~/Documents/contents" "~/Documents/notes" :default "journal") (:base "site-html" :path "~/Sites/johnw" :include "/contents/recent") (:base "pdf" :path "~/Sites/johnw/pdf" :include "/\\(essays\\|stories\\)/") (:base "poem-pdf" :path "~/Sites/johnw/pdf" :include "/poems/") (:base "site-html" :path "~/Sites/johnw" :exclude "/journal/") (:base "journal-pdf" :path "~/Sites/johnw/pdf" :include "/journal/") (:base "site-journal-html" :path "~/Sites/johnw" :include "/journal/") (:base "journal-rdf" :path "~/Sites/johnw" :include "/journal/journal" :base-url "http://johnwiegley.com/") (:base "journal-rss" :path "~/Sites/johnw" :include "/journal/journal" :base-url "http://johnwiegley.com/") (:base "journal-rss" :path "~/Sites/johnw" :include "/journal/pending" :base-url "http://johnwiegley.com/")) ("thoughts" ; collected writings (:book-end t "~/Documents/thoughts/thoughts" :default "thoughts") (:base "journal-pdf" :path "~/Sites/johnw/pdf") (:base "site-journal-html" :path "~/Sites/johnw")) ("newartisans" ; my company ("~/Documents/newartisans" :default "index") (:base "newartisans-html" :path "~/Sites/newartisans" :exclude "/news") (:base "newartisans-journal-html" :path "~/Sites/newartisans" :include "/news")) ("planner" ; my company ("~/Private/plan" :default "TaskPool" :major-mode planner-mode))))) '(muse-mode-highlight-p t nil (muse-colors)) '(muse-mode-auto-p t nil (muse-project)) '(muse-latex-header "~/Documents/site/header.tex") '(muse-latex-footer "~/Documents/site/footer.tex") '(muse-book-latex-header "~/Documents/site/book-header.tex") '(muse-poem-latex-header "~/Documents/site/poem-header.tex") '(muse-poem-latex-footer "~/Documents/site/poem-footer.tex") '(muse-chapbook-latex-header "~/Documents/site/chapbook-header.tex") ;;'(muse-before-publish-hook (quote (muse-cite-munge-footnotes))) '(muse-mode-hook (quote (list footnote-mode turn-on-auto-fill flyspell-mode)))) (defun muse-publish-my-books (&optional force) (interactive "P") (muse-book-publish-project '("essays" ("~/Documents/essays")) "essays" "Collected Essays" "book-pdf" "~/Sites/johnw/pdf" force) (muse-book-publish-project '("stories" ("~/Documents/stories")) "stories" "Collected Stories" "book-pdf" "~/Sites/johnw/pdf" force) (muse-book-publish-project '("myjournal" ("~/Documents/journal/early" "~/Documents/journal/summer2003" "~/Documents/journal/j2003" "~/Documents/journal/j2004" "~/Documents/journal/j2005" "~/Documents/journal/journal" :book-end t "~/Documents/poems/mystical" "~/Documents/poems/romantic" "~/Documents/poems/natural" "~/Documents/poems/melancholy" "~/Documents/poems/commentary")) "myjournal" "Thought Journal" "journal-book-pdf" "~/Sites/johnw/pdf" force) (muse-book-publish-project '("poems" (:nochapters t ; do automatically add chapters :book-chapter "Mystical" "~/Documents/poems/mystical" :book-chapter "Romance" "~/Documents/poems/romantic" :book-chapter "Nature" "~/Documents/poems/natural" :book-chapter "Melancholoy" "~/Documents/poems/melancholy" :book-chapter "Commentary" "~/Documents/poems/commentary")) "poems" "Collected Poems" "chapbook-pdf" "~/Sites/johnw/pdf" force) (muse-book-publish-project "website" "writings" "Collected Writings" "book-pdf" "~/Sites/johnw/pdf" force)) (defun modules-get-version-and-date (module) (let (version date) (with-temp-buffer (insert-file-contents-literally module nil 0 1000) (if (re-search-forward "Version:\\s-+\\(.*\\)" nil t) (setq version (match-string 1)))) (setq date (format-time-string "%Y-%m-%d" (nth 5 (file-attributes module)))) (concat (and muse-publishing-p "") (if version (format "%s (%s)" date version) date) (and muse-publishing-p "")))) (defun muse-blog-add-entry () (interactive) (muse-project-find-file "journal" "website") (goto-char (point-min)) (forward-line 3) (insert "* " (format-time-string "%Y%m%d: ") (read-string "Journal entry title: ") "\n\n\n\n") (forward-line -2)) (defun muse-my-html-insert-contents (&optional ignore) (let ((index 1) base contents l) (save-excursion (goto-char (point-min)) (search-forward "Page published by Emacs Muse begins here" nil t) (catch 'done (while (re-search-forward "^\\(.+?\\)" nil t) (unless (get-text-property (point) 'read-only) (setq l (1- (string-to-number (match-string 1)))) (if (null base) (setq base l) (if (< l base) (throw 'done t))) (when (<= l 1) (setq contents (cons (cons l (muse-match-string-no-properties 2)) contents)) (goto-char (match-beginning 2)) (muse-html-insert-anchor (concat "sec" (int-to-string index))) (setq index (1+ index))))))) (setq index 1 contents (reverse contents)) (when (> (length contents) 0) (goto-char (point-min)) (or (search-forward "

Archives

" nil t) (search-forward "#include virtual=\"/sidebar.html\"" nil t)) (beginning-of-line) (insert "

Contents

\n\n\n")))) (defun muse-my-html-finalize-buffer () (when muse-publish-generate-contents (muse-my-html-insert-contents (cdr muse-publish-generate-contents)) (setq muse-publish-generate-contents nil)) (when (string= (muse-publish-output-name) "recent.html") (goto-char (point-min)) (search-forward "Page published by Emacs Muse") (forward-line 1) (delete-region (point-min) (point)) (search-forward "Page published by Emacs Muse") (beginning-of-line) (delete-region (point) (point-max)))) (defun muse-site-html-set-mode (file output-path final-target) (set-file-modes output-path ?\755)) (defvar muse-my-journal-entries nil) (defvar muse-my-journal-nested t) (defun muse-my-journal-find-entries () (goto-char (point-min)) (let ((heading-regexp (concat "^\\* " muse-journal-heading-regexp "$")) (inhibit-read-only t) entries) (while (re-search-forward heading-regexp nil t) (let ((begin (match-beginning 0)) (date (match-string 1)) (title (muse-match-string-no-properties 2)) enclosure qotd desc) (if title (save-match-data (if (string-match muse-explicit-link-regexp title) (setq enclosure (match-string 1 title) title (match-string 2 title))))) (save-match-data (when (and date (string-match (concat "\\([1-9][0-9][0-9][0-9]\\)[./]?" "\\([0-1][0-9]\\)[./]?\\([0-3][0-9]\\)") date)) (setq date (encode-time 0 0 0 (string-to-number (match-string 3 date)) (string-to-number (match-string 2 date)) (string-to-number (match-string 1 date)) (current-time-zone))))) (while (string-match "\\*" title) (setq title (replace-match "" nil nil title))) (unless muse-my-journal-nested (let* ((path (muse-style-element :path)) (item-path (concat (expand-file-name (format-time-string "%Y/%m") path) "/" (muse-journal-anchorize-title title))) (end (save-excursion (if (re-search-forward heading-regexp nil t) (match-beginning 0) (if (re-search-forward "^Footnotes:" nil t) (match-beginning 0) (point-max))))) (data (buffer-substring begin end)) (footnotes (save-excursion (if (re-search-forward "^Footnotes:" nil t) (buffer-substring (match-beginning 0) (point-max))))) (project (muse-project))) (save-excursion (unless (file-directory-p (file-name-directory item-path)) (make-directory (file-name-directory item-path) t)) (find-file item-path) (erase-buffer) (insert "#title " title ?\n) (insert "#date " (format-time-string "%B %e, %Y" date) ?\n) (insert ?\n) (setq begin (point)) (insert data) (goto-char begin) (forward-line 2) (delete-region begin (point)) (goto-char (point-max)) (if footnotes (insert ?\n footnotes)) (save-buffer) (kill-buffer (current-buffer)) (let ((muse-my-journal-nested t) (muse-current-project project)) (muse-publish-file item-path "journal-pdf" (file-name-directory item-path)) (muse-publish-file item-path "site-journal-html" (file-name-directory item-path))) (delete-file item-path)))) (set (make-local-variable 'muse-my-journal-entries) (cons (cons title date) muse-my-journal-entries)))))) (defun muse-my-journal-insert-contents () (goto-char (point-min)) (or (search-forward "

Archives

" nil t) (search-forward "#include virtual=\"/sidebar.html\"" nil t)) (beginning-of-line) (if (string= "journal" (muse-page-name)) (insert "

Recent Entries

\n\n
    \n") (insert "

    Contents

    \n\n
      \n")) (dolist (entry (nreverse muse-my-journal-entries)) ;;(setq date (format-time-string "%m/%d" date)) ;;(if (= ?0 (aref date 0)) ;; (setq date (substring date 1))) (insert (format "
    • %s
    • \n" (muse-publish-output-name) (muse-journal-anchorize-title (car entry)) (car entry)))) (insert "
    \n\n") ;; jww (2005-04-17): a hack to rewrite MP3 titles (goto-char (point-min)) (let ((inhibit-read-only t)) (while (re-search-forward "

    \\(.+?\\)

    " nil t) (replace-match "

     \\2

    ")))) ;; (eval-when-compile ;; (defvar muse-current-project)) ;; ;; (defvar muse-ref-tag '("ref" nil t muse-ref-markup-tag)) ;; ;; (defun muse-ref-markup-tag (beg end attrs) ;; "This markup tag allows a poem to be included from another project page. ;; The form of usage is: ;; " ;; (let ((page (cdr (assoc (cdr (assoc "title" attrs)) ;; (muse-project-file-alist)))) ;; beg start end text) ;; (if (null page) ;; (insert " *Reference to\n unknown page \"" ;; (cdr (assoc "title" attrs)) "\".*\n") ;; (setq beg (point)) ;; (let (title) ;; (if (string-match "html" muse-publishing-current-style) ;; t ;; (insert ;; (with-temp-buffer ;; (insert-file-contents page) ;; (goto-char (point-min)) ;; (forward-paragraph) ;; (forward-line) ;; (buffer-substring-no-properties (point) (point-max))))))))) ;; ;; (add-to-list 'muse-publish-markup-tags muse-ref-tag) (when (and window-system (load "httpd" t)) (require 'muse-http) ;;(add-hook 'after-init-hook 'httpd-start) (setq httpd-document-root (expand-file-name "~/Sites/johnw"))) ;;(setq ;; muse-cite-titles ;; '(("Bahá'u'lláh" ;; ("Kitáb-i-Íqán" ;; "http://bahai-library.com/?file=bahaullah_kitab_iqan.html" ;; "http://bahai-library.com/?file=bahaullah_kitab_iqan.html#%d")) ;; ("`Abdu'l-Bahá" ;; ("Promulgation of Universal Peace" ;; "http://bahai-library.com/?file=abdulbaha_promulgation_universal_peace.html" ;; "http://www.bahai-library.com/writings/abdulbaha/pup/pup.html#%d")))) (provide 'muse-init) muse-el-3.20+dfsg/examples/muse-made-with.png0000644000175000017500000001602611331353120020407 0ustar taffittaffit‰PNG  IHDRZ$†âºä pHYs  šœtIMEÖ0~˜ÌtEXtCommentCreated with The GIMPïd%nŒIDAThÞEzy”Wuç½÷½WË·w·º¥–dí‹-yÅÆ666ÞX‡™8Y` „3&HØ2ÌÄC p ð…˜€ [$#ËXØ–míj©ÕêV/꽿¥ªÞrïüQmçû«¾:Uõ^½w—ßRxäè1fÉ G&0çÖzz¹•(U"di÷2@ Bç"fYAŠчG&/\y\X‡ˆÖùÂ:ÑJõrKˆˆhD€œó€à}ˆŒ€Hk !‹h¥ÀhZ«J €°!…zy‘Æ1 3 ¢÷AD3"†Àˆ€ˆÌ ˆ ŠVçãC Dç= ¢s^3‹1ŠEÖ‰ˆÖ˜^Œ® ÆÄPšm•òÞw³LD„Å-""R¯¦ÞB­TTÕ r«ˆ´¢Àì;ï½J‘\Î ¬uIl|`£"£‘Rd'Bf!D­•ˆ¤ILˆ.ïƒÖª|CˆŒ6Z‘2½¬‚ó¾’ÄÖ{ ctADˆÈh˜³Ü""-Îy£•ó¡8Ò3KiçÂÜboiÅX ¥ÐƒÈÖõ!)¬™Çì½öÖ;d‰Œ烰¤Iä}fÉs+"IYçâÈÖ!j“j­”uÎf‘FkçƒVÊy_ÎI)ÒJ!BÇeÔÑ=oØ |}¬\rÄÈhï]šÄ!°ŽŒFDç½RJi!fy¡µúã·ì€¿ùü1­È‡à|`‘½ãJ¸ïþãD$ˆ˜[—&‘&ÒQ¤­õàOÌž›÷§ÕJ½Õ Èan¥]kTë^ytD•(õä¡ "Šˆ&òÀ̘•"fnÔÒ¼pD(ÂJQGDä}`á?|ã6xÿG'û‡üØhüw÷n€OþýQ¥”Ö‚¨ˆ´VJQ`&ÄrßÊDfF@Bìô²2d10—9’BqÎ+E‘Ñå½Z+f)¬€Zš”'E@)‘2§¼¹·ºÝÍ@@@&ƧŽ÷‰ÚÓY¬Vfï+érÑ^îoU+§:!É@Òn·³,gàÀ\FcYSDÀ:[‹H„G&x!(­Ê©üüßšo¼'?¸o°üm´6Zåâ|Fk/Ħ¼FYëCàÈhiÖªD$"A„YQYçÊp³ÎöGD ø“·^ ÷Ý‚Ôêú–)IˆDh”ñ>£µV '&g~uè¤@œåníµ}SßÔ…éu›‡Ö WjqMÇ£SÓJcÐÚÛ¦Q_­QÓ^žåy! Epˆk­|Ö{ ¼° U¥‚Ïý¦§¢©‰úìLTþ­V’ÿñúÍ€küݿ߾úÚìWã/þ}Q”ëÌ29?øÅ5“ãѺõîM÷\Ü´%¡sáÃïÙ47«ßÿÑ >°^ÿæ™O~tÇÀ ûÀÇμýÍ;àþXù?}륟ú‡“åñûÿè ­åö—/¼ìÕ3"R8$Žá±ãÓ‹sùâbÀçž¹ÖoÖ¬Y±´°Ò1ÊÄ•¸Mãì¹ñù•îìJ§ë‹¼g;¹Rq’Ä•$ŽÒþzs Ñ@@B^Xñ>€@½QO«GÏ<À7g{ïÀM·äÏïüW¿3ùůŸÿØ}3s³ú+_lÂ÷þ©Yøç^|.¶åÁÇÏÅïxïä…ñèk_tÞw{¹un×e]xü`e~ÎÌÏ™ÇÖಽ½²Ý”Mª<øÄg<¿%÷¼sÔ{Ü÷ӾܺN/烑¹¹öÒôR5Ò–ˆDò^û‰‡4iT¸ySßÖ Ã³íïH”É{N+8zhT«¾é…éK÷¬èo¥Æx"3‡jƒÞ Š ì»™mwC­RaAZ]Ž›oÉÿù[õ[^b¿ùÕÕ4þá÷?úa¥Ó&X\P pñ¢€í»z}å]& |ê¯7ÀÄù8° baÝöÝíG÷7÷ÿ¬µ}wWüGlÛզ熋Ÿ+"Q¤­+›lÛÙ[Xë‹÷Aç…Ÿ˜w¾ÀDiF…½«$$¢û™‹³³SªÚúúW¯a;[Î/»rûý˧í-ujó+½f³Z3:¤A´8Æéù6"ô–²ééYEºZMÅÁséRoº/cŠðùDàïÿsÕZüË¿žûÈûÖ”Enp0LMê3§ÒçßdÃF;>¿ë}S»/ËÑ{êfy%/Û[ ‚µ¸sw'ŽÔaÏÅóÏ÷‰„{=1fu~µƒ÷A)ÈÖ9éé9æ‘XˆbT±hZ;Q=¾ïçÇìÌH¶8²Ø™=ÒW‰7nÎV²#‡NœzòÈÜèDµaJp±“/¬ôÎÏNžŸÎ»yÖÍ:+‹3 +í.³<_êËÿ|0+Ew¾,S >ò¾5å™$Ž^û»Ý8–O|´ÿùIßóöÅm;óÏ|rÝܽõ­ÿ}KnmGYn Ù¸)€]—å[wt`æ¬Zå²ã”ÏÉ]KQÌ|çeq=?ÄêdbƒX«¤øÈ£?ò‡——–‹”"ï ‚R‘VŠ$<ûäéjœ2&Ò¾ëdÛ¯½ù’ÍO<åCÜjÅvoì«×:…?=:m³nweÉ,D@Ç:I’$M6ol ‚x‘Ÿ‘Z+!$^m"«èDJ„f½GÄ¢pHˆŠˆE¬sΣ•óÁùPfRÊ9ˆÑs+˜……™£ÈÖ)E„伌.V+¥|:Ë,£DÇ`»Ý…¥…X+‰EWçæ[5×Íœw¡·|_ÒYÊó…±…´?©Ö‹Â:ÄN§ÛíÖ*ëÃÒÅ‹ªl¦ !°³–ƒs®RXGŠ’ÈXçãÈ”—UÒÄ(•['" •s«0?&Ĭ°e7eBÐJYç„Y˜¥›F«²0­.!•·–OÐJùŒVÝ,/;kxÊ‹ã$vÎ+"MHàCpEg~ΠODµ2uVŠ…3Si-2QRgÈØ;ë}£™P¬ÛËÞæì3vâdf1­TD¤Ù¨·új ³ó€HÈ"Þ³ÑÌ çãÈ$qôȾ_<°¯×ë­Ÿ{U¾ñÅ/¹ýΗª(³Ñ*+,ÿgBq^¸Èè¼pˆ>6Ú‡à‡ÀàG‘.¡*³Šˆä…SDJ)fîZ‡eÔBïC –3‹‹°ˆQJ/-¯8ßCS ±œµ[[YWóÜ£¶­º>+NêuVÊ (¥¥(íÔX±¡ºÙ…ó:ýõÀÃQ‘”pRö ŠÜEŒVˆ˜¯¿éÅÏ~bphíÞtOšD"òо_¯Ö Ìö8ÒYnKÆ]8GH"8”$%0—̈ÐhíCRTrœ^V$q„A¤Ì¾’”j¥Ê´"¢¢°Ì\I“ÈhëÜHÖ4“V³•$©°©HÏåK-;Š€É3çªX†ÐÕÈ;®¸²Ú×ß\·6Ïma=;KƗΟ™™89¦("Ô ˆ0ßY.¼_öX8\˜8ßìëï¶Wæçç¿ð¹O¯]·N“Å‘gžùøGÞ÷ïÿ¿åÅ…o>øÅï|ãÁŸýèíåÅÏÞ÷±éÉq9yô {¯6æÐ}ßýÆ————’8šœû̽i[;¼þ{ßüǃûn´zèûß>üį†×_rvää·|@kå‹€ Ybc ’Ä%E`£5iD¬6û.½æÖ,/žþõ“½<»0zŠlxhÀhJë:ä¡×é9æ¸+-¨ÂÔì2'³N/³™²…”†(Ö+&Ó„’Ê ÅJXqb³¬WÒ_Lâhdä=v`ÿã¹²¼´nx8„GQ´cçÎF£ùÚßþ=@š½83=yáïù@^¸Cè¶W4áýŸýÔýéû¶lÛ±pù•?ûÉÃ[¶mG„øÌß¼öwïÞ{õµxÇ+^³qã&£pßOþàÇ?eÒúCë¦'ÇË"+!°h);TÉî{yAˆ,ÂÌZDQ”ÖÍþÖòÙQèôr›×«U]k:d¤Z‘Ф* àÙS#§GÆjõ¦sYw1ä R)iPÐóÜZJ›?:²´´œNDàô©“×Ýð"c"­höâôµ7Ü„ˆIlfg¦×­ßøôÓOFq¼aÓVë|¯ÛަɳO=Ñí¶¯¸æ:n¸éÖR ºêÚëïý‹?Û{Õµ7Ü|ÛÎÝ{¬÷"ì=7ëë¼VTªJÎ¥(2F˜»™§Àâ|È K›·o»úšË6^¢LKtuÚ]^4‰JšI#…BJ¢XgËó+K•1NI®½Îû^NAMD(J+` yV«ºDäÜè™Ý»/5Z%q´uû®^#€”Hä왑M[¶@/+FGNïØ¹‹æf±Ñê;·aã&€ócg7oÝÎ,ãcë7l2Æ23"Ñ[þð]oχ“$ý§>>vîLdtšDqd¬õ‘ÖÌR–U¥ˆˆ ërëŒVÄÌJ‘Ѫ¼¢:0´÷ú«kƒÞ'í…B¹TQ¤)ö¬9DÞ‚rÎ; YÖ›»8ÅÖæ×kgùâr§—u;]Ÿ9A Á– ¶žÉ˜ÂºjÀÈéS[·í(*"þËw¾5rêd©ŽžÙ²u»µ®½²Üëu‡7l´ÞžÙ´ek™ZµBHÓ8‰Íþ_üdëöµJ:4´Ö{g´JãhzòÂ?}í‹"ðƒï~¶mÛñ†7ßS­ÕŒÖÌâ\ˆ#“& Ô*I¬ˆ`µõ`GJ+]2ÿÈh6ZƒµÃ›wnœ85 ·¼¸Xï_/š8HÈ{‡"¬äE‡]î³<Ö1X*ŠNær­(/Š´’öÏ/TûëÂ@ZzÝ®ïyŒ“¤i­:++|ásgÏŒüøG?|ôÀ#e—;wî¾—½Jkµ²²²0?·iË$;wæ’Í[Ó8Ž#]\˜æ©_ßôâ[~üƒùúW ¢¬ÛyúÉC·Þ~Ç7ßz`ÿÏ¿õµ/Uk ãc¿s÷[j•dvfúË_øô¶»Ïœ>yÇËþ˶í; ëÐ@`Ž#|`‚.•AfBÌ­#D|ø§ûBà82ˆN+e½×ˆßúò÷Å…J£¯:˜¸ÂÎN¬¸žcÎíÚt:‹Ø^Þ¶q-B˜é®Ì/õ|¯HÓ4èÚ%Ck®{Õ‘Í_˜Ïme]«éÛ_y]ÙáKÔÌ,>ç|©K2KaVDD¥œ©Š!"¡"*¶sv~~~ph•R •*¬›™™ÖJ ¬tΗ@syy©×í6š-ZeÒ"å Ì¢‰H Ò˜ÅyH¤Ó8¶Î­KBEƼîîW=ôôÈÙùs'¦ øÐYæÂÆ•f/çnèåíÎÍ»úîþÀ{Ž4"*¢(2%§€z£¶aËæ‘ã ƒýƒ;Ö››n»%Ëó³O>}üÔ©SÇdžšê¥ox“ ¢´ª5Z•zóú;_Ñ™ëMM\¤B…B §*¾zͨ"2º(œ€­˜ÉzÏÌ΃ѪTÏÑ&ÄF­bð!$‘$"ÐZ)"iE¹u«±ƒP¹µåfVD€@D>„ÒF0Z…R»\êo¤Ê B!°.Á¬,ÀVéfd4e9$z+yÁ7Ö‡‡R }6ÞœþÆâÔäâôT:ÐDBá;íÜÄæü…6™5ƒº›õhöâ#iA{yÁ(+,¥nøã=ôè/év;ïûÐ_6›­RÕZÍÌÌüÝÿùd£Ù¼íΗ^ó‚zf¥H‰ˆm×ZÒ ’èÈûPB»’­”2="–O+*õdqÞR-M²Â­#³ªÑ— !c¬ó̬µV„¨´„ÀJQºÌÕîJïè‘sCÍí—mžZè›:Ýí䃃µþèþxSkæÜÄî½›<üÔÁgM«æìJ£e&æ»[vlÎج Z#Žˆ ívæm¹õw½üÈ3O?õÄ¡'ýêe/%"F‘ !|ù>wø©'þï·¾;84$R Å«2r•4)“¼tjq›bì_æ@i2ÖÅ‘a‘"·Z‘°B¹ve×c´÷«E jæR¤+‹S`>rx´¿UÛ¸e½Žªó§Çžms8öô‘¡¡¡ÅùlëΡ<ë9¾ëâ|O×Óé‰ùDÑÙ³m¥V) ÖF«€!+Х޸bòô4ŠL“hqqáÆ›n~ìÑw½ô€¢ˆþýǯ[;ÜlµÖ !ÀÈ©ãAdïåWÖÙÂNŒmݶ£ þS§Nœ©ÖW^}1Qdta‹ÃOüziyùò+®jôõ—ø³äiTÌZ©²cxœЍäueu÷‰0Ë-±ˆAJKÍh…Ý•^1ßݱg— Ø]YfoÇÎÏN;ÕPE#ê©•Åã'ƽ÷/>ñ¯?:ØÍ@l¾¼Ò±ÜéKû*õ(ÕÔìKµâÎÜÊÄSc¿øù££“gFk( k´¹îú~òׄ3;33vn´Õß¿cç®ÒOÚ¿ß½û+ïYzüàýŸÿ,‹ â—øüýûÖ_rÉé“Ç?÷·÷£Ï~ð½ï ̃ƒƒyÿ»'ÇÇ"£Ë÷,}¹Èè2ãDJÅÍÌÖùR‘1Z)¢Z%%ïCauÞh¥–n–?¾ÿÈe/ÜY¯×Î9uúÐq ”¶ÏÍÏ\XîÍÌ/¥ƒ-Ý„ú†›ÕîÌÈØ±Qëpjv…"ݨ+¥Éùlo|yÙº ÙU“¸Y¯´êÕé ã[¶n»ý¶Û²,;qü‡ðå/Ýÿ–{þ`äô©í;v²Hš¦ëÖ ïÚ½»”%NŸ:µcç.D,lñ/ßùöË_õê«®¼êu¿ý{¯zõk„ùãýÐkç 7ßrëe—_µgï¿:øË²îгXç­óeÕŒc“Ä"­ Ñ]IâÒÍÕJű!B-"ˆ µ°ÞŸ›Ñ“ÔZAà®WÝh(öè™›7Ÿ8>a³¥É™nW¸×M«©ªGqMÍŸÝœ\šáŠï¦T©·ÛN5R(‚nÜY©5†ÇF2è,i­B"9uå•W ­Ù³÷òGöï;vôØo¼æ¿U*•3§OÝu×]•4vΟ=³k÷¥qdðÌéS/嫈Ð{¼áE7¿ý­oyñ­·¾ì•¯Þ{åUürzjêà/÷<ð"?v䆿‹µRD‚³(…¥=ØËЏ4• U³¨”:½<6Úù c¥³ÑÊZÇ"Jô¯iž™:xð×Ãë‡oºî2D58Ÿí?ðL_¥iµ#ä¹ñc/yÑ ñšÃOKBclvR+&澤 âP¥ÌÄŒ¶UZjçµ—î¾vÇòüB©W†À'Žóï¿%¾åÖ[¿õ¯ÿÆoþ׫_ð‚àì… {öìÕD*2'Oœ¸õ¶ÛµRκ‘Ó'ßù'ïñÏ>ð££g~öo?zï»Þñé¿¿b|lÏåW¼óÝ^ª>Öù¼p…s¥Vh‹ •ZF™)…uIÖ‰€1ŠA°VIJp(ÿip‡¬óiõ·êš^ÎÃøÈÙÇìâM·Ý´óÒm·Ý°s|¨ÒÚS3éæ]»ZÖÎ×[kï{LBë’MkÚË3ͪaU‰<¤5"rìò¾µëòÜfïC`žœœX3ˆˆwÞy×éS§Þö¶· ÐSGŸ­T*—lº¤ ìÉÉ ÍFSkõ“ÿ7kí¦Í›óÂýã—îío¿~÷îÝ—ïÝ»ßÏCàáuÃy–—žîÜÜÂ}÷þ¯?z÷ŒÑ¥y\*Ìqd˜…ˆâXi¥‡ç*ƒb‘ØèÜÚ2 @½þoVDetÄ‘N“—çg²ná‹|`ph`°ûÎí­fß–+önÞ½³Òj°ˆÑ*+Èæs¨5ÒVÚ[Ä}X«ºŽRâ[ýUc•îõz—lÙØ^Y¾ïoî=òì3ÝN÷…/¼¾¯¿ÿö;îªVÒ‡~èk~eii)ëõn¼ñEF«Ã‡Ÿzè¡;zdnnvlt40_ºgïÿõ{‡~upöâìw¿óín¼é¶;îÚ°qãã=zòøÑñóc?ü×ïýÖë~o`Í`©0VÓØ3Ç‘!­©¹)EµJZ:µ!°“Ȱ!âC?ÙB0Fs`¥UG!°Í³Ã?9yfŽ!Ú²gÓ+^~Û@µYPvñâ¼6Få…ÕJŸ™:þä‘‘#ã KsüКáhý:ÕèçëUs»o°C‘_wÛ‹Pž/Ë-õ>¤I[çUIÑ —åS““V_Ç%¬rÞæ¬ÛYXX\¿~8ISærÿyrr Aª>ˆcc­/­6ç=jE,‚ı)Ÿž”öxïbù™zýÝo.ã³Ô£È¡ÒzçîhB§×Í æ"_7¼®Ù¬W+qž¹ÀÞhíGF¿pòô…ÉùÅ®§*Õ«ët%µÖĵªªVST( ¼vÃúÒÒJ•u$ŽLl ³xQž3qK¡»ÑlŠ ”à Ab£+•J½Ñ¨¤ié´Ö!R­V‹âT)RŠJ’†هƑó^+&Q9z ÌKœ^Ê%ÞSŠ‘ ü2€YD´RQd¬ó»/ßsç+oÑQ87>>17ÛÎ ¤ä©g—žß«þVˉ´çꦦ“ZmC”Ä©RˆX¯ÄI%µ¶PJu:Ý¢ðe>‹"Qɡ˲%DˆaÕ." Ï}ßÄ ëK^SzTW¶È˜2²ŒV‘Ñ‘Ñe€•ßU”Ô‰Ðy¯ˆJ„Vz1ŠV?¶ˆŒF\îÿ†õ;e  ýIEND®B`‚muse-el-3.20+dfsg/examples/ikiwiki/0000755000175000017500000000000011331353120016506 5ustar taffittaffitmuse-el-3.20+dfsg/examples/ikiwiki/muse-init-project.el0000644000175000017500000000627111331353120022414 0ustar taffittaffit;;; muse-init-project.el --- Use Emacs Muse to publish ikiwiki documents ;; The code in this file may be used, distributed, and modified ;; without restriction. ;;; Setup (add-to-list 'load-path (expand-file-name "~ikiwiki/elisp/muse/lisp")) ;; Initialize (require 'muse) ; load generic module (require 'muse-html) ; load (X)HTML publishing style (require 'muse-ikiwiki) ; load Ikiwiki integration (require 'muse-project) ; load support for projects (require 'muse-wiki) ; load Wiki support ;;; Settings ;; New variables (defvar muse-ikiwiki-project "HCoopWiki" "Name of the project to publish using ikiwiki.") (defvar muse-ikiwiki-source "/afs/hcoop.net/common/ikiwiki/repo" "Source directory for Muse files.") (defvar muse-ikiwiki-dest "/afs/hcoop.net/common/ikiwiki/dest" "Destination directory for published files.") ;; Project listing (setq muse-project-alist `((,muse-ikiwiki-project (,@(muse-project-alist-dirs muse-ikiwiki-source)) ;; Publish this directory and its subdirectories. Arguments ;; are as follows. The above `muse-project-alist-dirs' part ;; is also needed. ;; 1. Source directory ;; 2. Output directory ;; 3. Publishing style ;; remainder: Other things to put in every generated style ,@(muse-project-alist-styles muse-ikiwiki-source muse-ikiwiki-dest "ikiwiki")))) ;; Wiki settings (setq muse-wiki-allow-nonexistent-wikiword t muse-wiki-match-all-project-files t muse-wiki-interwiki-delimiter "::") (add-to-list 'muse-publish-desc-transforms 'muse-wiki-publish-pretty-interwiki) (add-to-list 'muse-publish-desc-transforms 'muse-wiki-publish-pretty-title) (setq muse-wiki-interwiki-alist '(("EmacsWiki" . "http://www.emacswiki.org/cgi-bin/wiki/") ("UbuntuLinux" . "http://ubuntulinux.org/"))) ;; Permitted modes for to colorize (setq muse-html-src-allowed-modes '("ada" "apache" "asm" "awk" "c++" "c" "cc" "change-log" "context" "css" "diary" "diff" "dns" "domtool" "emacs-lisp" "f90" "fortran" "fundamental" "html" "java" "jython" "latex" "lisp" "lua" "m4" "makefile" "markdown" "matlab" "maxima" "message" "modula-2" "muse" "nroff" "octave" "org" "outline" "pascal" "perl" "ps" "python" "rst" "ruby" "scheme" "sgml" "sh" "slang" "sml" "sml-cm" "sml-lex" "sml-yacc" "sql" "tcl" "tex" "texinfo" "xml" "zone")) ;; In case someone does (setq muse-colors-evaluate-lisp-tags nil muse-colors-inline-images nil) ;; In case someone does (require 'org) (setq org-inhibit-startup t org-table-formula-evaluate-inline nil) ;; Don't allow dangerous tags to be published (setq muse-publish-enable-dangerous-tags nil) ;;; Custom variables (custom-set-variables '(muse-html-charset-default "utf-8") '(muse-html-encoding-default (quote utf-8)) '(muse-html-meta-content-encoding (quote utf-8)) '(muse-publish-comments-p t) '(muse-publish-date-format "%b. %e, %Y")) (custom-set-faces '(muse-bad-link ((t (:foreground "DeepPink" :underline "DeepPink" :weight bold))))) ;;; muse-init-project.el ends here muse-el-3.20+dfsg/examples/ikiwiki/muse-init-simple.el0000644000175000017500000000316611331353120022237 0ustar taffittaffit;;; muse-init-simple.el --- Use Emacs Muse to publish ikiwiki documents ;; The code in this file may be used, distributed, and modified ;; without restriction. ;;; Setup (add-to-list 'load-path (expand-file-name "~ikiwiki/elisp/muse/lisp")) ;; Initialize (require 'muse) ; load generic module (require 'muse-html) ; load (X)HTML publishing style (require 'muse-ikiwiki) ; load Ikiwiki integration ;;; Settings ;; Permitted modes for to colorize (setq muse-html-src-allowed-modes '("ada" "apache" "asm" "awk" "c++" "c" "cc" "change-log" "context" "css" "diary" "diff" "dns" "domtool" "emacs-lisp" "f90" "fortran" "fundamental" "html" "java" "jython" "latex" "lisp" "lua" "m4" "makefile" "markdown" "matlab" "maxima" "message" "modula-2" "muse" "nroff" "octave" "org" "outline" "pascal" "perl" "ps" "python" "rst" "ruby" "scheme" "sgml" "sh" "slang" "sml" "sml-cm" "sml-lex" "sml-yacc" "sql" "tcl" "tex" "texinfo" "xml" "zone")) ;; In case someone does (setq muse-colors-evaluate-lisp-tags nil muse-colors-inline-images nil) ;; In case someone does (require 'org) (setq org-inhibit-startup t org-table-formula-evaluate-inline nil) ;; Don't allow dangerous tags to be published (setq muse-publish-enable-dangerous-tags nil) ;;; Custom variables (custom-set-variables '(muse-html-charset-default "utf-8") '(muse-html-encoding-default (quote utf-8)) '(muse-html-meta-content-encoding (quote utf-8)) '(muse-publish-comments-p t) '(muse-publish-date-format "%b. %e, %Y")) (custom-set-faces) ;;; muse-init-simple.el ends here muse-el-3.20+dfsg/AUTHORS0000644000175000017500000001117411331353120014304 0ustar taffittaffitMuse ==== This is a listing of those who have made contributions of code or documentation to Muse. John Wiegley: Original author Michael Olson: Current maintainer Adrian Aichner: Contributor: - muse-publish.el: 2 lines changes Florian Beck: Contributor: - muse-regexps.el: 1 line changed Karl Berry: Contributor: - muse-latex.el: 5 lines changed Jean Magnan de Bornier: Author of muse-context.el, Contributor (assigned past and future changes) Trent Buck: Contributor: - muse-latex.el: 4 lines changed Sacha Chua: Contributor -- documentation (assigned past and future changes) Brad Collins: Author of: - muse-protocols.el - examples/muse.rnc schema Contributor (assigned past and future changes) Li Daobing: Author of muse-mathml.el, Contributor (assigned past and future changes) Wang Diancheng: Contributor: - muse-publish.el: 1 line changed - muse-regexps.el: 6 lines changed Clinton Ebadi: Contributor: - muse-html.el: 4 lines changed - muse-latex2png: 3 lines changed Bastien Guerry: Contributor (assigned past and future changes) Magnus Henoch: Contributor: - muse.el: 1 line changed Yann Hodique: Author of muse-wiki.el, Contributor (assigned past and future changes) Markus Hoenicka: Contributor (assigned past and future changes) Andrew J. Korty: Author of muse-groff.el (assigned past and future changes) Sasha Kovar: Contributor - muse-blosxom.el: >15 lines changed Bradley M. Kuhn: Contributor -- documentation - muse.texi: 9 lines changed Peter K. Lee: Contributor (assigned past and future changes) Na Li: Contributor: - muse-latex2png.el: 1 line changed Phillip Lord: Author of: - muse-split.el - muse-protocol-iw.el Contributor (assigned past and future changes) Chris Lowis: Contributor: - muse-latex2png.el: 1 line changed Deus Max: Contributor: - muse-publish.el: 2 lines changed Evan Monroig: Contributor: - muse.el: 2 lines changed Alex Ott: Contributor: - muse-html.el: 13 lines changed - muse-publish.el: 2 lines changed Jim Ottaway: Author of muse-backlink.el, Contributor (assigned past and future changes) Elena Pomohaci: Author of: - muse-import-docbook.el - muse-import-xml.el (assigned past and future changes) Andrea Riciputi: Idea taken from code, but re-implemented Stefan Schlee: Contributor - muse-mode: >15 lines changed - muse-protocols.el: 1 line changed - muse.texi: 7 lines changed (assigned past and future changes) Per B. Sederberg: Contributor (assigned past and future changes) René Stadler: Contributor: - muse-journal.el: 1 line changed - muse-project.el: 1 line changed Dale P. Smith: Contributor (disclaimed changes to Emacs) John Sullivan: Contributor -- documentation (assigned past and future changes) Ganesh Swami: Original author of latex2png.el, which was the basis for muse-latex2png.el. It has since been extensively rewritten, so we no longer need an assignment. G. J. Teale: Contributor: - muse-project.el: 2 lines changed Sebastian Tennant: Contributor -- documentation - muse.texi: 4 lines changed Gary Vaughan: Original author of emacs-wiki-blosxom.el, which was the basis for muse-blosxom.el (assigned past and future changes) Sergey Vlasov: Contributor: - muse-colors.el: 3 lines changed Valery V. Vorotyntsev: Contributor: - muse-protocols.el: 7 lines changed Charles Wang: Contributor: - muse-html.el: 4 lines changed (assigned past and future changes) Lan Yufeng: Contributor: - muse-colors.el: 1 line changed Contributed software ==================== This is a listing of authors of software in the `contrib' directory. Nathan Kent Bullock: pyblosxom/getstamps.py, pyblosxom/hardcodedates.py Cameron Desautels: pyblosxom/metadate.py Mark Ivey: blosxom/metadate_0_0_3 Eric Marsden: cgi.el, httpd.el (assigned past and future changes to FSF) Michael Welle: blosxom/getstamps.pl muse-el-3.20+dfsg/Makefile0000644000175000017500000000511011331353120014665 0ustar taffittaffit.PHONY: all lisp contrib autoloads examples experimental doc info-only .PHONY: clean realclean distclean fullclean install-info install-bin install .PHONY: test dist release upload elpa DEFS = $(shell test -f Makefile.defs && echo Makefile.defs \ || echo Makefile.defs.default) include $(DEFS) SUBDIRS = lisp contrib examples experimental texi all: autoloads lisp contrib info-only lisp: (cd lisp && $(MAKE)) contrib: (cd contrib && $(MAKE)) autoloads: (cd lisp && $(MAKE) autoloads) examples: (cd examples && $(MAKE)) experimental: (cd experimental && $(MAKE)) info-only: (cd texi && $(MAKE) info-only) doc texi: (cd texi && $(MAKE)) clean: for i in $(SUBDIRS); do \ (cd $$i && $(MAKE) clean); done realclean fullclean: clean for i in $(SUBDIRS); do \ (cd $$i && $(MAKE) realclean); done install-info: (cd texi && $(MAKE) install) install-bin: autoloads lisp contrib (cd lisp && $(MAKE) install) (cd contrib && $(MAKE) install) (cd experimental && $(MAKE) install-uncompiled) install: install-bin install-info test: (cd lisp && $(MAKE) test) distclean: for i in $(SUBDIRS); do \ (cd $$i && $(MAKE) distclean); done -rm -fr ../$(PROJECT)-$(VERSION) dist: autoloads distclean git archive --format=tar --prefix=$(PROJECT)-$(VERSION)/ HEAD | \ (cd .. && tar xf -) rm -f ../$(PROJECT)-$(VERSION)/.gitignore cp lisp/$(PROJECT)-autoloads.el ../$(PROJECT)-$(VERSION)/lisp release: dist (cd .. && tar -czf $(PROJECT)-$(VERSION).tar.gz \ $(PROJECT)-$(VERSION) ; \ zip -r $(PROJECT)-$(VERSION).zip $(PROJECT)-$(VERSION) && \ gpg --detach $(PROJECT)-$(VERSION).tar.gz && \ gpg --detach $(PROJECT)-$(VERSION).zip) upload: (cd .. && \ scp $(PROJECT)-$(VERSION).zip* $(PROJECT)-$(VERSION).tar.gz* \ mwolson@download.gna.org:/upload/muse-el) elpa: realclean info-only rm -fR $(ELPADIR)/$(PROJECT)-$(VERSION) rm -f $(ELPADIR)/$(PROJECT)-$(VERSION).tar mkdir -p $(ELPADIR)/$(PROJECT)-$(VERSION) cp lisp/*.el $(ELPADIR)/$(PROJECT)-$(VERSION) cp contrib/*.el $(ELPADIR)/$(PROJECT)-$(VERSION) echo '(define-package "$(PROJECT)" "$(VERSION)"' > \ $(ELPADIR)/$(PROJECT)-$(VERSION)/$(PROJECT)-pkg.el echo ' "$(ELPADESC)")' >> \ $(ELPADIR)/$(PROJECT)-$(VERSION)/$(PROJECT)-pkg.el cp texi/$(MANUAL).info $(ELPADIR)/$(PROJECT)-$(VERSION) cp texi/dir-template $(ELPADIR)/$(PROJECT)-$(VERSION)/dir install-info --section "Emacs" "Emacs" \ --info-dir=$(ELPADIR)/$(PROJECT)-$(VERSION) \ $(ELPADIR)/$(PROJECT)-$(VERSION)/$(MANUAL).info rm -f $(ELPADIR)/$(PROJECT)-$(VERSION)/dir.old (cd $(ELPADIR) && tar cf $(PROJECT)-$(VERSION).tar \ $(PROJECT)-$(VERSION)) muse-el-3.20+dfsg/ChangeLog.40000644000175000017500000026734011331353120015160 0ustar taffittaffit2007-12-13 Michael Olson * lisp/muse-wiki.el ("muse-publish"): Interpret tags when publishing. 2007-12-05 Magnus Henoch * lisp/muse.el (muse-escape-specials-in-string): Move save-match-data outside of with-temp-buffer, because apparently some implementations of with-temp-buffer can mangle the match data. 2007-11-28 Michael Olson * lisp/muse-project.el (muse-project-page-file): If page argument is nil, then choose the first directory in the project. * lisp/muse-wiki.el (muse-wiki-resolve-project-page): Style fix. 2007-11-07 Adrian Aichner * lisp/muse-publish.el (muse-publish-classify-url): Wrap call of `muse-publish-link-page' in `save-match-data', so that correct match data gets restored for subsequent use by `match-end'. 2007-10-29 Michael Olson * lisp/muse-regexps.el (muse-tag-regexp): Permit tag attributes to span more than one line. Thanks to Florian Beck for the fix. 2007-10-24 Michael Olson * lisp/muse-publish.el (muse-publish-markup-regexps): Recognize "---" as a valid mdash. Before, it was doing mdash followed by a single dash. Thanks to jordanb for the suggestion. 2007-10-12 Michael Olson * lisp/muse-mode.el (muse-insert-url-initial-input): New option that specifies the initial text to use when reading a URL. Thanks to Seweryn Kokot for the suggestion. (muse-insert-url): Use it. (muse-mode-fill-paragraph): Take into account any indentation that is already in front of the term. * lisp/muse-project.el (muse-project-determine-last-mod): New function split from muse-project-file-alist. (muse-project-file-alist): Improve docstring. (muse-project-add-to-alist): New function that ensures that the current file is added the its project file-alist. (muse-project-after-save-hook): Call muse-project-add-to-alist instead of muse-project-file-alist. This fixes an issue where if several files were being saved at once, only the first would make it into the project file-alist. 2007-10-11 Michael Olson * lisp/muse-latex.el (muse-latex-markup-specials-literal): Escape backslash as "\textbackslash{}". Thanks to Joost Kremers for the report. 2007-10-08 Michael Olson * lisp/muse-mode.el (muse-mode): Set fill-paragraph-function. (muse-mode-fill-paragraph): New function that fills the paragraph at point. If a definition list term is on the same line, then prefix subsequent lines with two spaces when filling. Otherwise, return nil, so that normal filling can take place. 2007-10-03 Michael Olson * lisp/muse-colors.el (muse-unhighlight-region): Remove muse-no-implicit link property. (muse-colors-implicit-link): Check for muse-no-implicit-link property. * lisp/muse-wiki.el (muse-wiki-colors-nop-tag): Add the muse-no-implicit-link property. This makes colorization of work. Add docstring. 2007-09-24 Michael Olson * lisp/muse-latex2png.el (muse-publish-math-tag): Fix bug introduced by recent change. Thanks to Darlan Cavalcante Moreira for the report. 2007-09-23 Michael Olson * lisp/muse-context.el (muse-context-pdf-generate): Change default-directory instead of calling "cd" in the command. * lisp/muse-latex.el (muse-latex-pdf-generate): Change default-directory instead of calling "cd" in the command. This should fix a bug with Windows. Thanks to Jia Ye for the report. 2007-09-22 Michael Olson * AUTHORS: Bookkeeping. * NEWS: Add entry for the LaTeX image filename escaping changes. * examples/mwolson/templates/header.tex: Update for recent changes. * lisp/muse-latex2png.el (muse-publish-math-tag): Detect whether the tag ends at the end of a line. If not, do not use "$$" to publish it. Thanks to Darlan Cavalcante Moreira for the suggestion. * lisp/muse-latex.el (muse-latex-header, muse-latexcjk-header) (muse-latex-slides-header, muse-latex-lecture-notes-header): Escape specials in the title. Define a museincludegraphics command, which is able to handle escaped special characters in image filenames. Thanks to Karl Berry for providing this. (muse-latex-markup-strings): Use museincludegraphics instead of includegraphics in all image-related markup. Move the width specification over to the museincludegraphics command, rather than specifying it explicitly. This allows people to change this information in their headers. (muse-latex-markup-specials-image): Escape backslashes, "#", and pipe characters in image filenames. * lisp/muse-wiki.el (muse-wiki-project-files-with-spaces): Fix byte-compiler warning. * lisp/muse.el (muse-update-values): Fix byte-compiler warning. Also, update the value of muse-current-project for all Muse buffers, even if they are new. This should be more intuitive. I don't think there are any cases where developers will want this value to be nil. (muse-replace-regexp-in-string): Fix byte-compiler warning. * texi/muse.texi (LaTeX): Mention grffile.sty. Thanks to Karl Berry for the tip. 2007-09-19 Michael Olson * lisp/muse.el (muse-replace-regexp-in-string): Remove fallback code, since it is not needed in any version of Emacs we support, and it also has a couple of bugs that I don't want to waste time fixing. 2007-09-18 Michael Olson * lisp/muse-mode.el (muse-mode): Fix bug involving filling and paragraphs next to headings. Thanks to Gregory Collins for the initial patch, which I modified. 2007-09-17 Michael Olson * lisp/muse-colors.el (muse-colors-toggle-inline-images): Display message about how images are now displayed. 2007-09-10 Michael Olson * Makefile (elpa): Use texi/dir-template rather than echoing lines to the ELPA dir file for Muse. * texi/dir-template: New file containing template to use when making ELPA dir files. This fixes a corrupt dir file bug for the Muse ELPA package. Thanks to Tom Tromey for the report. 2007-09-06 Michael Olson * lisp/muse-html.el (muse-html-class-tag): Fix bug where nested class tags were not working. We move to just after the beginning of the first class tag, so that we can detect any remaining class tags. Thanks to Florian Beck for the report. Fix error that occurred when class tag has no name element. Thanks to Peter Baranyi for the report. The correct behavior in this case is to not publish the tag at all. * lisp/muse.el (muse-goto-tag-end): Fix bug where nested tags with arguments were not being detected properly. 2007-09-05 Michael Olson * lisp/muse-context.el (muse-context-decide-specials): Add footnote. * lisp/muse-latex.el (muse-latex-decide-specials): Add footnote. * lisp/muse-publish.el (muse-publish-escape-specials): Mention 'footnote in docstring. (muse-publish-markup-footnote): Minor docstring fix. Escape footnote text properly. Thanks to Jean Magnan de Bornier for noticing. (muse-publish-url): When checking to see if this is just a plain URL without a description, compare the strings as they were before doing escaping. This fixes a bug where plain URLs could sometimes be published as if they were URLs with descriptions. * lisp/muse-texinfo.el (muse-texinfo-decide-specials): Add footnote. 2007-08-29 Michael Olson * lisp/muse.el (muse-update-values): Reset the value of muse-current-project in all Muse buffers. This updates the rules in case you want to publish a file after changing its associated muse-project-alist entry. 2007-08-27 Michael Olson * lisp/muse.el (muse-update-values): New function that the user can call after changing muse-project-alist, in order to update various autogenerated values. * texi/muse.texi (Keystroke Summary): Document it. 2007-08-25 Michael Olson * examples/QuickStart.muse: Fix typo in first paragraph. Thanks to Karl Berry for reporting this. * lisp/muse-mode.el (muse-visit-link-default): Fix bug with browsing anchors that come after a link to them. * texi/muse.texi (Poem): Fix typo in spelling of LaTeX. Thanks to Karl Berry for reporting this. 2007-08-24 Michael Olson * Release Emacs Muse 3.11. * AUTHORS: Add new authors for contrib files. * NEWS: Add entries for Muse 3.11. * README: Mention that contents of contrib/blosxom and contrib/pyblosxom have different licenses than the rest of Muse. * contrib/blosxom/getstamps.pl: New file that implements fetching timestamps from published Muse files and placing them in a single timestamps file. That file can then be used by blosxom's metadate plugin. Thanks to Michael Welle for providing this file, as well as instructions on how to use Muse with Blosxom. * contrib/blosxom/metadate_0_0_3: New file implementing the metadate plugin for blosxom. * contrib/pyblosxom/getstamps.py: Add license text. It seems safe to assume that the original author wanted this to be distributed with Pyblosxom, and hence use the MIT license like the rest of Pyblosxom. * contrib/pyblosxom/hardcodedates.py: Add license text. * contrib/pyblosxom/make-blog: Change license text to be "This file may be used, distributed, and modified without restriction." * contrib/pyblosxom/metadate.py: New file that implements the PyBlosxom metadate plugin. Since this can no longer be found at the original author's website, I have included it with Muse. * lisp/muse-blosxom.el: Update location of metadate plugin in header. * lisp/muse-wiki.el (muse-wiki-project-file-regexp): Fix typo in docstring. * texi/muse.texi (Blosxom Requirements): Organize information by subheading and subsubheading, and document how to use the metadate plugin. Briefly document using Blosxom to serve Muse entries. 2007-08-23 Michael Olson * lisp/muse-html.el (muse-html-insert-contents): Escape heading title just before extracting it. * lisp/muse-latex.el (muse-latex-fixup-headings): New function that removes footnotes from headers, since they are invalid in LaTeX. (muse-latex-munge-buffer): Call it. * lisp/muse-publish.el (muse-publish-markup-heading): Don't escape specials here. This fixes a bug involving links in headings. * lisp/muse.el (muse-update-file-extension): Simplify, and handle some edge cases. (muse-update-file-extension-after-init): Temporarily bind muse-file-extension to "muse", so that muse-update-file-extension knows what the old value was. This should fix a bug reported by Jean Magnan de Bornier. 2007-08-21 Michael Olson * lisp/muse-texinfo.el (muse-texinfo-markup-strings): Try to make url, link, and link-and-anchor look better in texi2html output. Thanks to thorne for the report. 2007-08-20 Michael Olson * lisp/muse-journal.el (muse-journal-anchorize-title): Revamp to escape characters rather than discard them. Use muse-regexp-alnum rather than listing out the characters and numbers. Thanks to Shunsuke OKANO for the report. (muse-journal-rss-munge-buffer): Make sure that * examples/mwolson: Update my example settings. * lisp/muse-colors.el (muse-colors-region): Bind muse-colors-region-end to the end of the last line. This avoids a bug where lines that had emphasis would suddenly become unhighlighted when moving around the buffer. * lisp/muse-docbook.el (muse-docbook-markup-paragraph): Fix bug involving paragraphs after literallayout markup, which is used in tags. Thanks to Shunsuke OKANO for the report. * lisp/muse-html.el (muse-html-src-tag): Use muse-delete-and-extract-region. * lisp/muse-import-xml.el: Add require statement. (muse-import-xml-parse-node): Use muse-replace-regexp-in-string. * lisp/muse-protocols.el (muse-browse-url-man): Add require statement. (muse-browse-url-woman): Add require statement. * lisp/muse-publish.el (muse-publish-surround-text): Fix serious bug in definition list publishing. We were skipping past the initial indented line, and that was causing an erroneous blockquote to be inserted. This alone merits a new release. * lisp/muse-texinfo.el (muse-texinfo-info-generate): Fix bug with XEmacs' return value for shell-command. * lisp/muse.el (muse-delete-and-extract-region): New compatibility function to deal with XEmacs' lack of the delete-and-extract-region function. 2007-08-18 Michael Olson * AUTHORS: Update. * lisp/muse-publish.el (muse-publish-include-tag): Switch from copy-tree to copy-alist, since Emacs21 does not have the former, and the latter does what we want. * lisp/muse.el: Force-require 'derived, since Emacs21 does not have derived-mode-p in subr.el like Emacs22 does. 2007-08-17 Michael Olson * etc/muse.rnc: Add the tag. * lisp/muse-context.el (muse-context-slides-header): Clarify what "mystyle" is. * lisp/muse-xml.el (muse-xml-markup-strings): Mark up citations as . We'll leave it to the post processing tools to interpret that. * texi/muse.texi (Directives, Blosxom Entries): Use @code{} for directives. (Citations): New section that explains further how to use the tag. The text was taken from Marcus Hoenicka's documentation at http://refdb.sourceforge.net/muse.html and modified. (Tag Summary): Link to the Citations section in the entry for . (ConTeXt): Update the documentation for muse-context-slides-header. 2007-08-17 Jean Magnan de Bornier * lisp/muse-context.el (muse-context-slides-header): Use #module directive, if it is provided. (muse-context-slides-header): Mention how to use #module. 2007-08-16 Michael Olson * Release Emacs Muse 3.10. * Makefile (dist, debprepare): Pass HEAD argument to git-archive. (upload): Don't depend on release rule. * NEWS: Document remaining changes. 2007-08-15 Michael Olson * NEWS: Document items through 2007-08-12. * lisp/muse-colors.el: Split the muse-directive-or-comment property into two separate properties that are muse-directive and muse-comment. (muse-colors-region-end): Make buffer-local. (muse-colors-delayed-commands): New variable that contains a list of commands to run immediately after highlighting. This is meant to allow highlighting functions to delay code until later. (muse-colors-region): Apply commands in muse-colors-delayed-commands. (muse-colors-inhibit-tags-in-directives): New variable that determines whether tags are allowed in directives. (muse-colors-custom-tags): Take muse-colors-inhibit-tags-in-directives into account. (muse-unhighlight-region): Remove muse-directive and muse-comment properties. (muse-colors-title): Modify muse-colors-delayed-commands. (muse-colors-title-lisp): New command that gets called after highlighting other things. This interprets tags, and is passed arguments specifying the beginning and end of the region. Thanks to Junichi Uekawa for the report. The reason we want to do things this way is because this is the behavior we get already when publishing the page. * lisp/muse.el (muse-goto-tag-end): Change to use muse-comment property rather than muse-directive-or-comment. 2007-08-14 Michael Olson * lisp/muse-colors.el: Document all functions and variables. (muse-colors-emphasized, muse-colors-underlined) (muse-colors-verbatim, muse-colors-custom-tags) (muse-colors-explicit-link, muse-colors-implicit-link): Don't trod on comments or the #title directive. (muse-colors-markup): Add comment rule. (muse-colors-implicit-link): Only remove flyspell overlay after we decide whether this is an implicit link, rather than before. (muse-colors-title): Add the muse-directive-or-comment property. (muse-colors-comment): New function that colorizes comments using font-lock-comment-face. (muse-colors-region-end): New variable indicating the end of the region that is currently being font-locked. This removes the need for an ugly "defvar end" hack. (muse-colors-emphasized, muse-colors-underlined) (muse-colors-verbatim): Use it. (muse-colors-region): Let-bind it. * lisp/muse-mode.el (muse-list-edit-minor-mode): Grammar fix in docstring. * lisp/muse-publish.el (muse-publish-markup-heading): Escape specials in heading now, rather than waiting on the whole-document pass later on. This lets generation work without validation errors. Thanks to Reid van Melle for the report. * texi/muse.texi (Tag Summary): Document tag. (Miscellaneous): New chapter containing "Muse List Edit Minor Mode" section. (Muse List Edit Minor Mode): New section that documents muse-list-edit-minor-mode. (Development): Mention the MuseDevlopment page on emacswiki.org. * lisp/muse.el (muse-goto-tag-end): Deal with case where we are font-locking and the end or beginning of a tag is in a comment or directive. 2007-08-12 Michael Olson * lisp/muse-html.el (muse-html-strip-links): New function that strips HTML links from a string. (muse-html-insert-contents): Use it, instead of muse-publish-strip-tags. This fixes a bug reported by Xin Shi involving the use of in section titles. * lisp/muse-project.el (muse-project-resolve-directory): New function that figures out the directory part of the path that provides a link to a page. (muse-project-resolve-link): Expand docstring. Use the new function. Don't call muse-publish-link-file, because that does the wrong thing when we have muse-file-extension set to nil. Thanks to Sebastian Obermanns for the report. (muse-project-publish-this-file): Let-bind muse-current-project. Also, if the file is not associated with a project, fall back to muse-publish-this-file. (muse-project-set-variables): Add this to muse-before-publish-hook, so that it gets called. This fixes a bug where project-specific variables were being used in Muse mode, but ignored when publishing. * lisp/muse-publish.el (muse-publish-link-name) (muse-publish-link-file, muse-publish-link-page): Add docstrings so that I can remember what each of these things do. (muse-publish-strip-tags): Remove, since it is no longer used. (muse-publish-cite-tag): Don't let-bind muse-publishing-directives, because there is no need to do so. Fix code indentation. (muse-publish-markup-attribute): Avoid multiple evaluation of attrs argument, in case it is list value instead of a symbol. Use sexp instead of form in the edebug-form-spec. (muse-publish-include-tag): Make a full copy of muse-publishing-directives, since it can be modified with setcdr. This fixes a bug where #title and some other directives were leaking out of an included region. (muse-publish-mark-up-tag): Don't let-bind muse-publishing-directives, because there is no need to do so. * lisp/muse.el (muse-page-name): Improve docstring. * texi/muse.texi (Development): Mention the http method for anonymous git access to the shared repo. 2007-08-10 Michael Olson * Makefile (dist, debprepare): Use git instead of tla. * contrib/httpd.el (httpd-send-file): Use insert-file-contents. * examples/mwolson/muse-init.el (my-muse-prepare-entry-for-xanga): Use muse-insert-file-contents. * experimental/muse-split.el (muse-publish-file) (muse-publish-presplit-publish, muse-publish-no-split-function) (muse-journal-split-by-entry, muse-journal-split-by-month): Use muse-insert-file-contents. * lisp/muse-book.el (muse-book-publish-chapter) (muse-book-get-directives): Use muse-insert-file-contents. * lisp/muse-http.el (muse-http-render-page): Use muse-insert-file-contents. * lisp/muse-poem.el (muse-poem-markup-tag): Use muse-insert-file-contents. * lisp/muse-publish.el (muse-insert-file-or-string) (muse-publish-file, muse-publish-include-tag) (muse-published-contents): Use muse-insert-file-contents. * lisp/muse.el (muse-insert-file-contents): New function that inserts a file with character code conversion, but none of the other frivolities. Since insert-file-contents-literally does not do character code conversion, it is not suitable for us. (muse-with-temp-buffer): Mention muse-insert-file-contents rather than insert-file-contents-literally. 2007-08-09 Michael Olson * lisp/muse.el (muse-write-file): Pay attention to coding-system-for-write and save-buffer-coding-system. This should fix a recently-introduced bug with writing Muse pages in different coding systems. 2007-08-08 Michael Olson * README (Prerequisites): Fix typo. (Compilation, Installation): Update. (Documentation, Further Documentation): Update URLs. (Further Documentation): Add quick blurb on how to participate in Muse development or track changes. * texi/muse.texi (Releases): Use gna.org URL for downloading the latest release, rather than my website. (Development): Change instructions to use git instead of Arch. Mention where to get a Windows binary for git. Improve the look of the listing. Add section with instructions for Becoming a Muse developer. (Installation): Update instructions for Makefile.defs.default and XEmacs. Add index entries. Add section for ELPA, since Muse ought to be distributed in ELPA after the 3.10 release. Fix typo and clarify wording. 2007-08-06 Michael Olson * texi/muse.texi: Make sure that attributes are marked up with @option{} rather than @code{} or @samp{} for consistency. (Journal): Add "muse-project-alist-considerations" subheading, along with a mention of :base-url. 2007-08-05 Michael Olson * .gitignore: Add texi/muse.html and the DVC log edit file. * Makefile.defs.default (install_info): Rename from INSTALLINFO. Turn this into something that can be called like a command, due to needing to deal with XEmacs, which has different argument order. Thanks to Terrence Brannon for the report. * lisp/muse-project.el (muse-project-of-file): Simplify by using catch, throw, and dolist. Look for exact matches before considering any subdirectories. If no exact matches are found, then pick the longest match. * lisp/muse.el (muse-sort-by-rating): Mention default test in documentation. * scripts/muse-build.el: Avoid interference from VC.el in the build process. * texi/Makefile (install): Call install_info. 2007-08-03 Michael Olson * lisp/muse-project.el (muse-project-applicable-styles): Remove useless argument ignore-regexp. Use saner logic. This fixes a bug where a file could potentially not exist but still appear in the used-styles list. Thanks to John Wiegley for the fix. (muse-project-publish-file): Don't take ignore-reegxp argument. 2007-08-02 Michael Olson * lisp/muse-publish.el (muse-batch-publish-files): Don't activate VC when publishing files in batch. This avoids some annoying messages when building QuickStart in the examples directory. * lisp/muse-mode.el (muse-mode): Don't try to indent line before inserting a comment. 2007-07-31 Michael Olson * lisp/Makefile: Add dependencies between Emacs Lisp files, so that Muse can be recompiled without running "make clean" after an update. * lisp/muse-publish.el (muse-publish-verse-tag): Unconditionally delete forward one character, since we are guaranteed to be on a blank line. Don't delete all initial whitespace of the first line. This fixes an issue where the output from the verse tag did not match the output from Muse's verse syntax. 2007-07-29 Michael Olson * Relicense to GPLv3. * Makefile.defs.default: Rename from Makefile.defs. This allows people to copy this file to Makefile.defs and make changes, without having the changes be accidentally committed. If Makefile.defs does not exist, this file is read instead, in order to minimize inconvenience to the casual user. * Makefile, contrib/Makefile, examples/Makefile, experimental/Makefile, lisp/Makefile, texi/Makefile: Use either Makefile.defs.default or Makefile.defs. * lisp/muse-mode.el (muse-list-edit-minor-mode-map): Use new function names. (muse-l-e-m-m-insert-list-item): Add real documentation. (muse-l-e-m-m-increase-list-item-indent) (muse-l-e-m-m-decrease-list-item-indent): Rename for clarity. Add real documentation. (muse-list-edit-minor-mode): Improve documentation. * texi/doclicense.texi (GNU Free Documentation License): Use pristine copy from Emacs source tree. * texi/muse.texi (Contributors): Move node and appendix indicators here, rather than doclicense.texi. 2007-07-29 Jean Magnan de Bornier * lisp/muse-latex.el (muse-latex-markup-strings): Change rule command which did not work correctly * lisp/muse-context.el (muse-context-markup-strings): Change rule command which did not work correctly; defined verse commands (muse-context-markup-specials-literal): Eliminate all unuseful entries 2007-07-29 Michael Olson * contrib/httpd.el (httpd-send-file): Use insert-file-contents-literally instead of insert-file-contents. * examples/mwolson/muse-init.el (my-muse-prepare-entry-for-xanga): Use insert-file-contents-literally instead of insert-file-contents. * experimental/muse-split.el (muse-publish-file) (muse-publish-presplit-publish, muse-publish-no-split-function) (muse-journal-split-by-entry, muse-journal-split-by-month): Use insert-file-contents-literally instead of insert-file-contents. * lisp/muse-book.el (muse-book-publish-chapter) (muse-book-get-directives): Use insert-file-contents-literally instead of insert-file-contents. * lisp/muse-http.el (muse-http-render-page): Use insert-file-contents-literally instead of insert-file-contents. * lisp/muse-import-latex.el (muse-import-latex): Set marker to nowhere when done, since they can slow things down. * lisp/muse-journal.el (muse-journal-html-munge-buffer): Set marker to nowhere when done, since they can slow things down. * lisp/muse-poem.el (muse-poem-markup-tag): Set marker to nowhere when done, since they can slow things down. Use insert-file-contents-literally instead of insert-file-contents. * lisp/muse-publish.el (muse-publish-markup-tag) (muse-publish-markup-word, muse-publish-markup-footnote) (muse-publish-call-tag-on-buffer): Set markers to nowhere when done, since they can slow things down. (muse-insert-file-or-string, muse-publish-file) (muse-publish-include-tag, muse-published-contents): Use insert-file-contents-literally instead of insert-file-contents. (muse-publish-surround-dl): Remove unused variable. Track whether a term has been found, and handle that case well. (muse-publish-ensure-blank-line): Use a marker, so that we don't lose our place when adding a newline. This really fixes the definition list item bug. (muse-publish-markup-list): Since people do seem to want definition lists with no terms, allow this. (muse-batch-publish-files): Set muse-current-output-style. * lisp/muse.el (muse-with-temp-buffer): Mention `insert-file-contents-literally'. 2007-07-28 Michael Olson * lisp/muse-mode.el (muse-browse-result): Set muse-current-output-style. (muse-mode): Don't duplicate the paragraph-start regexp unnecessarily. (muse-list-edit-minor-mode-map): New variable containing the keymap for Muse list edit minor mode. (muse-l-e-m-m-list-item-regexp): New variable that matches list items for Muse list edit minor mode. (muse-l-e-m-m-insert-list-item, muse-l-e-m-m-i-list-item-indentation) (muse-l-e-m-m-d-list-item-indentation): Variants of existing list item functions that change the list item regexp before calling the existing function. (muse-l-e-m-m-data): New variable that keeps track of the fill data that we overwrite when activating Muse list edit minor mode, so that we can restore it if the minor mode is toggled off. (muse-list-edit-minor-mode): New minor mode that is useful for editing lists in other major modes. (turn-on-muse-list-edit-minor-mode) (turn-off-muse-list-edit-minor-mode): New interactive functions that turn Muse list edit minor mode on and off, respectively. (muse-on-blank-line, muse-get-paragraph-start): Simplify some regexps. * lisp/muse-project.el (muse-project-publish-this-file): Set muse-current-output-style. This fixes a bug when publishing to a style that is not first in the list of styles. Thanks to Jean Magnan de Bornier for the report. * lisp/muse-publish.el (muse-publish-ensure-blank-line): New function that ensures that a blank line exists in the line before point. (muse-publish-markup-list): Use it, rather than `muse-publish-ensure-block'. This fixes a bug with definition list publishing. Thanks to meandtheshell for reporting this. * lisp/muse-wiki.el (muse-wiki-resolve-project-page): If the project argument is nil, default to the current project instead of the first project entry in muse-project-alist. This seems much more sane to me. * lisp/muse.el (muse-forward-list-item): Only check the 'face property if we are in Muse mode or one of its derivatives. This allows movement on nested lists to work in other modes, and fixes an issue with altering list indentation in muse-list-edit-minor-mode. 2007-07-27 Michael Olson * AUTHORS: Add new authors. * README: Permit Muse to be called "Emacs-Muse". * etc/IDEAS.muse: Remove now-implemented ideas and duplicate idea. * lisp/muse-publish.el (muse-publish-surround-text): Fix bug involving list items that have an extra blank line in front. * texi/muse.texi (Introduction): Mention that Emacs Muse, Muse, and Emacs-Muse are the same thing. 2007-07-27 Jean Magnan de Bornier * lisp/muse-context.el (muse-context-header): Put starttext after the modules who must be in preamble. (muse-context-markup-strings): Fixed mistake in begin-example and end-example. * lisp/muse-latex2png.el (muse-publish-math-tag): Replaced the math environment in ConTeXt when centered: "$$ $$" has to be "\startformula \stopformula". 2007-07-26 Michael Olson * lisp/muse-xml-common.el (muse-xml-escape-url): Do not escape parentheses in URLs. 2007-07-24 Michael Olson * examples/QuickStart.muse (Images): Fix typo where some text existed in the output but not in the example region. (Source Code): Fix another typo. Explain that publishing from console or X can make a difference. * lisp/muse-context.el (muse-context-pdf-program): New option that determines the program to use for generating PDF files for ConTeXt. (muse-context-pdf-cruft): New option that specifies the extensions of files to remove after generating PDF output successfully. (muse-context-slides-header): Docfix. (muse-context-pdf-generate): Use new options. * lisp/muse-publish.el (muse-publish-lisp-tag): Add missing save-restriction call. This was causing a world of hurt when using inside of . * texi/muse.texi (ConTeXt): New section that documents how to use the ConTeXt publishing styles. 2007-07-23 Michael Olson * lisp/muse-context.el: New file that provides support for publishing documents to the ConTeXt format. Thanks to Jean Magnan de Bornier for his work on this. * lisp/muse-docbook.el (muse-docbook-entities) (muse-docbook-bibliography): Remove unneeded save-restriction use. * lisp/muse-latex2png.el (muse-publish-latex-tag): s/contex/context/. * lisp/muse-latex.el (muse-latex-fixup-citations): Add docstring. (muse-latex-bibliography): Remove call to `widen', since it is not needed anymore. Remove unneeded save-restriction use. ("slides", "slides-pdf"): Indent elements uniformly. 2007-07-22 Michael Olson * lisp/muse-blosxom.el (muse-blosxom-new-entry): * lisp/muse-mode.el (muse-insert-tag): * lisp/muse-project.el (muse-read-project) (muse-read-project-file): * lisp/muse-publish.el (muse-publish-get-style): Use muse-completing-read-function. * lisp/muse-latex2png.el (muse-publish-latex-tag) (muse-publish-math-tag): Allow the context style -- which I plan to include soon -- to work with these tags. * lisp/muse.el (muse-completing-read-function): New option that determines which function to call when doing a completing-read. 2007-07-15 Michael Olson * lisp/muse-journal.el (muse-journal-html-entry-template) (muse-journal-rdf-entry-template) (muse-journal-rss-entry-template): Mention that this can be text or a filename. (muse-journal-rdf-entry-template, muse-journal-rss-header) (muse-journal-rss-footer, muse-journal-rss-entry-template): Add newlines to make the output look nicer. (muse-journal-html-munge-buffer, muse-journal-rss-munge-buffer): Use muse-insert-file-or-string for the entry templates, rather than muse-insert-markup. This allows and tags to be acted on. Thanks to Scott Hyde for the report. (muse-journal-html-munge-buffer): Escape quote of the day using entire-document specials before snarfing it. Mark entire template as read-only -- this fixes an incorrect escaping bug. Remove read-only properties before replacing template matches so that they can still be escaped with entire-document specials later on. (muse-journal-rss-munge-buffer): Make sure that title is escaped properly. (muse-journal-markup-tags): Rename from muse-journal-latex-markup-tags, because we will use it for journal-rss-entry as well. (muse-journal-qotd-tag): Move higher. Use begin-quote-item and end-quote-item. (muse-journal-rss-munge-buffer): Use journal-rss-entry rather than html. ("journal-latex", "journal-pdf", "journal-book-latex") ("journal-book-pdf"): Use muse-journal-markup-tags rather than muse-journal-latex-markup-tags. ("journal-rss-entry"): New style that is used by journal-rss and journal-rdf to mark up individual entries. It is needed so that we can do something meaningful with the qotd tag. (muse-journal-rdf-summarize-entries): Set this to nil by default, because it is annoying. Update docs to mention this. (muse-journal-rss-summarize-entries): Docfix. * lisp/muse-publish.el (muse-insert-file-or-string): Use muse-publish-markup-header-footer-tags. I'm not quite sure how this change got reverted. (muse-markup-tag-info): Make into a function. Move common code here, rather than duplicating it in two places. Deal with case where muse-publish-use-header-footer-tags is non-nil. (muse-publish-markup-specials, muse-publish-inhibit-style-hooks) (muse-inhibit-style-tags): Move higher to avoid byte-compiler warning. (muse-publish-use-header-footer-tags): New variable that indicates whether we should use just the header and footer tags, rather than the full set. (muse-insert-file-or-string): Bind muse-publish-use-header-footer-tags to t. (muse-publish-markup-tag, muse-publish-call-tag-on-buffer): Simplify call to muse-markup-tag-info. (muse-publish-mark-up-tag): Bind muse-publish-use-header-footer-tags to nil. * texi/muse.texi (Journal): Update for recent changes. 2007-07-14 Michael Olson * lisp/muse-journal.el (muse-journal-rss-munge-buffer): Don't delete the remainder of the buffer, since this causes the resulting RDF to have invalid syntax. Thanks to Phillip Lord for the report and the suggested fix. * lisp/muse-publish.el (muse-publish-markup-regexps): Add "^" to beginning of table-el regexp. This fixes a bug where Muse stalls when trying to publish a malformed table. Thanks to Ye Wenbin for the report and the suggested fix. 2007-07-12 Michael Olson * lisp/muse-wiki.el (muse-wiki-interwiki-regexp): Set to nil by default, rather than the empty string. This really fixes the bug that occurred when using Muse with muse-project-alist set to nil. Thanks to Jonathan Underwood for the report. (muse-wiki-update-interwiki-regexp): Set muse-wiki-interwiki-regexp to nil if muse-project-alist is not defined. (muse-wiki-handle-implicit-interwiki) (muse-wiki-handle-explicit-interwiki): Handle case where muse-wiki-interwiki-regexp is nil. 2007-07-10 Michael Olson * lisp/muse-mode.el (muse-grep): Abort search if the current project contains no directories. * lisp/muse-project.el (muse-project-file-alist): If muse-project-alist is not defined, or project is nil, return nil right away. This ought to fix a bug that occurred when using Muse with muse-project-alist set to nil. (muse-project-of-file): Make sure muse-project-alist is not nil. (muse-project-save-buffers): Make sure project is not nil. * lisp/muse-wiki.el (muse-wiki-resolve-project-page): Deal with case where muse-project-alist is nil. * lisp/muse.el (muse-replace-regexp-in-string): Explicitly check for XEmacs, since color-theme.el is poorly behaved, and defines its own replace-in-string. Bad color-theme.el -- no cookie for you. 2007-07-01 Michael Olson * Makefile (.PHONY): Update for new debian package rules. * lisp/muse-book.el (muse-book-latex-footer): Wrap long line. * lisp/muse-docbook.el (muse-docbook-fixup-citations): Re-indent. Use save-restriction properly. (muse-docbook-entities, muse-docbook-bibliography): : Re-indent. * lisp/muse-latex.el (muse-latex-footer): Wrap long line. (muse-latex-fixup-citations): Re-indent. Use save-restriction properly. (muse-latex-bibliography): Re-indent. * lisp/muse-publish.el (muse-publish-get-and-delete-attr): Move higher. This fixes an error at startup with some versions of Emacs. (muse-publish-cite-tag): Re-indent. * lisp/muse-wiki.el (muse-wiki-handle-explicit-interwiki): Narrow to the end of the link part, so as to exclude the description from the match. This fixes a bug with three-part links that have descriptions. Thanks to everyone who pointed it out. 2007-06-18 Michael Olson * lisp/muse-html.el (muse-html-markup-strings): Add anchor. (muse-xhtml1.1-markup-strings): New option that specifies XHTML 1.1 specific markup strings. (muse-html-insert-anchor): Use 'anchor string, rather than hard-coding it. Thanks to Chris Corsair for the suggestion. ("xhtml1.0"): New style that is an alias for the xhtml style. ("xhtml1.1"): New style that publishes XHTML 1.1 compliant output. 2007-06-17 Michael Olson * examples/QuickStart.muse: Make images local so that the Info version of this document works. Add for the Literal paragraphs chapter, so that it is clear what is happening. * Makefile: Add elpa target, which is used for building an ELPA package for Muse. * Makefile.defs (ELPADIR, ELPADESC): New variables used for building ELPA packages. * examples/Makefile (%.html, %.pdf, %.info): Add message to indicate what we are publishing. (realclean distclean fullclean): Remove all TeX crud. * examples/emacs-muse.png, examples/muse-made-with.png: Include so that the Info version of QuickStart can publish correctly. * lisp/muse-latex.el (muse-latex-slides-header) (muse-latex-lecture-notes-header): Docfix. * lisp/muse-project.el (muse-project-ignore-regexp): Add .git to the list of things to ignore. * lisp/muse-publish.el (muse-publish-markup-list): Remove unused variable. * lisp/muse-texinfo.el (muse-texinfo-process-natively): Set default to nil, since texinfmt.el is a serious nuisance. (muse-texinfo-markup-strings): Add newlines to begin-example and end-example. (muse-texinfo-decide-specials): Also escape URL-type specials in a whole slew of other contexts. * lisp/muse-xml-common.el (muse-xml-encoding-map): Change group to muse-xml. * lisp/muse-xml.el (muse-xml-footer): Docfix. * lisp/muse.el (muse-version): Release Emacs Muse version 3.03. 2007-06-16 Michael Olson * etc/IDEAS.muse: Add some ideas from David D. Smith. * examples/QuickStart.muse: Overhaul. * lisp/muse-project.el (muse-project): Call the last part of a muse-project-alist entry "Output styles" rather than "styles". * lisp/muse-publish.el (muse-publish-table-fields): Handle case where we have a pipe character at the beginning of line. * lisp/muse-xml-common.el (muse-xml-sort-table): Fix typo that was causing tables to not be sorted at all. * texi/muse.texi: Overhaul. It would be too time-consuming to list all of the changes here. The "Getting Started" and "Projects" chapters, in particular, were heavily revised. 2007-06-15 Michael Olson * NEWS: Update. * examples/QuickStart.muse: Mention new features. * lisp/muse-colors.el (muse-colors-toggle-inline-images): Docfix. Remove C-c C-i keybinding, since it conflicts with C-c TAB in the terminal, and C-c TAB is more important. Most people will not want to toggle images on and off that often. * lisp/muse-mode.el (muse-mode-map): Bind muse-insert-thing to C-c C-i as well, so that it works in the terminal. * lisp/muse-publish.el (muse-publish-literal-tag): Make the output look a bit tidier when removing the region. * lisp/muse-regexps.el (muse-list-item-regexp): Put definition list regexp part before other parts. (muse-ol-item-regexp): New regexp that specifies how to match an ordered list item. (muse-ul-item-regexp): New regexp that specifies how to match an unordered list item. (muse-table-field-regexp): New regexp that specifies how to match a definition list entry. * lisp/muse-texinfo.el (muse-texinfo-info-generate): Work around lack of support for @headitem in texinfmt.el. * lisp/muse.el: Wrap muse-line-beginning-position and muse-line-end-position in `eval-and-compile', since they are now used in muse.el. (muse-list-item-type): Use a simpler algorithm for detecting which kind of list item we have. This fixes a bug where a number in a definition list term was being detected incorrectly as an ordered list item. Fixes bug #6250. (muse-forward-list-item): Get the entire line with the list item. For some reason, Emacs 21 was not populating match 2 correctly, unlike Emacs 22, so this workaround was needed. * texi/muse.texi: (Keystroke Summary): Remove C-c C-i (`muse-insert-tag') documentation, and mention C-c C-i as an alternative keybinding to the C-c TAB stuff. Mention muse-colors-toggle-inline-images. 2007-06-14 Michael Olson * README: Mention that RelaxNG schema is in etc/ directory. * etc/emacs-wiki-migration.txt: New document that explains how to migrate from emacs-wiki to Muse. * etc/muse.rnc: Increment version number to 1.0. Fix several nested emphasis and nested lists edge cases. Move here from examples/. * lisp/muse-mode.el (muse-mode-map): Permit C-c C-M-t to do the same thing as C-c C-S-t, since the former works better in the console. Thanks to Leo for the suggestion. * lisp/muse-publish.el (muse-publish-markup-table) (muse-publish-markup-table-el): Include a newline in the return string, so that paragraph detection does not get confused. * lisp/muse.el (muse-with-temp-buffer): Docfix. * texi/muse.texi (Keystroke Summary): Document the C-c C-M-t keybinding. 2007-06-13 Michael Olson * etc/IDEAS.muse: Mark three-part-links item as done. * experimental/muse-message.el: Remove guard for muse-define-style calls. * lisp/muse-colors.el (muse-configure-highlighting): Fix bug where markup rules were being interpreted in reverse order. This should make implicit interwiki links work properly again. (muse-link-face): Strip anchor from end of a path, so that this works with anchors in interwiki links. (muse-colors-insert-image): Catch error that occurs in Emacs 21 when an image does not exist. * lisp/muse-wiki.el (muse-wiki-update-interwiki-regexp): Permit anchors. (muse-wiki-handle-implicit-interwiki): Docfix. Make anchors in interwiki links work. Thanks to Jim Ottaway for the initial implementation. (muse-wiki-handle-explicit-interwiki): Make anchors in interwiki links work. * lisp/muse.el (muse-handle-implicit-link): Docfix: only care about match 0. (muse-handle-explicit-link): Docfix: this does not modify the match data. (muse-file-remote-p): In Emacs 21, ange-ftp-name-format is a list that has the regexp in its car. 2007-06-12 Michael Olson * README: Document new etc/ directory. * etc/IDEAS.muse: Install things from new contributors just after the 3.03 release, since I won't have time to review the code before the release. Move to new etc/ directory. Slides publishing has been installed. * lisp/muse-latex.el (muse-latex-slides-header): New option that determines the header to use for publishing slides. (muse-latex-lecture-notes-header): New option that determines the header to use for publishing lecture notes. (muse-latex-slides-markup-tags): New option containing tags to use when publishing slides. (muse-latex-permit-contents-tag): Move higher in file. (muse-latex-slide-tag): New function to publish the tag. ("slides", "slides-pdf"): New publishing styles that create slides using Beamer. ("lecture-notes", "lecture-notes-pdf"): New publishing styles that create lecture notes using Beamer. * lisp/muse.el: Re-add the auto-mode-alist part to top-level, since otherwise Planner is not happy when `plan' is called during init. Remove stray quote from autoload snippet. 2007-06-11 Michael Olson * lisp/muse.el: Make the add-to-list 'auto-mode-alist part an autoload, rather than having it exist at top-level. Thanks to Leo for the suggestion. (muse-update-file-extension): Docfix. 2007-06-10 Michael Olson * lisp/muse-publish.el (muse-publish-strip-URL): Fix bug where URLs were being removed during publishing. Thanks to everyone who reported this. 2007-06-09 Markus Hoenicka * lisp/muse-book.el * lisp/muse-docbook.el * lisp/muse-latex.el * lisp/muse-publish.el: added support for element which denotes in-text citations * lisp/muse-html.el * lisp/muse-groff.el * lisp/muse-texinfo.el * lisp/muse-xml.el: added support for element (stub) 2007-06-06 Michael Olson * lisp/muse-regexps.el (muse-table-line-regexp) (muse-table-hline-regexp, muse-table-el-border-regexp): Fix regexps so that they work with XEmacs 21. Thanks to Adrian Tritschler for the report. * texi/muse.texi: Update copyright years. (HTML): Document muse-xhtml-style-sheet. Thanks to thorne for noticing. (Development): Change archive year to 2006. Thanks to Adrian Tritschler for noticing. So *that's* why some people had the 2005 version .... 2007-06-05 Michael Olson * Makefile (install-info): Remove $(MANUAL).info part, since this is taken care of already by texi/Makefile. Thanks to Leo for the report. * lisp/muse-journal.el (muse-journal-html-munge-buffer): Add read-only properties to qotd contents, so that they don't get double-escaped. Thanks to Leo for the report. 2007-06-04 Michael Olson * lisp/muse-colors.el (muse-link-face): If the link is to a remote -- that is, Tramp or ange-ftp -- file, then do not call file-exists-p on it. Thanks to Jim Ottaway for the suggestion. Fixes bug #5115. * lisp/muse-html.el (muse-html-insert-contents): Add documentation. Handle case where heading is read-only, but has muse-contents property. Remove the muse-contents property for any heading we come across so as to avoid double-including an item in an outer table of contents. (muse-html-denote-headings): New function that denotes whether a heading is not read-only by adding the muse-contents property to it. (muse-html-munge-buffer): If we are not to generate contents, still denote headings, in case some outer layer wants to generate contents for our headings. This should fix a bug with table of contents and the tag. Thanks to thorne for the report. * lisp/muse-publish.el (muse-publish-markup-region): Let-bind muse-publish-generate-contents and set it to nil. This should do the right thing when using tags. 2007-06-02 Michael Olson * NEWS: Update for non-inlined image change and support for table.el style tables. * examples/Makefile (clean): Clean backup files. * examples/QuickStart.muse (Images): New section that describes how to inline and not inline images. * lisp/muse-colors.el (muse-colors-resolve-image-file): Don't touch images that have "URL:" in front of them. * lisp/muse-protocols.el (muse-url-protocols): Add handler for "URL:". Use the identity function to resolve, since we don't want to rip "URL:" out while publishing, due to some magic that depends on that text. (muse-browse-url-url): New function that browses URLs that have "URL:" in front of them, by removing the "URL:" part and reprocessing the remainder. * lisp/muse-publish.el (muse-publish-classify-url): Docfix. (muse-publish-url): Recognize images in the description before images in the link. Fixes bug #5112. Thanks to Thomas Kappler for the suggested workaround. (muse-publish-desc-transforms): Add `muse-publish-strip-URL' as a default value. (muse-publish-classify-url): If target begins with "URL:" return type url. (muse-publish-strip-URL): New function that strips "URL:" from the beginning of a string. This is used to remove URL: from the link description. * texi/muse.texi (Markup Strings): Clarify the meanings of image-link, link, and link-and-anchor. (muse-publish-markup-regexps): Move normal table rule to 2350. Rule 2300 is now a regexp that matches table.el-style tables. (muse-publish-markup-functions): Add table-el entry. (muse-publish-table-el-table): New function that given a variant, publishes a table.el-style table using the table in the matched region. (muse-publish-markup-table-el): New function that determines whether the table.el-style table can be published, and what variant to use. * lisp/muse-regexps.el (muse-tag-regexp): New regexp that matches the borders of table.el-style tables. * lisp/muse-xml-common.el (muse-xml-markup-table): Make sure that the table has sufficient whitespace in front of it. * texi/muse.texi (Images): Update for new non-inlined image ability and provide example. 2007-05-31 Michael Olson * NEWS: Add example for setting `muse-html-table-attributes'. * lisp/muse-xml-common.el (muse-xml-markup-table): Add docstring. Publish multiple tbody tags if there is a horizontal separator after the heading, because that is valid HTML after all. 2007-05-30 Michael Olson * NEWS: Update. * lisp/muse-latex.el (muse-latex-markup-table): Deal with horizontal separators in tables. * lisp/muse-publish.el (muse-publish-markup-regexps): Recognize horizontal separators in tables. (muse-publish-trim-table): New function to remove initial and final blank columns from a table. (muse-publish-table-fields): Call `muse-publish-trim-table'. Deal with horizontal separators, aka "hlines". * lisp/muse-regexps.el (muse-table-hline-regexp): New regexp that defines the syntax of a horizontal separator in a table. * lisp/muse-texinfo.el (muse-texinfo-markup-table): Deal with horizontal separators. Publish header lines correctly. * lisp/muse-xml-common.el (muse-xml-sort-table): Deal with case where we have nonnumbers as a row type. This ignores sorting for hlines. (muse-xml-markup-table): Deal with horizontal separators. If the markup supports table groups, make hlines separate table groups. Otherwise, ignore them, since they cannot be marked up. Together, these changes allow us to support orgtbl-mode tables. Thanks to Carsten Dominik for the suggestion. 2007-05-26 Michael Olson * lisp/muse-project.el (muse-project-alist-styles): Allow for other things to be added to each generated style as well. For example, this permits me to add :base-url "http://blog.mwolson.org/" for my blog. 2007-05-25 Michael Olson * Makefile (debclean, debprepare, debbuild, debinstall, deb): New way of building Debian packages that preserves the original release tarball and is more modular. (debrevision, debrelease): Remove. (dist): No need to remove the debian/ directory, since it is now in its own branch. (debprepare): Copy over debian/ directory properly. * NEWS: Update. * examples/Makefile (clean): Remove QuickStart.texi, in case something went wrong during the build. (%.pdf): Publish the example using the normal pdf style, rather than info-pdf. * examples/QuickStart.muse: Add myself to the authors list. * lisp/muse-html.el (muse-html-src-tag): Ensure that we have sufficient blank lines before the tag. * lisp/muse-journal.el (muse-journal-latex-qotd-tag): Ensure that we have sufficient blank lines before the tag. * lisp/muse-latex.el (muse-latex-pdf-program): New option that specifies the program to call in order to generate PDF content from LaTeX content. (muse-latex-pdf-cruft): New option that specifies the extensions of files to remove after generating PDF output successfully. (muse-latex-pdf-generate): Use these new options. Work around the annoying edge case where a tilde character exists in the filename or directory path -- now this can only error out when the relative path from the output file to the source file contains a tilde, which is far less likely. * lisp/muse-publish.el (muse-publish-markup-attribute): Don't use muse-publish-ensure-block here after all, because et al may occur inline as part of other things. * lisp/muse-texinfo.el ("texi"): Make muse-texinfo-munge-buffer occur after full-document escaping, rather than before. This prevents automatically-inserted Texinfo code from being escaped. (muse-texinfo-pdf-generate): Rewrite to call `muse-latex-pdf-generate' with pdftex as the generating binary, because texi2pdf suffers irredeemably from the tilde edge case mentioned above. 2007-05-24 Michael Olson * NEWS: Drop vague entries and position interesting entries closer to the top of each section. Update for new changes. * lisp/muse-project.el (muse-project-ignore-regexp): Add Mercurial and bzr metadata directories to the list of things to ignore. * lisp/muse-publish.el (muse-publish-ensure-block): Rename from `muse-publish-ensure-block-tag', since we will use it for more than just tags. (muse-publish-markup-list, muse-publish-verse-tag) (muse-publish-quote-tag, muse-publish-example-tag) (muse-publish-markup-attribute): Use it. This fixes a bug that can occur when these types of markup occur immediately after a paragraph. It's good to have defined behavior! * texi/muse.texi (Markup Strings): Mention new argument for link-and-anchor. 2007-05-19 Michael Olson * lisp/muse-html.el (muse-html-markup-footnote): Add class tags to published footnotes and footnote references. Thanks to Scott Jaderholm for the idea. * lisp/muse-latex.el (muse-latex-markup-strings): Revert change to link-and-anchor, on the recommendation of the original submitter. 2007-05-14 Michael Olson * lisp/muse-latex.el (muse-latex-markup-strings): Use better link-and-anchor markup. Thanks to Jean Magnan de Bornier for the suggestion. * lisp/muse-publish.el (muse-publish-url): Pass the url without a file extension as the fourth argument. * README, texi/muse.texi (Getting Help and Reporting Bugs): Mention the new muse-el-logs mailing list. 2007-05-13 Michael Olson * lisp/muse-protocols.el (muse-resolve-url): Don't concatenate "\`" here. This fixes a problem with publishing custom URLs. 2007-05-12 Michael Olson * lisp/muse-blosxom.el (muse-blosxom-update-page-date-alist): Only update the list if the current buffer is associated with a file. This fixes a bug with M-x muse-publish-region in a temporary buffer. 2007-05-01 Michael Olson * lisp/muse-publish.el (muse-publish-region): Remove read-only properties from the published buffer, so that the results can be manually tweaked. 2007-04-23 Michael Olson * lisp/muse-publish.el (muse-publish-markup-footnote): If we can't find the footnote that goes with a reference, leave the reference as-is. This fixes an error where control characters could be placed in a published document. 2007-04-22 Michael Olson * IDEAS.muse: Add muse-slides.el to list of things to include before release. * lisp/muse-protocols.el (muse-url-protocols): Remove stray quote character. (muse-protocol-find): Find protocols correctly. Rewrite to use catch/throw. (muse-browse-url): Don't concatenate "\`" here. Together, this fixes a bug with browsing woman:// links. * lisp/muse-project.el (muse-project-alist-styles): Deal with case where entry-dir has a trailing backslash. (muse-project-publish-file): If a style is malformed, skip it and display a warning message. This should help people figure out where the problem is. 2007-04-21 Michael Olson * lisp/muse-latex2png.el (muse-publish-math-tag): If using the yet-to-be-included "contex" publishing style, use "$$" rather than "\[" and "\]". Thanks to Jean Magnan de Bornier for pointing this out. 2007-04-20 Michael Olson * lisp/muse-publish.el (muse-publish-inhibit-style-hooks): New variable that causes the :before and :before-end hooks to be ignored when non-nil. (muse-publish-markup-region): Use it. Also, guarantee that point is at end of region after publishing. (muse-publish-mark-up-tag): Simplify, taking advantage of the new variable. 2007-04-19 Michael Olson * IDEAS.muse: New file containing a list of ideas we have for new features, or patches that have yet to be applied. * README: Call it "Emacs Muse", not "the Emacs Muse". No need to be so confusing. * lisp/muse-html.el (muse-html-table-attributes): Fix typo in docstring. * lisp/muse-publish.el (muse-publish-markup-tags): Handle tags with muse-publish-literal-tag, rather than muse-publish-mark-read-only. (muse-publish-literal-tag): New function that publishes the tag. It adds the ability to add the optional "style" and "exact" elements, which cause text to only be included if the current publishing style matches some criteria. The text will be removed otherwise. Thanks to Jim Ottaway for the implementation. (muse-publish-mark-up-tag): Let the tag take the additional optional elements "style" and "exact", with much the same effect as the improvements, but after calling "function" or publishing the region first. Make it possible to put tags in regions in HTML publishing. 2007-04-12 Michael Olson * lisp/muse-publish.el (muse-publish-markup-heading): Make sure that a blank line always exists after a heading. This fixes a bug in Docbook paragraph detection. Thanks to Jean Magnan de Bornier for the report. * lisp/muse-xml.el (muse-xml-markup-regexps): Update paragraph detection regexp to that which is used in Docbook and HTML publishing styles. 2007-04-02 Michael Olson * README (muse-el-announce): Make a listing of mailing lists, rather than pointing to the old EmacsWikiMailingList page. Thanks to Andreas Roehler for noticing. 2007-04-01 Michael Olson * lisp/muse-publish.el (muse-publish-date-format): Add ` customization type and group. (muse-publish-region): New interactive function that publishes a region to a new buffer. * texi/muse.texi: Use "document" rather than "manual". 2007-03-31 Michael Olson * lisp/muse-publish.el (muse-style-derived-p): Fix bug where the expression (muse-style-derived-p "latex" (muse-style "latex")) yielded nil. It now yields t, as expected. Thanks to Jim Ottaway for the catch. 2007-02-25 Michael Olson * lisp/muse-publish.el (muse-publish-date-format): New option that specifies how to format the date when publishing Muse pages. Thanks to Thomas Gehrlein for the suggestion. (muse-publish-markup-buffer): Use it. 2007-02-23 Michael Olson * README: Add Prerequisites section to mention which versions of Emacs work with Muse. Thanks to Exal de Jesus Garcia Carrillo for the suggestion. Update link destination for Muse's page on emacswiki.org. 2007-02-15 Michael Olson * lisp/muse.el (muse-goto-tag-end): Modify regexp to allow tags to be not just at beginning of line. This fixes an error with the tag. Thanks to Jim Pivarski for the report. 2007-02-14 Michael Olson * lisp/muse-publish.el (muse-publish-classify-url): Check to see whether something is an image before checking to see if it is a URL. Thanks to ITSUMI ken-ichi for the report. 2007-02-13 Michael Olson * lisp/muse-publish.el (muse-publish-markup-regexps): Handle comments that have no text better. Thanks to fang.lungang for the report. (muse-publish-markup-comment): Deal with case where no comment text is provided. 2007-01-23 Michael Olson * lisp/muse-publish.el (muse-publish-ensure-block-tag): New macro that ensures that at least one blank line exists at the given position. This is used to avoid paragraph detection problems when block-level tags like immediately follow a paragraph. Thanks to Hans Ekbrand for the report. (muse-publish-example-tag): Use it. 2007-01-19 Michael Olson * lisp/muse-latex2png.el (muse-publish-math-tag): Only remove the previous blank line if we are publishing in Latex. Otherwise, that wouldn't be the right thing, so leave it be. 2007-01-17 Michael Olson * lisp/muse-latex2png.el (muse-publish-math-tag): Don't put multiple centered math lines on the same line; keep them on different lines. Use \[ math-text \] instead of $$math-text$$, since the latter seems to be deprecated. Thanks to Jody Klymak for the pointer. 2007-01-15 Michael Olson * lisp/muse-latex2png.el (muse-publish-latex-tag) (muse-publish-math-tag): Publish region read-only when current style is Latex-derived, so that Muse does not escape it. (muse-publish-math-tag): If 6 or more spaces come before the tag, surround the region with "$$" rather than "$". This is the Muse syntax for something centered, so it should be a good fit. 2007-01-15 Valery V. Vorotyntsev * lisp/muse-protocols.el (muse-url-protocols): Add "woman://" protocol. (muse-browse-url-man): Change man page URL format. The code is simpler when the section is left inside parentheses. (muse-browse-url-woman): New function. 2007-01-14 Michael Olson * AUTHORS: Bookkeeping. * lisp/muse-latex2png.el: Associate tag with muse-publish-math-tag, not muse-publish-latex-tag. Thanks to Jody Klymak for the report. (muse-publish-math-tag): Use muse-insert-markup for the "$" characters, so they don't get escaped. * lisp/muse-publish.el (muse-style-derived-p-1): New function to make muse-style-derived-p easier to implement. (muse-style-derived-p): If the style is not provided, fetch it and check to see if the car is a string. This should fix the other problem that was reported. * texi/muse.texi (Projects): Apply patch from Bradley M. Kuhn that explains a case where setting muse-file-extension to nil can cause unexpected behavior. 2007-01-09 Michael Olson * lisp/muse-publish.el (muse-publish-markup-regexps): Make comments higher priority than tags. Thanks to Stefan van der Walt for the report. 2007-01-08 Michael Olson * lisp/muse-publish.el (muse-markup-tag-info): Use the given argument rather than calling match-string. Thanks to Stefan van der Walt for the report. This should fix a bug with publishing . 2007-01-06 Michael Olson * Makefile (debclean): New rule split from debrevision and debrelease. (debbuild): Take distributor into account. * Makefile.defs (DISTRIBUTOR): New field that tracks what vendor/distributor we are building for. 2007-01-04 Michael Olson * lisp/muse-html.el (muse-html-src-tag): Remove initial blank line. * lisp/muse-publish.el (muse-publish-markup-tags): Make "src" point to muse-publish-src-tag by default, since and have different parameters. (muse-publish-src-tag): New barebones publishing function for , which is superseded when publishing in an HTML-based style. 2007-01-03 Michael Olson * lisp/muse-html.el (muse-html-src-tag): Document. * lisp/muse-publish.el (muse-publish-call-tag-on-buffer): New command that calls a given tag on the current buffer. Attributes may be passed. (muse-publish-examplify-buffer, muse-publish-versify-buffer): Use it. (muse-publish-srcify-buffer): New function that allows markup="src" in the tag. (muse-publish-get-and-delete-attr): New macro that gets an attribute from a list and removes the first instance of that attribute from said list. (muse-publish-markup-attribute): Handle markup="src". (muse-publish-command-tag, muse-publish-include-tag): Use muse-publish-get-and-delete-attr. This allows the remaining attributes to be passed. * texi/muse.texi (Tag Summary): Update for new tag as well as changes to and . 2006-12-30 Michael Olson * NEWS: Update. * experimental/muse-mathml.el (muse-publish-mathml-tag): Rename from muse-publish-math-tag to avoid conflict with muse-latex2png.el. 2006-12-23 Michael Olson * lisp/muse-latex2png.el: Update header, since this has been rewritten sufficiently to not need an assignment from the original author. (muse-latex2png-use-xhtml): Remove, since we now autodetect this. (muse-latex2png): Use two underscores to separate prefix and hash. (muse-latex2png-region): New function split from muse-publish-latex-tag that can be used easily by other code. Detect whether we are using an HTML-based publishing style, and insert a simpler markup if we are not. If we are using a Latex-based publishing style, do not generate an image, and leave the region alone. Return the path of the generated image, in case other functions want to use this programmatically. (muse-publish-latex-tag): Set a default prefix based on the name of the current file. (muse-publish-math-tag): New tag that surrounds the region with "$" characters, so that it becomes a Latex math region, and then publishes it. * lisp/muse-publish.el (muse-style-derived-p): New function that returns non-nil if a given style, or the current style if omitted, is equal to or derived from the given base style. This is useful in tags, because it allows the user to specify markup that is only to be inserted for one particular style. 2006-12-22 Michael Olson * lisp/muse-html.el (muse-html-markup-tags): Add tag. (muse-html-src-tag): New function which publishes the tag. Thanks to Clinton Ebadi and Charles Wang for the initial implementations. * lisp/muse-publish.el (muse-publish-markup-tags): Add tag. 2006-12-21 Michael Olson * examples/johnw/muse-johnw.el: Update for preferred muse-derive-style usage. Rename to muse-init.el. * examples/mwolson/muse-init.el: Update. * lisp/muse-book.el (muse-book-publish): New function split from muse-book-publish-project. This is used in the definitions for the book-latex and book-pdf styles. (muse-book-publish-p): New function split from muse-book-publish. (muse-book-get-directives): New function that retrieves the publishing directives from the given file. (muse-book-publish): Use muse-book-get-directives to set the title if no title was specified. * lisp/muse-project.el (muse-project): Add :publish-project entry to widget. (muse-read-project, muse-project-find-file): Message fix. (muse-project-publish-file-default): New function split from muse-project-publish-file. (muse-project-publish-file): Allow file-level publishing function to be specified by the :publish element. The default is muse-project-publish-file-default. (muse-project-publish-default): New function split from muse-project-publish. (muse-project-publish): Allow project-level publishing function to be specified by :publish-project element. The default is muse-project-publish-default. * lisp/muse-publish.el (muse-publish-file): Message fix. * texi/muse.texi (Book): Mention new way to publish books and provide an example, since the process may be non-obvious. 2006-12-20 Michael Olson * lisp/muse-docbook.el (muse-docbook-munge-buffer): Split out content-modifying code from the rest of muse-docbook-finalize-buffer. * lisp/muse-groff.el (muse-groff-munge-buffer): Rename from muse-groff-finalize-buffer, since it adds content to the buffer. * lisp/muse-html.el (muse-html-munge-buffer): Split out content-modifying code from the rest of muse-html-finalize-buffer. This fixes a bug when using with tags. * lisp/muse-journal.el (muse-journal-html-munge-buffer) (muse-journal-latex-munge-buffer) (muse-journal-rss-munge-buffer): Rename, since they add content to the buffer. * lisp/muse-latex.el (muse-latex-munge-buffer): Rename from muse-latex-finalize-buffer, since it adds content to the buffer. * lisp/muse-mode.el: * lisp/muse-project.el: * lisp/muse-publish.el: * lisp/muse.el: Fix recursive load error. * lisp/muse-texinfo.el (muse-texinfo-munge-buffer): Rename from muse-texinfo-finalize-buffer, since it adds content to the buffer. * lisp/muse-wiki.el: Comment cleanup. * lisp/muse-xml.el (muse-xml-charset-default): Docfix. 2006-12-17 Michael Olson * lisp/muse-latex.el (muse-latex-header, muse-latexcjk-header): Remove the definition of \comment, since Latex already has comment syntax. (muse-latex-markup-strings): Use the Latex comment syntax, rather than our own. Thanks to Ryan Stutsman for pointing this out. 2006-12-02 Michael Olson * lisp/muse-html.el (muse-html-insert-contents): Tweak regexp so that this can generate a proper table of contents for Planner HTML publishing. 2006-12-01 Michael Olson * lisp/muse.el (muse-replace-regexp-in-string): In case someone is using a very old Emacs, avoid an infinite loop that could occur when the regexp is an empty string. 2006-11-26 Michael Olson * NEWS: Bring up to date. * lisp/muse-docbook.el (muse-docbook-markup-paragraph): Fix nested list issues and multiple-stanza verse issues. This takes care of all of the markup issues I was worried about. * lisp/muse-project.el (muse-project-ignore-regexp): Minor docfix. (muse-project-publish-private-files): New option that indicates whether files with private filesystem permissions should be published. The default is to publish them, since it avoids confusion in new users. (muse-project-private-p): Use it. 2006-11-19 Michael Olson * lisp/muse-project.el (muse-project-resolve-link): If no remote style is found, which means that the link is not a Muse page, do not add a suffix or prefix to it. This should fix the "[[thing.owl]]" bug that Phillip Lord reported. * lisp/muse-publish.el (muse-publish-link-file): Simplify by removing unused 2nd argument. 2006-11-17 Michael Olson * lisp/muse-publish.el (muse-publish-surround-text): Fix bug in latex publishing where nested enumerated lists would be squashed together at the end. 2006-11-16 Michael Olson * lisp/muse-latex.el (muse-latex-markup-strings): Make an ordered list embedded in a definition list look right. This also allows for definitions to be separated from their terms, much like the way HTML does it by default, if the user puts a blank line or a line break between the term and the definition. If the term and definition are on the same line, they will be that way in the output as well. 2006-11-11 Michael Olson * muse.texi (Markup Strings): Fix typo. Thanks to Haiyong Zheng for the report. (Getting Help and Reporting Bugs): Fix emacswiki.org page URL. 2006-11-07 Michael Olson * lisp/muse.el (muse-version): Make Emacs Muse 3.02.93, the third release candidate for Muse 3.03, available. * NEWS: Update. 2006-11-06 Michael Olson * lisp/muse-project.el (muse-project-find-file): Fix bug when following a relative link worked even when the path was incorrect. 2006-11-04 John Sullivan * lisp/muse-mode.el (muse-mode-map): Remove C-c C-c binding for muse-follow-name-at-point to reduce collisions with other modes (Planner). * muse.texi (Keystroke Summary): Remove C-c C-c binding. 2006-11-04 Michael Olson * lisp/muse-wiki.el (muse-wiki-update-interwiki-regexp): Make page optional, and make interwiki delimiter a regular rather than shy group. (muse-wiki-handle-implicit-interwiki): Rename from muse-wiki-handle-interwiki. Use match group 3 to get the page. (muse-wiki-handle-explicit-interwiki): New function that is smarter about where an explicit link ends in a buffer. This allows you to refer to page names with invalid Wiki characters, such as underscores and dashes, merely by enclosing them in double brackets. Also, a bug with recognizing project names too loosely has been fixed. 2006-11-03 Michael Olson * lisp/muse-project.el (muse-project-page-file): Make relative links work as expected, hopefully. * lisp/muse-publish.el (muse-publish-this-file): Set the current output style manually, since it will differ from anything in the publishing style list. 2006-10-30 Michael Olson * lisp/muse-colors.el (muse-colors-markup): Remove note about grouping elements, since that no longer applies. (muse-colors-custom-tags): Explicitly match against muse-tag-regexp to get the match-data set the way we want. This really fixes the highlighting bug that Stefan reported. (muse-configure-highlighting): Set the original value to the symbol, not the modified value. Re-use modified rules properly. * lisp/muse-wiki.el (muse-wiki-update-interwiki-regexp): Fix bug introduced yesterday. 2006-10-29 Michael Olson * examples/mwolson: Update my example configuration. * NEWS: Update. * lisp/muse-colors.el (muse-configure-highlighting): Remove rules without a regexp in the first position before iterating through them to build muse-colors-vector. This fixes a bug with the display of tags. Thanks to Stefan Reichör for the report. * lisp/muse-project.el (muse-project-find-file): Permit non-Muse files in projects to be linked to. * lisp/muse-publish.el (muse-publish-url): Allow the original link to serve as a description for a URL, as long as it differs from the destination URL. This fixes the description of WikPage links in PDF output. (muse-publish-link-file): Check to see whether the given link points at a valid file. If so, return it. Otherwise, apply other transforms like prefix and link suffix. * lisp/muse-regexps.el (muse-file-regexp): If something ends in "/", it is a file or directory, not a Muse page. Thanks to Phillip Lord for the suggestion. * lisp/muse-wiki.el (muse-wiki-resolve-project-page): Use the path of the current page as the local path, instead of duplicating the remote file's path. This probably fixes at least one reported bug. since it's quite major. (muse-wiki-update-project-file-regexp) (muse-wiki-update-interwiki-regexp): Ensure that nil is never passed to regexp-opt, since that can cause Emacs 21 to throw an "maximum binding depth exceeded" error. Thanks to xs32 AT cornell DOT edu for the report. (muse-wiki-handle-wikiword): Avoid a potential stringp error. 2006-10-28 Michael Olson * lisp/muse-project.el (muse-project-choose-style-by-link-suffix) (muse-project-resolve-link): If the given style does not have a link-suffix, default to suffix. This fixes a bug I was noticing when linking to a file that was published in both PDF and HTML form. * lisp/muse-publish.el (muse-publish-determine-dl-indent): New function that is used as a callback to determine the initial amount of indentation that the current dl item has. (muse-publish-surround-dl): Use it. Pass the initial indent value and the post-indent value, instead of trying to determine them both. (muse-publish-strip-list-indentation): New function stripped from `muse-publish-surround-text' for readability. (muse-publish-surround-text): Instead of taking a determine-indent value, take a determine-indent-func function, which is called just after finding the next list item. If we are asked to determine the amount of indentation, concatenate indent and post-indent the first time around. This effectively fixes all known definition list issues. 2006-10-16 Michael Olson * lisp/muse.el: Provide the 'muse-nested-tags feature so that other software -- namely, Planner -- can detect whether they are using a version of Muse that supports nested tags. (muse-goto-tag-end): Moved from muse-publish.el and renamed from muse-publish-goto-tag-end. * lisp/muse-colors.el (muse-colors-tags, muse-colors-custom-tags): Adapt for nested tags. * lisp/muse-html.el (muse-html-markup-tags): Indicate that the tag is nestable. Thanks to Phillip Lord for noticing this. * lisp/muse-publish.el (muse-publish-markup-tag) (muse-publish-quote-tag): Use muse-goto-tag-end. * lisp/muse-wiki.el ("muse-colors"): Adapt for nested tags. 2006-10-15 Michael Olson * AUTHORS: Bookkeeping. * lisp/muse-blosxom.el (muse-blosxom-header): Indent code in lisp tag. * lisp/muse-groff.el (muse-groff-markup-tags): Adapt for nested tags. * lisp/muse-html.el (muse-html-markup-tags): Ditto. * lisp/muse-import-docbook.el (muse-import-docbook) (muse-import-docbook-files): Docfix. (muse-import-docbook-get-title): Remove cl.el-ism. * lisp/muse-import-xml.el (muse-import-xml): Fix compiler warning. * lisp/muse-journal.el (muse-journal-latex-markup-tags): Ditto. * lisp/muse-latex2png.el (muse-publish-markup-tags): Ditto. * lisp/muse-mode.el (muse-previous-reference): Minor docfix. (muse-next-reference, muse-previous-reference): Minor whitespace changes. (muse-mode-choose-mode): Add autoload cookie. Thanks to Leo for the suggestion. * lisp/muse-poem.el (muse-poem-tag): Ditto. * lisp/muse-publish.el (muse-publish-markup-tags) (muse-publish-markup-header-footer-tags): Shift 4th element to 5th element and make 4th element determine whether tags are nestable. (muse-publish-goto-tag-end): New function that moves to the end of a tag. Handle nested tags when NESTED is non-nil. (muse-publish-markup-tag): Call muse-publish-goto-tag-end. Use 5th element for function. (muse-publish-quote-tag): Handle nested quote tags. I've tested this on several scenarios, and it seems to work. (muse-publish-surround-text): Accept new optional argument LIST-ITEM which determines the regexp to use for list items. The default is to use muse-list-item-regexp. * muse.texi (Markup Tags): Mention nestable tags. * NEWS: Mention new files. 2006-10-15 Elena Pomohaci * lisp/muse-import-docbook.el: New file that converts Docbook XML into Muse format. * lisp/muse-import-xml.el: New file that provides helper routines for converting XML-ish files to Muse format. 2006-10-10 Michael Olson * NEWS: Update for 3.02.7 bugfix release. 2006-10-06 Sasha Kovar * lisp/muse-blosxom.el (muse-blosxom-header): Insert the date using the value in the muse #date directive. (muse-blosxom-use-metadate): New option that determines whether or not to use the #postdate directive. (muse-blosxom-format-date): Convert a date string to PyBlosxom metadate plugin format. 2006-09-30 Stefan Schlee * lisp/muse-protocols.el: Fix bug #6741: Exclude colon in recognised URLs. * muse.texi: Clarify handling of implicit links by mentioning which characters can prevent Muse from recognizing something as an implicit link. 2006-09-26 Stefan Schlee * lisp/muse-mode.el (muse-next-reference) (muse-previous-reference): Fix bug #6367 by moving point to the beginning of the link. 2006-09-26 Michael Olson * lisp/muse-colors.el (muse-use-font-lock): Don't quote beginning-of-line. This should fix a bug that was noticed in recent Emacs 22 builds. * lisp/muse-backlink.el: Wrap muse-backlink-split-string in an eval-and-compile block to avoid a compiler warning. 2006-09-25 Jim Ottaway * lisp/muse-backlink.el (muse-backlink-split-string): Compatibility with Emacs versions < 22 (muse-backlink-pending): New internal variable (muse-backlink-get-mode-hook): Find the major mode hook to use, so that backlinks are inserted at the right time. (muse-backlink-insert-hook-func): Remove unwind-protection; check for pending backlink, and that this is the targe page. (muse-backlink-handle-link): Don’t handle the link if we are already handling one. Return the link as well as the parent links. 2006-09-25 Sasha Kovar * lisp/muse-blosxom.el (muse-blosxom-new-entry): : Fix for bug #6942 - muse-blosxom-new-entry fails when using tags. 2006-09-14 Michael Olson * lisp/muse-texinfo.el (muse-texinfo-protect-wikiwords): Silence compiler warning. 2006-09-14 Jim Ottaway * lisp/muse-texinfo.el (muse-texinfo-protect-wikiwords): New function: Protect all wikiwords from START to END from further processing. (muse-texinfo-markup-heading): Use muse-texinfo-protect-wikiwords. 2006-09-13 Michael Olson * lisp/muse-texinfo.el (muse-texinfo-markup-heading): New function adopted from Jim Ottaway's patch. It removes links from the heading, and then marks the region read-only to inhibit WikiWord detection. 2006-09-13 Jim Ottaway * lisp/muse-texinfo.el (muse-texinfo-markup-functions): Add special handling for headings. (muse-texinfo-remove-links): New function that removes explicit links from the given strings, replacing them with a description. 2006-09-11 Michael Olson * muse.texi (Getting Help and Reporting Bugs): Mention the muse-el-internationalization mailing list. * lisp/muse.el (muse-path-sans-extension): New function that acts like file-name-sans-extension, but guarantees to never modify the directory part of the path. Thanks to Evan Monroig for investigating this. * lisp/muse-book.el (muse-book-publish-project): Use muse-path-sans-extension instead of file-name-sans-extension. * lisp/muse-publish.el (muse-publish-file, muse-publish-url): Ditto. 2006-08-30 Michael Olson * muse.texi (Blosxom Requirements): Fix typo. * contrib/pyblosxom/getstamps.py (recurse): Ignore metadata directories for bzr and darcs. * contrib/pyblosxom/make-blog, contrib/pyblosxom/hardcodedates.py: contrib/pyblosxom/getstamps.py: Update version and headers. 2006-08-27 Michael Olson * lisp/muse-colors.el (muse-configure-highlighting): Prune out any nil values before they get to mapconcat. This fixes a lockup when muse-wiki-match-all-project-files is nil. * lisp/muse-wiki.el (muse-wiki-match-all-project-files) (muse-wiki-ignore-implicit-links-to-current-page) (muse-wiki-interwiki-regexp, muse-wiki-interwiki-alist) (muse-wiki-resolve-project-page, muse-wiki-handle-interwiki) (muse-wiki-publish-small-title-words) (muse-wiki-publish-pretty-title): Docfix. (muse-wiki-update-local-wikiword-regexp): Rename from muse-wiki-update-local-wikiword-regexp. Set muse-wiki-project-file-regexp instead of muse-wiki-wikiword-regexp, as suggested by Per Sederberg. Don't take muse-wiki-use-wikiword into account, since this is a different concept now. (muse-wiki-update-wikiword-regexp): Remove. (muse-wiki-wikiword-regexp): In-line the :set function. (muse-wiki-handle-wikiword): Use muse-wiki-project-file-regexp. 2006-08-26 Michael Olson * lisp/muse-publish.el (muse-publish-surround-text): When looking for indented list items, ignore blank lines. * lisp/muse-wiki.el (muse-wiki-update-local-wikiword-regexp) (muse-wiki-update-interwiki-regexp): Use regexp-opt instead of mapconcat. This should hopefully fix a problem with large amounts of files with spaces in their name. Thanks to Greg Detre for the report. 2006-08-24 Michael Olson * lisp/muse-blosxom.el (muse-blosxom-new-entry): Remove the numbers from the argument to format-time-string. This fixes an XEmacs bug. Thanks to Michael Welle for the report and analysis. 2006-08-18 Michael Olson * lisp/muse-project.el (muse-project-file-entries): Since we are given a full path, match against the filename as well. This fixes an issue where backup files were being added to the file alist. * lisp/muse-docbook.el (muse-docbook-markup-regexps): Apply a fix from muse-html.el. 2006-08-12 Michael Olson * Makefile (.PHONY): Don't use line continuations. (realclean fullclean): Call realclean in subdirs, not distclean. (distclean): Don't call realclean, since this would wipe out our autoloads file. (dist): Use correct path to autoloads file. * NEWS: Catch up with the latest changes. * experimental/Makefile (.PHONY): Wrap long line. * lisp/Makefile (distclean): Do the same thing as "clean", not "realclean". * lisp/muse-project.el (muse-project-get-applicable-style): Indentation tweak. (muse-project-ignore-regexp, muse-project-recurse-directory): Docfix. (muse-project-of-file): Try the ignored files regexp against the base filename as well as the entire path. * lisp/muse-publish.el (muse-publish-this-file): Display message if the buffer is not associated with any file, so that we avoid errors later on. (muse-publish-url-desc): New function taken from muse-publish-url that causes a URL description to be transformed. (muse-publish-url): Call muse-publish-url-desc on either the description or the original URL if it will be used as a description. Accept the original URL as an argument, in case it was transformed earlier. (muse-publish-insert-url): Pass original URL as an argument. (muse-publish-markup-link): Make this somewhat easier to follow. Pass original URL as argument. (muse-publish-get-style): If the same style is used to publish to two different directories, prompt the user for which directory to use. (muse-publish-markup-header-footer-tags): Sync lisp tag with the latest changes. (muse-publish-markup-url): Pass original URL as an argument. This fixes the "nil" description for bare URLs that was in 3.02.91. Nothing like finding a bug just after completing the announcement of a release. * lisp/muse.el: Use defalias whenever convenient. (muse-version): Set version to 3.02.92 (3.03 RC2). 2006-08-10 Michael Olson * lisp/muse-html.el (muse-html-finalize-buffer): Since the html style does not derive from any other class, return `t' here. This, along with the corresponding change to muse-publish.el, fixes a problem with the table of contents getting inserted multiple times for custom html-based styles. (muse-html-markup-strings, muse-xhtml-markup-strings): Use a smarter method for table centering that works with XHTML. * lisp/muse-latex2png.el Rename all functions to have a "muse-latex2png" prefix. Turn all variables into customizable options in the muse-latex2png group. (muse-latex2png-img-dest): New option specifying where to place the images. (muse-latex2png-template): New option containing the template to use for the surrounding LaTeX code. (muse-latex2png-use-xhtml): New option that toggles strict XHTML compliance. (muse-latex2png-move2pubdir): Avoid multiple redundant error messages when something else goes wrong. Create the image subdirectory if it doesn't exist already -- thanks to Christian Straßer for the report. Expand the filename properly. (muse-publish-latex-tag, muse-latex2png): Ditto on error messages and filename expansion. (muse-latex2png): Use the "muse-latex2png" prefix by default. Set the default directory properly. * lisp/muse-publish.el (muse-style-run-hooks): Make sure that we do not run the same function twice. 2006-08-08 Michael Olson * lisp/muse-colors.el (muse-colors-explicit-link): Fix recently introduced wrong-type-argument error. * lisp/muse-html.el (muse-html-markup-strings) (muse-xhtml-markup-string): Cause table definition that contains image to be center-aligned. This should fix an issue with images not being centered when captions are very long. * lisp/muse-publish.el (muse-publish-table-fields): Trim whitespace from fields once we have split them up. * lisp/muse.el (muse-trim-whitespace): New function that strips leading and trailing whitespace from a string. 2006-08-07 Michael Olson * NEWS: Update through patch-95. * lisp/muse-colors.el (muse-colors-lisp-tag): Use a simpler regexp to match the tags. (muse-colors-explicit-link): Show images in link descriptions if inlined images are enabled. * lisp/muse-docbook.el (muse-docbook-markup-strings): Add definitions for 'image-with-desc, 'image, and 'image-link. (muse-docbook-markup-paragraph): If an inlined image begins a paragraph, insert before it. (muse-docbook-fixup-images): New function that upper-cases the "format" attribute of the tag. (muse-docbook-finalize-buffer): Call it. * lisp/muse-html.el (muse-html-markup-strings): Publish images with descriptions as centered tables, with a centered caption underneath. The resulting look is consistent with the way that they are published in the LaTeX style. Thanks to Jody Klymak for the suggestion. (muse-xhtml-markup-strings): Ditto, but XHTML apparently has no valid way to center a table. (muse-html-markup-paragraph): Use class="image" instead of "image-link" for paragraphs that start with an embedded image. * lisp/muse-latex.el (muse-latex-markup-specials-url): Use \textbackslash{} for "\". Thanks to Jim Ottaway for the suggestion. (muse-latex-markup-specials-image): New option that enables escaping of specials in images. This was split from the URL specials. (muse-latex-decide-specials): Handle 'image context. (muse-latex-fixup-dquotes): Go to beginning of document, instead of relying on caller to do this for us. * lisp/muse-publish.el (muse-publish-escape-specials): Document 'image context. (muse-publish-url): Use 'image context for images. Use 'image instead of 'image-link and 'image-link in place of 'url-with-image. Separate the image file from its extension so that docbook and texinfo can publish images correctly. (muse-publish-markup-link): Don't force a description if one is not given. This fixes a bug where images without descriptions were being published as 'image-with-desc instead of 'image. * lisp/muse-texinfo.el (muse-texinfo-decide-specials): Treat images the same as URLs. (muse-texinfo-markup-strings): Improve image markup to achieve an effect similar to that of the LaTeX publishing style. Simplify 'url string. * lisp/muse-xml-common.el (muse-xml-decide-specials): Ditto. * lisp/muse.el (muse-replace-regexp-in-string): Save match data when we have to use the custom version of this function. * muse.texi (Images): Explain how to toggle inlining of images and give better examples. Mention captions and that captioned images should not be used inside of text paragraphs. (Markup Strings): Bring up-to-date with the changes made since 3.02. 2006-08-06 Michael Olson * ChangeLog.1: Rename from ChangeLog.2004 to comply with standards in the Emacs source tree. * ChangeLog.2: Rename from ChangeLog.2005 to comply with standards in the Emacs source tree. * ChangeLog.3: New file created from the old ChangeLog. * Makefile.defs (VERSION): Set to 3.02.91. * NEWS: Update through patch-84. * lisp/muse.el (muse-version): Set to 3.02.91. * lisp/muse-colors.el (muse-colors-tags): Allow to take attributes. (muse-colors-lisp-tag): Figure out where the tag and its delimiter are instead of hard-coding it. * lisp/muse-mode.el (muse-insert-thing): Qualify "tag". (muse-mode): Make filling definition lists work better. This should fix #5359. * lisp/muse-publish.el (muse-style-run-hooks): Use `muse-style-element' instead of `muse-get-keyword' here. This should fix #6399. * muse.texi: Set version to 3.02.91 (3.02 RC2). See ChangeLog.3 for earlier changes. ;; Local Variables: ;; coding: utf-8 ;; End: ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������muse-el-3.20+dfsg/ChangeLog.3�����������������������������������������������������������������������0000644�0001750�0001750�00000320520�11331353120�015145� 0����������������������������������������������������������������������������������������������������ustar �taffit��������������������������taffit�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������2006-08-06 19:08:25 GMT Michael Olson patch-173 Summary: Make command, lisp, perl, python, and ruby tags interpret "markup". Revision: muse--main--1.0--patch-173 * lisp/muse-publish.el (muse-publish-markup-tags): Permit to take the "markup" argument. (muse-publish-markup-attribute): New macro that interprets the "markup" attribute. (muse-publish-lisp-tag, muse-publish-command-tag): Use muse-publish-markup-attribute. (muse-publish-command-tag): Make sure we have a newline at end of output. (muse-publish-perl-tag, muse-publish-python-tag) (muse-publish-ruby-tag): Pass remaining attributes to muse-publish-command-tag so that the "markup" attribute works. (muse-publish-include-tag): Use muse-publish-markup-attribute. * muse.texi (Tag Summary): Document changes to tags. modified files: ChangeLog lisp/muse-publish.el muse.texi 2006-08-06 16:44:16 GMT Michael Olson patch-172 Summary: Implement , , and tags. Revision: muse--main--1.0--patch-172 * lisp/muse-publish.el (muse-publish-markup-tags): Add , , and tags. (muse-publish-command-tag): Code indentation. (muse-publish-perl-tag): New function that publishes a tag. (muse-publish-python-tag): New function that publishes a tag. (muse-publish-ruby-tag): New function that publishes a tag. * muse.texi (Tag Summary): Document , , and . * examples/johnw/publish-johnw: Add explanatory comment. modified files: ChangeLog examples/johnw/publish-johnw lisp/muse-publish.el muse.texi 2006-08-06 01:34:51 GMT Michael Olson patch-171 Summary: Tweak build system. Revision: muse--main--1.0--patch-171 * Makefile, Makefile.defs, contrib/Makefile, experimental/Makefile: lisp/Makefile: Make the build system more abstract so that it can be easily re-used in other Emacs Lisp programs. * examples/mwolson/muse-init.el: Update. modified files: ChangeLog Makefile Makefile.defs contrib/Makefile examples/mwolson/muse-init.el experimental/Makefile lisp/Makefile 2006-08-05 15:12:38 GMT Michael Olson patch-170 Summary: Rename muse-convert-latex.el to muse-import-latex.el. Revision: muse--main--1.0--patch-170 * lisp/muse-import-latex.el: Rename from muse-convert-latex.el. Rename all functions as well. modified files: ChangeLog lisp/muse-import-latex.el renamed files: lisp/.arch-ids/muse-convert-latex.el.id ==> lisp/.arch-ids/muse-import-latex.el.id lisp/muse-convert-latex.el ==> lisp/muse-import-latex.el 2006-07-29 04:03:29 GMT Michael Olson patch-169 Summary: Manual: Update mailing list info. Revision: muse--main--1.0--patch-169 * muse.texi (Releases): Update mailing list info. (Implicit Links): Fix use of future tense. (Getting Help and Reporting Bugs): Update mailing list info. modified files: ChangeLog muse.texi 2006-07-29 03:49:29 GMT Michael Olson patch-168 Summary: Mention both Ubuntu and Debian throughout. Revision: muse--main--1.0--patch-168 * Makefile.defs, README, muse.texi: Mention Ubuntu wherever Debian is mentioned. modified files: ChangeLog Makefile.defs README muse.texi 2006-07-27 22:28:13 GMT Michael Olson patch-167 Summary: Fix #5899: muse-follow-name-at-mouse breaks mouse-yank-at-point. Revision: muse--main--1.0--patch-167 * lisp/muse-mode.el (muse-follow-name-at-mouse): Restore the point before calling the fallback keybinding. This fixes #5899. * lisp/muse-publish.el (muse-publish-escape-specials): Docfix. (muse-publish-mark-link): Docfix. (muse-link-specials): Docfix. modified files: ChangeLog lisp/muse-mode.el lisp/muse-publish.el lisp/muse.el 2006-07-27 20:46:38 GMT Michael Olson patch-166 Summary: Make C-c C-t publish the current file in a more sensible way. Revision: muse--main--1.0--patch-166 * lisp/muse-mode.el (muse-mode-map): Make C-c C-t call muse-project-publish-this-file instead of muse-publish-this file. Make C-c C-T call the latter. (muse-browse-result): Use `muse-project-get-applicable-styles'. (muse-follow-name-at-point): Docfix. * lisp/muse-project.el (muse-project-get-applicable-style): New function that prompts the user for a style if more than one style applies to the given file. (muse-project-publish-this-file): New function that publishes the currently-visited file according to `muse-project-alist', prompting if more than one style applies. * lisp/muse-publish.el (muse-publish-this-file): Docfix. * muse.texi (Keystroke Summary): Update for the changes made. C-c C-c was not previously documented. modified files: ChangeLog lisp/muse-mode.el lisp/muse-project.el lisp/muse-publish.el muse.texi 2006-07-27 19:36:31 GMT Michael Olson patch-165 Summary: Implement interactive insertion of URLs. Revision: muse--main--1.0--patch-165 * lisp/muse-mode.el (muse-insert-map): Add binding for muse-insert-url. (muse-insert-thing): Add text for URL to prompt. (muse-insert-relative-link-to-file): Docfix, style fix. (muse-insert-url): New function that reads a URL and description from the user. * muse.texi (Keystroke Summary): Mention insert-url keybinding. modified files: ChangeLog lisp/muse-mode.el muse.texi 2006-07-27 18:50:50 GMT Michael Olson patch-164 Summary: Make escaping of brackets in links work properly. Revision: muse--main--1.0--patch-164 * lisp/muse-colors.el (muse-colors-explicit-link): If the link has escaped characters, display them unescaped. * lisp/muse-mode.el (muse-make-link): Handle case where we are given no link. (muse-edit-link-at-point): Unescape the link before presenting it to the user for editing. * lisp/muse-publish.el (muse-publish-escape-specials-in-string): Minor coding style fix. (muse-publish-url): Unescape the link description before doing further transforms on it. The link has already been unescaped. * lisp/muse.el (muse-sort-by-rating): Minor coding style fix. (muse-escape-specials-in-string): New function that escapes specials in a string. This differs from Muse's other specials-escaping routines in that it replaces strings rather than characters, and is reversible if the specials are defined properly. (muse-replace-regexp-in-string): Docfix. (muse-link-specials): New variable containing the specials that Muse uses to handle syntactic issues with link text. Namely: brackets. The percent sign must also be escaped since it is used in the escaped text. (muse-link-escape, muse-link-unescape): Call muse-escape-specials-in-string. Embarrassingly, these functions previously had no effect before. modified files: ChangeLog lisp/muse-colors.el lisp/muse-mode.el lisp/muse-publish.el lisp/muse.el 2006-07-09 18:28:25 GMT Michael Olson patch-163 Summary: Make space around emdash optional. Revision: muse--main--1.0--patch-163 * lisp/muse-publish.el (muse-publish-markup-regexps): Make space around emdash optional. modified files: ChangeLog lisp/muse-publish.el 2006-07-08 20:38:12 GMT Michael Olson patch-162 Summary: muse-latex: Make publishing of tags optional. Revision: muse--main--1.0--patch-162 * lisp/muse-html.el (muse-html-insert-contents): Use nreverse rather than reverse for a minor speed boost. * lisp/muse-latex.el (muse-latex-header, muse-latexcjk-header): Only insert a table of contents when muse-latex-permit-contents-tag is nil. (muse-latexcjk-header): Make comments do the right thing. (muse-latex-permit-contents-tag): New option that specifies whether we should take action on the tag. (muse-latex-finalize-buffer): If muse-latex-permit-contents-tag is non-nil, publish a table of contents in the place where the tag is. * muse.texi (LaTeX): Bring up-to-date with new options. modified files: ChangeLog lisp/muse-html.el lisp/muse-latex.el muse.texi 2006-07-04 05:00:35 GMT Michael Olson patch-161 Summary: Fix publishing bug introduced in last patch. Revision: muse--main--1.0--patch-161 * lisp/muse-project.el (muse-current-output-style): New variable that holds the output style that is currently being used to publish a file. (muse-project-page-file): When a subdirectory is used, only record matches. Sort using matches, not entire list. (muse-project-resolve-link): Docfix. (muse-project-current-output-style): New function that returns the current output style. (muse-project-link-page): Use the local output style, not the other kind of style. (muse-project-publish-file): Set muse-current-output-style. * lisp/muse-wiki.el (muse-wiki-resolve-project-page): Use muse-current-output-style. modified files: ChangeLog lisp/muse-project.el lisp/muse-wiki.el 2006-07-04 04:06:44 GMT Michael Olson patch-160 Summary: Make links to files in subdirectories work. Revision: muse--main--1.0--patch-160 * lisp/muse-project.el (muse-project-alist-styles): Fix stray comment. (muse-project-page-file): Change to a defun. Handle files with the same name but in different directories. Handle case where a subdirectory is given in a link. (muse-project-choose-style-by-link-suffix): Move from muse-wiki.el. (muse-project-applicable-styles): Sort entries according to how late in the string the match for the include regexp occurs. (muse-project-resolve-link): Moved from muse-wiki.el. Strip subdirectory from page because we have already determined the correct path. (muse-project-link-page): New function that resolves a link to a page in the same project. * lisp/muse-publish.el (muse-publish-link-page): Simple wrapper for muse-project-link-page. (muse-publish-classify-url): Use muse-publish-link-page. * lisp/muse-regexps.el (muse-file-regexp): Don't match subdirectory links. * lisp/muse-wiki.el (muse-wiki-choose-style-by-link-suffix) (muse-wiki-resolve-project-page-1): Move to muse-project.el. (muse-wiki-resolve-project-page): Use muse-project-resolve-link. * lisp/muse.el (muse-collect-alist): New function that is like assoc, but returns a list of matches. (muse-sort-with-closure): New convenience macro for using `sort' with a closure argument. (muse-sort-by-rating): New function that takes a rating list and sorts it, discarding the rating. * muse.texi (Projects): Mention that you can use regexps in place of directory names in project entries. Caught that when source-diving. modified files: ChangeLog lisp/muse-project.el lisp/muse-publish.el lisp/muse-regexps.el lisp/muse-wiki.el lisp/muse.el muse.texi 2006-07-03 01:33:17 GMT Michael Olson patch-159 Summary: Fix publishing of blank table fields. Revision: muse--main--1.0--patch-159 * lisp/muse-regexps.el (muse-table-field-regexp): Make publishing blank fields work properly. modified files: ChangeLog lisp/muse-regexps.el 2006-07-03 00:39:47 GMT Michael Olson patch-158 Summary: Make muse-publish-markup-buffer usable even with no current file. Revision: muse--main--1.0--patch-158 * lisp/muse-publish.el (muse-publish-markup-buffer): Make this work even if no file is associated with the buffer. Thanks to dds for the fix. modified files: ChangeLog lisp/muse-publish.el 2006-06-26 18:13:59 GMT Michael Olson patch-157 Summary: Don't use illegal C-c i keybinding. Revision: muse--main--1.0--patch-157 * lisp/muse-mode.el (muse-mode-map): Remove "C-c i" binding and use "C-c TAB" for that purpose instead. Thanks to Adrian Aichner for the report. * muse.texi (Keystroke Summary): Update documentation for the above change. modified files: ChangeLog lisp/muse-mode.el muse.texi 2006-06-12 13:58:59 GMT Michael Olson patch-156 Summary: Improve ignored files regexp. Revision: muse--main--1.0--patch-156 * lisp/muse-project.el (muse-project-ignore-regexp): Ignore Darcs and SVN metadata directories, and use a better matching technique for autosave files. Previously, files with '#' in them were ignored erroneously. modified files: ChangeLog lisp/muse-project.el 2006-06-12 13:55:17 GMT Michael Olson patch-155 Summary: Provide example for in Muse manual. Revision: muse--main--1.0--patch-155 * muse.texi (Tag Summary): Give an example of using the tag. modified files: ChangeLog muse.texi 2006-06-10 06:49:08 GMT Michael Olson patch-154 Summary: Make PDF version of the Muse manual be generated correctly. Revision: muse--main--1.0--patch-154 * muse.texi (Tag Summary): Use a slightly different syntax for the table items. Even though texinfo published the HTML version correctly, the PDF version was not working. Thanks to mirko.vukovic for the report. modified files: ChangeLog muse.texi 2006-06-03 23:38:12 GMT Michael Olson patch-153 Summary: Fix bug introduced in last patch. Revision: muse--main--1.0--patch-153 * muse-publish.el (muse-publish-include-tag): Fix bug introduced in last patch. modified files: ChangeLog lisp/muse-publish.el 2006-06-03 21:18:35 GMT Michael Olson patch-152 Summary: Move Debian stuff into its own branch. Revision: muse--main--1.0--patch-152 * debian: Moved to muse--debian--0. removed files: debian/.arch-ids/=id debian/.arch-ids/NEWS.id debian/.arch-ids/changelog.id debian/.arch-ids/compat.id debian/.arch-ids/control.id debian/.arch-ids/copyright.id debian/.arch-ids/emacsen-install.id debian/.arch-ids/emacsen-remove.id debian/.arch-ids/emacsen-startup.id debian/.arch-ids/muse-el.dirs.id debian/.arch-ids/muse-el.docs.id debian/.arch-ids/muse-el.examples.id debian/.arch-ids/muse-el.info.id debian/.arch-ids/rules.id debian/NEWS debian/changelog debian/compat debian/control debian/copyright debian/emacsen-install debian/emacsen-remove debian/emacsen-startup debian/muse-el.dirs debian/muse-el.docs debian/muse-el.examples debian/muse-el.info debian/rules modified files: ChangeLog removed directories: debian debian/.arch-ids 2006-06-03 21:12:36 GMT Michael Olson patch-151 Summary: Provide some markup shortcuts for the tag. Revision: muse--main--1.0--patch-151 * lisp/muse-publish.el (muse-publish-examplify-buffer): New function that transforms the current buffer as if it were an region. (muse-publish-versify-buffer): Ditto, but for regions. (muse-publish-include-tag): Docfix. Support special cases for markup="example" and markup="verse". * muse.texi (Tag Summary): Update for new shortcuts. modified files: ChangeLog lisp/muse-publish.el muse.texi 2006-06-01 04:14:45 GMT Michael Olson patch-150 Summary: Really update ChangeLog.2005. Revision: muse--main--1.0--patch-150 * ChangeLog.2005: Really update this. new files: .arch-ids/ChangeLog.2005.id ChangeLog.2005 removed files: .arch-ids/ChangeLog.2005.id ChangeLog.2005 modified files: .arch-ids/muse.texi.id ChangeLog 2006-06-01 04:05:33 GMT Michael Olson patch-149 Summary: Second attempt at fixing XEmacs beta problem. Revision: muse--main--1.0--patch-149 * lisp/Makefile (ELC): Revert previous change, now that I have a hunch about what causes the problem. * lisp/muse-publish.el (muse-publish-markup-regexps): Move anchor markup lower to future-proof an idea that I have. (muse-style-element): Make this a function instead of a substitution, especially since it is potentially recursive. modified files: ChangeLog ChangeLog.2005 lisp/Makefile lisp/muse-publish.el 2006-06-01 03:47:49 GMT Michael Olson patch-148 Summary: Update ChangeLogs. Revision: muse--main--1.0--patch-148 * ChangeLog: Rename from ChangeLog.2006 to follow Emacs conventions. * ChangeLog.2005: Mention ChangeLog.2004 for earlier changes. * lisp/muse-regexps.el: Add a few comments. * muse.texi (Tag Summary): Add example of use. modified files: ChangeLog ChangeLog.2005 lisp/muse-regexps.el muse.texi 2006-06-01 03:44:00 GMT Michael Olson patch-147 Summary: Try to work around a bug in XEmacs beta. Revision: muse--main--1.0--patch-147 * lisp/Makefile (ELC): Compile muse-publish.el first, to try to work around a bug in XEmacs beta. modified files: ChangeLog lisp/Makefile 2006-05-30 18:21:51 GMT Michael Olson patch-146 Summary: Fix tag-publishing in and . Revision: muse--main--1.0--patch-146 * lisp/muse-publish.el (muse-insert-file-or-string): Don't set muse-publish-markup-tags, since that messes other things up for and . (muse-inhibit-style-tags): New variable that specifies whether to disable looking for tag definitions that are specific to the current style. This is useful for publishing headers and footers. (muse-publish-markup-tag): Use `muse-inhibit-style-tags', but disable it unconditionally when calling a tag's function, so that the effect does not propagate. * lisp/muse.el (muse-file-remote-p): New function that detects whether the given file path is a remote location. This is not used yet. modified files: ChangeLog lisp/muse-publish.el lisp/muse.el 2006-05-30 00:19:37 GMT Michael Olson patch-145 Summary: Rename muse-convert.el to muse-latex-convert.el. Revision: muse--main--1.0--patch-145 * lisp/muse-convert-latex.el: Rename from muse-convert.el, since more files of this nature are expected in the future. modified files: ChangeLog Makefile.defs debian/changelog lisp/muse-convert-latex.el renamed files: lisp/.arch-ids/muse-convert.el.id ==> lisp/.arch-ids/muse-convert-latex.el.id lisp/muse-convert.el ==> lisp/muse-convert-latex.el 2006-05-29 21:34:34 GMT Michael Olson patch-144 Summary: List all tags in Muse's documentation. Revision: muse--main--1.0--patch-144 * lisp/muse-publish.el (muse-publish-markup-region): Remove cruft that I was trying out. (muse-publish-contents-depth): New option that specifies the maximum depth of headings to include with tags. (muse-publish-contents-tag): Use it. (muse-publish-include-tag): Docfix. * muse.texi (Paragraphs): Mention
    and tags. (Tag Summary): New section that defines the syntax used for tags and gives a complete listing of all of the tags that Muse comes with, as well as some documentation for each tag. (HTML): Update documentation. modified files: ChangeLog lisp/muse-publish.el muse.texi 2006-05-29 18:48:41 GMT Michael Olson patch-143 Summary: Implement and tags. Revision: muse--main--1.0--patch-143 * lisp/muse-html.el (muse-html-markup-regexps): Make paragraph detection work better when a paragraph follows some other markup, especially tables. * lisp/muse-publish.el (muse-publish-markup-tags): Add and tags. (muse-publish-markup): Fix edge case. (muse-publish-markup-header-footer-tags): New option that specifies which tags may be used when publishing headers and footers. (muse-insert-file-or-string): Use muse-publish-markup-header-footer-tags instead of a hard-coded value. (muse-publish-markup-region): Make title and style arguments optional, so that this is easier to use. (muse-publish-include-tag): Implement tag. I've tested all of the cases I can think of, and it works. (muse-publish-mark-up-tag): Implement tag. This is handy for times when you want to publish Muse markup in headers and footers. Adding a table of contents to a header should be particularly easy now. modified files: ChangeLog lisp/muse-html.el lisp/muse-publish.el 2006-05-29 14:59:31 GMT Michael Olson patch-142 Summary: Make ChangeLog conform to conventions better. Revision: muse--main--1.0--patch-142 * ChangeLog: Renamed from ChangeLog.2006 in order to follow Emacs conventions better. Specify the buffer encoding. Add helpful notices near the bottom of this and ChangeLog.2005. modified files: ChangeLog ChangeLog.2004 ChangeLog.2005 debian/rules {arch}/muse/muse--main/muse--main--1.0/mwolson@gnu.org--2006/patch-log/base-0 renamed files: .arch-ids/ChangeLog.2006.id ==> .arch-ids/ChangeLog.id ChangeLog.2006 ==> ChangeLog 2006-05-28 07:45:09 GMT Michael Olson patch-141 Summary: Provide explanation of how to invoke getstamps.py. Revision: muse--main--1.0--patch-141 * contrib/pyblosxom/getstamps.py: Strip the Muse file extension when writing the timestamps file. * contrib/pyblosxom/make-blog: New example script that shows how to invoke getstamps.py. * examples/mwolson/stylesheets/common.css: Update. * muse.texi (Blosxom Requirements): Mention the new example script. Additionally, explain how to call getstamps.py. new files: contrib/pyblosxom/.arch-ids/make-blog.id contrib/pyblosxom/make-blog modified files: ChangeLog.2006 contrib/pyblosxom/getstamps.py examples/mwolson/stylesheets/common.css muse.texi 2006-05-28 06:40:46 GMT Michael Olson patch-140 Summary: muse-blosxom: Perform extra check on category in new entry. Revision: muse--main--1.0--patch-140 * lisp/muse-blosxom.el (muse-blosxom-new-entry): Make it impossible to write an invalid categories line, which could cause other mysterious troubles later on. modified files: ChangeLog.2006 lisp/muse-blosxom.el 2006-05-28 06:31:11 GMT Michael Olson patch-139 Summary: Improve documentation in the included pyblosxom plug-ins. Revision: muse--main--1.0--patch-139 * contrib/pyblosxom/getstamps.py, hardcodedates.py: Improve documentation. The initial wording was very confusing. modified files: ChangeLog.2006 contrib/pyblosxom/getstamps.py contrib/pyblosxom/hardcodedates.py 2006-05-27 06:25:32 GMT Michael Olson patch-138 Summary: Minor tweak in my example CSS stylesheet. Revision: muse--main--1.0--patch-138 * examples/mwolson/stylesheets/common.css: Be careful about distinguishing between links and anchors. modified files: ChangeLog.2006 examples/mwolson/stylesheets/common.css 2006-05-26 14:38:01 GMT Michael Olson patch-137 Summary: Use better fallback when displaying warnings. Revision: muse--main--1.0--patch-137 * lisp/muse.el (muse-display-warning): Use a better fallback if `display-warning' does not exist. modified files: ChangeLog.2006 lisp/muse.el 2006-05-25 21:23:55 GMT Michael Olson patch-136 Summary: Make the Table of Contents CSS easier to customize. Revision: muse--main--1.0--patch-136 * examples/mwolson/muse-init.el (muse-bad-link): Update. * examples/mwolson/stylesheets/*.css: Update and add license. * lisp/muse-html.el (muse-html-insert-contents): Surround contents with
    section for easier CSS hacking. Remove the class attribute of other elements, since we don't need it anymore. modified files: ChangeLog.2006 Makefile.defs debian/changelog examples/mwolson/muse-init.el examples/mwolson/stylesheets/blog.css examples/mwolson/stylesheets/common.css examples/mwolson/stylesheets/print.css examples/mwolson/stylesheets/screen.css lisp/muse-html.el 2006-05-24 03:30:40 GMT Michael Olson patch-135 Summary: Fix a potential unbounded recursive call. Revision: muse--main--1.0--patch-135 * lisp/muse-project.el (muse-updating-file-alist-p): New variable that prevents calls to muse-project-file-alist in its hook functions from going into an infinite loop. (muse-project-file-alist): Use it. * lisp/muse-wiki.el (muse-wiki-updating-wikiword-p): Remove. This is now handled in muse-project.el. (muse-wiki-update-local-wikiword-regexp): Remove the use of muse-wiki-updating-wikiword-p. modified files: ChangeLog.2006 lisp/muse-project.el lisp/muse-wiki.el 2006-05-23 18:10:49 GMT Michael Olson patch-134 Summary: Try not to call tramp during publishing. Revision: muse--main--1.0--patch-134 * lisp/muse-publish.el (muse-insert-file-or-string): Do not call file-readable-p on text that has a newline in it, because this could cause tramp to be invoked. modified files: ChangeLog.2006 lisp/muse-publish.el 2006-05-23 15:30:02 GMT Michael Olson patch-133 Summary: Make links colored blue by default. Revision: muse--main--1.0--patch-133 * lisp/muse-colors.el (muse-link): Make links blue by default, like most other Emacs modes do. modified files: ChangeLog.2006 lisp/muse-colors.el 2006-05-23 14:24:58 GMT Michael Olson patch-132 Summary: Fix publishing error with tables and initial whitespace. Revision: muse--main--1.0--patch-132 * lisp/muse-publish.el (muse-publish-markup-regexps): Move table rule above blockquote and centered text, so that indented but blank initial table fields publish correctly. * lisp/muse-regexps.el (muse-table-line-regexp): Make this much simpler. We accept anything that has at least one field delimiter. modified files: ChangeLog.2006 lisp/muse-publish.el lisp/muse-regexps.el 2006-05-18 06:58:58 GMT Michael Olson patch-131 Summary: Add muse-protocol-iw.el to experimental folder. Revision: muse--main--1.0--patch-131 * experimental/muse-protocol-iw.el: New experimental file that implements an interwiki protocol of sorts that handles subdirectories. new files: experimental/.arch-ids/muse-protocol-iw.el.id experimental/muse-protocol-iw.el modified files: AUTHORS ChangeLog.2006 experimental/muse-split.el 2006-05-18 06:43:30 GMT Michael Olson patch-130 Summary: Add muse-split.el to experimental folder. Revision: muse--main--1.0--patch-130 * experimental/muse-split.el: New experimental file that splits published Muse files into several smaller files. new files: experimental/.arch-ids/muse-split.el.id experimental/muse-split.el modified files: AUTHORS ChangeLog.2006 Makefile.defs debian/changelog debian/control 2006-05-18 06:03:49 GMT Michael Olson patch-129 Summary: muse-wiki: Make the interwiki resolver a bit more clever. Revision: muse--main--1.0--patch-129 * lisp/muse-project.el (muse-project-choose-style): New function that chooses a style from a list of styles, given a user-supplied test. * lisp/muse-wiki.el (muse-wiki-choose-style-by-link-suffix): New function that is used along with `muse-project-choose-style' to pick the first style that matches a given value for :link-prefix. (muse-wiki-resolve-project-page-1): New function split from `muse-wiki-resolve-project-page' for readability. Try to match files that have the same link-suffix. This should hopefully fix a bug noticed by Hans Ekbrand. modified files: ChangeLog.2006 lisp/muse-project.el lisp/muse-wiki.el 2006-05-18 01:24:04 GMT Michael Olson patch-128 Summary: Fix bug where links with :: in them were marked up as lists. Revision: muse--main--1.0--patch-128 * lisp/muse-html.el, lisp/muse-publish.el, lisp/muse-xml-common.el: Change noemphasis property to muse-link. * lisp/muse.el (muse-forward-list-item): Respect muse-link property. * lisp/muse-publish.el (muse-publish-surround-text) (muse-publish-markup-list): Ditto. This should fix a bug. (muse-publish-markup-list): Docfix. (muse-publish-mark-link): Rename from `muse-publish-mark-noemphasis'. * lisp/muse-regexps.el (muse-list-item-regexp, muse-dl-term-regexp): There must be either one or more spaces or a single newline after the colons. This prevents an ambiguity with the double-colon muse-wiki interwiki delimiter. modified files: ChangeLog.2006 lisp/muse-html.el lisp/muse-publish.el lisp/muse-regexps.el lisp/muse-xml-common.el lisp/muse.el 2006-05-17 21:27:19 GMT Michael Olson patch-127 Summary: DTRT with explicit links that have no description. Revision: muse--main--1.0--patch-127 * lisp/muse-publish.el (muse-publish-markup-link): If we are given an explicit link without a description, use the name of the linked page. modified files: ChangeLog.2006 lisp/muse-publish.el 2006-05-16 15:53:56 GMT Michael Olson patch-126 Summary: Fix emdash in link description bug. Revision: muse--main--1.0--patch-126 * lisp/muse-publish.el (muse-publish-markup-emdash): Don't markup emdash if we are in a link, since otherwise it will be incorrectly escaped. Thanks to Chiyuan Zhang for the report. modified files: ChangeLog.2006 Makefile.defs debian/changelog lisp/muse-publish.el 2006-05-12 04:16:43 GMT Michael Olson patch-125 Summary: Fix #5925: Emphasis on item breaks lists. Revision: muse--main--1.0--patch-125 * lisp/muse-blosxom.el ("blosxom-html", "blosxom-xhtml"): Use find-file as the browsing function. * lisp/muse-mode.el (muse-browse-result): Only include styles that match the current file. * lisp/muse.el (muse-list-item-critical-point): Take a new argument named `offset' into account, in case the list-item regexp is nested in another group. (muse-forward-list-item): Call `muse-list-item-critical-point' with an offset of 1. This should fix an unpleasant list-as-blockquote error that was noticed recently. Thanks to John Sullivan for the report. modified files: ChangeLog.2006 lisp/muse-blosxom.el lisp/muse-mode.el lisp/muse.el 2006-05-09 00:55:02 GMT Michael Olson patch-124 Summary: Fix a couple of beginning-of-buffer errors. Revision: muse--main--1.0--patch-124 * muse-mode.el (muse-mode-flyspell-p, muse-link-at-point): Make sure we don't throw an error if at the beginning of the buffer. Thanks to John Sullivan for the report. modified files: ChangeLog.2006 lisp/muse-mode.el 2006-05-08 23:42:42 GMT Michael Olson patch-123 Summary: muse.texi: Change use of @subsubheading to @subheading. Revision: muse--main--1.0--patch-123 * muse.texi: Change use of @subsubheading to @subheading throughout document. modified files: ChangeLog.2006 muse.texi 2006-05-08 23:30:58 GMT Michael Olson patch-122 Summary: muse.texi: Change subsections to subheadings. Revision: muse--main--1.0--patch-122 (Author: John Sullivan ) * muse.texi: Change @subsection and @strong to @subheading throughout document. modified files: ChangeLog.2006 Makefile.defs debian/changelog muse.texi 2006-05-08 08:53:03 GMT Michael Olson patch-121 Summary: Update keystrokes used in muse-mode, as well as docs. Revision: muse--main--1.0--patch-121 * lisp/muse-mode.el (muse-insert-map): New variable that defines the keymap to use when the user wants to insert something into the current buffer using `C-c i'. (muse-mode-map): Sort keys somewhat. Remove binding of `C-c C-v' to muse-follow-name-at-point, since this is already used for muse-browse-result. Call `muse-insert-thing' on `C-c i', which will prompt for the thing to insert. (muse-insert-thing): New function that prompts the user for something to insert into the current buffer. It tries to be as friendly as possible by catching possible errors with the message "Not inserting anything". (muse-mode-completions): Rename from `muse-completions', since this is what we use in `muse-mode'. (muse-mode-current-word): Similarly. These don't seem to work correctly, for unknown reasons. * muse.texi (Keystroke Summary): Update to include all keystrokes that we utilize. modified files: ChangeLog.2006 lisp/muse-mode.el muse.texi 2006-05-08 07:34:41 GMT Michael Olson patch-120 Summary: Fix buggy behavior in muse-browse-result. Revision: muse--main--1.0--patch-120 * lisp/muse-mode.el (muse-browse-result): Construct a mapping of style names to styles, based on the styles contained in the current Muse project. Thanks to kid kid for the analysis. * lisp/muse-publish.el (muse-publish-get-style): Permit styles to be specified as an argument. modified files: ChangeLog.2006 lisp/muse-mode.el lisp/muse-publish.el 2006-05-08 07:29:42 GMT Michael Olson patch-119 Summary: muse-latex: Make images look better. Revision: muse--main--1.0--patch-119 * lisp/muse-latex.el (muse-latex-markup-strings): Make width of images to be 75% the width of the page, which looks better. Enclose images in figures, and center them. modified files: ChangeLog.2006 lisp/muse-latex.el 2006-04-27 00:31:01 GMT Michael Olson patch-118 Summary: Fix a few image bugs. Revision: muse--main--1.0--patch-118 * lisp/muse-colors.el (muse-colors-insert-image): Expand file name before passing it to `muse-colors-inline-image-method'. This makes images with the same current directory and publishing directory get resolved correctly. * lisp/muse-project.el (muse-project-find-file): Don't try to add a ".muse" extension to images. modified files: ChangeLog.2006 lisp/muse-colors.el lisp/muse-project.el 2006-04-25 22:28:01 GMT Michael Olson patch-117 Summary: Make build targets more consistent. Revision: muse--main--1.0--patch-117 * contrib/Makefile (install): Make build targets more consistent. Thanks to dsmith for the report. * lisp/Makefile (all, lisp, install): Ditto. modified files: ChangeLog.2006 Makefile.defs contrib/Makefile debian/changelog lisp/Makefile 2006-04-25 00:31:42 GMT Michael Olson patch-116 Summary: cgi.el: Make this work without cl-seq.el. Revision: muse--main--1.0--patch-116 * contrib/cgi.el: Fix a compiler warning introduced by sample calendar code. Make this not depend on 'cl at runtime. (cgi-position): New function that implements a simple replacement for the position function found in cl-seq.el. (cgi-decode): Use `cgi-position' instead of `position' and `substring' instead of `subseq'. * contrib/httpd.el: Credit myself. modified files: ChangeLog.2006 contrib/cgi.el contrib/httpd.el 2006-04-25 00:04:10 GMT Michael Olson patch-115 Summary: Make publishing DTRT when using escaped list markup. Revision: muse--main--1.0--patch-115 * lisp/muse-publish.el (muse-publish-surround-text) (muse-publish-markup-list): Ignore escaped list markup. * lisp/muse.el (muse-list-item-type): Docfix. (muse-list-item-critical-point): New function that returns the point where we should expect to find the first character in the current list item markup. (muse-forward-paragraph): Docfix and cosmetic change. (muse-forward-list-item): Ignore escaped list markup. This should fix a few publishing errors that involve markup like =::=. modified files: ChangeLog.2006 lisp/muse-publish.el lisp/muse.el 2006-04-22 03:46:04 GMT Michael Olson patch-114 Summary: muse-publish: Get rid of warning when batch publishing. Revision: muse--main--1.0--patch-114 * lisp/muse-publish.el (muse-batch-publish-files): Get rid of a batch publishing warning message. modified files: ChangeLog.2006 Makefile.defs debian/changelog lisp/muse-publish.el 2006-04-22 03:35:12 GMT Michael Olson patch-113 Summary: Try to fix face clobbering bug. Revision: muse--main--1.0--patch-113 * lisp/muse-colors.el (muse-make-faces-default): New function that sets the default value of the header faces. It can be re-used. (muse-make-faces): Simplify. This should now fix the face clobbering bug. modified files: ChangeLog.2006 lisp/muse-colors.el 2006-04-21 19:31:23 GMT Michael Olson patch-112 Summary: Re-add some cgi.el stuff and update my example config. Revision: muse--main--1.0--patch-112 * contrib/cgi.el (cgi-calendar-string, cgi-calendar): Re-add these, since they are mentioned in the documentation. * examples/mwolson/: Update. modified files: ChangeLog.2006 contrib/cgi.el examples/mwolson/muse-init.el examples/mwolson/templates/footer.html examples/mwolson/templates/header.html 2006-04-21 15:23:13 GMT Michael Olson patch-111 Summary: muse-mode: Make C-c C-e work better. Revision: muse--main--1.0--patch-111 * lisp/muse-mode.el (muse-edit-link-at-point): Save link data earlier so that this is more robust. modified files: ChangeLog.2006 lisp/muse-mode.el 2006-04-18 21:09:37 GMT Michael Olson patch-110 Summary: muse-latex: Don't escape backslash in regions. Revision: muse--main--1.0--patch-110 * lisp/muse-latex.el (muse-latex-markup-specials-example): We don't need to escape the backslash after all. (muse-latex-markup-specials-literal): Docfix. * lisp/muse-publish.el (muse-publish-escape-specials): Docfix. modified files: ChangeLog.2006 lisp/muse-latex.el lisp/muse-publish.el 2006-04-18 01:55:21 GMT Michael Olson patch-109 Summary: Allow tab characters in the target of explicit links. Revision: muse--main--1.0--patch-109 * lisp/muse-regexps.el (muse-explicit-link-regexp): Allow tab characters in the link target. This doesn't seem like it could hurt anything, and prevents unexpected behavior. Thanks to rubikitch AT ruby-lang.org for the report. modified files: ChangeLog.2006 lisp/muse-regexps.el 2006-04-14 18:56:30 GMT Michael Olson patch-108 Summary: muse-wiki: Fix bug that caused WikiWords not to publish or display. Revision: muse--main--1.0--patch-108 * lisp/muse-wiki.el (muse-wiki-handle-wikiword): Logic fix. modified files: ChangeLog.2006 Makefile.defs debian/changelog lisp/muse-wiki.el 2006-04-11 03:49:41 GMT Michael Olson patch-107 Summary: Fix horrendous typo. Revision: muse--main--1.0--patch-107 * muse-publish.el (muse-define-style): Fix typo which caused all kinds of strangeness. modified files: ChangeLog.2006 lisp/muse-publish.el 2006-04-10 03:13:41 GMT Michael Olson patch-106 Summary: Merged from mwolson@gnu.org--2006-muse-el (patch 53) Revision: muse--main--1.0--patch-106 (Author: Per B. Sederberg ) * lisp/muse-wiki.el (muse-wiki-ignore-implicit-links-to-current-page): Option to not create implicit links to the current page. (muse-wiki-handle-wikiword): Process the option to not create implicit links to the current page. modified files: ChangeLog.2006 Makefile.defs debian/changelog lisp/muse-wiki.el 2006-04-10 03:03:28 GMT Michael Olson patch-105 Summary: Try to fix failure to recognize Muse file extension (6th attempt). Revision: muse--main--1.0--patch-105 * lisp/muse-mode.el: Call `muse-mode-maybe-after-init' after the user's init file is loaded. (muse-mode-maybe-after-init): New function that causes muse-mode-maybe to be added to find-file-hooks when muse-mode-auto-p is non-nil. * lisp/muse.el: Call `muse-update-file-extension-after-init after the user's init file is loaded. Explicitly add the Muse file extension when muse.el is loaded, to make life simpler. (muse-update-file-extension): Take several edge cases into account. (muse-file-extension): Docfix. (muse-update-file-extension-after-init): New function that causes the file extension to be updated. * muse.texi (Projects): It is no longer necessary to call `muse-mode-maybe' manually. modified files: ChangeLog.2006 lisp/muse-mode.el lisp/muse.el muse.texi 2006-04-10 00:08:01 GMT Michael Olson patch-104 Summary: Merged from mwolson@gnu.org--2006-muse-el (patch 48-52) Revision: muse--main--1.0--patch-104 (Author: Per B. Sederberg ) * lisp/muse-wiki.el (muse-wiki-project-files-with-spaces): New function to return a list of project files that have spaces. (muse-wiki-update-interwiki-regexp): Make use of new project-files with spaces function. Don't make this buffer-local. modified files: ChangeLog.2006 lisp/muse-wiki.el 2006-04-09 23:54:07 GMT Michael Olson patch-103 Summary: Try to fix failure to recognize Muse file extension (5th attempt). Revision: muse--main--1.0--patch-103 * lisp/muse.el: To detect whether Emacs has fully started, check `command-line-processed' instead of `inhibit-startup-hooks', since the latter only exists for Emacs22. modified files: ChangeLog.2006 Makefile.defs debian/changelog lisp/muse.el 2006-04-09 23:48:06 GMT Michael Olson patch-102 Summary: muse-html: Add :style-sheet element. Revision: muse--main--1.0--patch-102 * lisp/muse-html.el (muse-html-header, muse-xhtml-header): Use the :style-sheet element. ("html", "xhtml"): Add the :style-sheet element. * lisp/muse-publish.el (muse-define-style): Don't give an error when a style already exists. Instead, just replace the existing style. (muse-derive-style): Ditto. * muse.texi (Style Elements): Mention :style-sheet. modified files: ChangeLog.2006 lisp/muse-html.el lisp/muse-publish.el muse.texi 2006-04-09 02:23:47 GMT Michael Olson patch-101 Summary: Try to fix failure to recognize Muse file extension (4th attempt). Revision: muse--main--1.0--patch-101 * lisp/muse.el: Enter Muse mode correctly on files that are specified by the command line. modified files: ChangeLog.2006 Makefile.defs debian/changelog lisp/muse.el 2006-04-09 01:53:19 GMT Michael Olson patch-100 Summary: Try to fix failure to recognize Muse file extension (3rd attempt). Revision: muse--main--1.0--patch-100 * lisp/muse.el (muse-update-values-hook): Fix a sequencep error. modified files: ChangeLog.2006 lisp/muse.el 2006-04-09 01:36:50 GMT Michael Olson patch-99 Summary: Try to fix failure to recognize Muse file extension (2nd attempt). Revision: muse--main--1.0--patch-99 * lisp/muse.el: Try to fix failure to put muse-mode-choose-mode in auto-mode-alist. modified files: ChangeLog.2006 lisp/muse.el 2006-04-08 17:08:39 GMT Michael Olson patch-98 Summary: Merged from mwolson@gnu.org--2006-muse-el (patch 41-47) Revision: muse--main--1.0--patch-98 (Author: Per B. Sederberg ) * lisp/muse-wiki.el (muse-wiki-update-interwiki-regexp): Modify interwiki-regexp to search for any project file name. This is so it will match files with spaces. modified files: ChangeLog.2006 lisp/muse-wiki.el 2006-04-08 16:32:00 GMT Michael Olson patch-97 Summary: Try to fix failure to recognize Muse file extension. Revision: muse--main--1.0--patch-97 * lisp/muse-colors.el: Use add-hook instead of add-to-list, for the sake of semantics. * lisp/muse.el: Call muse-update-file-extension in muse-update-values-hook, instead of muse-ignored-file-extensions-regexp. Add muse-update-file-extension to emacs-startup-hook, so that the user has time to set this in their .emacs file. modified files: ChangeLog.2006 lisp/muse-colors.el lisp/muse.el 2006-04-08 02:46:41 GMT Michael Olson patch-96 Summary: Make things in contrib directory installable. Revision: muse--main--1.0--patch-96 * Makefile (SUBDIRS): Add contrib. (all): Add contrib. (contrib): New target that compiles things in the contrib directory. (install-bin): Add contrib. Install things in the contrib directory. Also install uncompiled things in the experimental directory. * contrib/Makefile: New Makefile for the contrib directory. * contrib/httpd.el (httpd-start): Fix compiler warnings. * debian/emacsen-install: Compile files in contrib directory in addition to the normal fare. Thanks to Junichi Uekawa for the suggestion. * debian/emacsen-startup: Add contrib directory to load-path. * experimental/Makefile (test): Remove target. (install-uncompiled): New target that installs uncompiled files. * lisp/muse.el: Set version to 3.02.90 (3.03 RC1). (muse-update-file-extension): Fix a warning that occurred when doing batch publishing. new files: contrib/.arch-ids/Makefile.id contrib/Makefile modified files: ChangeLog.2006 Makefile Makefile.defs contrib/httpd.el debian/changelog debian/emacsen-install debian/emacsen-startup experimental/Makefile lisp/muse.el muse.texi 2006-04-08 01:33:27 GMT Michael Olson patch-95 Summary: Remove muse-registry.el. Revision: muse--main--1.0--patch-95 * lisp/muse-registry.el: Move to the Planner project, since it is a better fit with Planner than Muse. removed files: lisp/.arch-ids/muse-registry.el.id lisp/muse-registry.el modified files: AUTHORS ChangeLog.2006 2006-04-08 01:23:24 GMT Michael Olson patch-94 Summary: Prepare Debian package for Arch snapshot. Revision: muse--main--1.0--patch-94 * Makefile.defs, debian/changelog: Prepare for Debian package of Arch snapshot. modified files: ChangeLog.2006 Makefile.defs debian/changelog 2006-04-05 18:56:26 GMT Michael Olson patch-93 Summary: muse-wiki: Honor setting for muse-wiki-hide-nop-tag. Revision: muse--main--1.0--patch-93 * lisp/muse-wiki.el (muse-wiki-colors-nop-tag): Take the value of `muse-wiki-hide-nop-tag' into account. modified files: ChangeLog.2006 lisp/muse-wiki.el 2006-04-05 18:47:54 GMT Michael Olson patch-92 Summary: Fix a couple of compiler warnings. Revision: muse--main--1.0--patch-92 * muse-publish.el, muse-wiki.el: Fix a couple of compiler warnings. modified files: ChangeLog.2006 lisp/muse-publish.el lisp/muse-wiki.el 2006-04-05 18:45:01 GMT Michael Olson patch-91 Summary: Make interwiki links work with the new option. Revision: muse--main--1.0--patch-91 * lisp/muse-wiki.el (muse-wiki-update-interwiki-regexp): Take no parameters. Populate this correctly when `muse-wiki-match-all-project-files' is non-nil. modified files: ChangeLog.2006 lisp/muse-wiki.el 2006-04-05 16:37:13 GMT Michael Olson patch-90 Summary: Permit table generation to be disabled for a single Muse page. Revision: muse--main--1.0--patch-90 * lisp/muse-latex.el (muse-latex-markup-table): If we don't get any table data, don't publish the table. * lisp/muse-texinfo.el (muse-texinfo-markup-table): Ditto. * lisp/muse-xml-common.el (muse-xml-markup-table): Ditto. * lisp/muse-publish.el (muse-publish-table-fields): If the "disable-tables" publishing directive exists for the current page, do not generate a table. * muse.texi (Tables): Mention that table generation can be disabled for a single page. modified files: ChangeLog.2006 lisp/muse-latex.el lisp/muse-publish.el lisp/muse-texinfo.el lisp/muse-xml-common.el muse.texi 2006-04-05 15:56:11 GMT Michael Olson patch-89 Summary: muse-wiki: Match filenames before WikiWords. Revision: muse--main--1.0--patch-89 * lisp/muse-wiki.el (muse-wiki-update-local-wikiword-regexp): Match filenames in project before the general WikiWord regexp. modified files: ChangeLog.2006 lisp/muse-wiki.el 2006-04-05 15:45:07 GMT Michael Olson patch-88 Summary: Use a better mechanism for updating autogenerated variables. Revision: muse--main--1.0--patch-88 * lisp/muse-mode.el (muse-mode-hook): Remove ugly kludge. * lisp/muse-mode.el (muse-mode): Call muse-update-values-hook. * lisp/muse-protocols.el: Add `muse-update-url-regexp' to muse-update-values-hook. * lisp/muse-publish.el (muse-publish-markup-buffer): Call muse-update-values-hook. * lisp/muse-wiki.el: Add `muse-wiki-update-local-wikiword-regexp' and `muse-wiki-update-interwiki-regexp' to muse-update-values-hook. (muse-wiki-update-local-wikiword-regexp): Quote an argument so that an error is fixed. (muse-wiki-update-custom-values): Replace with function that gives a warning and an explanation. * examples/mwolson/muse-init.el (muse-blosxom-base-directory): Update my example so that people who use it won't have a wrong value in muse-mode-hook. modified files: ChangeLog.2006 examples/mwolson/muse-init.el lisp/muse-mode.el lisp/muse-protocols.el lisp/muse-publish.el lisp/muse-wiki.el lisp/muse.el 2006-04-05 15:00:33 GMT Michael Olson patch-87 Summary: muse-wiki: Implement implicit links for all files in project. Revision: muse--main--1.0--patch-87 * lisp/muse-project.el (muse-project-file-alist): Quote hook, so that we don't get errors when trying to use it. * lisp/muse-wiki.el: Add `muse-wiki-update-local-wikiword-regexp' to muse-project-file-alist-hook. (muse-wiki-update-local-wikiword-regexp): Make sure that we can't get into a recursive call. (muse-wiki-update-wikiword-regexp): Call `muse-wiki-update-local-wikiword-regexp'. (Author: Per B. Sederberg ) * lisp/muse-wiki.el:: Add muse-wiki-update-local-wikiword-regexp to muse-before-publish-hook and muse-mode-hook so that implicit links are published properly. (muse-wiki-match-all-project-files): New option for determining whether to match all project files as implicit links. This is off by default. (muse-wiki-update-local-wikiword-regexp): New function to make the wikiword-regexp local and append the files in the current project to it. modified files: AUTHORS ChangeLog.2006 lisp/muse-project.el lisp/muse-wiki.el 2006-04-04 22:49:46 GMT Michael Olson patch-86 Summary: Update Muse's file-alist after saving any Muse page. Revision: muse--main--1.0--patch-86 * lisp/muse-project.el (muse-project-after-save-hook): New function that causes Muse's file-alist to be updated when we are saving a Muse file. This is added to after-save-hook. modified files: ChangeLog.2006 lisp/muse-project.el 2006-04-04 22:39:57 GMT Michael Olson patch-85 Summary: Add a hook that is called whenever Muse's file-alist is updated. Revision: muse--main--1.0--patch-85 * lisp/muse-project.el (muse-project-file-alist-hook): New hook that is executed after an update to muse-project-file-alist happens. (muse-project-file-alist): Call `muse-project-file-alist-hook'. modified files: ChangeLog.2006 lisp/muse-project.el 2006-04-04 22:23:40 GMT Michael Olson patch-84 Summary: muse-mode: Recognize definition lists when filling text. Revision: muse--main--1.0--patch-84 * lisp/muse-mode.el (muse-mode): Recognize definition lists when filling text. modified files: ChangeLog.2006 lisp/muse-mode.el 2006-04-04 22:22:19 GMT Michael Olson patch-83 Summary: Remove unrelated part of patch-82. Revision: muse--main--1.0--patch-83 modified files: ChangeLog.2006 lisp/muse-mode.el 2006-04-04 22:11:16 GMT Michael Olson patch-82 Summary: muse-journal: Fix dates in RSS feeds. Revision: muse--main--1.0--patch-82 * lisp/muse-journal.el (muse-journal-rss-munge-buffer): Make sure that date is in a format that RSS readers can handle. Thanks to René Stadler for the patch. modified files: AUTHORS ChangeLog.2006 lisp/muse-journal.el lisp/muse-mode.el 2006-04-01 15:32:26 GMT Michael Olson patch-81 Summary: debian: Install ChangeLog properly. Revision: muse--main--1.0--patch-81 * debian/rules: Create ChangeLog using ChangeLog.2006 as a base, and then appending the logs for previous years. Thanks to Sergei V. Fleytin for the breakage report. modified files: ChangeLog.2006 debian/rules 2006-04-01 04:20:45 GMT Michael Olson patch-80 Summary: Fix a bug triggered by batch-publishing. Revision: muse--main--1.0--patch-80 * lisp/muse-publish.el (muse-detect-invalid-style): Remove, since the right algorithm turned out to be simpler than I had thought. Thanks to Sergei V. Fleytin for reporting breakage with the old method. (muse-publish-file): Don't be overzealous when checking for an invalid style -- use a simpler check. (muse-batch-publish-files): Don't check for invalid styles here, since we already do so in `muse-publish-file'. modified files: ChangeLog.2006 lisp/muse-publish.el 2006-03-31 04:27:54 GMT Michael Olson patch-79 Summary: muse.texi: Move some sections to a new Extending Muse chapter. Revision: muse--main--1.0--patch-79 * muse.texi (Extending Muse): New chapter containing nodes that deal with extending Muse in various ways. (Common Elements, Deriving Styles): Move to Extending Muse chapter. modified files: ChangeLog.2006 muse.texi 2006-03-26 22:38:01 GMT Michael Olson patch-78 Summary: Fix a couple of recently-introduced bugs. Revision: muse--main--1.0--patch-78 * lisp/muse-colors.el: Fix errors introduced in a recent patch. Try extra hard to preserve our settings for faces, especially after a new frame or splash screen. * lisp/muse.el (muse-copy-face): New function that ensures the face is copied globally, to the extent the Emacs permits this. modified files: ChangeLog.2006 lisp/muse-colors.el lisp/muse.el 2006-03-26 20:02:11 GMT Michael Olson patch-77 Summary: Update my example configuration file. Revision: muse--main--1.0--patch-77 modified files: ChangeLog.2006 examples/mwolson/muse-init.el 2006-03-26 19:54:43 GMT Michael Olson patch-76 Summary: Remove cruft from patch logs. Revision: muse--main--1.0--patch-76 modified files: ChangeLog.2006 {arch}/muse-el/muse-el--devel/muse-el--devel--0/mwolson@gnu.org--2006-muse-el/patch-log/patch-14 {arch}/muse-el/muse-el--devel/muse-el--devel--0/mwolson@gnu.org--2006-muse-el/patch-log/patch-25 {arch}/muse-el/muse-el--devel/muse-el--devel--0/mwolson@gnu.org--2006-muse-el/patch-log/patch-3 {arch}/muse/muse--main/muse--main--1.0/mwolson@gnu.org--2006/patch-log/patch-19 {arch}/muse/muse--main/muse--main--1.0/mwolson@gnu.org--2006/patch-log/patch-46 {arch}/muse/muse--main/muse--main--1.0/mwolson@gnu.org--2006/patch-log/patch-58 {arch}/muse/muse--main/muse--main--1.0/mwolson@gnu.org--2006/patch-log/patch-60 {arch}/muse/muse--main/muse--main--1.0/mwolson@gnu.org--2006/patch-log/patch-74 2006-03-26 18:38:31 GMT Michael Olson patch-75 Summary: Make faces more robust and namespace-conforming. Revision: muse--main--1.0--patch-75 * lisp/muse-colors.el (muse-make-faces): Make sure that each generated face has documentation and a group. (muse-link, muse-bad-link, muse-verbatim): Renamed faces to drop the "-face" suffix. (muse-emphasis-1, muse-emphasis-2, muse-emphasis-3): Make sure that the faces have documentation and a group. Copy unconditionally from the related Emacs faces, rather than specifying face attributes. (muse-colors-verbatim, muse-colors-example-tag, muse-link-face): (muse-colors-explicit-link, muse-colors-implicit-link): Use the new face names. * lisp/muse-mode.el (muse-next-reference, muse-previous-reference): Use the 'muse-link property rather than looking at the face. modified files: ChangeLog.2006 lisp/muse-colors.el lisp/muse-mode.el 2006-03-26 18:33:12 GMT Michael Olson patch-74 Summary: muse.texi: Mention the tag. Revision: muse--main--1.0--patch-74 * muse.texi (Emphasizing Text): Mention the tag. modified files: ChangeLog.2006 muse.texi 2006-03-26 06:35:49 GMT Michael Olson patch-73 Summary: Fix bug in verse markup, undesired behavior with emdash. Revision: muse--main--1.0--patch-73 * lisp/muse-docbook.el (muse-docbook-markup-strings): Preserve whitespace around emdash. * lisp/muse-html.el (muse-html-markup-strings): Ditto. * lisp/muse-xml.el (muse-xml-markup-strings): Ditto. * lisp/muse-publish.el (muse-publish-markup-emdash): Pass preceding and trailing whitespace to `muse-markup-text', in case the current publishing wishes to use them. (muse-publish-markup-verse): Insert newline without adding read-only properties to it. This fixes a paragraph detection bug in HTML publishing. modified files: ChangeLog.2006 lisp/muse-docbook.el lisp/muse-html.el lisp/muse-publish.el lisp/muse-xml.el 2006-03-25 05:57:36 GMT Michael Olson patch-72 Summary: httpd.el: Update to work with newer versions of Emacs. Revision: muse--main--1.0--patch-72 * contrib/httpd.el (httpd-start): Update this to work with newer versions of Emacs. modified files: ChangeLog.2006 contrib/httpd.el 2006-03-25 05:27:46 GMT Michael Olson patch-71 Summary: muse-journal: Make custom RSS heading regexps possible. Revision: muse--main--1.0--patch-71 * lisp/muse-journal.el (muse-journal-rss-heading-regexp): New option that determines the regexp to use when searching for an RSS heading. (muse-journal-rss-munge-buffer): Use `muse-journal-rss-heading-regexp'. modified files: ChangeLog.2006 lisp/muse-journal.el 2006-03-25 04:33:40 GMT Michael Olson patch-70 Summary: Fix #5190: Endless loop in muse style-run-hooks when muse-project-publish is called with undefined style. Revision: muse--main--1.0--patch-70 * lisp/muse-project.el (muse-project-publish): If we cannot find a project to publish, indicate this in an error message. * lisp/muse-publish.el (muse-style-run-hooks): Never go into an endless loop. This should fix #5190. Thanks to Rod Morehead for the report. (muse-detect-invalid-style): New function that makes sure that the given style is in a valid format. (muse-publish-file): Call `muse-detect-invalid-style' before doing any publishing. modified files: ChangeLog.2006 lisp/muse-project.el lisp/muse-publish.el 2006-03-25 03:31:36 GMT Michael Olson patch-69 Summary: muse-mode: Don't require muse-publish.el. Revision: muse--main--1.0--patch-69 * lisp/muse-mode.el: Use a few autoloads instead of requiring muse-publish.el. This allows people to optionally have Muse mode without including the publishing features, as long as they never call a publishing function. The documentation says that Muse is supposed to be modular in that way, so I guess we'd better follow it. (muse-insert-tag): Make sure that muse-publish is required before accessing `muse-publish-markup-tags'. modified files: ChangeLog.2006 lisp/muse-mode.el 2006-03-21 01:59:03 GMT Michael Olson patch-68 Summary: Minor code cleanup. Revision: muse--main--1.0--patch-68 * lisp/muse-mode.el (muse-grep): Remove commented-out code. modified files: ChangeLog.2006 lisp/muse-mode.el 2006-03-21 01:56:21 GMT Michael Olson patch-67 Summary: Merged from mwolson@gnu.org--2006-muse-el (patch 15-26) Revision: muse--main--1.0--patch-67 (Author: Per B. Sederberg ) * lisp/muse-mode.el (muse-grep-command): Add custom to set up the command used for grepping. (muse-mode-map): Changed muse-browse-result to C-c C-v and made muse-find-backlinks C-c C-b (muse-grep): New function to envoke a search with the compiler. (muse-search-with-command): New function to search for text, optionally editing the command. (muse-search): New function to search for text. (muse-find-backlinks): New function to search for backlinks to the current page. modified files: ChangeLog.2006 lisp/muse-mode.el 2006-03-20 18:43:15 GMT Michael Olson patch-66 Summary: Make it easier to call context-specific region-escaping function. Revision: muse--main--1.0--patch-66 * lisp/muse-publish.el (muse-publish-escape-specials): If a function is returned from specials, call it with beg, end, ignore-read-only args. This allows for people to specify their own functions for escaping regions, depending on context. See `muse-xml-decide-specials' in muse-xml-common.el. This functionality already exists for escaping specials in strings. modified files: ChangeLog.2006 lisp/muse-publish.el 2006-03-17 01:56:38 GMT Michael Olson patch-65 Summary: Attempt to make new syntaxes easier to support. Revision: muse--main--1.0--patch-65 * lisp/muse-colors.el (muse-colors-explicit-link): Use `muse-get-link' and `muse-get-link-data'. * lisp/muse-journal.el (muse-journal-rss-munge-buffer): Ditto. * lisp/muse-mode.el (muse-edit-link-at-point): Ditto. (muse-make-link): Change argument name. * lisp/muse.el (muse-handle-explicit-link): Ditto. (muse-get-link, muse-get-link-desc): New functions that return the link and the link description, respectively, from the given TARGET. The idea is that at least one other markup syntax puts descriptions before links, so all they would have to do is re-define these two functions. modified files: ChangeLog.2006 lisp/muse-colors.el lisp/muse-journal.el lisp/muse-mode.el lisp/muse.el 2006-03-14 18:41:54 GMT Michael Olson patch-64 Summary: Fix #5477: muse-replace-regexp-in-string throws error in XEmacs 21.4 Revision: muse--main--1.0--patch-64 * Makefile.defs, lisp/muse-colors.el: Fix typo. * lisp/muse.el (muse-replace-regexp-in-string): Switch order so that `replace-in-string' is checked before `replace-regexp-in-string', since XEmacs' implementation of the latter seems to be broken. Thanks to Jim Ottaway for the heads up. modified files: ChangeLog.2006 Makefile.defs lisp/muse-colors.el lisp/muse.el 2006-03-13 19:38:36 GMT Michael Olson patch-63 Summary: muse-latex: Add footnotes to links so that they show up on printed copies. Revision: muse--main--1.0--patch-63 * lisp/muse-latex.el (muse-latex-markup-strings): Add string for 'url-and-desc. Display footnotes if we have both a link and a description, since we want URLs to show up on printed documents. (muse-latex-markup-specials-document): Escape the "@" character in the entire document. * lisp/muse-publish.el (muse-publish-url): Distinguish between URLs without descriptions and URLs with descriptions. If no markup string exists for 'url-and-desc, fall back to 'url. modified files: ChangeLog.2006 lisp/muse-latex.el lisp/muse-publish.el 2006-03-13 18:42:27 GMT Michael Olson patch-62 Summary: Fix publishing error with multi-line wrapped list items. Revision: muse--main--1.0--patch-62 * lisp/muse-publish.el (muse-publish-surround-text): Fix a problem with multiple lines of a wrapped list item. modified files: ChangeLog.2006 lisp/muse-publish.el 2006-03-13 02:10:44 GMT Michael Olson patch-61 Summary: Add COPYING file; update headers. Revision: muse--main--1.0--patch-61 * COPYING: New file containing the GNU GPL. * AUTHORS: Bookkeeping. * README: Add License section. Change Muse homepage URL. * debian/copyright: Change Muse homepage URL. Prune list to those who have changed 15+ lines of code, since this is the amount that constitutes legal contribution to a software work, AFAICT. * examples/mwolson: Update contents of directory to match my current setup. * experimental/muse*.el, lisp/muse*.el: Update headers. * muse.texi: Change Muse homepage URL. new files: .arch-ids/COPYING.id COPYING modified files: AUTHORS ChangeLog.2006 README debian/copyright examples/mwolson/muse-init.el examples/mwolson/stylesheets/blog.css examples/mwolson/stylesheets/common.css examples/mwolson/stylesheets/print.css examples/mwolson/stylesheets/screen.css experimental/muse-cite.el experimental/muse-mathml.el experimental/muse-message.el lisp/muse-backlink.el lisp/muse-blosxom.el lisp/muse-book.el lisp/muse-colors.el lisp/muse-convert.el lisp/muse-docbook.el lisp/muse-groff.el lisp/muse-html.el lisp/muse-http.el lisp/muse-journal.el lisp/muse-latex.el lisp/muse-latex2png.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-registry.el lisp/muse-texinfo.el lisp/muse-wiki.el lisp/muse-xml.el lisp/muse.el muse.texi 2006-03-13 01:48:10 GMT Michael Olson patch-60 Summary: Update Muse XML schema. Revision: muse--main--1.0--patch-60 * examples/muse.rnc: Allow nested list items. Update header. Provide history. We'll call this v0.3 of the schema. * lisp/muse-xml-common.el: Update header. (muse-xml-markup-table): Fix table generation when attributes are not specified. modified files: ChangeLog.2006 examples/muse.rnc lisp/muse-xml-common.el 2006-03-12 21:12:48 GMT Michael Olson patch-59 Summary: Fix output for consecutive list items of same type. Revision: muse--main--1.0--patch-59 * lisp/muse-publish.el (muse-publish-surround-text): Make calculated post-indent and indent-found values local to each list item. This should fix undesired behavior with consecutive list items of the same type. modified files: ChangeLog.2006 lisp/muse-publish.el 2006-03-12 21:09:43 GMT Michael Olson patch-58 Summary: Make C-> and C-< keybindings not indent nested items. Revision: muse--main--1.0--patch-58 * lisp/muse-mode.el (muse-alter-list-item-indentation): Don't include nested items. * lisp/muse.el (muse-forward-list-item): Make skipping of nested items optional, and document this. modified files: ChangeLog.2006 lisp/muse-mode.el lisp/muse.el 2006-03-12 19:56:26 GMT Michael Olson patch-57 Summary: Slightly improve flyspell integration. Revision: muse--main--1.0--patch-57 * lisp/muse-mode.el (muse-mode-flyspell-p): Use the new 'muse-link text property to determine whether we are at a link. modified files: ChangeLog.2006 lisp/muse-mode.el 2006-03-11 23:42:56 GMT Michael Olson patch-56 Summary: Make nested definition list items work much better. Revision: muse--main--1.0--patch-56 * lisp/muse-publish.el (muse-publish-surround-dl): Use `muse-forward-list-item'. Don't pass indent and post-indent to the move function. (muse-publish-surround-text): If we are to determine the indentation, but have found no list items, set indent to the empty string. If we are to determine indentation but have found an item, get all leading whitespace and set indent to it. Never try to determine post-indent using the first line. Try to contain the amount of "damage" a nested list item can do to wrapped list item text. * lisp/muse-regexps.el (muse-list-item-regexp): Hone the definition list part so that it is easier to indicate the amount of desired initial whitespace. * lisp/muse.el (muse-list-item-type): Make initial whitespace of a dl entry optional. (muse-forward-dl-term, muse-forward-dl-entry): Remove. Functionality merged into `muse-forward-list-item'. (muse-forward-list-item-1): New function that determines whether a nested list item is found. (muse-forward-list-item): Move hairy nested list detection algorithm into `muse-forward-list-item-1'. Be extra careful about terminating when we go past the boundary. modified files: ChangeLog.2006 lisp/muse-publish.el lisp/muse-regexps.el lisp/muse.el 2006-03-11 06:10:19 GMT Michael Olson patch-55 Summary: Add backlink support, thanks to Jim Ottaway. Revision: muse--main--1.0--patch-55 * lisp/muse-colors.el (muse-colors-fontifying-p): New buffer-local variable that indicates whether Muse is fontifying the current buffer. (muse-colors-region): Set `muse-colors-fontifying' to t. * lisp/muse-backlink.el: New file by Jim Ottaway that provides backlink support. I've modified it slightly to get rid of the defadvice forms. new files: lisp/.arch-ids/muse-backlink.el.id lisp/muse-backlink.el modified files: AUTHORS ChangeLog.2006 lisp/muse-colors.el 2006-03-10 22:56:22 GMT Michael Olson patch-54 Summary: muse-protocols: Add Wikipedia support. Revision: muse--main--1.0--patch-54 * lisp/muse-protocols.el (muse-url-protocols): Add "dict:" handler. This is used to look up terms on the Wikipedia website. (muse-wikipedia-country): New option that specifies the country code to use for Wikipedia. (muse-resolve-url-dict, muse-browse-url-dict): New functions that resolve and browse Wikipedia URLs. modified files: ChangeLog.2006 lisp/muse-protocols.el 2006-03-10 19:29:56 GMT Michael Olson patch-53 Summary: muse-protocols: Add DOI handling. Revision: muse--main--1.0--patch-53 * lisp/muse-protocols.el (muse-url-protocols): Add handler for DOI's. DOI's (digitial object identifiers) are a standard identifier used in the publishing industry. Thanks to Phillip Lord for the patch. (muse-resolve-url-doi, muse-browse-url-doi): New functions that resolve and browse DOI's. modified files: AUTHORS ChangeLog.2006 lisp/muse-protocols.el 2006-03-10 16:34:52 GMT Michael Olson patch-52 Summary: Refine previous patch. Revision: muse--main--1.0--patch-52 * lisp/muse-mode.el (muse-link-at-point): If muse-colors is loaded, don't ever use the fallback method. Save point when using new method. modified files: ChangeLog.2006 lisp/muse-mode.el 2006-03-10 16:26:53 GMT Michael Olson patch-51 Summary: Make visiting of links a bit faster. Revision: muse--main--1.0--patch-51 * lisp/muse-colors.el (muse-unhighlight-region): Remove muse-link property. (muse-link-properties): If we are highlighting a link, add the muse-link property. * lisp/muse-mode.el (muse-link-at-point): If the muse-link property exists at point, use it to bound the link. Otherwise, use the old method. This should make it easier to visit custom implicit link forms, since it does not require a change to muse-implicit-link-regexp. * lisp/muse-regexps.el (muse-implicit-link-regexp): Note that this is not used when muse-colors.el is loaded. modified files: ChangeLog.2006 lisp/muse-colors.el lisp/muse-mode.el lisp/muse-regexps.el 2006-03-10 04:57:55 GMT Michael Olson patch-50 Summary: Make resolving of inline image paths more flexible. Revision: muse--main--1.0--patch-50 * lisp/muse-colors.el (muse-colors-inline-image-method): Rename from `muse-inline-relative-to'. Add muse-colors-use-publishing-directory option. Make the fallback customization type a function rather than a symbol. (muse-colors-use-publishing-directory): New function that takes the best guess at where the current Muse file will be published and makes the given link relative to that. (muse-colors-insert-image): If muse-colors-inline-image-method is 'default-directory, use the default directory. If it is a function, call that function with LINK as an argument. Otherwise, give up. modified files: ChangeLog.2006 lisp/muse-colors.el 2006-03-10 03:43:03 GMT Michael Olson patch-49 Summary: Fix inline image lockup. Revision: muse--main--1.0--patch-49 * lisp/muse-colors.el (muse-colors-explicit-link): Fix regression in patch-47. This will prevent Muse from locking up after making a new inline image. modified files: ChangeLog.2006 lisp/muse-colors.el 2006-03-07 03:52:11 GMT Michael Olson patch-48 Summary: Fix publishing problem with XEmacs. Revision: muse--main--1.0--patch-48 * lisp/muse-publish.el (muse-insert-file-or-string): Fix XEmacs publishing problem when text at beginning of buffer is read-only. Thanks to Christian Clercin for the report. modified files: ChangeLog.2006 lisp/muse-publish.el 2006-03-06 06:06:38 GMT Michael Olson patch-47 Summary: Get increase and decrease of list indentation to work with complex cases. Revision: muse--main--1.0--patch-47 * lisp/muse-colors.el: Miscellaneous whitespace fixes. (muse-colors-explicit-link): Minor logic tweak. The indentation seems to indicate this interpretation, though parens are different. * lisp/muse-mode.el: Miscellaneous whitespace fixes. (muse-alter-list-item-indentation): New function that alters the list structure at point. The behavior to use is specified by the OPERATION argument. Currently-supported operations are 'increase and 'decrease indentation level. This now uses the same sort of list detection algorithm that is used during publishing, so it should work as expected for complicated cases. (muse-increase-list-item-indentation) (muse-decrease-list-item-indentation): Use `muse-alter-list-item-indentation'. modified files: ChangeLog.2006 lisp/muse-colors.el lisp/muse-mode.el 2006-03-06 04:50:17 GMT Michael Olson patch-46 Summary: Code simplification; improve muse-list-item-type function. Revision: muse--main--1.0--patch-46 * lisp/muse.el (muse-list-item-type): Disambiguate between 'dl-term and 'dl-entry, instead of just returning 'dl. (muse-forward-dl-term, muse-forward-dl-entry): Use muse-forward-list-item. (muse-forward-dl-part): Remove, merge functionality into muse-forward-list-item. (muse-forward-list-item): Add a few conditions needed for skipping nested 'dl-term and 'dl-entry items. modified files: ChangeLog.2006 lisp/muse.el 2006-03-06 01:11:58 GMT Michael Olson patch-45 Summary: Put movement by list and paragraph functions in muse.el. Revision: muse--main--1.0--patch-45 * lisp/muse.el (muse-list-item-type, muse-forward-paragraph): (muse-forward-dl-term, muse-forward-dl-entry, muse-forward-dl-part): (muse-forward-list-item): Move here from muse-publish.el, so that muse-mode can make use of these. modified files: ChangeLog.2006 lisp/muse-publish.el lisp/muse.el 2006-03-06 01:06:14 GMT Michael Olson patch-44 Summary: Merged from mwolson@gnu.org--2006-muse-el (patch 5-14) Revision: muse--main--1.0--patch-44 (Author: Per B. Sederberg ) * lisp/muse-mode.el (muse-mode-map): Added key mappings to increase or decrease the current item indentation. (muse-get-paragraph-start): Helper function to determine the start of the current paragraph. (muse-insert-list-item): Cleaned up list item insertion code and made it handle definitions. (muse-increase-list-item-indentation): New interactive function to increase list item indentation. (muse-decrease-list-item-indentation): New interactive function to decrease list item indentation. modified files: ChangeLog.2006 lisp/muse-mode.el 2006-03-06 00:58:00 GMT Michael Olson patch-43 Summary: Use slightly better algorithm for removing initial whitespace. Revision: muse--main--1.0--patch-43 * lisp/muse-publish.el (muse-publish-surround-dl): Keep track of whether the definition occurred on the same line as the term. (muse-publish-surround-text): Use a slightly better algorithm for removing initial indentation of list items. This way, we preserve nesting of lists and also deal with same-level items that occur after nested items. This probably doesn't make much of a difference in the output, but it should make support of nested definition lists a bit less troublesome in some cases. (muse-forward-dl-entry): Deal with ambiguity in muse-list-item-regexp regexp. (muse-forward-dl-part, muse-forward-list-item): Don't clobber match data. Don't remove any text. This makes the function easier to reuse in display-only situations. modified files: ChangeLog.2006 lisp/muse-publish.el 2006-03-04 02:03:59 GMT Michael Olson patch-42 Summary: In a preliminary way, make definition lists nest. Revision: muse--main--1.0--patch-42 * lisp/muse-publish.el (muse-forward-dl-part): Make it so that definition lists nest a bit better. * lisp/muse-regexps.el (muse-dl-entry-regexp): Removed, since we don't use it anymore. modified files: ChangeLog.2006 lisp/muse-publish.el lisp/muse-regexps.el 2006-03-03 19:28:22 GMT Michael Olson patch-41 Summary: Fix nested list regression. Revision: muse--main--1.0--patch-41 * lisp/muse-publish.el (muse-publish-surround-text): Keep track of original indentation value and use that. This fixes a regression caused by the last patch. modified files: ChangeLog.2006 lisp/muse-publish.el 2006-03-03 05:24:59 GMT Michael Olson patch-40 Summary: Make code look nicer by using muse-forward-dl-* functions. Revision: muse--main--1.0--patch-40 * lisp/muse-publish.el (muse-publish-surround-dl): Factor out lambda forms into muse-forward-dl-* for increased reusability. (muse-publish-surround-text): Call move function with an indent argument so that we don't have to use partial substitution in lambda forms. (muse-forward-dl-term): New function that moves forward to the next definition list term. (muse-forward-dl-entry): New function that moves forward to the next definition list entry. (muse-forward-dl-part): Renamed from `muse-forward-dl-item', since this does not move past entire definition list items, only parts of them. (muse-publish-markup-list, muse-publish-markup-quote): (muse-publish-quote-tag): Use better lambda form, and include a parameter. modified files: ChangeLog.2006 lisp/muse-publish.el 2006-03-02 05:38:41 GMT Michael Olson patch-39 Summary: Handle blockquoted sections within lists properly. Revision: muse--main--1.0--patch-39 * lisp/muse-publish.el (muse-forward-paragraph): Respect end-list property. This should make blockquoted sections within a list do the right thing. (muse-forward-dl-item, muse-forward-list-item): Adjust logic for new behavior of `muse-forward-paragraph'. modified files: ChangeLog.2006 lisp/muse-publish.el 2006-03-02 05:00:07 GMT Michael Olson patch-38 Summary: Fix problem when previous list item was nested. Revision: muse--main--1.0--patch-38 * lisp/muse-publish.el (muse-publish-surround-text): Bind nested list indicator at the correct place. This fixes an error where a previous list was nested but the current one isn't. Thanks to Per B. Sederberg for the report. modified files: ChangeLog.2006 lisp/muse-publish.el 2006-03-02 04:36:06 GMT Michael Olson patch-37 Summary: Fix #5376: Changing muse-wiki-wikiword-regexp does not seem to affect anything. Revision: muse--main--1.0--patch-37 * muse.texi (Implicit Links): Mention how to customize the WikiName recognition, and note that if you're setting this manually, you have to call some additional code. This should fix #5376. Also remove local variables section at end, since it seems pointless. modified files: ChangeLog.2006 muse.texi 2006-03-02 04:25:37 GMT Michael Olson patch-36 Summary: Fix #5325: nested formatting not working in HTML output. Revision: muse--main--1.0--patch-36 * lisp/muse-publish.el (muse-publish-markup-word): Make nested emphasis work. I'm a bit worried about possible double-escaping, though. Perhaps we should write the context to a text property and escape it later. This should fix #5325. modified files: ChangeLog.2006 lisp/muse-publish.el 2006-03-02 01:08:14 GMT Michael Olson patch-35 Summary: Make paragraphs respect the end of a list or list item. Revision: muse--main--1.0--patch-35 * lisp/muse-docbook.el (muse-docbook-markup-paragraph): If we are at the end of a list (or list item), back up. This allows for a nice side effect when using indented sentences in between list items. * lisp/muse-html.el (muse-html-markup-paragraph): Ditto. * lisp/muse-xml.el (muse-xml-markup-paragraph): Ditto. * lisp/muse-publish.el (muse-publish-surround-dl): Make sure that end-ddt and end-item are marked up with end-list properties. modified files: ChangeLog.2006 lisp/muse-docbook.el lisp/muse-html.el lisp/muse-publish.el lisp/muse-xml.el 2006-03-01 21:00:41 GMT Michael Olson patch-34 Summary: Make sure an initial term exists before publishing definition list. Revision: muse--main--1.0--patch-34 * lisp/muse-publish.el (muse-publish-markup-list): Ensure that a term exists before publishing a definition list. modified files: ChangeLog.2006 lisp/muse-publish.el 2006-03-01 20:21:08 GMT Michael Olson patch-33 Summary: Add comments to nested list code. Revision: muse--main--1.0--patch-33 * lisp/muse-publish.el (muse-publish-surround-dl) (muse-publish-surround-text, muse-forward-dl-item): (muse-forward-list-item): Add comments, since there were many intricacies that are probably not obvious to the casual reader. (muse-forward-dl-item): Remove no-op condition. modified files: ChangeLog.2006 lisp/muse-publish.el 2006-03-01 19:51:45 GMT Michael Olson patch-32 Summary: Make nested list items work when separated by one blank line. Revision: muse--main--1.0--patch-32 * lisp/muse-publish.el (muse-publish-surround-dl): Use muse-forward-dl-item instead of muse-forward-list-item. On second thought, don't unconditionally insert a newline, as that breaks some things. (muse-forward-dl-item): New function that moves forward to the next definition list item. This was factored out from muse-forward-list-item, since it was getting too complex for my liking. (muse-forward-dl-item, muse-forward-list-item): Introduce concept of indented line, and skip past these if we have a blank line followed by an indented line. "Indented" means "indented one past the current indentation level" here. Remove some initial whitespace that was being overlooked before. modified files: ChangeLog.2006 lisp/muse-publish.el lisp/muse-regexps.el 2006-03-01 17:43:55 GMT Michael Olson patch-31 Summary: Fix a couple of bugs in muse-wiki-resolve-project-page. Revision: muse--main--1.0--patch-31 * lisp/muse-project.el (muse-project-applicable-styles): Use a slightly better algorithm for adding styles to a list. * lisp/muse-wiki.el (muse-wiki-resolve-project-page): Handle project more carefully. This should fix one or two hard-to-explain bugs. modified files: ChangeLog.2006 lisp/muse-project.el lisp/muse-wiki.el 2006-03-01 17:24:23 GMT Michael Olson patch-30 Summary: Fix another definition list edge case. Revision: muse--main--1.0--patch-30 * lisp/muse-publish.el (muse-publish-surround-dl): Fix edge case where unordered list immediately follows definition list term. modified files: ChangeLog.2006 lisp/muse-publish.el 2006-03-01 17:05:25 GMT Michael Olson patch-29 Summary: Pass all current definition list test cases. Revision: muse--main--1.0--patch-29 * lisp/muse-publish.el (muse-publish-surround-dl): Move correctly to next line if definition is not on the same line as the term. (muse-forward-list-item): Fix publishing incorrectness that occurred when a non-dl list follows a definition list. Always move to the right place so as to prevent extra empty dd elements from being published. modified files: ChangeLog.2006 lisp/muse-publish.el 2006-03-01 15:08:45 GMT Michael Olson patch-28 Summary: Merge consecutive definition list terms properly. Revision: muse--main--1.0--patch-28 * lisp/muse-publish.el (muse-publish-surround-dl): Keep track of status correctly. This makes Muse merge several definition list items into one list. (muse-forward-list-item): Use simpler regexp for 'dl. * lisp/muse-regexps.el (muse-list-item-regexp): Make terms optional in definition lists, and make terms the 2nd matched text. modified files: ChangeLog.2006 lisp/muse-publish.el lisp/muse-regexps.el 2006-02-28 23:48:24 GMT Michael Olson patch-27 Summary: Bookkeeping. Revision: muse--main--1.0--patch-27 * AUTHORS: Update. * muse-colors.el, muse-mode.el: Credit contributions. modified files: AUTHORS ChangeLog.2006 lisp/muse-colors.el lisp/muse-mode.el 2006-02-28 23:37:26 GMT Michael Olson patch-26 Summary: Merged from mwolson@gnu.org--2006-muse-el (patch 0-4) Revision: muse--main--1.0--patch-26 Patches applied: * mwolson@gnu.org--2006-muse-el/muse-el--devel--0--patch-2 Added ability to show inline images in the Emacs buffer. * mwolson@gnu.org--2006-muse-el/muse-el--devel--0--patch-3 Added enhanced list item insertion. Detailed log: (Author: Per B. Sederberg ) * lisp/muse-mode.el (muse-mode-map): Added new key binding to insert a list item. New key mapping to toggle showing images. Added a key mapping to insert a link to a file and modified the key map to insert a tag. (muse-on-blank-line): Helper function to determine if the point is on a line containing only blank spaces. (muse-insert-list-item): New interactive function to insert a new list item, taking into account the current list state. (muse-insert-relative-link-to-file): New function to insert a link to a file, relative to the default directory. * lisp/muse-colors.el (muse-inline-relative-to): Added custom directory for where to search for images to inline in the buffer. (muse-colors-inline-images): Added custom boolean field for whether to show inline images in the buffer. (muse-colors-toggle-inline-images): New function to toggle showing the inline images in the buffer. (muse-unhighlight-region): Now removes end-glyph text properties to support XEmacs. (muse-colors-resolve-image-file): New function to determine if a link is an image and whether the version of Emacs can support inline images. (muse-make-file-glyph): New function to create an image glyph if we are using XEmacs. (muse-colors-insert-image): New function to insert an image in an Emacs buffer. (muse-colors-explicit-link): Modified function to have the ability to insert an image instead of formatting the text of the link. modified files: ChangeLog.2006 lisp/muse-colors.el lisp/muse-mode.el 2006-02-28 05:20:11 GMT Michael Olson patch-25 Summary: Pass testcase for definition list and nested unordered list. Revision: muse--main--1.0--patch-25 * lisp/muse-publish.el (muse-publish-surround-dl): Ensure that definition lists always have at least one entry. This appears to do the right thing with a sample nested unordered list. modified files: ChangeLog.2006 lisp/muse-publish.el 2006-02-28 05:09:33 GMT Michael Olson patch-24 Summary: Some definition list fixes. Revision: muse--main--1.0--patch-24 * lisp/muse-publish.el (muse-publish-markup-list): Make sure to insert markup for end of list using the `muse-insert-markup-end-list' function. Handle list items nested inside of a definition list. modified files: ChangeLog.2006 lisp/muse-publish.el 2006-02-28 04:43:15 GMT Michael Olson patch-23 Summary: Fix another wrapped list item edge case. Revision: muse--main--1.0--patch-23 * lisp/muse-publish.el (muse-publish-surround-text): Stop removing indentation in a region when we encounter any list items. This should fix another wrapped list item edge case. Thanks to Per B. Sederberg for the report. modified files: ChangeLog.2006 lisp/muse-publish.el 2006-02-26 18:26:05 GMT Michael Olson patch-22 Summary: Fix comment in Debian packaging. Revision: muse--main--1.0--patch-22 * debian/emacsen-remove: Fix comment. modified files: ChangeLog.2006 debian/emacsen-remove 2006-02-24 03:23:49 GMT Michael Olson patch-21 Summary: muse-blosxom: Fix order of #tags line in header. Revision: muse--main--1.0--patch-21 * lisp/muse-blosxom.el (muse-blosxom-header): Put #tags line after title, rather than before it. Thanks to bkhl for the heads up. modified files: ChangeLog.2006 lisp/muse-blosxom.el 2006-02-23 03:33:03 GMT Michael Olson patch-20 Summary: muse-blosxom: Add ability to use tags in entries. Revision: muse--main--1.0--patch-20 * lisp/muse-blosxom.el (muse-blosxom-header): If we are using tags, publish them. (muse-blosxom-use-tags): New option that specifies whether we are using tags. (muse-blosxom-new-entry): If using tags, read tags until the user hits RET without entering one. modified files: ChangeLog.2006 lisp/muse-blosxom.el 2006-02-23 03:23:51 GMT Michael Olson patch-19 Summary: Fix backtrace when publishing unsaved files. Revision: muse--main--1.0--patch-19 * lisp/muse-publish.el (muse-publish-file): Detect case where we are trying to publish a file that has not been saved, and give an explanation to the user. modified files: ChangeLog.2006 lisp/muse-publish.el 2006-02-21 23:19:36 GMT Michael Olson patch-18 Summary: muse-texinfo: Fix link suffix. Revision: muse--main--1.0--patch-18 * lisp/muse-texinfo.el: Specify :link-suffix for info and info-pdf styles. This should fix a bug where links in published info files use an incorrect extension. Thanks to Hans Ekbrand for the report! modified files: ChangeLog.2006 lisp/muse-texinfo.el 2006-02-16 21:54:11 GMT Michael Olson patch-17 Summary: Fix prompting of non-Muse buffers before publishing. Revision: muse--main--1.0--patch-17 * lisp/muse-project.el (muse-project-of-file): Apply fix from René Stadler to ignore buffers that have no associated filename. This fixes an annoyance where Muse prompts to save BBDB and ERC buffers before publishing. modified files: AUTHORS ChangeLog.2006 lisp/muse-project.el 2006-02-16 04:43:35 GMT Michael Olson patch-16 Summary: Fix wrapped nested list item edge case. Revision: muse--main--1.0--patch-16 * lisp/muse-publish.el (muse-publish-markup-regexps): Remove 2300 rule, since it is no longer needed. Tweak 2200 regexp to cover 2300's use case. (muse-publish-surround-text): Tweak prefix for muse-list-item-regexp. (muse-list-item-type): Handle the new change to muse-list-item-regexp. * lisp/muse-regexps.el (muse-list-item-regexp): Explicitly require exactly one space character in front of a unnumbered or numbered list. This should make it easier to match every list instance, since definition lists can now be handled more nicely in muse-publish-markup-regexps. This also has the effect of fixing a wrapped nested list item edge case. modified files: ChangeLog.2006 lisp/muse-publish.el lisp/muse-regexps.el 2006-02-16 03:04:20 GMT Michael Olson patch-15 Summary: Fix edge case in muse-wiki-publish-pretty-title. Revision: muse--main--1.0--patch-15 * lisp/muse-wiki.el (muse-wiki-publish-pretty-title): If for some reason the document does not have a valid title, use the empty string. modified files: ChangeLog.2006 lisp/muse-wiki.el 2006-02-14 06:35:02 GMT Michael Olson patch-14 Summary: Use debian/compat to determine debhelper compat level. Revision: muse--main--1.0--patch-14 * debian/compat: New file that sets the debhelper compatibility level to 4. * debian/rules: Remove DH_COMPAT line. new files: debian/.arch-ids/compat.id debian/compat modified files: ChangeLog.2006 debian/rules 2006-02-13 04:50:57 GMT Michael Olson patch-13 Summary: Fix a couple of table-publishing edge cases. Revision: muse--main--1.0--patch-13 * lisp/muse-publish.el (muse-publish-markup-regexps): Fix a table publishing error that occurs when a table line is the last thing in a document. Thanks to cymacs for the report and suggested fix. (muse-publish-table-fields): Skip initial blank lines, and don't remove them. * lisp/muse-docbook.el (muse-docbook-markup-strings): Don't put a newline at the end of the 'end-table markup string. * lisp/muse-html.el (muse-html-markup-strings): Ditto. * lisp/muse-xml.el (muse-xml-markup-strings): Ditto. * lisp/muse-xml-common.el (muse-xml-markup-table): Always insert a newline at the end of the table. This should fix a problem with paragraphs after tables not being published as such. Thanks to cymacs for the report. * lisp/muse-texinfo.el (muse-texinfo-markup-table): Don't use muse-insert-markup to insert a trailing newline. modified files: ChangeLog.2006 lisp/muse-docbook.el lisp/muse-html.el lisp/muse-publish.el lisp/muse-texinfo.el lisp/muse-xml-common.el lisp/muse-xml.el 2006-02-12 22:56:27 GMT Michael Olson patch-12 Summary: Add ChangeLog for 2006 and move previous ChangeLog for 2005. Revision: muse--main--1.0--patch-12 new files: .arch-ids/ChangeLog.2006.id ChangeLog.2006 renamed files: .arch-ids/ChangeLog.id ==> .arch-ids/ChangeLog.2005.id ChangeLog ==> ChangeLog.2005 2006-02-12 22:53:48 GMT Michael Olson patch-11 Summary: Make muse-journal work with whole-document escaping. Revision: muse--main--1.0--patch-11 * examples/mwolson/templates/*: Change "Published by Muse" to "Published by Emacs Muse" so that muse-journal does not get confused. * lisp/muse-journal.el (muse-journal-html-munge-buffer): (muse-journal-latex-munge-buffer, muse-journal-rss-munge-buffer): Adapt for whole-buffer escaping. Thanks to mondoshawan for the report. (muse-journal-rss-munge-buffer): Display a warning if someone does not have "Page published by Emacs Muse (begins|ends) here" in their header or footer, since muse-journal needs this in order to determine where entries begin and end. modified files: examples/mwolson/templates/footer.html examples/mwolson/templates/generic-footer.html examples/mwolson/templates/generic-header.html examples/mwolson/templates/header.html examples/mwolson/templates/header.tex lisp/muse-journal.el 2006-02-08 03:00:07 GMT Michael Olson patch-10 Summary: Get simple test case for definition lists to work. Revision: muse--main--1.0--patch-10 * lisp/muse-publish.el (muse-publish-surround-dl): Make simple test case publish properly. (muse-forward-list-item): Fix edge case. modified files: lisp/muse-publish.el 2006-01-28 02:47:07 GMT Michael Olson patch-9 Summary: Add documentation to some publishing functions. Revision: muse--main--1.0--patch-9 * lisp/muse-publish.el (muse-publish-mark-read-only) (muse-publish-mark-noemphasis): Add documentation. modified files: lisp/muse-publish.el 2006-01-28 02:42:03 GMT Michael Olson patch-8 Summary: Fix an error with `custom-quote'. Revision: muse--main--1.0--patch-8 * lisp/muse-project.el: Require 'cus-edit, since that is where `custom-quote' is defined. * muse.texi: Use copyright symbol. modified files: lisp/muse-project.el muse.texi 2006-01-25 18:27:53 GMT Michael Olson patch-7 Summary: muse-registry: update from author. Revision: muse--main--1.0--patch-7 * lisp/muse-registry.el: Update to newest version from author. Re-tabify. modified files: lisp/muse-registry.el 2006-01-21 19:26:57 GMT Michael Olson patch-6 Summary: muse-latex: Handle double-quote edge case. Revision: muse--main--1.0--patch-6 * lisp/muse-latex.el (muse-latex-fixup-dquotes): Handle case when a quote character begins the buffer. modified files: lisp/muse-latex.el 2006-01-21 18:47:33 GMT Michael Olson patch-5 Summary: Allow beginning and ending empty elements in tables. Revision: muse--main--1.0--patch-5 * lisp/muse-regexps.el (muse-table-field-regexp): Allow there to be no whitespace after the field if we're at the end of a line. (muse-table-line-regexp): Allow the table to start with a "|". The resulting initial empty cell isn't yet thrown away like it should be. modified files: lisp/muse-regexps.el 2006-01-21 02:45:36 GMT Michael Olson patch-4 Summary: muse-latex: Use \url to publish bare URLs. Revision: muse--main--1.0--patch-4 * lisp/muse-latex.el (muse-latex-markup-strings): Use \url instead of \href for bare URLs. Thanks to Na Li for the suggestion! modified files: lisp/muse-latex.el 2006-01-20 16:22:04 GMT Michael Olson patch-3 Summary: Create parents of output directories. Revision: muse--main--1.0--patch-3 * lisp/muse-project.el (muse-project-publish-file): Create parent directories as well, if the output directory does not exist. This can happen when we have nested directories in a project. modified files: lisp/muse-project.el 2006-01-20 15:54:21 GMT Michael Olson patch-2 Summary: Pick a better default if publishing with more than one style. Revision: muse--main--1.0--patch-2 * lisp/muse-project.el (muse-project-applicable-styles): Make sure that the list we return is in the right order. That way, if more than one publishing rule matches a link, the first one is used, rather than the last. modified files: lisp/muse-project.el 2006-01-19 15:55:19 GMT Michael Olson patch-1 Summary: Oops, committed to the wrong archive. Revision: muse--main--1.0--patch-1 Patches applied: * mwolson@gnu.org--2005/muse--main--1.0--patch-356 Debian fixups. * mwolson@gnu.org--2005/muse--main--1.0--patch-357 Another Debian fix. modified files: ChangeLog debian/emacsen-startup renamed files: debian/.arch-ids/NEWS.Debian.id ==> debian/.arch-ids/NEWS.id debian/NEWS.Debian ==> debian/NEWS 2006-01-17 06:28:50 GMT Michael Olson base-0 Summary: tag of mwolson@gnu.org--2005/muse--main--1.0--patch-355 Revision: muse--main--1.0--base-0 See ChangeLog.2 for earlier changes. ;; Local Variables: ;; coding: utf-8 ;; End: muse-el-3.20+dfsg/COPYING0000644000175000017500000010437411331353120014274 0ustar taffittaffit GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program 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 3 of the License, or (at your option) any later version. This program 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 this program. If not, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . muse-el-3.20+dfsg/texi/0000755000175000017500000000000012070124130014177 5ustar taffittaffitmuse-el-3.20+dfsg/texi/dir-template0000644000175000017500000000103511331353120016512 0ustar taffittaffitThis is the file .../info/dir, which contains the topmost node of the Info hierarchy, called (dir)Top. The first time you invoke Info you start off looking at this node.  File: dir, Node: Top This is the top of the INFO tree This (the Directory node) gives a menu of major topics. Typing "q" exits, "?" lists all Info commands, "d" returns here, "h" gives a primer for first-timers, "mEmacs" visits the Emacs manual, etc. In Emacs, you can click mouse button 2 on a menu item or cross reference to select it. * Menu: muse-el-3.20+dfsg/texi/Makefile0000644000175000017500000000113411331353120015640 0ustar taffittaffit.PHONY: all info-only doc clean realclean distclean fullclean install .PRECIOUS: %.info %.html DEFS = $(shell test -f ../Makefile.defs && echo ../Makefile.defs \ || echo ../Makefile.defs.default) include $(DEFS) all: doc %.info: %.texi makeinfo $< %.html: %.texi makeinfo --html --no-split $< info-only: $(MANUAL).info doc: $(MANUAL).info $(MANUAL).html clean: ; distclean realclean fullclean: clean -rm -f $(MANUAL).info $(MANUAL).html install: $(MANUAL).info [ -d $(INFODIR) ] || install -d $(INFODIR) install -m 0644 $(MANUAL).info $(INFODIR)/$(MANUAL) $(call install_info,$(MANUAL)) muse-el-3.20+dfsg/texi/doclicense.texi0000644000175000017500000005051211331353120017207 0ustar taffittaffit@c -*-texinfo-*- @center Version 1.2, November 2002 @display Copyright (C) 2000,2001,2002 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. @end display @sp 1 @enumerate 0 @item PREAMBLE The purpose of this License is to make a manual, textbook, or other functional and useful document ``free'' in the sense of freedom: to assure everyone the effective freedom to copy and redistribute it, with or without modifying it, either commercially or noncommercially. Secondarily, this License preserves for the author and publisher a way to get credit for their work, while not being considered responsible for modifications made by others. This License is a kind of ``copyleft,'' which means that derivative works of the document must themselves be free in the same sense. It complements the GNU General Public License, which is a copyleft license designed for free software. We have designed this License in order to use it for manuals for free software, because free software needs free documentation: a free program should come with manuals providing the same freedoms that the software does. But this License is not limited to software manuals; it can be used for any textual work, regardless of subject matter or whether it is published as a printed book. We recommend this License principally for works whose purpose is instruction or reference. @sp 1 @item APPLICABILITY AND DEFINITIONS This License applies to any manual or other work, in any medium, that contains a notice placed by the copyright holder saying it can be distributed under the terms of this License. Such a notice grants a world-wide, royalty-free license, unlimited in duration, to use that work under the conditions stated herein. The ``Document,'' below, refers to any such manual or work. Any member of the public is a licensee, and is addressed as ``you.'' You accept the license if you copy, modify or distribute the work in a way requiring permission under copyright law. A ``Modified Version'' of the Document means any work containing the Document or a portion of it, either copied verbatim, or with modifications and/or translated into another language. A ``Secondary Section'' is a named appendix or a front-matter section of the Document that deals exclusively with the relationship of the publishers or authors of the Document to the Document's overall subject (or to related matters) and contains nothing that could fall directly within that overall subject. (Thus, if the Document is in part a textbook of mathematics, a Secondary Section may not explain any mathematics.) The relationship could be a matter of historical connection with the subject or with related matters, or of legal, commercial, philosophical, ethical or political position regarding them. The ``Invariant Sections'' are certain Secondary Sections whose titles are designated, as being those of Invariant Sections, in the notice that says that the Document is released under this License. If a section does not fit the above definition of Secondary then it is not allowed to be designated as Invariant. The Document may contain zero Invariant Sections. If the Document does not identify any Invariant Sections then there are none. The ``Cover Texts'' are certain short passages of text that are listed, as Front-Cover Texts or Back-Cover Texts, in the notice that says that the Document is released under this License. A Front-Cover Text may be at most 5 words, and a Back-Cover Text may be at most 25 words. A ``Transparent'' copy of the Document means a machine-readable copy, represented in a format whose specification is available to the general public, that is suitable for revising the document straightforwardly with generic text editors or (for images composed of pixels) generic paint programs or (for drawings) some widely available drawing editor, and that is suitable for input to text formatters or for automatic translation to a variety of formats suitable for input to text formatters. A copy made in an otherwise Transparent file format whose markup, or absence of markup, has been arranged to thwart or discourage subsequent modification by readers is not Transparent. An image format is not Transparent if used for any substantial amount of text. A copy that is not ``Transparent'' is called ``Opaque.'' Examples of suitable formats for Transparent copies include plain ASCII without markup, Texinfo input format, LaTeX input format, SGML or XML using a publicly available DTD, and standard-conforming simple HTML, PostScript or PDF designed for human modification. Examples of transparent image formats include PNG, XCF and JPG. Opaque formats include proprietary formats that can be read and edited only by proprietary word processors, SGML or XML for which the DTD and/or processing tools are not generally available, and the machine-generated HTML, PostScript or PDF produced by some word processors for output purposes only. The ``Title Page'' means, for a printed book, the title page itself, plus such following pages as are needed to hold, legibly, the material this License requires to appear in the title page. For works in formats which do not have any title page as such, ``Title Page'' means the text near the most prominent appearance of the work's title, preceding the beginning of the body of the text. A section ``Entitled XYZ'' means a named subunit of the Document whose title either is precisely XYZ or contains XYZ in parentheses following text that translates XYZ in another language. (Here XYZ stands for a specific section name mentioned below, such as ``Acknowledgements,'' ``Dedications,'' ``Endorsements,'' or ``History.'') To ``Preserve the Title'' of such a section when you modify the Document means that it remains a section ``Entitled XYZ'' according to this definition. The Document may include Warranty Disclaimers next to the notice which states that this License applies to the Document. These Warranty Disclaimers are considered to be included by reference in this License, but only as regards disclaiming warranties: any other implication that these Warranty Disclaimers may have is void and has no effect on the meaning of this License. @sp 1 @item VERBATIM COPYING You may copy and distribute the Document in any medium, either commercially or noncommercially, provided that this License, the copyright notices, and the license notice saying this License applies to the Document are reproduced in all copies, and that you add no other conditions whatsoever to those of this License. You may not use technical measures to obstruct or control the reading or further copying of the copies you make or distribute. However, you may accept compensation in exchange for copies. If you distribute a large enough number of copies you must also follow the conditions in section 3. You may also lend copies, under the same conditions stated above, and you may publicly display copies. @sp 1 @item COPYING IN QUANTITY If you publish printed copies (or copies in media that commonly have printed covers) of the Document, numbering more than 100, and the Document's license notice requires Cover Texts, you must enclose the copies in covers that carry, clearly and legibly, all these Cover Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on the back cover. Both covers must also clearly and legibly identify you as the publisher of these copies. The front cover must present the full title with all words of the title equally prominent and visible. You may add other material on the covers in addition. Copying with changes limited to the covers, as long as they preserve the title of the Document and satisfy these conditions, can be treated as verbatim copying in other respects. If the required texts for either cover are too voluminous to fit legibly, you should put the first ones listed (as many as fit reasonably) on the actual cover, and continue the rest onto adjacent pages. If you publish or distribute Opaque copies of the Document numbering more than 100, you must either include a machine-readable Transparent copy along with each Opaque copy, or state in or with each Opaque copy a computer-network location from which the general network-using public has access to download using public-standard network protocols a complete Transparent copy of the Document, free of added material. If you use the latter option, you must take reasonably prudent steps, when you begin distribution of Opaque copies in quantity, to ensure that this Transparent copy will remain thus accessible at the stated location until at least one year after the last time you distribute an Opaque copy (directly or through your agents or retailers) of that edition to the public. It is requested, but not required, that you contact the authors of the Document well before redistributing any large number of copies, to give them a chance to provide you with an updated version of the Document. @sp 1 @item MODIFICATIONS You may copy and distribute a Modified Version of the Document under the conditions of sections 2 and 3 above, provided that you release the Modified Version under precisely this License, with the Modified Version filling the role of the Document, thus licensing distribution and modification of the Modified Version to whoever possesses a copy of it. In addition, you must do these things in the Modified Version: A. Use in the Title Page (and on the covers, if any) a title distinct from that of the Document, and from those of previous versions (which should, if there were any, be listed in the History section of the Document). You may use the same title as a previous version if the original publisher of that version gives permission.@* B. List on the Title Page, as authors, one or more persons or entities responsible for authorship of the modifications in the Modified Version, together with at least five of the principal authors of the Document (all of its principal authors, if it has fewer than five), unless they release you from this requirement.@* C. State on the Title page the name of the publisher of the Modified Version, as the publisher.@* D. Preserve all the copyright notices of the Document.@* E. Add an appropriate copyright notice for your modifications adjacent to the other copyright notices.@* F. Include, immediately after the copyright notices, a license notice giving the public permission to use the Modified Version under the terms of this License, in the form shown in the Addendum below.@* G. Preserve in that license notice the full lists of Invariant Sections and required Cover Texts given in the Document's license notice.@* H. Include an unaltered copy of this License.@* I. Preserve the section Entitled ``History,'' Preserve its Title, and add to it an item stating at least the title, year, new authors, and publisher of the Modified Version as given on the Title Page. If there is no section Entitled ``History'' in the Document, create one stating the title, year, authors, and publisher of the Document as given on its Title Page, then add an item describing the Modified Version as stated in the previous sentence.@* J. Preserve the network location, if any, given in the Document for public access to a Transparent copy of the Document, and likewise the network locations given in the Document for previous versions it was based on. These may be placed in the ``History'' section. You may omit a network location for a work that was published at least four years before the Document itself, or if the original publisher of the version it refers to gives permission.@* K. For any section Entitled ``Acknowledgements'' or ``Dedications,'' Preserve the Title of the section, and preserve in the section all the substance and tone of each of the contributor acknowledgements and/or dedications given therein.@* L. Preserve all the Invariant Sections of the Document, unaltered in their text and in their titles. Section numbers or the equivalent are not considered part of the section titles.@* M. Delete any section Entitled ``Endorsements.'' Such a section may not be included in the Modified Version.@* N. Do not retitle any existing section to be Entitled ``Endorsements'' or to conflict in title with any Invariant Section.@* O. Preserve any Warranty Disclaimers.@* @sp 1 If the Modified Version includes new front-matter sections or appendices that qualify as Secondary Sections and contain no material copied from the Document, you may at your option designate some or all of these sections as invariant. To do this, add their titles to the list of Invariant Sections in the Modified Version's license notice. These titles must be distinct from any other section titles. You may add a section Entitled ``Endorsements,'' provided it contains nothing but endorsements of your Modified Version by various parties--for example, statements of peer review or that the text has been approved by an organization as the authoritative definition of a standard. You may add a passage of up to five words as a Front-Cover Text, and a passage of up to 25 words as a Back-Cover Text, to the end of the list of Cover Texts in the Modified Version. Only one passage of Front-Cover Text and one of Back-Cover Text may be added by (or through arrangements made by) any one entity. If the Document already includes a cover text for the same cover, previously added by you or by arrangement made by the same entity you are acting on behalf of, you may not add another; but you may replace the old one, on explicit permission from the previous publisher that added the old one. The author(s) and publisher(s) of the Document do not by this License give permission to use their names for publicity for or to assert or imply endorsement of any Modified Version. @sp 1 @item COMBINING DOCUMENTS You may combine the Document with other documents released under this License, under the terms defined in section 4 above for modified versions, provided that you include in the combination all of the Invariant Sections of all of the original documents, unmodified, and list them all as Invariant Sections of your combined work in its license notice, and that you preserve all their Warranty Disclaimers. The combined work need only contain one copy of this License, and multiple identical Invariant Sections may be replaced with a single copy. If there are multiple Invariant Sections with the same name but different contents, make the title of each such section unique by adding at the end of it, in parentheses, the name of the original author or publisher of that section if known, or else a unique number. Make the same adjustment to the section titles in the list of Invariant Sections in the license notice of the combined work. In the combination, you must combine any sections Entitled ``History'' in the various original documents, forming one section Entitled ``History''; likewise combine any sections Entitled ``Acknowledgements,'' and any sections Entitled ``Dedications.'' You must delete all sections Entitled ``Endorsements.'' @sp 1 @item COLLECTIONS OF DOCUMENTS You may make a collection consisting of the Document and other documents released under this License, and replace the individual copies of this License in the various documents with a single copy that is included in the collection, provided that you follow the rules of this License for verbatim copying of each of the documents in all other respects. You may extract a single document from such a collection, and distribute it individually under this License, provided you insert a copy of this License into the extracted document, and follow this License in all other respects regarding verbatim copying of that document. @sp 1 @item AGGREGATION WITH INDEPENDENT WORKS A compilation of the Document or its derivatives with other separate and independent documents or works, in or on a volume of a storage or distribution medium, is called an ``aggregate'' if the copyright resulting from the compilation is not used to limit the legal rights of the compilation's users beyond what the individual works permit. When the Document is included in an aggregate, this License does not apply to the other works in the aggregate which are not themselves derivative works of the Document. If the Cover Text requirement of section 3 is applicable to these copies of the Document, then if the Document is less than one half of the entire aggregate, the Document's Cover Texts may be placed on covers that bracket the Document within the aggregate, or the electronic equivalent of covers if the Document is in electronic form. Otherwise they must appear on printed covers that bracket the whole aggregate. @sp 1 @item TRANSLATION Translation is considered a kind of modification, so you may distribute translations of the Document under the terms of section 4. Replacing Invariant Sections with translations requires special permission from their copyright holders, but you may include translations of some or all Invariant Sections in addition to the original versions of these Invariant Sections. You may include a translation of this License, and all the license notices in the Document, and any Warranty Disclaimers, provided that you also include the original English version of this License and the original versions of those notices and disclaimers. In case of a disagreement between the translation and the original version of this License or a notice or disclaimer, the original version will prevail. If a section in the Document is Entitled ``Acknowledgements,'' ``Dedications,'' or ``History,'' the requirement (section 4) to Preserve its Title (section 1) will typically require changing the actual title. @sp 1 @item TERMINATION You may not copy, modify, sublicense, or distribute the Document except as expressly provided for under this License. Any other attempt to copy, modify, sublicense or distribute the Document is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. @sp 1 @item FUTURE REVISIONS OF THIS LICENSE The Free Software Foundation may publish new, revised versions of the GNU Free Documentation License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. See http://www.gnu.org/copyleft/. Each version of the License is given a distinguishing version number. If the Document specifies that a particular numbered version of this License ``or any later version'' applies to it, you have the option of following the terms and conditions either of that specified version or of any later version that has been published (not as a draft) by the Free Software Foundation. If the Document does not specify a version number of this License, you may choose any version ever published (not as a draft) by the Free Software Foundation. @end enumerate @unnumberedsec ADDENDUM: How to use this License for your documents To use this License in a document you have written, include a copy of the License in the document and put the following copyright and license notices just after the title page: @smallexample @group Copyright (C) @var{year} @var{your name}. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled ``GNU Free Documentation License.'' @end group @end smallexample If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, replace the ``with...Texts.'' line with this: @smallexample @group with the Invariant Sections being @var{list their titles}, with the Front-Cover Texts being @var{list}, and with the Back-Cover Texts being @var{list}. @end group @end smallexample If you have Invariant Sections without Cover Texts, or some other combination of the three, merge those two alternatives to suit the situation. If your document contains nontrivial examples of program code, we recommend releasing these examples in parallel under your choice of free software license, such as the GNU General Public License, to permit their use in free software. @ignore arch-tag: c1679162-1d8a-4f02-bc52-2e71765f0165 @end ignore muse-el-3.20+dfsg/contrib/0000755000175000017500000000000011331353120014670 5ustar taffittaffitmuse-el-3.20+dfsg/contrib/blosxom/0000755000175000017500000000000011331353120016353 5ustar taffittaffitmuse-el-3.20+dfsg/contrib/blosxom/getstamps.pl0000644000175000017500000000276411331353120020730 0ustar taffittaffit#!/usr/bin/perl -w -- # # $Id: getstamps.pl,v 1.3 2007-08-19 13:46:54 welle Exp $ # # Author: Michael Welle # This file is available under the terms of the GNU General Public # License, Version 2. # Modified by Michael Olson to add Author note. license text, and to # fix a use of "muse" rather than $muse_file_extension. #my $tsfile = "/tmp/blog/timestamps"; my $tsfile = "-"; my $muse_file_extension = "muse"; # # # sub process_file { my ($file) = @_; open( F, "<$file" ); while ( ) { if ( /^#date\s+(.+)$/ ) { close ( F ); my $d = $1; $file =~ s/\.${muse_file_extension}$/\.txt/; $file =~ s/^\.\///; if ( $d =~ /(\d\d\d\d)-(\d\d)-(\d\d)-(\d\d)-(\d\d)/ ) { printf TS "${file}=>$2/$3/$1 $4:$5\n"; return; } # if } # if } # while close( F ); } # process_file # # # sub traverse_directory { my ($directory) = @_; local *DIR; my @files = (); my $pfad = ""; opendir( DIR, $directory ); @files = readdir( DIR ); closedir( DIR ); foreach my $file ( @files ) { next if ( !( $file =~ /^.*\.${muse_file_extension}$/ ) || ($file eq '.') || ($file eq '..')); $path = "$directory/$file"; if( -d $path ) { traverse_directory( $path ); } else { process_file( $path ); } #if } #foreach } # traverse_directory # # Here we go... # open( TS, ">${tsfile}" ); if ( @ARGV == 0 ) { traverse_directory( "." ); } else { traverse_directory( $ARGV[0] ); } #if close( TS ); exit 0; muse-el-3.20+dfsg/contrib/blosxom/metadate_0_0_30000644000175000017500000002157611331353120020755 0ustar taffittaffit# Blosxom Plugin: metadate # Author(s): Mark Ivey # Version: 0.0.3 # Documentation: See the bottom of this file or type: perldoc metadate package metadate; # --- Configurable variables ----- # fullpath to the external metadates file (see perldoc for description) $external_file = "$blosxom::datadir/external_metadate"; $use_UK_dates = 0; # Default is mm/dd/yy (US) # Set to 1 to use dd/mm/yy (UK) # -------------------------------- use English; use File::Basename; use Time::Local; use File::Find; use File::stat; use Time::Local; use vars qw( %dirs, %all ); my $debug = 0; # log debug messages or not? sub start { return 1; } # FIXME: make the external metadate file optional # FIXME: handle both creation date & modification date... sub filter { _add_from_find(); _add_from_file(); return 1; } sub _add_from_file { # read the external metadates file unless (open(FILE, "< $external_file")) { warn "metadate::filter() couldn't open external file $external_file\n"; return 0; } while () { next if (/^\s*#/); # skip comments if (/(.*)=>(.*)/) { my ($file, $time) = ($1, $2); $file =~ s!/*$!!; # remove any trailing slashes $file =~ s!^/*!!; # remove any leading slashes $file = "$blosxom::datadir/$file"; warn "metadate: $file=>$time\n" if $debug > 0; $time = parsedate($time); _add($file, $time); } } close(FILE); return 1; } sub _add_from_find { find( sub { _add($File::Find::name, extract_date($File::Find::name,$files{$File::Find::name}) || $files{$File::Find::name} || stat($File::Find::name)->mtime) }, $blosxom::datadir ); return 1; } sub _add { my $file = shift or return; my $time = shift or return; # check %files, then %others, then check for a directory. Always add to %all if (exists $blosxom::files{$file}) { $blosxom::files{$file} = $time; } elsif (exists $blosxom::others{$file}) { $blosxom::others{$file} = $time; } elsif (-d "$file") { $dirs{$file} = $time; } $all{$file} = $time; } # extract_date() taken from Fletcher T. Penney's entriescache plugin # # FIXME I should make _add_from_file() know about these and then # make them user variables $use_date_tags = 1; $update_meta_date = 0; $meta_timestamp = "meta-creation_timestamp:" unless defined $meta_timestamp; $meta_date = "meta-creation_date:" unless defined $meta_date; sub extract_date { my ($file, $indexed_date) = @_; my $new_story = ""; my ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst); # This is an attempt for compatibility with Eric Sherman's entries_index_tagged # But it does not handle as many date formats, as there are too many additional # necessary modules that I am not willing to require if ( $use_date_tags != 0) { open (FILE, $file); while ($line = ) { if ($line =~ /^$meta_timestamp\s*(\d+)/) { # If present, this format is used close File; return $1; } if ($line =~ /^$meta_date\s*(.*)/) { close File; return parsedate($1); } if ($line =~ /^\s*$/) { # Empty Line signifying end of meta-tags if ($update_meta_date eq 1) { if ($indexed_date eq 0) { $indexed_date = stat($file)->mtime; } ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = localtime($indexed_date); $year += 1900; $mon += 1; $hour = sprintf("%02d",$hour); $min = sprintf("%02d",$min); $sec = sprintf("%02d",$sec); if ($use_UK_dates eq 1) { $new_story .= "$meta_date $mday/$mon/$year $hour:$min:$sec\n\n"; } else { $new_story .= "$meta_date $mon/$mday/$year $hour:$min:$sec\n\n"; } while ($line = ) { $new_story .= $line; } close FILE; open (FILE, "> $file") or warn "Unable to update date meta-tag on $file\n"; print FILE $new_story; close FILE; return 0; } else { close File; return 0; } } $new_story .= $line; } } return 0; } # parsedate() taken from Fletcher T. Penney's entriescache plugin # sub parsedate { my ($datestring) = @_; #warn "Parsing $datestring\n"; # Possible formatting # Month can be 3 letter abbreviation or full name (in English) # Time must be hh:mm or hh:mm:ss in 24 hour format # Year must be yyyy # The remaining 1 or 2 digits are treated as date # ie: May 25 2003 18:40 # order is not important as long as pieces are there # Convert the datestring to a time() format # Find "Shorthand" Date if ( $datestring =~ /\d\d?\/\d\d?\/\d\d\d?\d?/) { if ( $use_UK_dates eq 0) { # Use US Formatting $datestring =~ s/(\d\d?)\/(\d\d?)\/(\d\d\d?\d?)//; $mon = $1 - 1; $day = $2; $year = $3; } else { # Use UK Formatting $datestring =~ s/(\d\d?)\/(\d\d?)\/(\d\d\d?\d?)//; $mon = $2 - 1; $day = $1; $year = $3; } # Now, clean up year if 2 digit # You may change the 70 to whatever cutoff you like $year += 2000 if ($year < 70 ); $year += 1900 if ($year < 100); } # Find Month $mon = 0 if ($datestring =~ s/(Jan|January)//i); $mon = 1 if ($datestring =~ s/(Feb|February)//i); $mon = 2 if ($datestring =~ s/(Mar|March)//i); $mon = 3 if ($datestring =~ s/(Apr|April)//i); $mon = 4 if ($datestring =~ s/(May)//i); $mon = 5 if ($datestring =~ s/(Jun|June)//i); $mon = 6 if ($datestring =~ s/(Jul|July)//i); $mon = 7 if ($datestring =~ s/(Aug|August)//i); $mon = 8 if ($datestring =~ s/(Sep|September)//i); $mon = 9 if ($datestring =~ s/(Oct|October)//i); $mon = 10 if ($datestring =~ s/(Nov|November)//i); $mon = 11 if ($datestring =~ s/(Dec|December)//i); # Find Time if ($datestring =~ s/(\d\d?):(\d\d)(:\d\d)?//) { $hour = $1; $min = $2; $sec = $3; } if ($datestring =~ s/(\d\d\d\d)//) { $year = $1; } if ($datestring =~ s/(\d\d?)//) { $day = $1; } return timelocal($sec,$min,$hour,$day,$mon,$year); } 1; __END__ =head1 NAME Blosxom Plug-in: metadate =head1 SYNOPSIS Handles meta tags related to dates. =head1 VERSION 0.0.3 =head1 AUTHOR Mark Ivey , http://zovirl.com =head1 DESCRIPTION metadate parses metadates in stories. It also provides a way to save metadates externally from a file. This is most useful for non-story files, such as pictures or categories which can't contain metadates internally. The file $external_file should contain entries in this format: # comment lines start with a "#" /software=>11/17/2003 22:45 /software/screenshot.png=>11/18/2003 22:50 /software/static_file.patch.asc=>11/18/2003 22:50 WARNING: The file format changed between version 0.0.1 and 0.0.2. It used to contain the full path to the file. Now it contains the path from $blosxom::datadir, to make it easier to relocate $blosxom::datadir metadates stores dates in %blosxom::files (for story files), %blosxom::others (for non-story files), or %metadate::dirs (for directories). Metdates also provides %metadates::all, which contains any file/directory metadate knows about. =head1 SEE ALSO Blosxom Home/Docs/Licensing: http://www.raelity.org/apps/blosxom/ Blosxom Plugin Docs: http://www.raelity.org/apps/blosxom/plugin.shtml parsedate() and extract_date() taken from Fletcher T. Penney's entriescache plugin: http://www.blosxom.com/plugins/indexing/entries_cache.htm =head1 BUGS Address bug reports and comments to the Blosxom mailing list [http://www.yahoogroups.com/group/blosxom]. =head1 LICENSE metadate Blosxom Plugin Copyright 2003-2004, Mark Ivey Portions Copyright 2003, Fletcher Penney Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. muse-el-3.20+dfsg/contrib/pyblosxom/0000755000175000017500000000000011331353120016724 5ustar taffittaffitmuse-el-3.20+dfsg/contrib/pyblosxom/hardcodedates.py0000644000175000017500000000651111331353120022073 0ustar taffittaffit""" This allows the user to create a file "timestamps" in their top-level blog entries directory, that will override the timestamp of any given blog entry. Each line in this file should be in one of the following forms. "YYYY-MM-DD-hh-mm file-name" "YYYY-MM-DD file-name" Then for any entry that one of these lines exist the system will use that timestamp instead of the actual files modification time. Note: the filename is relative to your data-dir. An example follows of a line for the file /var/data-dir/school/abc.txt, where the top-level blog entries directory is "/var/data-dir/" and the date is Aug 9, 2004. 2004-08-09-00-00 school/abc.txt History: 1.3 * Michael Olson made it optional to include the hours and minutes. 1.2 * Original version License: Copyright (c) 2006 Nathan Kent Bullock Copyright (c) 2006, 2007, 2008, 2009, 2010 Michael Olson Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. """ __author__ = 'Nathan Kent Bullock' __homepage__ = 'http://bullock.moo.com/nathan/' __email__ = 'nathan_kent_bullock -at- yahoo.ca' __version__ = '1.3' from Pyblosxom import tools import os, re, time, sys FILETIME = re.compile('^([0-9]{4})-([0-1][0-9])-([0-3][0-9])(-([0-2][0-9])-([0-5][0-9]))? +(.*)$') all_timestamps = None def get_all_timestamps(datadir): f = open(datadir + "/timestamps") t = [] while True: str = f.readline() if str == "": break m = FILETIME.search(str.strip()) if m: year = int(m.group(1)) mo = int(m.group(2)) day = int(m.group(3)) if m.group(4): hr = int(m.group(5)) minute = int(m.group(6)) else: hr = 0 minute = 0 mtime = time.mktime((year,mo,day,hr,minute,0,0,0,-1)) t.append( (datadir + "/" + m.group(7), mtime) ) f.close() return t def cb_filestat(args): global all_timestamps filename = args["filename"] stattuple = args["mtime"] for fname,mtime in all_timestamps: if fname == filename: args["mtime"] = tuple(list(stattuple[:8]) + [mtime] + list(stattuple[9:])) break return args def cb_start(args): global all_timestamps all_timestamps = get_all_timestamps(args["request"].getConfiguration()['datadir']) muse-el-3.20+dfsg/contrib/pyblosxom/getstamps.py0000644000175000017500000000633211331353120021311 0ustar taffittaffit""" Run 'python getstamps.py' from the directory that contains your unpublished blog entries. You may need to make some modification for your situation. This assumes your blog entries use a .txt extension and that you generate them from "source" files in a different directory (with an optional .muse extension). History: 1.1 * Michael Olson adapted this for Emacs Muse and added a few more exluded patterns for other version control systems. 1.0 * Original version License: Copyright (c) 2006 Nathan Kent Bullock Copyright (c) 2006, 2007, 2008, 2009, 2010 Michael Olson Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. """ __author__ = 'Nathan Kent Bullock' __homepage__ = 'http://bullock.moo.com/nathan/' __email__ = 'nathan_kent_bullock -at- yahoo.ca' __version__ = '1.1' import re, sys, os, types OutFile=None # The format of the date line in each blog entry DateRegexp = re.compile (r'^#date\s+(.+)$') # The part of the filename of the blog entry to write to the # timestamps file. Only the first grouping will be used. FileNameRegexp = re.compile (r'^(.+?)(\.muse)?$') def getdate(f): for line in f: matched = DateRegexp.search(line) if matched: return matched.group(1) def recurse(so_far): global OutFile for filename in os.listdir(so_far): filepath = so_far + "/" + filename # just makes output prettier. if filename == ".svn": continue if filename == ".arch-ids": continue if filename == "{arch}": continue if filename == ".bzr": continue if filename == "_darcs": continue if os.path.isdir(filepath): print "dir %s" % (filepath,) recurse(filepath) # You may need to modify the extension test if os.path.isfile(filepath) and filepath != "timestamps": thisfile = open(filepath,'r') thisdate = getdate (thisfile) matched = FileNameRegexp.search(filepath[2:]) if thisdate and matched: thisname = matched.group(1) + ".txt" OutFile.write("%s %s\n" % (thisdate, thisname)) continue if __name__ == "__main__": OutFile = open("timestamps", "w+") recurse(".") muse-el-3.20+dfsg/contrib/pyblosxom/metadate.py0000644000175000017500000000712311331353120021065 0ustar taffittaffit""" Purpose: If an entry contains a #postdate metatag, metadate.py makes pyblosxom use that as the entry's date instead of the file's mtime. To use: Place this file in your pyblosxom plugins directory. If you have previously assigned a value to py['load_plugins'] in your config.py file, add this module to that list. Tag an entry with a metadata line like so: #postdate YYYY-MM-DD HH-MM Developer Info: There really isn't a clean way to implement this (as far as I can tell). The cb_filestat callback isn't passed the entry, and none of the other callbacks are passed the mtime, and we really need them both to do this properly. The ugly--but functional--solution to this problem is to go into the file and dig the metadata out directly. That is what I have done here. Since the entries are now being opened twice each, this could result in decently-sized (relatively speaking) performance hit. Consider yourself warned. License: Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the"Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Copyright 2005 Cameron Desautels """ import os, re, time __author__ = 'Cameron Desautels ' __version__ = 'metadate.py, v 0.1' __description__ = 'Implements overriding of mtime with #postdate metadata.' DATEFORMAT = re.compile('([0-9]{4})-([0-1][0-9])-([0-3][0-9]) ([0-2][0-9]):([0-5][0-9])') def cb_filestat(args): stattuple = args['mtime'] try: story = open(args['filename']).readlines() except IOError: raise IOError if story: story.pop(0) #throw away the title while story: metamatch = re.match(r'#(\w+)\s+(.*)', story[0]) if metamatch: if metamatch.groups()[0] == 'postdate': datematch = DATEFORMAT.match(metamatch.groups()[1].strip()) if datematch: # year, month, day, hour, minute mtime = time.mktime((int(datematch.groups()[0]),int(datematch.groups()[1]), \ int(datematch.groups()[2]),int(datematch.groups()[3]), \ int(datematch.groups()[4]),0,0,0,-1)) args['mtime'] = tuple(list(stattuple[:8]) + [mtime] + list(stattuple[9:])) # whether the postdate line was correct or malformed, we found it, so quit break else: # that wasn't the right metadata line, so chuck it and keep going story.pop(0) else: # quit when all metadata has been examined break return args muse-el-3.20+dfsg/contrib/pyblosxom/make-blog0000755000175000017500000000126111331353120020510 0ustar taffittaffit#!/bin/sh # # Author: Michael Olson # # License: This file may be used, distributed, and modified without # restriction. # # This is a sample script that shows how to update the timestamps # file. Note that you have to run the getstamps.py program in your # source directory, and then move the generated timestamps file to the # directory where your published entries are kept. # Blog entries in Muse format SRC_DIR=/stuff/proj/wiki/blog # Published blog entries DEST_DIR=$PWD/site/blog # Path to the getstamps.py script GETSTAMPS=$PWD/scripts/getstamps.py # Update timestamps for blog (cd $SRC_DIR && python $GETSTAMPS && mv timestamps $DEST_DIR/timestamps) muse-el-3.20+dfsg/contrib/cgi.el0000644000175000017500000001710011331353120015753 0ustar taffittaffit;;; cgi.el -- using Emacs for CGI scripting ;;; ;;; Author: Eric Marsden ;;; Michael Olson (slight modifications) ;;; Keywords: CGI web scripting slow ;;; Version: 0.3 ;;; Time-stamp: <2001-08-24 emarsden> ;;; Copyright: (C) 2000 Eric Marsden ;;; Parts copyright (C) 2006 Free Software Foundation, Inc. ;; ;; This program 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 3 of ;; the License, or (at your option) any later version. ;; ;; This program 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 this program; if not, write to the Free ;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, ;; MA 02111-1307, USA. ;; ;; ;;; Commentary: ;; ;; People who like this sort of thing will find this the sort of ;; thing they like. -- Abraham Lincoln ;; ;; ;; Overview ========================================================== ;; ;; A simple library for the Common Gateway Interface for Emacs, ;; allowing you to service requests for non static web pages in elisp. ;; Provides routines for decoding arguments to GET- and POST-type CGI ;; requests. ;; ;; Usage: place a shell script such as the following in your web ;; server's CGI directory (typically called something like ;; /var/www/cgi-bin/): ;; ;; ,------------------------------------------------------------------- ;; | #!/bin/sh ;; | ;; | emacs -batch -l cgi.el -f cgi-calendar ;; `------------------------------------------------------------------- ;; ;; (`cgi-calendar' is a sample elisp CGI script provided at the end of ;; this file). ;; ;; Alternatively, if you're running version 2.x of the linux kernel ;; you could make .elc files directly executable via the binfmt_misc ;; mechanism and run them straight from the cgi-bin directory. ;; ;; Efficiency would be improved by having Emacs bind to the http ;; service port and spawn a thread per connection. Extending Emacs to ;; support server sockets and multithreading is left as an exercise ;; for the reader. ;; ;; References: ;; * rfc1738 "Uniform Resource Locators" ;; * rfc1630 "Universal Resource Identifiers in WWW" ;; ;; Thanks to Christoph Conrad for pointing ;; out a bug in the URI-decoding. ;;; Code: (eval-when-compile (require 'cl) (require 'calendar)) (defconst cgi-url-unreserved-chars '( ?a ?b ?c ?d ?e ?f ?g ?h ?i ?j ?k ?l ?m ?n ?o ?p ?q ?r ?s ?t ?u ?v ?w ?x ?y ?z ?A ?B ?C ?D ?E ?F ?G ?H ?I ?J ?K ?L ?M ?N ?O ?P ?Q ?R ?S ?T ?U ?V ?W ?X ?Y ?Z ?0 ?1 ?2 ?3 ?4 ?5 ?6 ?7 ?8 ?9 ?\$ ?\- ?\_ ?\. ?\! ?\~ ?\* ?\' ?\( ?\) ?\,)) (defun cgi-int-char (i) (if (fboundp 'int-char) (int-char i) i)) (defun cgi-hex-char-p (ch) (declare (character ch)) (let ((hexchars '(?0 ?1 ?2 ?3 ?4 ?5 ?6 ?7 ?8 ?9 ?A ?B ?C ?D ?E ?F))) (member (upcase ch) hexchars))) ;; decode %xx to the corresponding character and + to ' ' (defun cgi-decode-string (str) (do ((i 0) (len (length str)) (decoded '())) ((>= i len) (concat (nreverse decoded))) (let ((ch (aref str i))) (cond ((eq ?+ ch) (push ?\ decoded) (incf i)) ((and (eq ?% ch) (< (+ i 2) len) (cgi-hex-char-p (aref str (+ i 1))) (cgi-hex-char-p (aref str (+ i 2)))) (let ((hex (string-to-number (substring str (+ i 1) (+ i 3)) 16))) (push (cgi-int-char hex) decoded) (incf i 3))) (t (push ch decoded) (incf i)))))) (defun cgi-position (item seq &optional start end) (or start (setq start 0)) (or end (setq end (length seq))) (while (and (< start end) (not (equal item (aref seq start)))) (setq start (1+ start))) (and (< start end) start)) ;; Parse "foo=x&bar=y+re" into (("foo" . "x") ("bar" . "y re")) ;; Substrings are plus-decoded and then URI-decoded. (defun cgi-decode (q) (when q (flet ((split-= (str) (let ((pos (or (cgi-position ?= str) 0))) (cons (cgi-decode-string (substring str 0 pos)) (cgi-decode-string (substring str (+ pos 1))))))) (mapcar #'split-= (split-string q "&"))))) (defun cgi-lose (fmt &rest args) (let ((why (apply #'format fmt args))) (message "Script error: %s" why) ; to error_log (princ "Content-type: text/html\n\n") ; to browser (princ "Script error\r\n") (princ "

    Script error

    \r\n

    \r\n") (princ why) (princ "\r\n\r\n") (kill-emacs 0))) (defmacro cgi-evaluate (&rest forms) `(condition-case why (princ (with-output-to-string ,@forms)) (error (cgi-lose "Emacs Lisp error: %s" why)))) (defun cgi-arguments () (let ((method (getenv "REQUEST_METHOD")) req buf) (cond ((null method) (cgi-lose "No request method specified")) ((string= "GET" method) (unless (getenv "QUERY_STRING") (cgi-lose "No query string for GET request")) (cgi-decode (getenv "QUERY_STRING"))) ((string= "POST" method) (setq req (getenv "CONTENT_LENGTH")) (unless req (cgi-lose "No content-length for POST request")) (setq buf (get-buffer-create " *cgi*")) (set-buffer buf) (erase-buffer) (loop for i from 1 to (string-to-number req) do (insert (read-event))) (cgi-decode (buffer-string))) (t (cgi-lose "Can't handle request method %s" method))))) ;; ==================================================================== ;; a sample application: calendar via the web. If invoked without ;; arguments, presents a calendar for the three months around the ;; current date. You can request a calendar for a specific period by ;; specifying the year and the month in the query string: ;; ;; ~$ lynx -dump 'http://localhost/cgi-bin/cal?year=1975&month=6' ;; ;; When run in batch mode, text normally displayed in the echo area ;; (via `princ' for example) goes to stdout, and thus to the browser. ;; Text output using `message' goes to stderr, and thus normally to ;; your web server's error_log. ;; ==================================================================== (eval-and-compile (if (fboundp 'calendar-extract-month) (defalias 'cgi-calendar-extract-month 'calendar-extract-month) (defalias 'cgi-calendar-extract-month 'extract-calendar-month)) (if (fboundp 'calendar-extract-year) (defalias 'cgi-calendar-extract-year 'calendar-extract-year) (defalias 'cgi-calendar-extract-year 'extract-calendar-year)) (if (fboundp 'calendar-generate) (defalias 'cgi-calendar-generate 'calendar-generate) (defalias 'cgi-calendar-generate 'generate-calendar))) (defun cgi-calendar-string () (require 'calendar) (let* ((args (cgi-arguments)) (now (calendar-current-date)) (mnth (cdr (assoc "month" args))) (month (if mnth (string-to-number mnth) (cgi-calendar-extract-month now))) (yr (cdr (assoc "year" args))) (year (if yr (string-to-number yr) (cgi-calendar-extract-year now)))) (with-temp-buffer (cgi-calendar-generate month year) (buffer-string)))) (defun cgi-calendar () (cgi-evaluate (princ "Content-type: text/html\n\n") (princ "Emacs calendar\r\n") (princ "

    Emacs calendar

    \r\n") (princ "
    \r\n")
       (princ (cgi-calendar-string))
       (princ "\r\n
    \r\n"))) (provide 'cgi) ;; cgi.el ends here muse-el-3.20+dfsg/contrib/Makefile0000644000175000017500000000134011331353120016326 0ustar taffittaffit.PHONY: all contrib clean realclean distclean fullclean install .PRECIOUS: %.elc DEFS = $(shell test -f ../Makefile.defs && echo ../Makefile.defs \ || echo ../Makefile.defs.default) include $(DEFS) EL = $(wildcard *.el) EL_NOT_BYTE_COMPILED = htmlize-hack.el ELC = $(patsubst %.el,%.elc,$(filter-out $(EL_NOT_BYTE_COMPILED),$(EL))) all: contrib contrib: $(ELC) $(PROJECT)-build.elc: ../scripts/$(PROJECT)-build.el @echo $(PROJECT)-build.el is not byte-compiled %.elc: %.el @$(EMACS) -q $(SITEFLAG) -batch -l ../scripts/$(PROJECT)-build.el \ -f batch-byte-compile $< clean realclean distclean fullclean: -rm -f *.elc *~ install: $(ELC) install -d $(ELISPDIR)/contrib install -m 0644 $(EL) $(ELC) $(ELISPDIR)/contrib muse-el-3.20+dfsg/contrib/htmlize-hack.el0000644000175000017500000000131111331353120017566 0ustar taffittaffit;; This file provides a fix for htmlize.el and Emacs 23. ;; To use it, add the path to this directory to your load path and ;; add (require 'htmlize-hack) to your Emacs init file. (require 'htmlize) (when (equal htmlize-version "1.34") (defun htmlize-face-size (face) ;; The size (height) of FACE, taking inheritance into account. ;; Only works in Emacs 21 and later. (let ((size-list (loop for f = face then (face-attribute f :inherit) until (or (null f) (eq f 'unspecified)) for h = (face-attribute f :height) collect (if (eq h 'unspecified) nil h)))) (reduce 'htmlize-merge-size (cons nil size-list))))) (provide 'htmlize-hack) muse-el-3.20+dfsg/contrib/ikiwiki/0000755000175000017500000000000011331353120016330 5ustar taffittaffitmuse-el-3.20+dfsg/contrib/ikiwiki/IkiWiki/0000755000175000017500000000000011331353120017670 5ustar taffittaffitmuse-el-3.20+dfsg/contrib/ikiwiki/IkiWiki/Plugin/0000755000175000017500000000000011331353120021126 5ustar taffittaffitmuse-el-3.20+dfsg/contrib/ikiwiki/IkiWiki/Plugin/muse.pm0000644000175000017500000001122511331353120022436 0ustar taffittaffit#!/usr/bin/perl # Ikiwiki plugin for Emacs Muse. # Author: Michael Olson # License: GPLv2 or later # # In your ikiwiki.setup file, set the muse_init option to the location # of the init file for Muse. Some examples provided in the # examples/ikiwiki directory are muse-init-simple.el and # muse-init-project.el. package IkiWiki::Plugin::muse; use warnings; use strict; use IkiWiki 3.00; use Date::Format (); use Encode (); use File::Temp (); sub import { hook(type => "getsetup", id => "muse", call => \&getsetup); hook(type => "scan", id => "muse", call => \&scan); hook(type => "filter", id => "muse", call => \&filter); hook(type => "htmlize", id => "muse", call => \&htmlize); } sub getsetup () { return ( plugin => { safe => 1, rebuild => 1, # format plugin }, muse_emacs => { type => "string", example => "/usr/bin/emacs", description => "the location of Emacs", safe => 1, rebuild => 1, }, muse_init => { type => "string", example => "~/ikiwiki/muse-init.el", description => "the location of your Muse init file", safe => 1, rebuild => 1, }, ); } # Handle Muse directives sub scan (@) { my %params=@_; return unless pagetype($pagesources{$params{page}}) eq 'muse'; my $canmeta = UNIVERSAL::can('IkiWiki::Plugin::meta', 'preprocess'); my $cantag = UNIVERSAL::can('IkiWiki::Plugin::tag', 'preprocess_tag'); return unless $canmeta || $cantag; my $fun; $_ = $params{content}; pos = undef; while ( m/ \G \# ([a-zA-Z-]+) \s+ (.+?) \n+ /sgx ) { my ($key, $val) = ($1, $2); if ( $key =~ m/^(tags?|category)$/s ) { next unless $cantag; $fun = sub { IkiWiki::Plugin::tag::preprocess_tag( (map { $_ => '' } (split /\s+/, $val)), page => $params{page}, destpage => $params{page}, preview => 1, ); }; } else { next unless $canmeta; if ( $key eq 'date' ) { # Support pyblosxom-style dates (YYYY-MM-DD(-hh-mm)?) my $re = qr/ ^ ([0-9]{4}) - ([0-1][0-9]) - ([0-3][0-9]) (?: - ([0-2][0-9]) - ([0-5][0-9]) )? $ /sx; if ( $val =~ m/$re/ ) { my @array = (0, $5 || 0, $4 || 0, $3, $2, $1 - 1900); $val = Date::Format::strftime("%a, %e %b %Y %T", @array); } } $fun = sub { IkiWiki::Plugin::meta::preprocess( $key, $val, page => $params{page}, destpage => $params{page}, preview => 1, ); }; } if ( $params{muse_filter} ) { # Make "wantarray" work in the meta plugin my $ret = $fun->(); } else { $fun->(); } } } # Determine the emacs binary to use sub locate_emacs { my $err = sub { die "Unable to find your emacs binary.\n", " Set muse_emacs config to the right value.\n"; }; if ( $config{muse_emacs} ) { ( -x $config{muse_emacs} ) ? return $config{muse_emacs} : $err->(); } else { my $emacs = `which emacs`; chomp $emacs; ( $emacs ) ? return $emacs : $err->(); } } # Pass the content of the page to Muse for publishing sub filter (@) { my %params=@_; return $params{content} unless pagetype($pagesources{$params{page}}) eq 'muse'; # Force detection of the Muse #date directive scan( content => $params{content}, page => $params{page}, muse_filter => 1, ); my $content = Encode::encode_utf8($params{content}); my $qname = $params{page}; $qname =~ s/"/\\"/g; my ($fh, $filename) = File::Temp::tempfile(); print $fh $content; close $fh; my $qfile = $filename; $qfile =~ s/"/\\"/g; eval { system locate_emacs(), qw( -q --no-site-file -batch -l ), $config{muse_init}, '--eval', qq{(muse-ikiwiki-publish-file "$qfile" "$qname")}; { open my $ifh, '<', $filename; local $/; $content = <$ifh>; close $ifh; } unlink $filename; }; if ($@) { my $ret = $@; unlink $filename; die $ret; } return Encode::decode_utf8($content); } # Fake handler to make publishing work sub htmlize (@) { my %params=@_; return $params{content}; } 1 muse-el-3.20+dfsg/contrib/ikiwiki/IkiWiki/Plugin/test.pl0000644000175000017500000001230011331353120022436 0ustar taffittaffit use warnings; use strict; use IO::Select qw(); use IO::Socket::INET qw(); my %config = ( muse_emacs => '/usr/local/bin/emacs', muse_init => '/stuff/proj/personal-site/ikiwiki/muse-init.el', muse_shared_secret => 'foo', ); my %MUSE_SERVER = ( host => 'localhost' ); main(); exit 0; # Determine the emacs binary to use sub locate_emacs { my $err = sub { die "Unable to find your emacs binary.\n", " Set muse_emacs config to the right value.\n"; }; if ( $config{muse_emacs} ) { ( -x $config{muse_emacs} ) ? return $config{muse_emacs} : $err->(); } else { my $emacs = `which emacs`; chomp $emacs; ( $emacs ) ? return $emacs : $err->(); } } # Initialize connection to the Muse IPC server sub start_muse_server { my $secret = $config{muse_shared_secret}; my $init_port = $config{muse_init_port} || 0; my $ipc_port = $config{muse_ipc_port}; # Perform sanity checks $config{muse_init} or die "Error: muse_init config option not defined.\n"; # Start initialization server my $pserver = IO::Socket::INET->new( Proto => 'tcp', LocalAddr => 'localhost', LocalPort => $init_port, Listen => IO::Socket::INET::SOMAXCONN, ) or die "Error: Cannot begin initialization for the Muse IPC server.\n"; $pserver->autoflush(1); $init_port = $pserver->sockport(); my $select = IO::Select->new($pserver); # Start Emacs defined(my $pid = fork()) or die "Error: Unable to fork.\n"; if ( $pid ) { $MUSE_SERVER{pid} = $pid; } else { exec locate_emacs(), qw( -q --no-site-file -batch -l ), $config{muse_init}, qw( --eval ), "(muse-ikiwiki-start-server \"$init_port\"" . ( $ipc_port ? " \"$ipc_port\"" : '' ) . ")"; die "Error: Unable to exec emacs.\n"; } my $emacs_port = undef; SERVER: # Respond to clients while ( my @ready = $select->can_read() ) { for my $client (@ready) { if ($client == $pserver) { my $new = $pserver->accept(); $select->add($new); next; } my $line = <$client>; chomp $line if defined $line; if ( defined $line && $line =~ m/^begin (.+)$/s && $1 eq $secret ) { print $client "ok\n"; $line = <$client>; chomp $line if defined $line; if ( defined $line && $line =~ m/^port (.+)$/s ) { $emacs_port = $1; } else { print STDERR <remove($client); $client->close(); } } $pserver->close(); if ( $emacs_port ) { $MUSE_SERVER{port} = $emacs_port; } else { kill_muse_server(); } } sub stop_muse_server { my ( $sock ) = @_; if ( $MUSE_SERVER{pid} ) { # Give Muse 3 seconds to stop, presuming that it has already # been sent the "done" command via stop_muse_server. local $SIG{ALRM} = sub { kill 9, $MUSE_SERVER{pid}; die "Timeout"; }; eval { alarm 3; print $sock "done\n"; $sock->close(); waitpid($MUSE_SERVER{pid}, 0); alarm 0; }; delete $MUSE_SERVER{pid}; } else { print $sock "done\n"; $sock->close(); } } sub kill_muse_server { my @msgs = @_; kill 9, $MUSE_SERVER{pid} if $MUSE_SERVER{pid}; die @msgs if @msgs; } sub ipc_expect_ok { my ( $sock, $err_msg ) = @_; $err_msg = "Error: Command did not succeed on Muse IPC server.\n"; my $line = <$sock>; chomp $line; if ( $line ne 'ok' ) { $sock->close(); kill_muse_server $err_msg; } } sub ipc_connect { my $secret = $config{muse_shared_secret}; my $host = $MUSE_SERVER{host}; my $port = $MUSE_SERVER{port}; $host && $port or kill_muse_server "Error: No Muse IPC server is active.\n"; # Start client connection my $sock = IO::Socket::INET->new( Proto => 'tcp', PeerAddr => $host, PeerPort => $port, ) or kill_muse_server "Error: Cannot connect to the Muse IPC server.\n"; $sock->autoflush(1); # Authenticate print $sock "begin $secret\n"; ipc_expect_ok $sock, "Error: Could not authenticate to the Muse IPC server.\n"; return $sock; } sub test_name { my ( $sock ) = @_; print $sock "name foobar\n"; ipc_expect_ok $sock, "Error: Could not set name of page on Muse IPC server.\n"; } sub test_title { my ( $sock ) = @_; print $sock "title quux\n"; ipc_expect_ok $sock, "Error: Could not set title of page on Muse IPC server.\n"; } sub main { print "Starting Muse server ...\n"; start_muse_server(); print "Got port $MUSE_SERVER{port}.\n"; my $sock = ipc_connect(); test_name($sock); test_title($sock); print "Shutting down ...\n"; stop_muse_server($sock); print "Done shutting down.\n"; } muse-el-3.20+dfsg/contrib/httpd.el0000644000175000017500000002314211331353120016337 0ustar taffittaffit;;; httpd.el -- a web server in Emacs Lisp ;;; ;;; Author: Eric Marsden ;;; John Wiegley ;;; Michael Olson (slight modifications) ;;; Version: 1.1 ;;; Keywords: games ;;; Copyright (C) 2001, 2003 Eric Marsden ;;; Parts copyright (C) 2006 Free Software Foundation, Inc. ;; ;; This program 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 3 of ;; the License, or (at your option) any later version. ;; ;; This program 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 this program; if not, write to the Free ;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, ;; MA 02111-1307, USA. ;; ;; The latest version of this package should be available from ;; ;; ;;; Commentary: ;; ;; httpd.el is an HTTP server embedded in the Emacs. It can handle GET ;; and HEAD requests; adding support for POST should not be too ;; difficult. By default, httpd.el will listen on server side Emacs ;; sockets for HTTP requests. ;; ;; I have only tested this code with Emacs; it may need modifications ;; to work with XEmacs. ;; ;; This version has been modified to work with GNU Emacs 21 and 22. ;; ;;; Acknowledgements: ;; ;; httpd.el was inspired by pshttpd, an HTTP server written in ;; Postscript by Anders Karlsson . ;; ;; Thanks to John Wiegley and Cyprian Adam Laskowski. ;;; Code (defvar httpd-document-root "/var/www") (defvar httpd-path-handlers '() "Alist of (path-regexp . handler) forms. If a GET request is made for an URL whose path component matches a PATH-REGEXP, the corresponding handler is called to generate content.") (defvar httpd-mime-types-alist '(("html" . "text/html; charset=iso-8859-1") ("txt" . "text/plain; charset=iso-8859-1") ("jpg" . "image/jpeg") ("jpeg" . "image/jpeg") ("gif" . "image/gif") ("png" . "image/png") ("tif" . "image/tiff") ("tiff" . "image/tiff") ("css" . "text/css") ("gz" . "application/octet-stream") ("ps" . "application/postscript") ("pdf" . "application/pdf") ("eps" . "application/postscript") ("tar" . "application/x-tar") ("rpm" . "application/x-rpm") ("zip" . "application/zip") ("mp3" . "audio/mpeg") ("mp2" . "audio/mpeg") ("mid" . "audio/midi") ("midi" . "audio/midi") ("wav" . "audio/x-wav") ("au" . "audio/basic") ("ram" . "audio/pn-realaudio") ("ra" . "audio/x-realaudio") ("mpg" . "video/mpeg") ("mpeg" . "video/mpeg") ("qt" . "video/quicktime") ("mov" . "video/quicktime") ("avi" . "video/x-msvideo"))) (defun httpd-mime-type (filename) (or (cdr (assoc (file-name-extension filename) httpd-mime-types-alist)) "text/plain")) (put 'httpd-exception 'error-conditions '(httpd-exception error)) (defun defhttpd-exception (name code msg) (put name 'error-conditions (list name 'httpd-exception 'error)) (put name 'httpd-code code) (put name 'httpd-msg msg)) (defhttpd-exception 'httpd-moved/perm 301 "Moved permanently") (defhttpd-exception 'httpd-moved/temp 302 "Moved temporarily") (defhttpd-exception 'httpd-bad-request 400 "Bad request") (defhttpd-exception 'httpd-forbidden 403 "Forbidden") (defhttpd-exception 'httpd-file-not-found 404 "Not found") (defhttpd-exception 'httpd-method-forbidden 405 "Method not allowed") (defhttpd-exception 'httpd-unimplemented 500 "Internal server error") (defhttpd-exception 'httpd-unimplemented 501 "Not implemented") (defhttpd-exception 'httpd-unimplemented 503 "Service unavailable") (defvar httpd-endl "\r\n") (defvar httpd-process nil) (defvar httpd-bytes-sent nil) ; only used with `httpd-process' (defvar httpd-log-accesses t) (defun httpd-add-handler (path-regexp handler) (push (cons path-regexp handler) httpd-path-handlers)) (defun httpd-try-internal-handler (path &optional cont) (catch 'result (dolist (elem httpd-path-handlers) (let ((regexp (car elem)) (handler (cdr elem))) (if (string-match regexp path) (throw 'result (funcall handler path cont))))))) (defun httpd-date-stamp () (format-time-string "[%d/%b/%Y %H:%M:%S %z]")) (defun httpd-log (&rest strings) (if httpd-log-accesses (save-excursion (goto-char (point-max)) (with-current-buffer (get-buffer-create "*httpd access_log*") (mapc 'insert strings))))) (defun httpd-send-data (&rest strings) (dolist (s strings) (send-string httpd-process s) (if httpd-bytes-sent (setq httpd-bytes-sent (+ httpd-bytes-sent (length s)))))) (defun httpd-send (code msg &rest strings) (httpd-log (number-to-string code) " ") (apply 'httpd-send-data "HTTP/1.0 " (number-to-string code) " " msg httpd-endl strings)) (defun httpd-send-eof () (httpd-log (number-to-string httpd-bytes-sent) "\n") (process-send-eof httpd-process)) (defun httpd-send-file (filename) (with-temp-buffer (insert-file-contents filename) (httpd-send-data (buffer-string)))) (defun httpd-lose (code msg) (httpd-send code msg "Content-Type: text/html" httpd-endl "Connection: close" httpd-endl httpd-endl "Error" httpd-endl "

    " msg "

    " httpd-endl "

    " msg httpd-endl "" httpd-endl) (httpd-send-eof)) (defun httpd-handle-redirect (req where) "Redirect the client to new location WHERE." (httpd-send 301 "Moved permanently" "Location: " where httpd-endl "URI: " where httpd-endl "Connection: close" httpd-endl httpd-endl) (httpd-send-eof)) (defun httpd-handle-GET+HEAD (path &optional want-data req) (if (zerop (length path)) (setq path "index.html")) ;; could use `expand-file-name' here instead of `concat', but we ;; don't want tilde expansion, etc. (let ((filename (concat httpd-document-root "/" path)) modified-since) (cond ((httpd-try-internal-handler path) t) ((file-directory-p filename) (httpd-handle-redirect path (concat "http://" (system-name) "/" path "/"))) ((file-readable-p filename) (let ((attrs (file-attributes filename))) (if (and (string-match "^If-Modified-Since:\\s-+\\(.+\\)" req) (setq modified-since (apply 'encode-time (parse-time-string (match-string 1 req)))) (time-less-p (nth 5 attrs) modified-since)) (httpd-send 304 "Not modified" "Server: Emacs/httpd.el" httpd-endl "Connection: close" httpd-endl httpd-endl) (httpd-send 200 "OK" "Server: Emacs/httpd.el" httpd-endl "Connection: close" httpd-endl "MIME-Version: 1.0" httpd-endl "Content-Type: " (httpd-mime-type filename) httpd-endl "Content-Length: " (number-to-string (nth 7 attrs)) httpd-endl httpd-endl) (if want-data (httpd-send-file filename))) (httpd-send-eof))) (t (signal 'httpd-file-not-found path))))) (defun httpd-handle-request (req &optional cont) (httpd-log (car (process-contact httpd-process)) " - - " (httpd-date-stamp) " \"") (if (not (string-match ".+" req)) (progn (httpd-log "\"") (error "HTTP request was empty")) (let ((request (match-string 0 req))) (httpd-log request "\" ") (cond ((string-match "\\.\\." request) ;; reject requests containing ".." in the path. Should really ;; URI-decode first. (signal 'httpd-forbidden request)) ((string-match "\\`\\(GET\\|HEAD\\|POST\\)\\s-/\\(\\S-*\\)" request) (let ((kind (match-string 1 request)) (arg (match-string 2 request))) (if (string= kind "POST") (unless (httpd-try-internal-handler arg cont) (signal 'httpd-unimplemented arg)) (httpd-handle-GET+HEAD arg (string= kind "GET") req)))) (t (signal 'httpd-bad-request request)))))) (defun httpd-serve (proc string) (let ((httpd-process proc) (httpd-bytes-sent 0)) (condition-case why (httpd-handle-request string) (httpd-exception (httpd-lose (get (car why) 'httpd-code) (get (car why) 'httpd-msg))) ;; Comment out these two lines if you want to catch errors ;; inside Emacs itself. (error (httpd-lose 500 (format "Emacs Lisp error: %s" why))) ))) (defun httpd-start (&optional port) (interactive (list (read-string "Serve Web requests on port: " "8080"))) (if (null port) (setq port 8080) (if (stringp port) (setq port (string-to-number port)))) (if httpd-process (delete-process httpd-process)) (setq httpd-process (if (fboundp 'make-network-process) (make-network-process :name "httpd" :buffer (generate-new-buffer "httpd") :host 'local :service port :server t :noquery t :filter 'httpd-serve) (and (fboundp 'open-network-stream-server) (open-network-stream-server "httpd" (generate-new-buffer "httpd") port nil 'httpd-serve)))) (if (and (processp httpd-process) (eq (process-status httpd-process) 'listen)) (message "httpd.el is listening on port %d" port))) (defun httpd-stop () (interactive) (when httpd-process (message "httpd.el server on port %d has stopped" (cadr (process-contact httpd-process))) (delete-process httpd-process) (setq httpd-process nil))) (provide 'httpd) ;; httpd.el ends here muse-el-3.20+dfsg/ChangeLog.20000644000175000017500000101603311331353120015146 0ustar taffittaffit2006-01-19 15:49:56 GMT Michael Olson patch-357 Summary: Another Debian fix. Revision: muse--main--1.0--patch-357 * debian/NEWS: Rename from NEWS.Debian at the suggestion of Romain. * debian/rules: Drop explicit installation of NEWS.Debian. This should happen automatically now. modified files: ChangeLog debian/rules renamed files: debian/.arch-ids/NEWS.Debian.id ==> debian/.arch-ids/NEWS.id debian/NEWS.Debian ==> debian/NEWS 2006-01-19 01:54:58 GMT Michael Olson patch-356 Summary: Debian fixups. Revision: muse--main--1.0--patch-356 * debian/emacsen-startup: Remove unnecessary path addition. * debian/rules: Explicitly install NEWS.Debian. Thanks to Romain Francoise for noticing. modified files: ChangeLog debian/emacsen-startup debian/rules 2006-01-17 03:57:45 GMT Michael Olson patch-355 Summary: Merged from mwolson@gnu.org--2005 (patch 56) Revision: muse--main--1.0--patch-355 * Sync a few changes back. modified files: ChangeLog Makefile Makefile.defs debian/changelog 2006-01-17 02:08:48 GMT Michael Olson patch-354 Summary: Post-release updates. Revision: muse--main--1.0--patch-354 * AUTHORS: Update assignments. * Makefile (release): Sign files here, rather than just before upload. * debian/copyright: Update. * debian/emacsen-install (FILES): Filter out autoloads. * debian/emacsen-startup: Load autoload file. * rules (build-stamp): Make autoloads. (install): Install NEWS properly. * lisp/Makefile: Make sure autoloads get generated upon install. * lisp/muse.el (muse-version): Change to version 3.02.6. Oops. Thanks to Romain Francoise for spotting this. modified files: AUTHORS ChangeLog Makefile debian/copyright debian/emacsen-install debian/emacsen-startup debian/rules lisp/Makefile lisp/muse.el renamed files: debian/.arch-ids/NEWS.id ==> debian/.arch-ids/NEWS.Debian.id debian/NEWS ==> debian/NEWS.Debian 2006-01-13 22:52:45 GMT Michael Olson patch-353 Summary: Fix typo. Revision: muse--main--1.0--patch-353 * lisp/muse-publish.el (muse-forward-list-item): Fix typo. Thanks to Jim Ottaway for the report. modified files: ChangeLog lisp/muse-publish.el 2006-01-13 03:36:47 GMT Michael Olson patch-352 Summary: Merged from mwolson@gnu.org--2005 (patch 53-55) Revision: muse--main--1.0--patch-352 Patches applied: * mwolson@gnu.org--2005/muse--rel--3.02--patch-53 Use better code for displaying warnings. * mwolson@gnu.org--2005/muse--rel--3.02--patch-54 Add NEWS items. Make eval of at display time optional. * mwolson@gnu.org--2005/muse--rel--3.02--patch-55 Release Emacs Muse 3.02.6. modified files: ChangeLog Makefile.defs NEWS debian/changelog lisp/muse-colors.el lisp/muse-html.el lisp/muse-mode.el lisp/muse-project.el lisp/muse-publish.el lisp/muse-wiki.el lisp/muse.el muse.texi 2006-01-11 22:08:16 GMT Michael Olson patch-351 Summary: Fix #5044: lisp tag only evaluates first statement. Revision: muse--main--1.0--patch-351 * lisp/muse-colors.el (muse-colors-lisp-tag): Manually wrap the contents in (progn ...) so that multiple lisp fragments can be evaluated. Thanks to Jim Ottaway for the idea. * lisp/muse-publish.el (muse-publish-lisp-tag): Ditto. modified files: ChangeLog lisp/muse-colors.el lisp/muse-publish.el 2006-01-06 18:17:07 GMT Michael Olson patch-350 Summary: Sync with contributors. Revision: muse--main--1.0--patch-350 * scripts/muse-build.el (muse-generate-autoloads): Add a newline to keep Emacs from being confused when it loads this file. I don't think Emacs' evaluation of the quoted local variables section does any harm, but if it does, I'll provide a different fix. modified files: ChangeLog scripts/muse-build.el 2006-01-05 16:20:51 GMT Michael Olson patch-349 Summary: Merged from john@wjsullivan.net--2006 (patch 0-1) Revision: muse--main--1.0--patch-349 Patches applied: * john@wjsullivan.net--2006/muse--johnsu01--0--patch-1 Updated copyright year. Added notes about using the .muse file extension to the Projects node. modified files: ChangeLog muse.texi 2006-01-05 14:38:56 GMT Michael Olson patch-348 Summary: More nested list twiddling. Revision: muse--main--1.0--patch-348 * lisp/muse-publish.el (muse-publish-surround-dl) (muse-forward-list-item): Make marginal progress on definition lists. (muse-forward-paragraph): Move forward first before searching. * lisp/muse-regexps.el (muse-dl-term-regexp): New regexp that specifies how a term begins. The first match string contains the term. (muse-dl-term-regexp): Don't include initial "^", so that we can embed this more easily. modified files: ChangeLog lisp/muse-publish.el lisp/muse-regexps.el 2006-01-05 13:28:49 GMT Michael Olson patch-347 Summary: Fix nested list regression. Make some (untested) progress on dl. Revision: muse--main--1.0--patch-347 * lisp/muse-docbook.el (muse-docbook-markup-strings): Drop newline from end-ddt string. * lisp/muse-html.el (muse-html-markup-strings): Ditto. * lisp/muse-texinfo.el (muse-texinfo-markup-strings): Ditto. * lisp/muse-xml.el (muse-xml-markup-strings): Ditto. * muse.texi (Introduction): Fix dated part concerning muse-wiki. * lisp/muse-publish.el (muse-publish-surround-dl): Make good progress on this. (muse-list-item-type): Deal with null str by returning nil. It should never have to do this, but I'd rather not be bothered when I'm debugging something else. (muse-forward-paragraph): Make the enclosing parens shy. (muse-forward-list-item): Take optional ENTRY-P argument so that we can use this for both dl terms and dl entries. Use muse-dl-entry-regexp when dealing with dl entries. Lower the match number to cope with change to muse-forward-paragraph. (muse-publish-markup-list): Quote arguments lambda functions properly, so that we don't run into namespace conflicts. This should fix a regression in nested list handling. * lisp/muse-regexps.el (muse-list-item-regexp): Clarify docstring. (muse-dl-entry-regexp): New regexp that matches the beginning of a definition list entry. modified files: ChangeLog lisp/muse-docbook.el lisp/muse-html.el lisp/muse-publish.el lisp/muse-regexps.el lisp/muse-texinfo.el lisp/muse-xml.el muse.texi 2006-01-05 03:51:57 GMT Michael Olson patch-346 Summary: Fix #4973: muse-project-ignore-regexp too aggressive Revision: muse--main--1.0--patch-346 * lisp/muse-project.el (muse-project-ignore-regexp): Note that case-fold-search should be nil before using this regexp. (muse-project-recurse-directory, muse-project-file-entries) (muse-project-of-file): Set case-fold-search to nil before matching against muse-project-ignore-regexp. Thanks to G. J. Teale for the report. * muse-registry.el (muse-registry-make-new-registry): Ditto. modified files: ChangeLog lisp/muse-project.el lisp/muse-registry.el 2006-01-04 20:07:54 GMT Michael Olson patch-345 Summary: Fix backtrace on project names. Revision: muse--main--1.0--patch-345 * lisp/muse-wiki.el (muse-wiki-handle-interwiki): Fix backtrace on coloring project names. modified files: ChangeLog lisp/muse-wiki.el 2006-01-04 00:50:43 GMT Michael Olson patch-344 Summary: Fix quote publishing error. Revision: muse--main--1.0--patch-344 * lisp/muse-publish.el (muse-publish-surround-text): Fix an error that occurs when publishing quotes. modified files: ChangeLog lisp/muse-publish.el 2006-01-04 00:37:27 GMT Michael Olson patch-343 Summary: Nested list fix. Revision: muse--main--1.0--patch-343 * lisp/muse-publish.el (muse-publish-surround-text): Preserve indentation of nested-list items until they are processed. modified files: ChangeLog lisp/muse-publish.el 2006-01-04 00:00:52 GMT Michael Olson patch-342 Summary: Nested ordered and unordered lists seem to work now. Revision: muse--main--1.0--patch-342 * muse-publish.el (muse-insert-markup-end-list): New function that publishes the text with end-list properties. (muse-publish-surround-text): If we are looking at a list item while stripping whitespace, make sure it has at least one space in front so that it gets published correctly. Use muse-insert-markup-end-list for inserting end-tag. (muse-forward-list-item): Get the position of the next list-end property and use it if point moves past it. Use `cond' instead of `if' for a nicer look. modified files: ChangeLog lisp/muse-publish.el 2006-01-03 04:58:18 GMT Michael Olson patch-341 Summary: Fix #4718: InterWiki links with special characters are not handled properly. Revision: muse--main--1.0--patch-341 * lisp/muse-wiki.el (muse-wiki-handle-interwiki): If given a string, make sure that we get everything after the interwiki delimiter. This fixes #4718. modified files: ChangeLog lisp/muse-wiki.el 2006-01-03 02:46:18 GMT Michael Olson patch-340 Summary: Fix an issue with muse-project-file-alist. Revision: muse--main--1.0--patch-340 * lisp/muse-project.el (muse-project-file-alist): Apply patch from G. J. Teale. Make sure that last-mod is loaded correctly. This fixes a problem that causes some files to not be published. modified files: AUTHORS ChangeLog lisp/muse-project.el 2006-01-02 21:59:27 GMT Michael Olson patch-339 Summary: Implement escaping of "[" and "]" in extended links. Revision: muse--main--1.0--patch-339 * lisp/muse-mode.el (muse-make-link): Use muse-link-escape * lisp/muse.el (muse-link-escape): Escape "[" and "]" in links. (muse-link-unescape): Unescape "[" and "]" in links. (muse-handle-explicit-link): Use muse-link-unescape. modified files: ChangeLog lisp/muse-mode.el lisp/muse.el 2006-01-02 19:33:23 GMT Michael Olson patch-338 Summary: muse-colors: Implement tag evaluation when viewing Muse files. Revision: muse--main--1.0--patch-338 * lisp/muse-colors.el (muse-colors-tags): Use muse-colors-lisp-tag to publish tags. (muse-colors-lisp-tag): New function that implements the evaluation of tags when viewing Muse files. Thanks to Jim Ottaway for porting this. modified files: ChangeLog lisp/muse-colors.el 2006-01-02 01:05:13 GMT Michael Olson patch-337 Summary: muse-wiki: Allow interwiki links to use different base URLs. Revision: muse--main--1.0--patch-337 * lisp/muse-wiki.el (muse-wiki-resolve-project-page): If :base-url is defined for the remote style, use it instead of file-relative-name to resolve the path. Thanks to Justin Kirby for the idea. modified files: ChangeLog lisp/muse-wiki.el 2006-01-01 19:15:02 GMT Michael Olson patch-336 Summary: Fix #4971. Revision: muse--main--1.0--patch-336 * lisp/muse-xml-common.el (muse-xml-escape-url): Don't escape "+". modified files: ChangeLog lisp/muse-xml-common.el 2006-01-01 18:27:53 GMT Michael Olson patch-335 Summary: More definition list twiddling. Revision: muse--main--1.0--patch-335 * lisp/muse-publish.el (muse-publish-surround-dl): Make marginal progress. * lisp/muse-regexps.el (muse-list-item-regexp): Match additional whitespace after "::". modified files: ChangeLog lisp/muse-publish.el lisp/muse-regexps.el 2006-01-01 05:04:36 GMT Michael Olson patch-334 Summary: Fix a few more list markup issues. Revision: muse--main--1.0--patch-334 * lisp/muse-publish.el (muse-publish-surround-dl): Begin this function for definition list markup, but it's not useful yet. (muse-publish-surround-text): Accept post-indent argument, and use it to strip extra space from indented lists, hopefully in a smart way. (muse-forward-list-item): Don't explicitly move the point unless another list item of the same type is encountered. (muse-publish-markup-list): Calculate post-indent correctly, and make use of it. modified files: ChangeLog lisp/muse-publish.el 2005-12-30 23:22:45 GMT Michael Olson patch-333 Summary: muse-publish: Prevent error when return value is not a string. Revision: muse--main--1.0--patch-333 * lisp/muse-publish.el (muse-publish-markup): Make sure returned value is a string before using it to replace text. Thanks to Sacha for the patch. modified files: ChangeLog lisp/muse-publish.el 2005-12-30 23:12:56 GMT Michael Olson patch-332 Summary: muse-publish: Prevent an error with list markup. Revision: muse--main--1.0--patch-332 * lisp/muse-publish.el (muse-forward-list-item): If type is 'dl, do not remove the matched text from muse-list-item-regexp. (muse-publish-markup-list): Apply patch from Sacha that keeps muse-publish-markup-region from being confused. modified files: ChangeLog lisp/muse-publish.el 2005-12-30 01:42:30 GMT Michael Olson patch-331 Summary: Fix #4923: Definition lists with numbers are not possible. Revision: muse--main--1.0--patch-331 * lisp/muse-publish.el (muse-list-item-type): Use string-match to determine whether an item is an ordered list or definition list. This should fix Bug #4923. modified files: ChangeLog lisp/muse-publish.el 2005-12-30 00:35:12 GMT Michael Olson patch-330 Summary: Make progress on non-nested ordered and unordered lists. Revision: muse--main--1.0--patch-330 * lisp/muse-publish.el (muse-publish-markup-regexps): Make sure that we don't match lines with just whitespace for 'quote. (muse-publish-markup-comment): Use muse-insert-markup in the correct order. Remove extra comment space. (muse-publish-surround-text): Stay at end of line if we are at the end of a series of list items. Otherwise advance. (muse-forward-paragraph): Use "\n" instead of "$" in regexps, since the former works better in multi-line contexts. (muse-forward-list-item): Fix a silly logic error. Simplify the regexp passed to muse-forward-paragraph. Remove the initial "- " or "1. " when the markup types match on a new item. (muse-publish-markup-list): Docfix. Swap args of string-match. Ignore an unordered list if a dash immediately follows. This disambiguates the emdash and unordered list markups. Use save-excursion to ensure that the point ends on the line after the begin-list markup. We still haven't dealt with definition lists yet. (muse-publish-markup-quote): Docfix. Deal with improved regexp. Manually remove the leading whitespace. Insert 'begin-quote and 'end-quote correctly, and use 'quote-item for muse-publish-surround-text. (muse-publish-quote-tag): Deal with multiple paragraphs inside of a quote tag. Skip past additional whitespace in the move function for muse-publish-surround-text. (muse-publish-comment-tag): Make the comment text read-only. modified files: ChangeLog lisp/muse-publish.el 2005-12-29 23:02:18 GMT Michael Olson patch-329 Summary: muse-latex: Fix comment markup. Revision: muse--main--1.0--patch-329 * lisp/muse-latex.el (muse-latex-markup-strings): Fix typo in comment-end. Thanks to Ken Brown for reporting this. modified files: ChangeLog lisp/muse-latex.el 2005-12-29 21:33:08 GMT Michael Olson patch-328 Summary: muse-publish: Use narrow-to-region to fix various bugs. Revision: muse--main--1.0--patch-328 * lisp/muse-publish.el (muse-publish-markup-tag): Code indent change. (muse-publish-escape-specials): Use `narrow-to-region' so that we better define the region to work with. Thanks to Sacha Chua for the advice. Also make sure that we are more careful with the result from next-single-property-change. (muse-publish-surround-text): Use narrow-to-region. Make this routine less brain-dead. (muse-publish-verse-tag): Use narrow-to-region. modified files: ChangeLog lisp/muse-publish.el 2005-12-29 19:49:39 GMT Michael Olson patch-327 Summary: Minor logic tweak in muse-forward-list-item. Revision: muse--main--1.0--patch-327 * lisp/muse-publish.el (muse-forward-list-item): On second thought, let's not use POST-INDENT. It would accidentally merge lists that were 1-space-different in indentation. Even more so for definition lists. modified files: ChangeLog lisp/muse-publish.el 2005-12-29 07:45:45 GMT Michael Olson patch-326 Summary: Work on nested list support for ordered and unordered lists. Revision: muse--main--1.0--patch-326 * lisp/muse-publish.el: Nested list support isn't quite finished, but progress is being made. (muse-publish-markup-regexps): Remove 2150 regexp since it doesn't seem useful at the moment. Invoke `format' to get the general version of muse-list-item-regexp. (muse-publish-surround-text): Add INDENT argument that specifies the leading indentation to strip. Default is all whitespace. Loop until MOVE-FUNC returns nil. (muse-list-item-type): New function that figures out what kind of list we have, given its separator string. (muse-forward-paragraph): Make this slightly more general. (muse-forward-list-item): New function that moves forward to the next list item. Non-nil is returned if we found another item of the same type, nil otherwise. (muse-publish-markup-list): Adapt unordered list and ordered list to perhaps do nested lists correctly, though this hasn't been tested. * lisp/muse-regexps.el (muse-list-item-regexp): Use "%s" in place of initial whitespace for the sake of flexibility. Call `format' on it to change it. modified files: ChangeLog lisp/muse-publish.el lisp/muse-regexps.el 2005-12-27 18:51:18 GMT Michael Olson patch-325 Summary: Pave the way for nested lists by adding markup strings. Revision: muse--main--1.0--patch-325 * examples/muse.rnc: muse.element.format is no longer a block, and may not contain muse.element.p. * lisp/muse-latex.el (muse-latex-markup-strings): Add markup strings for '(begin|end)-(quote|uli|oli|dl)-item. Add '(begin|end)-(dl|ddt|dde) markup strings. This will allow for more flexibility in constructing all sorts of lists, especially definition lists. Rename 'start-dde to 'begin-dde for consistency. * lisp/muse-texinfo.el (muse-latex-markup-strings): Ditto. (muse-texinfo-markup-regexps): Remove list concatenation regexp. * lisp/muse-docbook.el (muse-docbook-markup-strings) (muse-docbook-markup-regexps): Ditto, but simplify paragraph regexp. * lisp/muse-xml.el (muse-xml-markup-regexps, muse-xml-markup-strings): Ditto. * lisp/muse-html.el (muse-html-markup-regexps, muse-html-markup-strings): Ditto. Include

    in center markup. (muse-html-markup-paragraph): Remove special treatment of blockquote and center. * lisp/muse-groff.el (muse-groff-markup-strings): Rename 'begin-dde to 'start-dde. * lisp/muse-publish.el (muse-publish-markup-regexps): Begin implementing nested list preliminaries. This is currently broken, probably. * lisp/muse-regexps.el (muse-list-item-regexp): New regexp that matches the beginning of a list item. modified files: ChangeLog examples/muse.rnc lisp/muse-docbook.el lisp/muse-groff.el lisp/muse-html.el lisp/muse-latex.el lisp/muse-publish.el lisp/muse-regexps.el lisp/muse-texinfo.el lisp/muse-xml.el 2005-12-27 03:20:11 GMT Michael Olson patch-324 Summary: Implement tag. Revision: muse--main--1.0--patch-324 * lisp/muse-publish.el (muse-publish-markup-tags) (muse-publish-quote-tag): Implement tag, which does a blockquote. This is an alternative to indenting text, in that the quote can span several paragraphs. The paragraph detection routine for HTML has not yet been tested with several paragraphs inside a quote. modified files: ChangeLog lisp/muse-publish.el 2005-12-26 22:26:56 GMT Michael Olson patch-323 Summary: Add markup for non-breaking space. Revision: muse--main--1.0--patch-323 * lisp/muse-docbook.el (muse-docbook-markup-strings): Add markup string for 'no-break-space. * lisp/muse-groff.el (muse-groff-markup-strings): Ditto. * lisp/muse-html.el (muse-html-markup-strings): Ditto. * lisp/muse-latex.el (muse-latex-markup-strings): Ditto. * lisp/muse-texinfo.el (muse-texinfo-markup-strings): Ditto. * lisp/muse-xml.el (muse-xml-markup-strings): Ditto. * lisp/muse-publish.el (muse-publish-markup-regexps) (muse-publish-markup-functions): Interpret "~~" as a non-breaking space. Thanks to Ken Brown for the suggestion. (muse-publish-markup-no-break-space): New function that publishes a non-breaking space. modified files: ChangeLog lisp/muse-docbook.el lisp/muse-groff.el lisp/muse-html.el lisp/muse-latex.el lisp/muse-publish.el lisp/muse-texinfo.el lisp/muse-xml.el 2005-12-26 21:35:08 GMT Michael Olson patch-322 Summary: muse-texinfo: Escape commas in URLs. Revision: muse--main--1.0--patch-322 * lisp/muse-texinfo.el (muse-texinfo-markup-specials-url): New option that determines the specials to escape in URLs. This is needed in order to escape commas in @ref. (muse-texinfo-decide-specials): New function that determines the specials to escape by context. modified files: ChangeLog lisp/muse-texinfo.el 2005-12-26 07:02:20 GMT Michael Olson patch-321 Summary: Make sure spaces in HTML URLs get escaped properly. Revision: muse--main--1.0--patch-321 * lisp/muse-docbook.el (muse-docbook-markup-specials): Move to muse-xml-common.el. * lisp/muse-html.el (muse-html-markup-specials): Ditto. * lisp/muse-xml.el (muse-xml-markup-specials): Ditto. * lisp/muse-html.el (muse-html-prepare-buffer): Don't modify muse-publish-url-transforms. * lisp/muse-publish.el (muse-publish-escape-specials): Get specials only once, rather than once-per-iteration. (muse-publish-escape-specials-in-string): If a function is returned by a function in :specials, pass it the string and use the results. This allows us to deal with funky cases like HTML URLs which work on a negated subset, by passing the buck. We don't permit this behavior in muse-publish-escape-specials because there hasn't been a need, yet. * lisp/muse-xml-common.el (muse-xml-markup-specials): New option that specifies the specials to normally escape. (muse-xml-markup-specials-url-extra): New option that specifies the extra specials to escape in URLs. Thanks to John Sullivan for reporting the incorrect translation of the space character in URLs. (muse-xml-decide-specials): New function that determines the specials to escape, given context. (muse-xml-escape-url): Rename from muse-xml-escape-string. Add "%" to the list of characters to ignore. Fix code indentation. modified files: ChangeLog lisp/muse-docbook.el lisp/muse-html.el lisp/muse-publish.el lisp/muse-xml-common.el lisp/muse-xml.el 2005-12-25 17:33:25 GMT Michael Olson patch-320 Summary: Allow text like "%N%" in markup strings. Revision: muse--main--1.0--patch-320 * lisp/muse-docbook.el (muse-docbook-markup-strings): Rename 'internal-link to 'anchor-ref for clarity. Split 'url-link into 'url and 'link so that TeX-related publishing styles can more handle links to other Muse documents. Add 'link-and-anchor string that handles a link with an anchor and an optional description. * lisp/muse-groff.el (muse-groff-markup-strings): Ditto. * lisp/muse-html.el (muse-html-markup-strings): Ditto. * lisp/muse-latex.el (muse-latex-markup-strings): Ditto. * lisp/muse-texinfo.el (muse-texinfo-markup-strings): Ditto. * lisp/muse-xml.el (muse-xml-markup-strings): Ditto. * lisp/muse-publish.el (muse-publish-url-transforms): Remove muse-publish-prepare-url. * lisp/muse-publish.el (muse-markup-text): Turn this into a function and add documentation. It will now handle arguments like "%N%", which indicate the position of an argument to insert. `format' is applied afterward. (muse-publish-classify-url): New function derived from muse-publish-prepare-url that returns a data structure with complete information about the given target string. (muse-publish-url): Use muse-publish-classify-url. This should fix an error in the LaTeX publishing style when specifying links to anchors. (muse-publish-insert-url): Remove unnecessary let-binding. (muse-publish-markup-url): Simplify, now that we have whole-document escaping of specials. (muse-publish-prepare-url): Remove. * lisp/muse.el (muse-replace-regexp-in-string): Use a more robust fallback routine when neither replace-regexp-in-string nor replace-in-string are found. modified files: ChangeLog lisp/muse-docbook.el lisp/muse-groff.el lisp/muse-html.el lisp/muse-latex.el lisp/muse-publish.el lisp/muse-texinfo.el lisp/muse-xml.el lisp/muse.el 2005-12-25 04:32:27 GMT Michael Olson patch-319 Summary: Use simpler markup string for anchors. Revision: muse--main--1.0--patch-319 * lisp/muse-docbook.el (muse-docbook-markup-strings): Use 'anchor instead of 'begin-anchor and 'end-anchor. * lisp/muse-latex.el (muse-latex-markup-strings): Ditto. * lisp/muse-publish.el (muse-publish-markup-anchor): Ditto. * lisp/muse-texinfo.el (muse-texinfo-markup-strings): Ditto. * lisp/muse-xml-common.el (muse-xml-markup-anchor): Ditto. * lisp/muse-xml.el (muse-xml-markup-strings): Ditto. * lisp/muse-html.el (muse-html-insert-anchor, muse-html-markup-anchor): Revert previous change, since muse-html-insert-contents needs muse-html-insert-anchor. modified files: ChangeLog lisp/muse-docbook.el lisp/muse-html.el lisp/muse-latex.el lisp/muse-publish.el lisp/muse-texinfo.el lisp/muse-xml-common.el lisp/muse-xml.el 2005-12-25 03:15:36 GMT Michael Olson patch-318 Summary: Fix a markup error involving links like [[#foo]]. Revision: muse--main--1.0--patch-318 * examples/QuickStart.muse: Move higher. Remove tags around the centered text. * lisp/muse-html.el (muse-html-markup-regexps): Cosmetic change. (muse-html-markup-strings): Remove table-group strings, since they aren't valid (X)HTML like I had thought. Change center to use

    rather than . (muse-html-insert-anchor): Remove. (muse-html-markup-anchor): Respect the noemphasis property. This fixes a bug with links like [[#foo]]. (muse-html-markup-footnote): Insert the correct footnote number. * lisp/muse-publish.el (muse-publish-markup-regexps): Make noemphasis rule higher than anchor rule. (muse-publish-markup-anchor): Respect the noemphasis property. * lisp/muse-xml-common.el (muse-xml-markup-anchor): Respect the noemphasis property. modified files: ChangeLog examples/QuickStart.muse lisp/muse-html.el lisp/muse-publish.el lisp/muse-xml-common.el 2005-12-24 23:13:41 GMT Michael Olson patch-317 Summary: Get rid of muse-regexp-space. Standardize anchor markup somewhat. Revision: muse--main--1.0--patch-317 * lisp/muse-colors.el (muse-colors-markup, muse-colors-custom-tags): Replace muse-regexp-space with muse-regexp-blank. Too many Emacs functions treat [:blank:]+\n differently than [:space:], so we'll use the former everywhere. * lisp/muse-convert.el (muse-write-citation): Ditto. * lisp/muse-mode.el (muse-current-word, muse-link-at-point): Ditto. * lisp/muse-protocols.el (muse-update-url-regexp): Ditto. * lisp/muse-publish.el (muse-publish-markup-regexps) (muse-publish-markup-tag, muse-publish-surround-text) (muse-publish-markup-list): Ditto. * lisp/muse-regexps.el (muse-tag-regexp, muse-implicit-link-regexp): Ditto. * lisp/muse-registry.el (muse-registry-url-regexp): Ditto. * lisp/muse-regexps.el (muse-regexp-space): Remove. * lisp/muse-docbook.el (muse-docbook-markup-functions): Use muse-xml-markup-anchor. (muse-docbook-markup-strings): Add markup strings for anchors. (muse-docbook-insert-anchor, muse-docbook-markup-anchor): Remove. * lisp/muse-html.el (muse-html-markup-footnote): Use muse-insert-markup. * lisp/muse-latex.el (muse-latex-markup-functions): Remove anchor rule, since we now have a sane default in muse-publish.el. (muse-latex-markup-strings): Add markup strings for anchors. (muse-latex-insert-anchor, muse-latex-markup-anchor): Remove. * lisp/muse-publish.el (muse-publish-markup-anchor): Consult markup strings. If style does not handle anchors, remove them. * lisp/muse-texinfo.el (muse-texinfo-markup-functions): Remove anchor rule, since we now have a sane default in muse-publish.el. (muse-texinfo-markup-strings): Add markup strings for anchors. (muse-texinfo-insert-anchor, muse-texinfo-markup-anchor): Remove. * lisp/muse-xml-common.el (muse-xml-markup-anchor): New generic routine for handling anchors. (muse-xml-markup-table): Pass row-len to begin-table-group markup string. * lisp/muse-xml.el (muse-xml-markup-strings): Add markup strings for anchors. (muse-xml-insert-anchor, muse-xml-markup-anchor): Remove. modified files: ChangeLog lisp/muse-colors.el lisp/muse-convert.el lisp/muse-docbook.el lisp/muse-html.el lisp/muse-latex.el lisp/muse-mode.el lisp/muse-protocols.el lisp/muse-publish.el lisp/muse-regexps.el lisp/muse-registry.el lisp/muse-texinfo.el lisp/muse-xml-common.el lisp/muse-xml.el lisp/muse.el 2005-12-24 22:07:28 GMT Michael Olson patch-316 Summary: Adapt the remaining publishing styles. Revision: muse--main--1.0--patch-316 * lisp/muse-groff.el (muse-groff-markup-paragraph): Use muse-insert-markup. * lisp/muse-latex2png.el (muse-publish-latex-tag): Use muse-insert-markup. (latex2png): Clean up the code a bit. * lisp/muse-texinfo.el (muse-texinfo-insert-anchor): Use muse-insert-markup. (muse-texinfo-markup-table): Use the shiny new muse-publish-table-fields function. modified files: ChangeLog lisp/muse-groff.el lisp/muse-latex2png.el lisp/muse-texinfo.el 2005-12-24 21:47:44 GMT Michael Olson patch-315 Summary: Make all XML-based publishing styles do tables. Needs testing. Revision: muse--main--1.0--patch-315 * lisp/muse-docbook.el (muse-docbook-markup-functions): Use muse-xml-markup-table. (muse-docbook-markup-regexps): Remove table kludges. (muse-docbook-markup-strings): Add markup strings for tables. (muse-docbook-encoding-map, muse-docbook-transform-content-type) (muse-docbook-markup-table): Remove in favor of using the functions in muse-xml-common.el. (muse-docbook-encoding): Use muse-xml-transform-content-type. (muse-docbook-markup-paragraph, muse-docbook-insert-anchor): Use muse-insert-markup. (muse-docbook-fixup-tables): Remove, since it isn't needed anymore. (muse-docbook-prepare-buffer): New function that forces the escaping of extra specials in URLs. * lisp/muse-html.el (muse-html-table-attributes): Add a leading space. Fix documentation. (muse-html-markup-regexps): Remove table kludges. (muse-html-markup-strings): Add markup strings for tables. (muse-html-encoding-map, muse-html-transform-content-type): Remove in favor of the functions of muse-xml-common.el. (muse-html-insert-anchor, muse-html-markup-paragraph) (muse-html-class-tag): Use muse-insert-markup. (muse-html-markup-table): Call muse-xml-markup-table to do most of the work, passing attributes. (muse-html-insert-contents): Use muse-insert-markup. Bum it down a bit. (muse-html-encoding): Use muse-xml-transform-content-type. (muse-html-fixup-tables): Remove. * lisp/muse-xml-common.el: Move a few functions and options here from other publishing styles. Make an initial attempt at an XML-based table publishing routine that uses markup strings. I'm not sure if it will abstract easily enough to use with LaTeX, but that's not a huge concern. * lisp/muse-xml.el (muse-xml-markup-regexps): Remove table kludges. (muse-xml-markup-strings): Add table markup strings. Omit table-group markup since it's unnecessary sugar. (muse-xml-encoding-map, muse-xml-transform-content-type) (muse-xml-markup-table): Move to muse-xml-common.el. (muse-xml-encoding): Pass default argument. (muse-xml-markup-paragraph, muse-xml-insert-anchor): Use muse-insert-markup. (muse-xml-fixup-tables): Remove. modified files: ChangeLog lisp/muse-docbook.el lisp/muse-html.el lisp/muse-xml-common.el lisp/muse-xml.el 2005-12-24 20:01:37 GMT Michael Olson patch-314 Summary: Implement a nicer way of publishing tables. Fix some regexps. Revision: muse--main--1.0--patch-314 * lisp/muse-html.el (muse-html-markup-footnote): Fix logic error. I thought "/=" was a typo, but it really meant "!=". Odd. Let's avoid that so that people familiar with C derivatives won't be confused :^) . (muse-html-insert-anchor, muse-html-markup-paragraph): Fix regexp. We have to make sure to add "\n" to most negated sets if we don't want them to span multiple lines. (muse-html-escape-string): Move to muse-xml-common.el. (muse-html-prepare-buffer): Use muse-xml-escape-string. * lisp/muse-journal.el (muse-journal-html-heading-regexp): Fix. * lisp/muse-latex.el (muse-latex-markup-regexps): Remove the kludgy table-joining regexp. (muse-latex-markup-table): Call muse-publish-table-fields to get a table structure that we can work with. Now we can publish the entire table at once. * lisp/muse-protocols.el (muse-browse-url-info): Fix regexps. * lisp/muse-publish.el (muse-publish-markup-regexps): Compact some regexps. Use a table-matching regexp that matches the entire region of a table, rather than just one line. (muse-publish-file): Docfix. (muse-publish-markup-footnote): Compact regexp. (muse-publish-table-fields): New function that snarfs the given region and returns a table structure. * lisp/muse-regexps.el (muse-table-field-regexp): New regexp that matches the field separator for tables. (muse-table-line-regexp): New regexp that matches a table line. (muse-tag-regexp): Fix regexp. * lisp/muse-registry.el (muse-registry-url-regexp) (muse-registry-link-regexp): Fix. * lisp/muse-xml.el (muse-xml-insert-anchor): Fix regexp. * lisp/muse-xml-common.el: New file containing routines that are commonly used by XML-ish publishing styles. (muse-xml-sort-table): New function that sorts a table structure so that it validates properly. We don't use it yet, but we will. new files: lisp/.arch-ids/muse-xml-common.el.id lisp/muse-xml-common.el modified files: ChangeLog lisp/muse-html.el lisp/muse-journal.el lisp/muse-latex.el lisp/muse-protocols.el lisp/muse-publish.el lisp/muse-regexps.el lisp/muse-registry.el lisp/muse-xml.el 2005-12-23 06:18:46 GMT Michael Olson patch-313 Summary: muse-latex: Work on table markup, isn't perfect yet. Revision: muse--main--1.0--patch-313 * lisp/muse-latex.el (muse-latex-markup-table): Make this sort of work. I've got an idea for how it should be done. We're going to try to snarf the whole table in muse-publish using only regexps, and pass it to the style-specific table markup function. * lisp/muse-publish.el (muse-publish-insert-url) (muse-publish-markup-url): Use muse-insert-markup. (muse-publish-verbatim-tag): Pass arguments correctly. modified files: ChangeLog lisp/muse-latex.el lisp/muse-publish.el 2005-12-23 05:27:53 GMT Michael Olson patch-312 Summary: Get practically-perfect LaTeX special escaping. Revision: muse--main--1.0--patch-312 * examples/QuickStart.muse: Detabify, change URLs. * lisp/muse-latex.el (muse-latex-markup-specials-document): New option that indicates the specials characters to escape in the whole document. (muse-latex-markup-specials-example): New option that indicates the specials to escape in regions. (muse-latex-markup-specials-literal): New option that indicates the specials to escape in =monospaced text= and regions. (muse-latex-markup-specials-url): New option that indicates the specials to escape in URLs. (muse-latex-decide-specials): Determine which specials to use depending on context. (muse-latex-insert-anchor): Use muse-insert-markup. * lisp/muse-publish.el (muse-publish-markup-region): Escape specials in the entire document. (muse-publish-escape-specials, muse-publish-escape-specials-in-string): List all contexts in documentation. Skip past entire read-only regions for a speed improvement. We'll need this now that we're using it on the whole document. Fix a bug in retrieving specials. (muse-publish-markup-enddots, muse-publish-markup-dots) (muse-publish-markup-rule, muse-publish-surround-text): Use muse-insert-markup. (muse-publish-markup-leading-space): Take 2 more arguments for easy generalization. (muse-publish-markup-verse): Pass more arguments to muse-publish-markup-leading-space. (muse-publish-url): Fix a specials bug with bare links. (muse-publish-code-tag): Use 'literal context here. modified files: ChangeLog examples/QuickStart.muse lisp/muse-latex.el lisp/muse-publish.el 2005-12-23 01:42:39 GMT Michael Olson patch-311 Summary: muse-build: Prevent backup files when generating autoloads. Revision: muse--main--1.0--patch-311 * scripts/muse-build.el (muse-generate-autoloads): Inhibit backups so that we don't get muse-autoloads.el~ files. modified files: ChangeLog scripts/muse-build.el 2005-12-22 04:12:00 GMT Michael Olson patch-310 Summary: Begin implementing context-specific handling of special characters. Revision: muse--main--1.0--patch-310 * lisp/muse-publish.el (muse-publish-url-transforms) (muse-publish-desc-transforms): Remove muse-publish-escape-specials-in-string, since we will explicitly call this with the proper parameters later on. (muse-publish-escape-specials, muse-publish-escape-specials-in-string): Add new optional CONTEXT argument that specifies further information to use when obtaining the specials that will be applied to the text. If someone specifies a function instead of an alist for the style's specials, call it and pass CONTEXT. (muse-publish-markup-word): Indicate the context when escaping specials. Make sure we have a context before continuing the publishing of the word. (muse-publish-markup-email, muse-publish-markup-url) (muse-publish-code-tag, muse-publish-example-tag) (muse-publish-verbatim-tag): Indicate the context when escaping specials. (muse-publish-url): Explicitly escape specials, rather than expecting it to be done in a user-customizable hook. Use different contexts for url and description. modified files: ChangeLog lisp/muse-publish.el 2005-12-21 02:44:57 GMT Michael Olson patch-309 Summary: Merged from mwolson@gnu.org--2005 (patch 37) Revision: muse--main--1.0--patch-309 Patches applied: * mwolson@gnu.org--2005/muse--rel--3.02--patch-37 Make error messages during publishing more friendly. modified files: ChangeLog lisp/muse-mode.el lisp/muse.el 2005-12-21 02:07:34 GMT Michael Olson patch-308 Summary: Don't mix up links and footnotes. Revision: muse--main--1.0--patch-308 * lisp/muse-html.el (muse-html-markup-footnote): Change "/=" typo to "=". * lisp/muse-publish.el (muse-publish-markup-footnote): Don't mix up links and footnotes. Thanks to Dale Smith for spotting this. modified files: ChangeLog lisp/muse-html.el lisp/muse-publish.el 2005-12-17 17:16:32 GMT Michael Olson patch-307 Summary: Merged from mwolson@gnu.org--2005 (patch 36) Revision: muse--main--1.0--patch-307 Patches applied: * mwolson@gnu.org--2005/muse--rel--3.02--patch-36 Release Emacs Muse 3.02.5. modified files: ChangeLog Makefile.defs NEWS debian/changelog lisp/muse.el muse.texi 2005-12-17 02:10:32 GMT Michael Olson patch-306 Summary: Merged from mwolson@gnu.org--2005 (patch 35) Revision: muse--main--1.0--patch-306 Patches applied: * mwolson@gnu.org--2005/muse--rel--3.02--patch-35 muse-colors: Fix QuickStart display bug. modified files: ChangeLog lisp/muse-colors.el 2005-12-17 01:19:30 GMT Michael Olson patch-305 Summary: Revert QuickStart changes, hack more on muse.rnc. Revision: muse--main--1.0--patch-305 * examples/QuickStart.muse: Revert previous changes; they cause publishing to fail. Hrm. Guess I'll have to fix the display issue with tags then. * muse.rnc: Put blockquote in the muse.element namespace, since it's not an attribute. modified files: ChangeLog examples/QuickStart.muse examples/muse.rnc 2005-12-16 23:37:24 GMT Michael Olson patch-304 Summary: QuickStart: Correct old syntax. Revision: muse--main--1.0--patch-304 * examples/QuickStart.muse: Don't wrap the literal tag around other tags. Just use equal sign escaping. modified files: ChangeLog examples/QuickStart.muse 2005-12-16 23:19:09 GMT Michael Olson patch-303 Summary: Make XML publishing work with QuickStart; no longer considered unstable. Revision: muse--main--1.0--patch-303 * examples/muse.rnc: Strip trailing whitespace. Hack it to the point that it works with our QuickStart document. * examples/Makefile (%.html, %.pdf, %.info, realclean, distclean) (fullclean): Adapt to work with .muse extension. * examples/QuickStart.muse: Rename from QuickStart. This makes it automatically get colorized as a Muse document when opened. * lisp/muse-xml.el: Move from experimental. (muse-xml-footer): Use correct ending tag. (muse-xml-markup-strings): Make emdash publish as " -- " to avoid an annoying error regarding "—" when validating with nxml-mode. rule and fn-sep should use the empty form of the HR tag. * README: Fix directions for QuickStart. modified files: ChangeLog README examples/Makefile examples/muse.rnc lisp/muse-xml.el renamed files: examples/.arch-ids/QuickStart.id ==> examples/.arch-ids/QuickStart.muse.id examples/QuickStart ==> examples/QuickStart.muse experimental/.arch-ids/muse-xml.el.id ==> lisp/.arch-ids/muse-xml.el.id experimental/muse-xml.el ==> lisp/muse-xml.el 2005-12-16 21:29:58 GMT Michael Olson patch-302 Summary: muse-html: Fix regexp error. Revision: muse--main--1.0--patch-302 * lisp/muse-html.el (muse-html-escape-string): Fix error in regexp string. modified files: ChangeLog lisp/muse-html.el 2005-12-16 21:28:45 GMT Michael Olson patch-301 Summary: Makefile: Minor tweak. Revision: muse--main--1.0--patch-301 * lisp/Makefile (ELC): Base this on $(EL). This should keep muse-autoloads.elc from being added to the list -- it won't be compiled anyway. modified files: ChangeLog lisp/Makefile 2005-12-16 19:21:06 GMT Michael Olson patch-300 Summary: Generate autoloads file. Revision: muse--main--1.0--patch-300 * Makefile (autoloads): New rule that calls "make autoloads" in lisp directory. * lisp/Makefile (EL): Avoid warning by removing muse-autoloads.el from list. (all): Generate autoloads. (autoloads): Make muse-autoloads.el. (muse-autoloads.el): Call `muse-generate-autoloads' from scripts/muse-build.el with arguments representing the directories to use when searching for autoloads. (realclean distclean fullclean): Remove autoloads. * scripts/muse-build.el (muse-generate-autoloads): Generate autoloads for Muse. Deal with XEmacs and its quirky insistence on doing most of the work itself. Expand all command line args so that the right directories are searched. Hardcode muse-autoloads.el as the name of the generated autoloads file. Use my custom header and footer, if possible. modified files: ChangeLog Makefile lisp/Makefile scripts/muse-build.el 2005-12-16 17:06:06 GMT Michael Olson patch-299 Summary: Add autoload cookies. Revision: muse--main--1.0--patch-299 Add autoload cookies to several functions. modified files: ChangeLog lisp/muse-blosxom.el lisp/muse-mode.el lisp/muse-project.el lisp/muse-protocols.el lisp/muse-publish.el 2005-12-16 16:42:46 GMT Michael Olson patch-298 Summary: muse-mode: Make muse-edit-link-at-point work. Revision: muse--main--1.0--patch-298 * lisp/muse-mode.el (muse-edit-link-at-point): Save match data so that this function works. Before, it would remove an arbitrary chunk of the top of the buffer. modified files: ChangeLog lisp/muse-mode.el 2005-12-15 23:09:32 GMT Michael Olson patch-297 Summary: Change mode of muse-protocols to 644. Revision: muse--main--1.0--patch-297 modified files: ChangeLog lisp/muse-protocols.el 2005-12-14 00:57:11 GMT Michael Olson patch-296 Summary: muse-wiki: WikiWord suffix fix. Revision: muse--main--1.0--patch-296 * lisp/muse-wiki.el (muse-wiki-wikiword-regexp): Don't require there to be nothing at the end. This allows us to separate WikiWords with "''''" to indicate suffixes. modified files: ChangeLog lisp/muse-wiki.el 2005-12-14 00:54:02 GMT Michael Olson patch-295 Summary: muse-wiki: Fix an error that occurs when muse-colors is not loaded. Revision: muse--main--1.0--patch-295 * lisp/muse-wiki.el (muse-wiki-update-interwiki-regexp): Try to fix an error when muse-colors is not loaded. Thanks to Stefan van der Walt for the report. modified files: ChangeLog lisp/muse-wiki.el 2005-12-13 14:45:20 GMT Michael Olson patch-294 Summary: muse-publish: Make muse-insert-markup a function. Revision: muse--main--1.0--patch-294 * lisp/muse-publish.el (muse-insert-markup): Use defun rather than defsubst. modified files: ChangeLog lisp/muse-publish.el 2005-12-13 04:49:16 GMT Michael Olson patch-293 Summary: Merged from muse--rel--3.02 (patch 29) Revision: muse--main--1.0--patch-293 Patches applied: * mwolson@gnu.org--2005/muse--rel--3.02--patch-29 muse-mode: Fix semicolon in paragraph issue. modified files: ChangeLog lisp/muse-mode.el 2005-12-13 00:04:50 GMT Michael Olson patch-292 Summary: Merged from muse--rel--3.02 (patch 28) Revision: muse--main--1.0--patch-292 Patches applied: * mwolson@gnu.org--2005/muse--rel--3.02--patch-28 muse-project: Deal with edge case. modified files: ChangeLog lisp/muse-project.el 2005-12-11 07:06:34 GMT Michael Olson patch-291 Summary: Merged from muse--rel--3.02 (patch 27) Revision: muse--main--1.0--patch-291 Patches applied: * mwolson@gnu.org--2005/muse--rel--3.02--patch-27 muse-project: Prevent auto-save files from being included. modified files: ChangeLog lisp/muse-project.el 2005-12-11 06:27:40 GMT Michael Olson patch-290 Summary: muse-groff: Fix compiler warning. Revision: muse--main--1.0--patch-290 * lisp/muse-groff.el (muse-groff-concat-lists): Fix compiler warning. modified files: ChangeLog lisp/muse-groff.el 2005-12-11 06:24:18 GMT Michael Olson patch-289 Summary: muse-registry: Attempt to increase Emacs20 compatibility. Revision: muse--main--1.0--patch-289 * lisp/muse-registry.el (muse-registry-show) (muse-registry-update-registry, muse-registry-make-new-registry): Use dolist instead of mapc for nomimal support of Emacs20, since Planner tries to support it. modified files: ChangeLog lisp/muse-registry.el 2005-12-11 06:17:25 GMT Michael Olson patch-288 Summary: XEmacs fixes in muse-latex2png and muse-registry. Revision: muse--main--1.0--patch-288 * lisp/muse-latex2png.el (latex2png): Fix XEmacs error. It seems better to use expand-file-name than concat, since the result of the temp-directory function sometimes doesn't have a trailing backslash. * lisp/muse-registry.el (muse-registry-url-regexp): Use muse-regexp-space. (muse-registry-get-project-name): Use muse-replace-regexp-in-string. (muse-registry-make-new-registry): Use a better heuristic for determining whether the given file is actually a directory. This avoids the use of `directory-files-and-attributes', which is not available in XEmacs. (muse-registry-new-entries): Use muse-match-string-no-properties. modified files: ChangeLog lisp/muse-latex2png.el lisp/muse-registry.el 2005-12-11 03:39:22 GMT Michael Olson patch-287 Summary: muse-registry.el: Fix compiler warnings. Revision: muse--main--1.0--patch-287 * lisp/muse-registry.el: Fix compiler warnings. Remove dependency on cl.el. modified files: ChangeLog lisp/muse-registry.el 2005-12-11 03:21:14 GMT Michael Olson patch-286 Summary: muse-wiki: First try at implementing WikiName separator. Revision: muse--main--1.0--patch-286 * lisp/muse-wiki.el: Implement WikiName separator support via "''''" markup, for when you want to add a suffix to a WikiName. modified files: ChangeLog lisp/muse-wiki.el 2005-12-11 00:33:48 GMT Michael Olson patch-285 Summary: Merged from muse--rel--3.02 (patch 25) Revision: muse--main--1.0--patch-285 Patches applied: * mwolson@gnu.org--2005/muse--rel--3.02--patch-25 muse-latex: Get table of contents to publish correctly. modified files: ChangeLog lisp/muse-latex.el 2005-12-06 16:57:48 GMT Michael Olson patch-284 Summary: Add muse-registry.el to Muse. Revision: muse--main--1.0--patch-284 * lisp/muse-registry.el: New file contributed by Bastien Guerry that provides a URL registry for Muse. new files: lisp/.arch-ids/muse-registry.el.id lisp/muse-registry.el modified files: AUTHORS ChangeLog 2005-12-06 16:54:40 GMT Michael Olson patch-283 Summary: muse-mode: Minor fix. Revision: muse--main--1.0--patch-283 * lisp/muse-mode.el (muse-current-word): Switch order of save-restriction and save-excursion as recommended by Emacs documentation. modified files: ChangeLog lisp/muse-mode.el 2005-12-01 01:32:29 GMT Michael Olson patch-282 Summary: muse-mode: Handle case where we visit an anchor-only link. Revision: muse--main--1.0--patch-282 * lisp/muse-mode.el (muse-visit-link-default): Handle case where the link consists of only an anchor. Thanks to Jim Ottaway for the patch. modified files: ChangeLog lisp/muse-mode.el 2005-12-01 01:08:13 GMT Michael Olson patch-281 Summary: muse-colors: Add faces for all 3 levels of emphasis. Revision: muse--main--1.0--patch-281 * lisp/muse-colors.el (muse-emphasis-1, muse-emphasis-2) (muse-emphasis-3): New faces that represent italic, bold, and bold italic emphasis, respectively. (muse-colors-emphasized): Use new faces. Thanks to Phillip Lord for the suggestion and the initial code. modified files: AUTHORS ChangeLog lisp/muse-colors.el 2005-11-30 23:00:34 GMT Michael Olson patch-280 Summary: muse-latex2png: XEmacs compatibility. Revision: muse--main--1.0--patch-280 * lisp/muse-latex2png.el (latex2png-move2pubdir): Remove use of file-expand-wildcards, since it was a no-op. (latex2png): Fall back to a temporary directory variable that works with XEmacs. Thanks to Neilen Marais for the report and suggested fix. modified files: ChangeLog lisp/muse-latex2png.el 2005-11-21 21:14:20 GMT Michael Olson patch-279 Summary: Update AUTHORS. Revision: muse--main--1.0--patch-279 * AUTHORS: Update. modified files: AUTHORS ChangeLog 2005-11-21 21:11:14 GMT Michael Olson patch-278 Summary: Don't split anchors in URLs. Revision: muse--main--1.0--patch-278 * lisp/muse-mode.el (muse-visit-link-default): Install patch from Jim Ottaway. Remove ANCHOR parameter. Compute the anchor ourselves. Make sure that we handle URLs before trying to split the anchor. (muse-visit-link): Don't compute the anchor. Let the callee do that. modified files: ChangeLog lisp/muse-mode.el 2005-11-21 15:24:41 GMT Michael Olson patch-277 Summary: Merged from mwolson@gnu.org--2005 (patch 23) Revision: muse--main--1.0--patch-277 Patches applied: * mwolson@gnu.org--2005/muse--rel--3.02--patch-23 muse-wiki: WikiWords can have consecutive capital letters. modified files: ChangeLog lisp/muse-wiki.el 2005-11-20 22:22:10 GMT Michael Olson patch-276 Summary: Deal with case when muse-make-link is passed an explicit link. Revision: muse--main--1.0--patch-276 * lisp/muse-mode.el (muse-make-link): Apply patch from Sacha that deals with case when we are passed an explicit-style link. modified files: ChangeLog lisp/muse-mode.el 2005-11-19 23:06:24 GMT Michael Olson patch-275 Summary: Merged from mwolson@gnu.org--2005 (patch 20-22) Revision: muse--main--1.0--patch-275 Patches applied: * mwolson@gnu.org--2005/muse--rel--3.02--patch-20 Update NEWS. * mwolson@gnu.org--2005/muse--rel--3.02--patch-21 Update examples. * mwolson@gnu.org--2005/muse--rel--3.02--patch-22 Release Emacs Muse 3.02.02. new files: examples/mwolson/templates/.arch-ids/header.tex.id examples/mwolson/templates/header.tex modified files: ChangeLog NEWS examples/mwolson/muse-init.el examples/mwolson/templates/header.html lisp/muse.el muse.texi 2005-11-19 23:02:20 GMT Michael Olson patch-274 Summary: Merged from mwolson@gnu.org--2005 (patch 11, 13-15, 17-19) Revision: muse--main--1.0--patch-274 Patches applied: * mwolson@gnu.org--2005/muse--rel--3.02--patch-11 Don't interpret enddots, dots, and rule inside of links. * mwolson@gnu.org--2005/muse--rel--3.02--patch-13 Allow bad WikiWords to be colorized, by popular request. * mwolson@gnu.org--2005/muse--rel--3.02--patch-14 Be more fault-tolerant about muse-file-extension. * mwolson@gnu.org--2005/muse--rel--3.02--patch-15 Prepare debian files for new minor release. * mwolson@gnu.org--2005/muse--rel--3.02--patch-17 Update NEWS. * mwolson@gnu.org--2005/muse--rel--3.02--patch-18 NEWS: Add migration note. * mwolson@gnu.org--2005/muse--rel--3.02--patch-19 Merged from mwolson@gnu.org--2005 (patch 272-273) modified files: ChangeLog Makefile.defs NEWS debian/NEWS debian/changelog debian/control debian/rules lisp/muse-colors.el lisp/muse-project.el lisp/muse-publish.el lisp/muse-wiki.el 2005-11-19 00:01:26 GMT Michael Olson patch-273 Summary: muse-latex: Make footnotes look a bit more natural for LaTeX users. Revision: muse--main--1.0--patch-273 * lisp/muse-latex.el (muse-latex-markup-strings): Remove markup strings for footnotemark and footnotetext-end, as recommended by Jim Ottaway. modified files: ChangeLog lisp/muse-latex.el 2005-11-18 23:56:22 GMT Michael Olson patch-272 Summary: muse-texinfo: Correct markup strings for dots, enddots, center. Revision: muse--main--1.0--patch-272 * AUTHORS: Bookkeeping * lisp/muse-texinfo.el (muse-texinfo-markup-strings): Apply patch from Jim Ottaway that produces correct output for dots, enddots, and centered text. modified files: AUTHORS ChangeLog lisp/muse-texinfo.el 2005-11-18 17:18:40 GMT Michael Olson patch-271 Summary: Sync with davidsmith@acm.org--2005 (patch 0), davidsmith@acm.org--main (patch 0-2), hodique@lifl.fr--2005 (patch 40-45), mwolson@gnu.org--2005 (patch 0-8) Revision: muse--main--1.0--patch-271 Mark several revisions as "included". No actual changes were made to the source. modified files: ChangeLog 2005-11-18 17:14:38 GMT Michael Olson patch-270 Summary: muse-groff: Provide groff-pdf style rather than pdf. Revision: muse--main--1.0--patch-270 * experimental/muse-groff.el: Remove, since the original author keeps his version in the lisp/ directory, and it's reasonably stable by now. * lisp/muse-groff.el: Detabify source. ("groff-pdf"): Rename the "pdf" publishing style to "groff-pdf" to avoid a conflict with the latex-based pdf style. removed files: experimental/.arch-ids/muse-groff.el.id experimental/muse-groff.el modified files: ChangeLog lisp/muse-groff.el 2005-11-18 17:07:51 GMT Michael Olson patch-269 Summary: Merged from ajk@iu.edu--2005 (patch 0-9) Revision: muse--main--1.0--patch-269 Patches applied: * ajk@iu.edu--2005/muse--ajk--1.0--base-0 tag of mwolson@gnu.org--2005/muse--main--1.0--patch-82 * ajk@iu.edu--2005/muse--ajk--1.0--patch-1 Publish PDF using GROFF with mom macros. * ajk@iu.edu--2005/muse--ajk--1.0--patch-2 Kinda works, still need tables and a bunch of other stuff. * ajk@iu.edu--2005/muse--ajk--1.0--patch-3 Remove extra newlines from QUOTE calls. * ajk@iu.edu--2005/muse--ajk--1.0--patch-4 mom -> groff * ajk@iu.edu--2005/muse--ajk--1.0--patch-5 - fix syntax of definition of muse-groff-markup-strings * ajk@iu.edu--2005/muse--ajk--1.0--patch-6 Use \z to keep leading space that will result from .URL... * ajk@iu.edu--2005/muse--ajk--1.0--patch-7 Don't use .blm (blank line == paragraph break). Hopefu... * ajk@iu.edu--2005/muse--ajk--1.0--patch-8 Use markup-strings for . * ajk@iu.edu--2005/muse--ajk--1.0--patch-9 Catch up with mwolson new files: lisp/.arch-ids/muse-groff.el.id lisp/muse-groff.el modified files: ChangeLog 2005-11-16 23:56:20 GMT Michael Olson patch-268 Summary: Allow "-" in publishing directives. Revision: muse--main--1.0--patch-268 * lisp/muse-publish.el (muse-publish-markup-regexps): Allow "-" in publishing directives. Thanks to Jim Ottaway for the suggestion. modified files: ChangeLog lisp/muse-publish.el 2005-11-14 20:28:47 GMT Michael Olson patch-267 Summary: muse-latex: Fix "generation of PDF failed" message. Revision: muse--main--1.0--patch-267 * lisp/muse-latex.el (muse-latex-pdf-generate): Make sure that we return t or nil depending on whether the publishing attempt was successful. modified files: ChangeLog lisp/muse-latex.el 2005-11-10 01:26:15 GMT Michael Olson patch-266 Summary: Call pdflatex a reasonable number of times. Revision: muse--main--1.0--patch-266 * lisp/muse-latex.el (muse-latex-pdf-generate): Call pdflatex up to 3 times, depending on what return value we get. Thanks to John Wiegley for the heads up. modified files: ChangeLog Makefile.defs debian/changelog debian/rules lisp/muse-latex.el 2005-11-02 03:56:03 GMT Michael Olson patch-265 Summary: Temporary workaround to make lists work properly again. Revision: muse--main--1.0--patch-265 * lisp/muse-publish.el (muse-publish-surround-text): Don't add read-only properties to lists, since we need to be able to reduce them in later publishing rules for muse-html. I'd really like to change the way lists are marked up so as to obviate the need for this. modified files: ChangeLog lisp/muse-publish.el 2005-11-01 21:42:57 GMT Michael Olson patch-264 Summary: Attempt to fix read-only error. Revision: muse--main--1.0--patch-264 * lisp/muse-publish.el (muse-publish-markup-buffer): Set inhibit-read-only to t so that we don't get buffer-read-only errors. modified files: ChangeLog lisp/muse-publish.el 2005-10-31 20:38:52 GMT Michael Olson patch-263 Summary: Fix mistyping of new option name. Revision: muse--main--1.0--patch-263 * lisp/muse-publish.el (muse-publish-markup-comment) (muse-publish-comment-tag): s/markup-//g. Fix mistyping of new option. modified files: ChangeLog lisp/muse-publish.el 2005-10-31 15:10:28 GMT Michael Olson patch-262 Summary: muse-publish: Use `apply' instead of passing list to `insert'. Revision: muse--main--1.0--patch-262 * lisp/muse-publish.el (muse-insert-markup): Use `apply' instead of passing a list to `insert'. Thanks to Mark Triggs for the suggestion. Hopefully this will fix a backtrace or two. modified files: ChangeLog lisp/muse-publish.el 2005-10-30 20:02:19 GMT Michael Olson patch-261 Summary: muse-latex2png: Put png files in correct place. all: Introduce comment syntax. Revision: muse--main--1.0--patch-261 * experimental/muse-xml.el (muse-xml-markup-strings): Produce markup for 'comment-begin and 'comment-end. * lisp/muse-docbook.el (muse-docbook-markup-strings): Ditto. * lisp/muse-html.el (muse-html-markup-strings): Ditto. * lisp/muse-texinfo.el (muse-texinfo-markup-strings): Ditto. * lisp/muse-latex.el (muse-latex-markup-strings): Ditto. Remove second argument for "\ref", since it isn't valid LaTeX. * lisp/muse-latex2png.el (muse-publish-latex-tag): Use muse-publishing-current-output-path rather than muse-publishing-current-file. * lisp/muse-publish.el (muse-publishing-current-output-path): New variable that determines where the current file is being published to. (muse-publish-file): Set muse-publishing-current-output-path. (muse-publish-comments-p): New option that determines whether comments should be deleted or published. Default is to delete. (muse-publish-markup-comment, muse-publish-comment-tag): Use muse-publish-comments-p. modified files: ChangeLog experimental/muse-xml.el lisp/muse-docbook.el lisp/muse-html.el lisp/muse-latex.el lisp/muse-latex2png.el lisp/muse-publish.el lisp/muse-texinfo.el 2005-10-30 19:07:30 GMT Michael Olson patch-260 Summary: muse-latex2png: Fix compiler warning, muse-project: add with-muse-project. Revision: muse--main--1.0--patch-260 * AUTHORS: Bookkeeping. * lisp/muse-latex2png.el (latex2png-move2pubdir): Fix compiler warning. `output-dir' is not defined, so let's just use pubdir. * lisp/muse-project.el (with-muse-project): New function courtesy of Jim Ottaway. modified files: AUTHORS ChangeLog lisp/muse-latex2png.el lisp/muse-project.el 2005-10-30 18:40:56 GMT Michael Olson patch-259 Summary: Move latex2png.el to lisp/, muse-latex: Emphasize table elements. Revision: muse--main--1.0--patch-259 * AUTHORS: Update. * lisp/muse-latex.el (muse-latex-markup-table): Implement underlining of table headers and overlining table footers, as suggested by Trent Buck. * contrib/muse-latex2png.el: Move to the lisp/ directory -- the original author has agreed to send in a copyright assignment form. modified files: AUTHORS ChangeLog lisp/muse-latex.el lisp/muse-latex2png.el renamed files: contrib/.arch-ids/muse-latex2png.el.id ==> lisp/.arch-ids/muse-latex2png.el.id contrib/muse-latex2png.el ==> lisp/muse-latex2png.el 2005-10-29 19:53:49 GMT Michael Olson patch-258 Summary: Pave the way for entire-document escaping of specials. Revision: muse--main--1.0--patch-258 * lisp/muse-mode.el (muse-mode): Silence compiler warning. * lisp/muse-publish.el (muse-insert-markup): New function that is used for inserting markup text. Currently, this inserts the text and adds the read-only property. This should permit us to deal with escaping specials in the entire document, later on. (muse-publish-section-close, muse-publish-markup-word) (muse-publish-markup-emdash, muse-publish-markup-enddots) (muse-publish-markup-dots, muse-publish-markup-rule) (muse-publish-markup-heading, muse-publish-markup-footnote) (muse-publish-markup-fn-sep, muse-publish-surround-text) (muse-publish-markup-list, muse-publish-markup-leading-space) (muse-publish-markup-verse): Use muse-insert-markup instead of `insert'. Don't use this on whitespace, just the markup text itself. * muse-book.el (muse-book-publish-chapter, muse-book-publish-project): Ditto. * muse-journal.el (muse-journal-latex-qotd-tag): Ditto. modified files: ChangeLog lisp/muse-book.el lisp/muse-journal.el lisp/muse-mode.el lisp/muse-publish.el 2005-10-29 09:15:07 GMT Michael Olson patch-257 Summary: By default, use ".muse" extension and do not detect by pathname. Revision: muse--main--1.0--patch-257 * lisp/muse-mode.el (muse-mode-auto-p): Default to nil. (muse-file-extension): Default to "muse". This has the effect of making Emacs associate the ".muse" extension with muse-mode, without trying to figure things out from the path to the file. The former method is usually considered to be best, so we'll go with it. modified files: ChangeLog lisp/muse-mode.el lisp/muse.el 2005-10-29 07:10:16 GMT Michael Olson patch-256 Summary: Emacs 21 flyspell fix. Revision: muse--main--1.0--patch-256 * lisp/muse-mode.el (muse-mode): I finally figured out how to get flyspell to pay attention to my muse-mode-flyspell-p constraints, which means that the version of flyspell that comes with Emacs21 will no longer mess up links. modified files: ChangeLog lisp/muse-mode.el 2005-10-29 03:22:40 GMT Michael Olson patch-255 Summary: Merged from jeho@jeho.org--2005 (patch 0-11) Revision: muse--main--1.0--patch-255 * AUTHORS: Update. * lisp/muse-latex.el (muse-latex-markup-strings): Use the proper footnode-end mark. * lisp/muse-mode.el (muse-link-at-point): Avoid error with intangible links. (muse-visit-link-default): Save position before searching, in case the search fails. Use a regexp search. Start from beginning of document. Refine search regexp. * lisp/muse-wiki.el (muse-wiki-ignore-bare-project-names): New option that indicated whether project names without a page specifier will be considered links. (muse-wiki-handle-interwiki): Consult `muse-wiki-ignore-bare-project-names'. Patches applied: * jeho@jeho.org--2005/muse--jeho--1.0--patch-6 muse-mode.el fix for muse-visit-link-default * jeho@jeho.org--2005/muse--jeho--1.0--patch-7 muse-mode.el fix intangible problem in muse-link-at-point * jeho@jeho.org--2005/muse--jeho--1.0--patch-8 muse-wiki: added option for not rendering bare project names as links * jeho@jeho.org--2005/muse--jeho--1.0--patch-10 muse-mode.el: fix finding an anchor * jeho@jeho.org--2005/muse--jeho--1.0--patch-11 muse-latex.el: fix footnote-end modified files: AUTHORS ChangeLog lisp/muse-latex.el lisp/muse-mode.el lisp/muse-wiki.el 2005-10-28 17:05:42 GMT Michael Olson patch-254 Summary: contrib/muse-latex2png.el: Put images in the correct directory. Revision: muse--main--1.0--patch-254 * contrib/muse-latex2png.el (latex2png-move2pubdir) (muse-publish-latex-tag): Apply patch from Na Li and Chris Lowis that puts generated images in the correct directory. modified files: AUTHORS ChangeLog contrib/muse-latex2png.el 2005-10-21 15:26:51 GMT Michael Olson patch-253 Summary: Anchor fixes; muse-latex: Use \label{} and \ref{} for anchors. Revision: muse--main--1.0--patch-253 * experimental/muse-xml.el (muse-xml-insert-anchor) (muse-xml-markup-anchor): Make sure we don't blow away the text just before an anchor. On all types but texinfo, insert a newline immediately after the anchor. * lisp/muse-docbook.el (muse-docbook-insert-anchor) (muse-docbook-markup-anchor): Ditto. * lisp/muse-html.el (muse-html-insert-anchor) (muse-html-markup-anchor): Ditto. * lisp/muse-texinfo.el (muse-texinfo-insert-anchor) (muse-texinfo-markup-anchor): Ditto. * lisp/muse-publish.el (muse-publish-markup-regexps): Make text before the anchor the first match group. * lisp/muse-latex.el (muse-latex-markup-strings): Use \ref{} for internal-link rather than \hyperlink{}. Thanks to Jim Ottaway for the suggestion. (muse-latex-insert-anchor): Use a simpler routine that inserts \label{}. modified files: ChangeLog experimental/muse-xml.el lisp/muse-docbook.el lisp/muse-html.el lisp/muse-latex.el lisp/muse-publish.el lisp/muse-texinfo.el 2005-10-21 14:39:50 GMT Michael Olson patch-252 Summary: Allow anchors to occur near (rather than at) the beginning of line. Revision: muse--main--1.0--patch-252 * lisp/muse-publish.el (muse-publish-markup-regexps): Allow non-word characters before anchor, like " - ". Thanks to Phillip Lord for the suggestion. modified files: ChangeLog lisp/muse-publish.el 2005-10-13 04:20:29 GMT Michael Olson patch-251 Summary: Minor bookkeeping update. Revision: muse--main--1.0--patch-251 * AUTHORS: Update information. modified files: AUTHORS ChangeLog 2005-10-13 04:07:36 GMT Michael Olson patch-250 Summary: muse-mathml: New experimental embedded MathML publisher. Revision: muse--main--1.0--patch-250 * lisp/muse-html.el (muse-html): Fix docstring. * experimental/muse-mathml.el: New file that implements a tag. With the help of an external program, this will translate LaTeX code between and to embedded MathML. A new style called "mathml" is defined, which is derived from the XHTML style, but with a more suitable header. new files: experimental/.arch-ids/muse-mathml.el.id experimental/muse-mathml.el modified files: ChangeLog lisp/muse-html.el 2005-10-13 03:38:30 GMT Michael Olson patch-249 Summary: muse-latex: Ignore anchor if it occurs at end of line. Revision: muse--main--1.0--patch-249 * lisp/muse-latex.el (muse-latex-insert-anchor): If the anchor occurs at the end of a line, ignore it. Thanks to Na Li for the suggestion. modified files: ChangeLog experimental/muse-xml.el lisp/muse-latex.el 2005-10-12 15:57:20 GMT Michael Olson patch-248 Summary: Add ability to publish embedded LaTeX content as a PNG. Revision: muse--main--1.0--patch-248 * lisp/muse-publish.el (muse-publishing-styles) (muse-publishing-current-file, muse-publishing-current-style) (muse-publishing-styles): Add documentation. * contrib/muse-latex2png.el: New file that adds the tag. The tag expects LaTeX content, and will publish a PNG file. If you're interesting in helping, check out To Do in the commentary. This is in /contrib for now, since the original author doesn't have a copyright assignment on file with the FSF. new files: contrib/.arch-ids/muse-latex2png.el.id contrib/muse-latex2png.el modified files: AUTHORS ChangeLog lisp/muse-publish.el 2005-10-06 19:40:37 GMT Michael Olson patch-247 Summary: muse-groff.el: New publishing styles groff and groff-pdf. Revision: muse--main--1.0--patch-247 * AUTHORS: Add AJK. * lisp/muse.el: Use the correct month name for this release. Oops. * muse.texi (Directives): The behavior for #date changed in 3.02.01. * experimental/muse-groff.el: New file containing the groff and groff-pdf publishing styles. new files: experimental/.arch-ids/muse-groff.el.id experimental/muse-groff.el modified files: AUTHORS ChangeLog lisp/muse.el muse.texi 2005-09-27 00:15:05 GMT Michael Olson patch-246 Summary: Figure out syntax of :set. Revision: muse--main--1.0--patch-246 * lisp/muse-project.el (muse-project): Make the :set option inline to match the actual syntax that Muse recognizes. * muse.texi (Projects): Note that I need to work on this section. modified files: ChangeLog lisp/muse-project.el muse.texi 2005-09-26 22:31:57 GMT Michael Olson patch-245 Summary: Release Emacs Muse 3.02.01. Revision: muse--main--1.0--patch-245 * NEWS: Update entries for Muse 3.02.01. * debian/rules: Install NEWS.Debian. * debian/NEWS: New file that contains Debian-related news items. * examples/mwolson/muse-init.el: Update with my latest changes. * examples/mwolson/templates/footer.html: Use `muse-publishing-directive'. new files: debian/.arch-ids/NEWS.id debian/NEWS modified files: ChangeLog Makefile.defs NEWS debian/changelog debian/rules examples/mwolson/muse-init.el examples/mwolson/templates/footer.html lisp/muse.el muse.texi 2005-09-26 21:23:49 GMT Michael Olson patch-244 Summary: Fix customization bugs concerning muse-project-alist. Revision: muse--main--1.0--patch-244 * examples/johnw/muse-johnw.el: Update with latest version from John. * muse-project.el (muse-project-alist-using-customize): New variable that indicates whether or not we just used customize to modify the value of muse-project-alist. (muse-project-alist-get): Set muse-project-alist-using-customize. (muse-project-alist-set): Only try to unescape muse-project-alist if muse-project-alist-using-customize is set. Make sure that the value we save to .emacs is unescaped. (muse-project): Add definition for :value-delete so that we can work around an Emacs21 and XEmacs21 annoyance. modified files: ChangeLog examples/johnw/muse-johnw.el lisp/muse-project.el 2005-09-25 03:06:25 GMT Michael Olson patch-243 Summary: Try to make link properties more sane. Revision: muse--main--1.0--patch-243 * lisp/muse-colors.el (muse-link-properties): Try to make link properties a bit smarter. It is hoped that this fixes several strange key movement and link coloring issues. Thanks to Sergey Vlasov for the fix. modified files: AUTHORS ChangeLog lisp/muse-colors.el 2005-09-24 00:01:56 GMT Michael Olson patch-242 Summary: Use modification time for date directive. Revision: muse--main--1.0--patch-242 * lisp/muse-publish.el (muse-publish-markup-buffer): Set the date directive using the currently-publishing file's modification time, rather than the current time. modified files: ChangeLog lisp/muse-publish.el 2005-09-22 16:51:05 GMT Michael Olson patch-241 Summary: muse-latex: Add a few escaping options that may be used in the future. Revision: muse--main--1.0--patch-241 * lisp/muse-latex.el: Note that we don't make use of these new options yet. (muse-latex-markup-specials): Move longer escapes out of here. (muse-latex-markup-specials-entire-document): New option that specifies the special characters to escape in the whole document after processing markup rules. (muse-latex-markup-specials-verbatim): New option that specifies the special characters to escape in tags and =literal text=. modified files: ChangeLog lisp/muse-latex.el 2005-09-22 16:15:59 GMT Michael Olson patch-240 Summary: If more than 1 blank separates list/table items, separate them. Revision: muse--main--1.0--patch-240 * lisp/muse-docbook.el, muse-html.el, muse-latex.el, muse-texinfo.el, experimental/muse-xml.el (muse-*-markup-regexps): If more than 1 blank line separates a list or table item, it will form a new table. modified files: ChangeLog experimental/muse-xml.el lisp/muse-docbook.el lisp/muse-html.el lisp/muse-latex.el lisp/muse-texinfo.el 2005-09-19 01:34:48 GMT Michael Olson patch-239 Summary: muse.texi: Use @example instead of @smallexample. Revision: muse--main--1.0--patch-239 * muse.texi: Replace @smallexample with @example. It didn't do what I thought it did, and the result looked worse. Hence, the reversal. modified files: ChangeLog muse.texi 2005-09-19 01:31:34 GMT Michael Olson patch-238 Summary: muse-html: Add muse-xhtml-style-sheet. Revision: muse--main--1.0--patch-238 * lisp/muse-html.el (muse-html-style-sheet): Remove XHTML note. (muse-xhtml-style-sheet): New option that is used in muse-xhtml-header. Thanks to Trent Buck for the suggestion. modified files: ChangeLog lisp/muse-html.el 2005-09-16 07:06:42 GMT Michael Olson patch-237 Summary: Release Muse 3.02. Revision: muse--main--1.0--patch-237 * Makefile.defs: Update Debian stuff. * changelog: Add entry for 3.02-1, urgency medium. modified files: ChangeLog Makefile.defs debian/changelog 2005-09-16 06:57:44 GMT Michael Olson 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 patch-235 Summary: Finish documentation. Revision: muse--main--1.0--patch-235 * muse.texi (Comments): New node that describes the syntax of comments. (Markup Strings): Describe all markup strings. modified files: ChangeLog muse.texi 2005-09-16 05:02:45 GMT Michael Olson patch-234 Summary: Document style elements for muse-define-style. Revision: muse--main--1.0--patch-234 * muse.texi: Use @smallexample for 1-line examples. (Style Elements): New node that explains the different style elements that may be used for muse-define-style and muse-derive-style. (Deriving Styles): Prune unnecessary entries. Explain existing entries better. modified files: ChangeLog muse.texi 2005-09-16 04:05:19 GMT Michael Olson patch-233 Summary: Make documentation separately installable. Revision: muse--main--1.0--patch-233 * Makefile (install): Split into install-bin and install-info. * muse.texi (Markup Regexps): Fix display bug. modified files: ChangeLog Makefile muse.texi 2005-09-15 03:52:01 GMT Michael Olson patch-232 Summary: muse-mode: Set comment syntax. Revision: muse--main--1.0--patch-232 * lisp/muse-mode.el (muse-mode): Declare comment syntax to be `^; comment text$'. Thanks to Jesse Alama for the suggestion. modified files: ChangeLog lisp/muse-mode.el 2005-09-13 06:30:18 GMT Michael Olson patch-231 Summary: muse.texi: Add publishing order information. Revision: muse--main--1.0--patch-231 * muse.texi (Markup Regexps): Add publishing order. modified files: ChangeLog muse.texi 2005-09-09 15:12:05 GMT Michael Olson patch-230 Summary: Hack on documentation. The release is in sight! Revision: muse--main--1.0--patch-230 * muse.texi: Use @subsubheading for all logical split headers rather than @emph. Move all examples against left margin. Add comments to indicate what still needs to be done. (DocBook): Correct a few misspelled variable names and add some new variables. (Common Elements): Split this into 4 new subsections. modified files: ChangeLog muse.texi 2005-09-08 16:50:53 GMT Michael Olson patch-229 Summary: Fix publishing of stuff like <>. Revision: muse--main--1.0--patch-229 * lisp/muse-publish.el (muse-publish-escape-specials): Use `insert-before-markers' rather than `insert'. This should fix strange edge cases like <>. Thanks to Trent Buck for the report. modified files: ChangeLog lisp/muse-publish.el 2005-09-08 16:24:11 GMT Michael Olson patch-228 Summary: Update NEWS, fix muse-url-protocols customization interface. Revision: muse--main--1.0--patch-228 * lisp/muse-protocols.el (muse-url-protocols): Add customize choice for using nil as the resolve function. * NEWS: Bring up-to-date. modified files: ChangeLog NEWS lisp/muse-protocols.el 2005-09-05 17:34:31 GMT Michael Olson patch-227 Summary: Fix title coloring bug; muse-latex: escape '<' and '>'. Revision: muse--main--1.0--patch-227 * lisp/muse-colors.el (muse-colors-markup): Match against the space after #title. This should prevent a rather nasty bug. Thanks to John Sullivan for the report. * lisp/muse-latex.el (muse-latex-markup-specials): Mark up '_' as "\textunderscore{}". Add escaping for '<' and '>'. Thanks to Trent Buck. modified files: ChangeLog lisp/muse-colors.el lisp/muse-latex.el 2005-09-05 16:49:35 GMT Michael Olson patch-226 Summary: muse-latex: Handle special characters in a better way. Revision: muse--main--1.0--patch-226 * lisp/muse-latex.el (muse-latex-markup-regexps): Remove special characters hack. (muse-latex-markup-strings): Use \\texttt{...} for 'begin-literal and 'end-literal. Thanks to Trent Buck for the suggestion. (muse-latex-markup-specials): Move special characters here instead of using the regexp. modified files: ChangeLog lisp/muse-latex.el 2005-09-05 14:25:37 GMT Michael Olson patch-225 Summary: muse-latex: Fix compiler warning. Revision: muse--main--1.0--patch-225 * lisp/muse-latex.el (muse-latex-pdf-generate): Provide 3rd argument for format. modified files: ChangeLog lisp/muse-latex.el 2005-09-05 14:24:22 GMT Michael Olson patch-224 Summary: Add tag. Revision: muse--main--1.0--patch-224 * lisp/muse-colors.el (muse-colors-tags): Switch coloring of code and verbatim. Verbatim makes text literal and escaped, code makes text teletype and escaped. * muse-publish.el (muse-publish-markup-tags): Add "code". (muse-publish-code-tag): New function that publishes code the same way as =teletyped= text. modified files: ChangeLog lisp/muse-colors.el lisp/muse-publish.el 2005-09-05 13:24:19 GMT Michael Olson patch-223 Summary: Strip text properties before browsing a URL. Revision: muse--main--1.0--patch-223 * lisp/muse-protocols.el (muse-browse-url): Strip text properties. Maybe this will fix a bug. modified files: ChangeLog lisp/muse-protocols.el 2005-09-05 05:12:07 GMT Michael Olson patch-222 Summary: muse-latex: Call pdflatex twice to get published. Revision: muse--main--1.0--patch-222 * lisp/muse-latex.el (muse-latex-pdf-generate): Quote arguments. Call pdflatex twice, since this seems to be necessary to get published. Thanks to Trent Buck for the heads up. I wonder if we need to call it three times, since this is what John originally did. Can someone please give me advice about this? modified files: ChangeLog lisp/muse-latex.el 2005-09-04 17:07:07 GMT Michael Olson patch-221 Summary: Make info:// and man:// not publish a link, handle insert URL edge case. Revision: muse--main--1.0--patch-221 * lisp/muse-protocols.el (muse-url-protocols): info:// and man:// should publish only the description, not the URL. * lisp/muse-publish.el (muse-publish-insert-url): Handle case where we get nil from muse-publish-url by not inserting any text. modified files: ChangeLog lisp/muse-protocols.el lisp/muse-publish.el 2005-09-04 17:02:21 GMT Michael Olson patch-220 Summary: If a URL has a resolve function of nil, publish the description only. Revision: muse--main--1.0--patch-220 * lisp/muse-mode.el (muse-visit-link-default): Make sure we search for a complete tag. * lisp/muse-protocols.el (muse-url-protocols): Improve customization interface. (muse-resolve-url): If nil is given as the resolve function, return nil. * lisp/muse-publish.el (muse-publish-url): If the URL resolves as nil, insert the description instead of the original URL. modified files: ChangeLog lisp/muse-mode.el lisp/muse-protocols.el lisp/muse-publish.el 2005-09-02 22:57:04 GMT Michael Olson patch-219 Summary: Implement protocol handling. Revision: muse--main--1.0--patch-219 * lisp/muse-mode.el (muse-mode): Call muse-update-url-regexp. Maybe I should just make a hook for this stuff. (muse-visit-link-default): Call muse-browse-url instead of browse-url. * lisp/muse-protocols.el: New file that implements protocol handling. * lisp/muse-publish.el (muse-publish-url-transforms): Add muse-resolve-url. (muse-publish-markup-url): Indentation fix, no func change. * lisp/muse-regexps.el (muse-url-regexp): Move to muse-protocols.el. * lisp/muse.el: Require muse-protocols. new files: lisp/.arch-ids/muse-protocols.el.id lisp/muse-protocols.el modified files: ChangeLog lisp/muse-mode.el lisp/muse-publish.el lisp/muse-regexps.el lisp/muse.el 2005-09-01 16:11:57 GMT Michael Olson patch-218 Summary: muse-xml: Use a more standard sort of header. Revision: muse--main--1.0--patch-218 * experimental/muse-xml.el (muse-xml-header): Use instead of , as suggested by Brad Collins. modified files: ChangeLog experimental/muse-xml.el 2005-09-01 16:04:32 GMT Michael Olson patch-217 Summary: Add schema for muse-xml, tweak verse formatting, fix goof from last patch. Revision: muse--main--1.0--patch-217 * AUTHORS: Note that Brad Collins authored examples/muse-rnc. * README (examples): Mention that other files are here as well. * examples/muse-rnc.el: New file that implements a RelaxNG Compact schema for use with muse-xml.el. * muse-xml.el: Mention the newly-contributed schema from Brad, and that muse-xml is in experimental status. (muse-xml-markup-regexps): Correct table-munging regexp. (muse-xml-markup-strings): Surround each verse line with . Empty lines are marked up as . * muse-html.el (muse-html-markup-strings, muse-xhtml-markup-strings): s/last-stanza-end/end-last-stanza-line/. * muse-mode.el (muse-visit-link-default): Make the temporary file visiting work as expected. * muse-publish.el (muse-publish-markup-verse): Make use of 'begin-verse-line and 'begin-last-stanza-line. Use 'end-last-stanza-line instead of 'last-stanza-end. * muse.texi (Verse): Be a bit more clever with our example. new files: examples/.arch-ids/muse.rnc.id examples/muse.rnc modified files: AUTHORS ChangeLog README experimental/muse-xml.el lisp/muse-html.el lisp/muse-mode.el lisp/muse-publish.el muse.texi 2005-09-01 13:42:15 GMT Michael Olson patch-216 Summary: Allow links to temporary files to be visited. Revision: muse--main--1.0--patch-216 * lisp/muse-mode.el (muse-visit-link-default): Permit visiting of temporary files. These are buffers that do not have a corresponding file. modified files: ChangeLog lisp/muse-mode.el 2005-09-01 11:41:14 GMT Michael Olson patch-215 Summary: Fix save-match-data gaffe. Revision: muse--main--1.0--patch-215 * lisp/muse-regexps.el (muse-regexp-emacs-revision): Move save-match-data outside of `and' statement. modified files: ChangeLog lisp/muse-regexps.el 2005-08-31 03:48:28 GMT Michael Olson patch-214 Summary: Introduce :link-suffix. muse-wiki: Don't mangle acronyms in titles. Revision: muse--main--1.0--patch-214 * examples/mwolson/muse-init.el: Update. * muse-blosxom.el ("blosxom-html", "blosxom-xhtml"): Use :link-suffix to ensure that links to other pages in this project are given the proper extension. * muse-latex.el ("pdf", "pdfcjk"): Ditto. * muse-journal.el (muse-journal-rdf-header): Use muse-publish-link-name instead of muse-publish-output-name. * muse-publish.el (muse-publish-link-name, muse-publish-link-file): New functions that consult the :link-suffix when returning the name of the link (or the complete file name for the latter function). If :link-suffix does not exist, use :suffix. This should help Muse be able to handle some more usage scenarios. (muse-publish-prepare-url): Use muse-publish-link-name instead of muse-publish-output-name. * muse-wiki.el (muse-wiki-resolve-project-page): Use muse-publish-link-file instead of muse-publish-output-file. (muse-wiki-publish-pretty-title): Don't space-separate capitalized letters. The old behavior was not friendly to acronyms. modified files: ChangeLog examples/mwolson/muse-init.el lisp/muse-blosxom.el lisp/muse-journal.el lisp/muse-latex.el lisp/muse-publish.el lisp/muse-wiki.el 2005-08-29 06:14:35 GMT Michael Olson patch-213 Summary: Correct the publish-project example. Revision: muse--main--1.0--patch-213 * examples/publish-project: Remove "-l muse-build.el" and note that the user's muse-init.el file should add the Muse directories to load-path. modified files: ChangeLog examples/publish-project 2005-08-29 06:04:51 GMT Michael Olson patch-212 Summary: Reinstate former extended character class rules. Revision: muse--main--1.0--patch-212 * lisp/muse-regexps.el (muse-regexp-use-character-classes): Looks like extended regexps really don't work well on Emacs 21.2 or 21.3, so document that. (muse-regexp-emacs-revision): New variable that indicates the revision number of this version of Emacs. (muse-extreg-usable-p): Reinstate old rules -- Emacs 21.2 and 21.3 aren't working well enough with extended character classes in regexps. * lisp/muse.el (muse-version): If INSERT option is given, insert the text instead of just displaying it. modified files: ChangeLog lisp/muse-regexps.el lisp/muse.el 2005-08-28 23:59:03 GMT Michael Olson patch-211 Summary: Fix paragraph-filling breakage in Emacs21. Revision: muse--main--1.0--patch-211 * lisp/muse-mode.el (muse-mode): Check explicitly for Emacs21 rather than relying on muse-extreg-usable-p. Thanks to Sergey Vlasov for the bug report. modified files: ChangeLog lisp/muse-mode.el 2005-08-27 02:25:35 GMT Michael Olson patch-210 Summary: Allow Emacs 21.3 to use extended character classes in regexps. Revision: muse--main--1.0--patch-210 * lisp/muse-regexps.el (muse-extreg-usable-p): Use a simpler algorithm. Since enough positive reports have come in about the usability of 21.3, we'll allow it to use extended character classes in regexps by default. modified files: ChangeLog lisp/muse-regexps.el 2005-08-26 14:48:08 GMT Michael Olson patch-209 Summary: Don't prompt unnecessarily when doing C-c C-t in a Muse project file. Revision: muse--main--1.0--patch-209 * lisp/muse-publish.el (muse-publish-get-output-dir): Use `muse-read-directory-name' instead of `read-file-name'. Now Muse won't offer the style and directory prompt when you hit C-c C-t in a file belonging to a defined Muse project. Otherwise prompt. Thanks to Yann Hodique for the fix. * lisp/muse.el (muse-read-directory-name): New function that defines a fallback version of `read-directory-name', since Emacs21 doesn't have it. modified files: ChangeLog lisp/muse-publish.el lisp/muse.el 2005-08-25 05:44:56 GMT Michael Olson patch-208 Summary: Fix problem with links at beginning of buf and paragraphs. Revision: muse--main--1.0--patch-208 * experimental/muse-xml.el (muse-xml-markup-regexps): Update to do what I mean. * muse-docbook.el (muse-docbook-markup-regexps): Ditto. * muse-html.el (muse-html-markup-regexps): Ditto. * muse-publish.el (muse-publishing-last-position): New variable that indicates our last buffer position while publishing the current rule. Used to make sure the process doesn't get stalled. (muse-publish-markup): Fix edge case where links at beginning of buffer, with read-only text, would prevent the beginning of buffer from being matched. (muse-publish-markup-directive): Fix case where two directives of the same size would prevent any following directives from being interpreted. We accomplish this by setting the last published position to nil after each directive. modified files: ChangeLog experimental/muse-xml.el lisp/muse-docbook.el lisp/muse-html.el lisp/muse-publish.el 2005-08-24 03:45:13 GMT Michael Olson patch-207 Summary: Document publishing directives. Revision: muse--main--1.0--patch-207 * muse.texi (Getting Started): Remove crufty sentence. (Directives): New section that describes the likes of #title and #author. modified files: ChangeLog muse.texi 2005-08-23 04:36:54 GMT Michael Olson patch-206 Summary: Document WikiNames and update header publishing information. Revision: muse--main--1.0--patch-206 * muse.texi (Headings): Any level of headings is supported. (Emphasizing Text): Verbatim text may span multiple lines. (Explicit Links): Refactor Links section into Explicit Links, Implicit Links, and Images. (Implicit Links): Document WikiNames and InterWiki links. modified files: ChangeLog muse.texi 2005-08-22 20:37:10 GMT Michael Olson patch-205 Summary: Finish NEWS, handle emphasis at EOF edge case. Revision: muse--main--1.0--patch-205 * lisp/muse-colors.el (muse-colors-emphasized, muse-colors-underlined) (muse-colors-verbatim): Highlight emphasis at the end of file, as long as there is a terminating emphasis delimiter. * examples/mwolson/muse-init.el: Sync with my latest configuration. * NEWS: Bring this up to date. modified files: ChangeLog NEWS examples/mwolson/muse-init.el lisp/muse-colors.el 2005-08-19 16:55:39 GMT Michael Olson patch-204 Summary: muse-html: Add muse-xhtml-extension. Revision: muse--main--1.0--patch-204 * lisp/muse-html.el (muse-xhtml-extension): New option that specifies the default file extension for publishing XHTML files. Thanks to Trent Buck for the suggestion. ("xhtml"): Use it. modified files: ChangeLog lisp/muse-html.el 2005-08-19 16:24:08 GMT Michael Olson patch-203 Summary: Add items through patch-149 to NEWS. Revision: muse--main--1.0--patch-203 * NEWS (progress): Catch up to patch-149. * lisp/muse-mode.el (muse-mode): Remove spurious comment. * lisp/muse-publish.el (muse-publish): Ditto. modified files: ChangeLog NEWS lisp/muse-mode.el lisp/muse-publish.el 2005-08-18 06:53:31 GMT Michael Olson patch-202 Summary: Make building of Debian revisions work. Revision: muse--main--1.0--patch-202 * Makefile (distclean): Don't remove anything in debian/, since it will never be necessary. (debclean): Removed, since two different targets need slightly different versions of this. Even abstraction has its limits. (debbuild): New target that takes care of performing the build itself. (debrevision): New target that makes a revision build, where the original tarball must not be modified. (debrevision): Split out building stuff to debbuild target. * debian/changelog: Several revisions worth of Debian fun. * debian/control (Build-Depends-Indep): Add emacs21 | emacsen. (Description): Make this match the ITP and shorten the text. modified files: ChangeLog Makefile Makefile.defs debian/changelog debian/control 2005-08-14 07:10:16 GMT Michael Olson patch-201 Summary: Prepare initial upload for Debian project. Revision: muse--main--1.0--patch-201 * Makefile.defs (LASTUPLOAD): Mark as the previous Debian package version, since we only want the last changelog entry to appear on the initial Debian upload. * debian/changelog: New Debian package 3.01.arch.201-1. modified files: ChangeLog Makefile.defs debian/changelog 2005-08-13 05:05:41 GMT Michael Olson patch-200 Summary: muse-mode: Minor regexp tweak. Revision: muse--main--1.0--patch-200 * lisp/muse-mode.el (muse-mode): Use \\s- instead of [[:blank:]]. modified files: ChangeLog lisp/muse-mode.el 2005-08-13 00:25:54 GMT Michael Olson patch-199 Summary: Minor fixups from Peter K. Lee. Revision: muse--main--1.0--patch-199 * experimental/muse-xml.el (muse-xml-fixup-tables): Be slightly less restrictive with our end-of-table regexp. * lisp/muse-docbook.el (muse-docbook-fixup-tables): Look for tgroup instead of start of table. Be less restrictive with several of our regexps. * lisp/muse-html.el: Patch from Peter K. Lee. (muse-html-prepare-buffer): Work around edge case where the "charset=" part has already been appended to muse-html-meta-content-type. (muse-html-fixup-tables): Be slightly less restrictive with our end-of-table regexp. modified files: ChangeLog experimental/muse-xml.el lisp/muse-docbook.el lisp/muse-html.el 2005-08-12 20:36:10 GMT Michael Olson patch-198 Summary: Keep lists from getting mashed together on M-q. Revision: muse--main--1.0--patch-198 * lisp/muse-mode.el (muse-mode): Handle footnotes. Set `paragraph-start' locally so that lists don't get blended together incorrectly upon hitting M-q. modified files: ChangeLog lisp/muse-mode.el 2005-08-12 01:29:58 GMT Michael Olson patch-197 Summary: QuickStart: Minor typo in anchor example. Revision: muse--main--1.0--patch-197 * examples/QuickStart (Anchors and tagged links): Link to an anchor only, rather than a full URL. modified files: ChangeLog examples/QuickStart 2005-08-09 23:15:10 GMT Michael Olson patch-196 Summary: Makefile: Use BUILDOPTS. Revision: muse--main--1.0--patch-196 * Makefile (debrelease): Make use of $(BUILDOPTS). * Makefile.defs (BUILDOPTS): New option that allows additional options to be passed to dpkg-buildpackage. In case I ever make several revisions before getting the -1 revision uploaded, for example, I can use "-sa" here in order to make a valid pacakge. modified files: ChangeLog Makefile Makefile.defs 2005-08-09 22:39:09 GMT Michael Olson patch-195 Summary: Make generated Debian packages slightly easier to upload. Revision: muse--main--1.0--patch-195 * debian/changelog: Generate 3.01.arch.195-1. * debian/rules (clean): Call $(MAKE) realclean instead of $(MAKE) clean. * Makefile.defs (LASTUPLOAD): New variable that indicates the version that was last uploaded to Debian. * Makefile (debrelease): Use $(LASTUPLOAD) to ensure that a full set of changes is generated. This means we have to use dpkg-buildpackage, since debuild doesn't recognize the environment variables that it claims to recognize. modified files: ChangeLog Makefile Makefile.defs debian/changelog debian/rules 2005-08-09 04:01:52 GMT Michael Olson patch-194 Summary: Makefile: Minor deletion cleanups. Revision: muse--main--1.0--patch-194 modified files: ChangeLog Makefile 2005-08-09 03:26:50 GMT Michael Olson patch-193 Summary: Compilation cleanups. Revision: muse--main--1.0--patch-193 * lisp/muse-mode.el (muse-mode): Use `make-local-variable' instead of `make-variable-buffer-local' in order to silence compiler warnings. * lisp/muse.el: Add an eval-when-compile line to silence a compiler warning. * scripts/muse-build.el (muse-elint-files): Automatically load every elisp file rather than specifying each one. modified files: ChangeLog lisp/muse-mode.el lisp/muse.el scripts/muse-build.el 2005-08-08 22:58:24 GMT Michael Olson patch-192 Summary: Fix failure to resolve interwiki link when clicking on it. Revision: muse--main--1.0--patch-192 * Makefile (debclean): Minor tweak. * lisp/muse-mode.el (muse-visit-link-default): Indentation fix. No func change. * lisp/muse-project.el (muse-project-find-file): Don't add file extensions to a relative name. If we're dealing with a file, open it up without searching through the various projects for a path. This should fix the failure to resolve an interwiki link by clicking on it. modified files: ChangeLog Makefile lisp/muse-mode.el lisp/muse-project.el 2005-08-06 17:39:45 GMT Michael Olson patch-191 Summary: Makefile: Remove stale Debian packages for this version. Revision: muse--main--1.0--patch-191 * Makefile (debclean): Remove generated Debian packages for the current version in parent directory. modified files: ChangeLog Makefile 2005-08-03 04:34:50 GMT Michael Olson patch-190 Summary: Fix trailing backslash error. Revision: muse--main--1.0--patch-190 * lisp/muse-project.el (muse-project-of-file): Apply 1-line regexp-quoting fix from drkm. modified files: ChangeLog lisp/muse-project.el 2005-07-27 07:43:53 GMT Michael Olson patch-189 Summary: Release 3.01.91 (3.02 RC2). Revision: muse--main--1.0--patch-189 * lisp/muse.el (muse-version): Release 3.01.91 (3.02 RC2). modified files: ChangeLog Makefile.defs lisp/muse.el muse.texi 2005-07-27 07:40:03 GMT Michael Olson patch-188 Summary: Escape email address and URL always. Revision: muse--main--1.0--patch-188 * lisp/muse-publish.el (muse-publish-markup-email): Move lower. Always escape and publish email address as read-only, even when it's not marked up. (muse-publish-markup-url): Ditto for URL. modified files: ChangeLog Makefile.defs debian/changelog lisp/muse-publish.el 2005-07-26 08:49:38 GMT Michael Olson patch-187 Summary: Inter-project output name fix. Revision: muse--main--1.0--patch-187 * lisp/muse-wiki.el (muse-wiki-resolve-project-page): I would've sworn that I had fixed this before. modified files: ChangeLog lisp/muse-wiki.el 2005-07-26 08:40:11 GMT Michael Olson patch-186 Summary: Make coloring of verbatim greater-than sign same as publishing. Revision: muse--main--1.0--patch-186 * lisp/muse-colors.el (muse-colors-markup): Since we currently publish a greater-than sign surrounded by equal signs, display it in verbatim face. modified files: ChangeLog lisp/muse-colors.el 2005-07-26 08:03:41 GMT Michael Olson patch-185 Summary: Allow transform function for link descriptions. Bare email and URL fixes. Revision: muse--main--1.0--patch-185 * lisp/muse-publish.el (muse-publish-url-transforms): Docfix. (muse-publish-desc-transforms): New option that contains the functions that will be called to transform a link description. (muse-publish-markup-word): Handle Yet Another Edge Case. (muse-publish-markup-email): Use `muse-publish-escape-specials-in-string'. Don't publish if we have a double-quote on either side. (muse-publish-url): Apply description transforms. (muse-publish-markup-url): Don't publish if we have a double-quote on either side. * lisp/muse-wiki.el (muse-wiki-update-wikiword-regexp) (muse-wiki-wikiword-regexp, muse-wiki-use-wikiword): Minor docfixes. (muse-wiki-interwiki-delimiter): New option that indicates the interwiki delimiter to use. (muse-wiki-interwiki-replacement): New option that indicates the replacement (muse-wiki-update-interwiki-regexp): Use muse-wiki-interwiki-delimiter. (muse-wiki-publish-pretty-title): Deal with EXPLICIT argument so that this can be added to muse-publish-desc-transforms. (muse-wiki-publish-pretty-interwiki): New function that replaces the interwiki delimiter with its replacement, but only when the given text is not an explicit link. * lisp/muse.el (muse-update-file-extension): New function made from the innards of the :set function in `muse-file-extension'. modified files: ChangeLog lisp/muse-publish.el lisp/muse-wiki.el lisp/muse.el 2005-07-26 06:17:31 GMT Michael Olson patch-184 Summary: Handle anchors in all publishing styles, as well as linking to them. Revision: muse--main--1.0--patch-184 * lisp/muse-publish.el (muse-publish-url): Publish links to anchors as 'internal-link. (muse-publish-prepare-url): Don't touch links to anchors. * lisp/muse-docbook.el (muse-docbook-markup-strings): Add handler for 'internal-link. Treat centered text with .... (muse-docbook-markup-paragraph): Slight regexp tweak. (muse-docbook-insert-anchor): Docfix. (muse-docbook-markup-anchor): Move lower in file. * lisp/muse-html.el (muse-html-markup-strings): Add handler for 'internal-link. (muse-xhtml-markup-strings): Order list, no func change. (muse-html-markup-anchor): Move up in file, no func change. * lisp/muse-latex.el (muse-latex-markup-functions): Add rule for publishing anchors. (muse-latex-markup-strings): Add handler for 'internal-link. (muse-latex-insert-anchor, muse-latex-markup-anchor): New functions that insert an anchor around the next word or inside of a tag. * lisp/muse-texinfo.el (muse-texinfo-markup-functions): Add rule for publishing anchors. * lisp/muse-texinfo.el (muse-texinfo-markup-strings): Add handler for 'internal-link. (muse-texinfo-insert-anchor, muse-texinfo-markup-anchor): New functions that insert an anchor before the next word or within a tag. * NEWS: Initial attempt at documenting changes since 3.01. new files: .arch-ids/NEWS.id NEWS modified files: ChangeLog lisp/muse-docbook.el lisp/muse-html.el lisp/muse-latex.el lisp/muse-publish.el lisp/muse-texinfo.el 2005-07-26 04:30:52 GMT Michael Olson patch-183 Summary: Generalize some blosxom helper functions. Revision: muse--main--1.0--patch-183 * examples/mwolson/muse-init.el (muse-project-alist): Adapt to new generalized helper functions. (my-muse-prepare-entry-for-xanga): Use muse-blosxom-extension rather than hard-coding it. Use muse-with-temp-buffer. Handle all kinds of relative links. * lisp/muse-blosxom.el: Update example in header. (muse-blosxom-new-entry): Use new names for helper functions. (muse-blosxom-get-categories, muse-blosxom-project-alist-entry) (muse-blosxom-project-alist-dirs): Move to muse-project.el. * lisp/muse-project.el (muse-project-recurse-directory): Renamed from `muse-blosxom-project-get-categories'. (muse-project-alist-styles): Renamed from `muse-blosxom-project-alist-entry'. (muse-project-alist-dirs): Renamed from `muse-blosxom-project-alist-dirs'. (muse-project-of-file): Use `muse-current-file'. * lisp/muse-wiki.el (muse-wiki-resolve-project-page): Use `muse-current-file'. * lisp/muse.el (muse-current-file): New function that returns the name of the currently visited or published file. (muse-page-name): Use `muse-current-file'. modified files: ChangeLog examples/mwolson/muse-init.el lisp/muse-blosxom.el lisp/muse-project.el lisp/muse-wiki.el lisp/muse.el 2005-07-26 03:47:53 GMT Michael Olson patch-182 Summary: muse-xml: definition lists, muse-docbook: center. Revision: muse--main--1.0--patch-182 * Makefile (%.info, %.html): Use general argument in rule. (distclean): Add another cruft file. * experimental/muse-xml.el (muse-xml-markup-strings): Use for definition lists. * lisp/muse-docbook.el (muse-docbook-markup-strings): Replace

    with , since it's the closest thing I could find. modified files: ChangeLog Makefile experimental/muse-xml.el lisp/muse-docbook.el 2005-07-24 22:46:22 GMT Michael Olson patch-181 Summary: Minor namespace fix. Revision: muse--main--1.0--patch-181 * lisp/muse-colors.el (muse-colors-explicit-link): Use muse-match-string-no-properties rather than match-string-no-properties. modified files: ChangeLog lisp/muse-colors.el 2005-07-24 21:04:15 GMT Michael Olson patch-180 Summary: Correct breakage induced by previous patch. Revision: muse--main--1.0--patch-180 * lisp/muse-wiki.el (muse-wiki-resolve-project-page): Don't use the local path as a fallback if we are publishing. modified files: ChangeLog lisp/muse-wiki.el 2005-07-24 21:01:02 GMT Michael Olson patch-179 Summary: Make interwiki links work in a few more edge cases. Revision: muse--main--1.0--patch-179 * lisp/muse-project.el (muse-project-applicable-styles): Remove assertion, now that I have a good idea of the edge cases involved. * lisp/muse-wiki.el (muse-wiki-resolve-project-page): Handle case where the current file is not part of any Muse project, allowing interwiki links to be resolvable even then. Don't return a relative path if we are not publishing. For visiting links, the best thing is just to return the real path. modified files: ChangeLog lisp/muse-project.el lisp/muse-wiki.el 2005-07-24 03:38:06 GMT Michael Olson patch-178 Summary: Fix warnings during font-lock, example tag highlighting. Revision: muse--main--1.0--patch-178 * lisp/muse-colors.el (muse-colors-region): Prevent "Wrong side of point" error. (muse-colors-tags): Make sure that no fontification occurs in or tags. (muse-unhighlight-region): Move higher up. (muse-colors-example-tag, muse-colors-literal-tag): Use `muse-unhighlight-region'. Fix spelling goof. Omit (goto-char end) since the point gets put in the right place automatically. modified files: ChangeLog lisp/muse-colors.el 2005-07-24 03:01:50 GMT Michael Olson patch-177 Summary: muse-xml: Separate section from title. Revision: muse--main--1.0--patch-177 * experimental/muse-xml.el (muse-xml-markup-strings): Add "level" attribute to sections. Use separate tag to handle the title of a section. Thanks to drkm for the suggestion. * lisp/muse-mode.el (muse-mode): Code indentation, no func change. * lisp/muse-publish.el (muse-publish-markup-heading) (muse-publish-section-close): Pass level to markup strings for all section-related tags. * lisp/muse.el (muse-page-name): Handle case where buffer-file-name is not defined. modified files: ChangeLog experimental/muse-xml.el lisp/muse-mode.el lisp/muse-publish.el lisp/muse.el 2005-07-23 01:29:29 GMT Michael Olson <mwolson@gnu.org> patch-176 Summary: Include regexps from base styles. Fix muse-project-ignore-regexp and use it more. Revision: muse--main--1.0--patch-176 * lisp/muse-blosxom.el (muse-blosxom-get-categories): Don't include folders that match `muse-project-ignore-regexp'. * lisp/muse-project.el (muse-project-ignore-regexp): Correct an escape omission. Add ",.*" to list of bad directory parts. * lisp/muse-project.el (muse-project-of-file): Ignore PATHNAME if it matches `muse-project-ignore-regexp'. * lisp/muse-publish.el: Install patch from Peter K. Lee. (muse-style-elements-list): New function that returns a list of references to ELEM in STYLE, including base styles. (muse-publish-markup-region): Use muse-style-elements-list rather than muse-style-elements when getting :regexps. * lisp/muse-publish.el (muse-style-element): Add docstring. modified files: AUTHORS ChangeLog lisp/muse-blosxom.el lisp/muse-project.el lisp/muse-publish.el 2005-07-23 00:21:36 GMT Michael Olson <mwolson@gnu.org> patch-175 Summary: Initial implementation of muse-xml.el. End of section edge case. Revision: muse--main--1.0--patch-175 * AUTHORS: Add Peter K. Lee. * Makefile (experimental): New target that builds experimental programs. (distclean): Remove debian/dirs, a cruft file from the debian build process. * examples/mwolson/muse-init.el: Update. * examples/mwolson/muse-init.el ("\C-cpL"): Use a better function that prompts for the blog entry to visit. * experimental/Makefile: New file that causes experimental stuff to be built. * experimental/muse-xml.el: New file that provides the experimental XML publishing style. * lisp/muse-docbook.el (muse-docbook-markup-regexps): Re-order and fix comment strings. * lisp/muse-html.el (muse-html-markup-regexps): Ditto. * lisp/muse-publish.el (muse-publish-section-close): Deal with edge case involving end-of-file and paragraph detection. * lisp/muse-wiki.el: Minor header fix. * scripts/muse-build.el (load-path): Add "../experimental". new files: experimental/.arch-ids/Makefile.id experimental/.arch-ids/muse-xml.el.id experimental/Makefile experimental/muse-xml.el modified files: AUTHORS ChangeLog Makefile examples/mwolson/muse-init.el lisp/muse-docbook.el lisp/muse-html.el lisp/muse-publish.el lisp/muse-wiki.el scripts/muse-build.el 2005-07-22 07:30:43 GMT Michael Olson <mwolson@gnu.org> patch-174 Summary: Try to fix <example> region coloring problem. Revision: muse--main--1.0--patch-174 * lisp/muse-colors.el (muse-colors-example-tag, muse-colors-literal-tag): If region is multiple lines, add '(font-lock-multiline t) to properties. This should fix an annoying <example> region issue. modified files: ChangeLog lisp/muse-colors.el 2005-07-22 07:19:30 GMT Michael Olson <mwolson@gnu.org> patch-173 Summary: Don't publish implicit links that have a double-quote at begin or end. Revision: muse--main--1.0--patch-173 * lisp/muse-colors.el (muse-colors-implicit-link): Don't colorize if a double-quote exists at beginning or end. * lisp/muse-publish.el (muse-publish-markup-link): When link is implicit, don't colorize if a double-quote exists at beginning or end. modified files: ChangeLog lisp/muse-colors.el lisp/muse-publish.el 2005-07-22 06:42:10 GMT Michael Olson <mwolson@gnu.org> patch-172 Summary: Fix failure to publish emphasis properly. Revision: muse--main--1.0--patch-172 * lisp/muse-publish.el (muse-publish-markup-word): Darn off-by-one errors. * experimental/muse-wiki-old.el: Removed, since I'm happy with the state of muse-wiki. removed files: experimental/.arch-ids/muse-wiki-old.el.id experimental/muse-wiki-old.el modified files: ChangeLog lisp/muse-publish.el 2005-07-22 04:55:52 GMT Michael Olson <mwolson@gnu.org> patch-171 Summary: Add a few common revision control directories to the ignore list. Revision: muse--main--1.0--patch-171 * lisp/muse-project.el (muse-project-ignore-regexp): Add types of directories to be ignored when building the file alist, such as those used for CVS and Arch revision control data. modified files: ChangeLog lisp/muse-project.el 2005-07-21 01:00:25 GMT Michael Olson <mwolson@gnu.org> patch-170 Summary: Fix #2654: Append a newline when using pdf publishing style. Revision: muse--main--1.0--patch-170 * lisp/muse-latex.el (muse-latex-footer, muse-latexcjk-footer): Append a newline to the end. modified files: ChangeLog lisp/muse-latex.el 2005-07-20 20:20:24 GMT Michael Olson <mwolson@gnu.org> patch-169 Summary: 5 levels of headings colorization; color bare URLs. Revision: muse--main--1.0--patch-169 * lisp/muse-colors.el (muse-colors-emphasized, muse-colors-markup): Really color up to 5 headings. (muse-colors-markup): Add muse-url-regexp. (muse-colors-explicit-link): Renamed from muse-colors-link. (muse-colors-implicit-link): Moved here from `muse-wiki-colors-wikiword' in muse-wiki.el. We need it here since we'll be coloring URLs. modified files: ChangeLog lisp/muse-colors.el lisp/muse-wiki.el 2005-07-20 19:45:15 GMT Michael Olson <mwolson@gnu.org> patch-168 Summary: Don't emphasize if a word constituent follows the trailer. Revision: muse--main--1.0--patch-168 * lisp/muse-colors.el (muse-colors-emphasized, muse-colors-underlined) (muse-colors-verbatim): Don't colorize if a word constituent follows the trailer. * lisp/muse-publish.el (muse-publish-markup-word): Don't publish if a word constituent follows the trailer. modified files: ChangeLog lisp/muse-colors.el lisp/muse-publish.el 2005-07-20 18:50:12 GMT Michael Olson <mwolson@gnu.org> patch-167 Summary: Add coloring for example, verbatim, and =signs=; anchor fix. Revision: muse--main--1.0--patch-167 * lisp/muse-colors.el (muse-verbatim-face): New face that is used to color <example>, <verbatim>, and =signs=. Defaults to a shade of gray. (muse-colors-verbatim): Use `muse-verbatim-face'. (muse-colors-markup): Move =sign= interpreting down so it gets higher priority. (muse-colors-tags): Add verbatim and literal tags. (muse-colors-example-tag): Use `remove-text-properties' instead of `set-text-properties', since the latter does not work consistently. (muse-colors-literal-tag): New function that strips all markup from the region. (muse-colors-link): Match against muse-explicit-link-regexp early on so that we can work around an annoying XEmacs issue. * lisp/muse-publish.el (muse-publish-markup-word): Make =signs= multi-line by default. * lisp/muse.el (muse-page-name): Handle case where we're given an empty string. modified files: ChangeLog lisp/muse-colors.el lisp/muse-publish.el lisp/muse.el 2005-07-20 16:13:37 GMT Michael Olson <mwolson@gnu.org> patch-166 Summary: Link with anchor bugfix. Revision: muse--main--1.0--patch-166 * lisp/muse-colors.el (muse-link-face): Highlight links with anchors as valid, as long as the base is valid. modified files: ChangeLog lisp/muse-colors.el 2005-07-20 14:21:57 GMT Michael Olson <mwolson@gnu.org> patch-165 Summary: Link inside table issue, fixes read-only text error. Revision: muse--main--1.0--patch-165 * lisp/muse-docbook.el (muse-docbook-fixup-tables): Ignore read-only text inside tables so we don't get an error when links exist. * lisp/muse-html.el (muse-html-fixup-tables): Ditto. * lisp/muse-project.el (muse-project-publish): Don't take forced files into account when displaying the "All files published" message, unless they've actually been modified. * lisp/muse.el (muse-with-temp-buffer): If debug-on-error is non-nil, don't wrap in condition-case; we don't want the message to be muffled. modified files: ChangeLog lisp/muse-docbook.el lisp/muse-html.el lisp/muse-project.el lisp/muse.el 2005-07-20 07:41:28 GMT Michael Olson <mwolson@gnu.org> patch-164 Summary: Permit infinitely-nested sections. Revision: muse--main--1.0--patch-164 * examples/QuickStart (Links): Use GNA link rather than johnw's site. (Deriving from an existing style): Mark up as a list. * lisp/muse-colors.el (muse-colors-outline-faces-list, muse-make-faces): Color an additional level of headings. * lisp/muse-docbook.el (muse-docbook-markup-strings): Add new section-other, section-other-end, and section-close strings. (muse-docbook-fixup-sections): Removed, since Muse now implements this through the 'section-close string. * lisp/muse-html.el (muse-xhtml-markup-strings): Omit newline from 'begin-underline, since this messes up paragraph handling. Use <h5></h5> for 'section-other. (muse-html-fixup-tables): New function that sorts the table parts so that order is head, foot, body. Apparently XHTML needs this, and it seems like a good general practice, so we do it for HTML as well. * lisp/muse-latex.el (muse-latex-markup-strings): Use \\paragraph{} for 'section-other. * lisp/muse-publish.el (muse-publish-section-close): New function that determines where to put the section close given heading depth and inserts it. (muse-publish-markup-heading): Handle 'section-other and 'section-other-end. Call `muse-publish-section-close' at end of function. * lisp/muse-texinfo.el (muse-texinfo-markup-strings): Use @subsubheading for 'section-other. modified files: ChangeLog examples/QuickStart lisp/muse-colors.el lisp/muse-docbook.el lisp/muse-html.el lisp/muse-latex.el lisp/muse-publish.el lisp/muse-texinfo.el 2005-07-20 05:50:55 GMT Michael Olson <mwolson@gnu.org> patch-163 Summary: muse-docbook: table and anchor fixes; many non-MULE XEmacs fixes. Revision: muse--main--1.0--patch-163 * lisp/muse-docbook.el: More suggestions from Dale Smith, and non-MULE XEmacs fixes. (muse-docbook-markup-regexps): Deal with new table algorithm. (muse-docbook-transform-content-type, muse-docbook-encoding) (muse-docbook-finalize-buffer): Non-MULE XEmacs fix. (muse-docbook-markup-table): Use a better table algorithm, based on the one in muse-html.el. Make sure a <tgroup> surrounds the body, head, and foot of the table. Use informaltable rather than table. (muse-docbook-fixup-tables): New function that sorts all tables found in the published document so that the order is head, foot, body. (muse-docbook-markup-functions): Add anchor handler. (muse-docbook-markup-paragraph): Allow anchors to occur at beginning of paragraph. (muse-docbook-markup-anchor, muse-docbook-insert-anchor): New functions that insert an anchor at point. * lisp/muse-html.el (muse-html-transform-content-type) (muse-html-encoding, muse-html-finalize-buffer): Non-MULE XEmacs fixes. * examples/QuickStart (Anchors and tagged links): Improve anchor example. * lisp/muse.el (muse-eval-lisp): XEmacs fix. * lisp/muse.el (muse-with-temp-buffer): XEmacs fix. Include the body that was evaluated in the output. modified files: ChangeLog examples/QuickStart lisp/muse-docbook.el lisp/muse-html.el lisp/muse-latex.el lisp/muse.el 2005-07-19 08:11:37 GMT Michael Olson <mwolson@gnu.org> patch-162 Summary: muse-texinfo: Improve formatting for enddots, dots, underline. Revision: muse--main--1.0--patch-162 * lisp/muse-texinfo.el (muse-texinfo-markup-strings): Improve translation of enddots and dots. For begin-underline and end-underline, use "_", since we don't have anything better. modified files: ChangeLog lisp/muse-texinfo.el 2005-07-19 07:51:54 GMT Michael Olson <mwolson@gnu.org> patch-161 Summary: muse-texinfo: Fix #2635 by adding `}' and `{' to specials list. Revision: muse--main--1.0--patch-161 * lisp/muse-texinfo.el (muse-texinfo-markup-specials): Add `{' and `}' to list. This should fix #2635. modified files: ChangeLog lisp/muse-texinfo.el 2005-07-19 07:24:38 GMT Michael Olson <mwolson@gnu.org> patch-160 Summary: muse-texinfo fixes; use info-pdf to generate PDF doc for QuickStart. Revision: muse--main--1.0--patch-160 * Makefile.defs (VERSION): Prepare snapshot 3.01.arch.160. * debian/changelog: Ditto. * debian/control (Build-Depends-Indep): Add tetex-bin. * examples/Makefile (%.pdf): Use info-pdf, since it generates nicer output for me. * examples/QuickStart: Remove stray <comment> now that the bug that made it necessary is fixed. * lisp/muse-blosxom.el: Credit Björn Lindström for his excellent suggestions. * lisp/muse-texinfo.el (muse-texinfo-header, muse-texinfo-footer): Move the contents from the footer to the header. * lisp/muse-texinfo.el (muse-texinfo-markup-table): Insert space before each number, not after. * lisp/muse.el (muse-eval-lisp): Minor whitespace fix. * lisp/muse.el (muse-with-temp-buffer): Throw a backtrace if an error happens when doing batch publishing. Minor whitespace fix. modified files: ChangeLog Makefile.defs debian/changelog debian/control examples/Makefile examples/QuickStart lisp/muse-blosxom.el lisp/muse-texinfo.el lisp/muse.el 2005-07-19 05:50:25 GMT Michael Olson <mwolson@gnu.org> patch-159 Summary: Handle a few more DocBook edge cases; all known DocBook issues are fixed. Revision: muse--main--1.0--patch-159 * examples/QuickStart: Add "Write me." to empty sections at end so that they publish correctly with DocBook. * lisp/muse-docbook.el (muse-docbook-markup-paragraph): Handle case where paragraph starts with emphasis, example, link, or email address. modified files: ChangeLog examples/QuickStart lisp/muse-docbook.el 2005-07-19 05:34:28 GMT Michael Olson <mwolson@gnu.org> patch-158 Summary: Handle embedded docbook footnotes and <literal> edge case. Revision: muse--main--1.0--patch-158 * lisp/muse-docbook.el: Implement more suggestions from Dale Smith. (muse-docbook-markup-strings): Use systemitem for example text. (muse-docbook-markup-paragraph): Allow for embedded footnotes that have <para></para> inside of them. * lisp/muse-html.el (muse-html-escape-string): Don't deal with '&<>"' here at all. * lisp/muse-publish.el (muse-publish-url-transforms): Add muse-publish-escape-specials-in-string to list by default. * lisp/muse-publish.el (muse-publish-escape-specials): New optional third argument IGNORE-READ-ONLY determines whether or not to ignore the read-only property when transforming text. Add docstring. (muse-publish-markup-word): Use non-nil third argument to muse-publish-escape-specials when we're publishing `='-delimited text. This allows =<literal><tag></literal>= to work as intended. * lisp/muse-publish.el (muse-publish-escape-specials-in-string): Ignore arguments after the first so that we can include this in `muse-publish-url-transforms'. * lisp/muse-publish.el (muse-publish-prepare-url): Add docstring. modified files: ChangeLog lisp/muse-docbook.el lisp/muse-html.el lisp/muse-publish.el 2005-07-19 03:07:59 GMT Michael Olson <mwolson@gnu.org> patch-157 Summary: Misc. blosxom fixes, like category directive. Revision: muse--main--1.0--patch-157 * contrib/pyblosxom/getstamps.py: Add file extension. * contrib/pyblosxom/hardcodedates.py (get_all_timestamps): Omit file extension. This will allow Muse to specify it once a timestamps-writing routine gets written. * lisp/muse-blosxom.el (muse-blosxom-update-page-date-alist): Pay attention to the "category" directive, if it exists. Use file-truename instead of expand-file-name for base directory. * lisp/muse-blosxom.el (muse-blosxom-new-entry): Add #category directive by default. * lisp/muse-project.el (muse-project): Add :timestamps to list of available tags, even though it doesn't do anything yet. modified files: ChangeLog contrib/pyblosxom/getstamps.py contrib/pyblosxom/hardcodedates.py lisp/muse-blosxom.el lisp/muse-project.el 2005-07-18 08:53:32 GMT Michael Olson <mwolson@gnu.org> patch-156 Summary: Small logic fix with temp files. Revision: muse--main--1.0--patch-156 * lisp/muse.el (muse-with-temp-buffer): Use buffer-live-p instead of buffer-name to determine whether the buffer is still around. modified files: ChangeLog lisp/muse.el 2005-07-18 08:23:00 GMT Michael Olson <mwolson@gnu.org> patch-155 Summary: Make customize of muse-project-alist work in Emacs21 and XEmacs. Revision: muse--main--1.0--patch-155 * lisp/muse.el (muse-widget-type-value-create) (muse-widget-child-value-get, muse-widget-type-match): Minimum set of extra widgets from 'lazy type that are needed to get the `muse-project-alist' customize interface to work on XEmacs and Emacs21. * lisp/muse.el (muse-implicit-link-functions) (muse-explicit-link-functions): Remove predefined wiki-related options. These are added in muse-wiki via custom-add-option. * lisp/muse-mode.el (muse-mode-hook): Ditto. * lisp/muse-colors.el (muse-colors-emphasized): Use eq instead of memq. * lisp/muse-project.el (muse-project-alist-get): Turn :symbols into ":strings" to cope with Emacs21 and XEmacs. (muse-project-alist-set): Turn ":strings" back into ":symbols". * lisp/muse-project.el (muse-project): Derive from 'default rather than 'lazy, since that is an Emacs CVS-ism. Separate logical groups with newlines. Control indentation. Remove an unnecessary inlined repeat. * lisp/muse-project.el (muse-project-alist): Use cons instead of alist, since XEmacs doesn't support the alist widget. Deal with case where no projects are defined, or a strange expression is used. * lisp/muse-wiki.el: Insinuate muse-wiki link handlers and mode hook stuff using custom-add-option. modified files: ChangeLog lisp/muse-colors.el lisp/muse-mode.el lisp/muse-project.el lisp/muse-wiki.el lisp/muse.el 2005-07-18 03:31:38 GMT Michael Olson <mwolson@gnu.org> patch-154 Summary: Don't kill temp buffer if debug-on-error is non-nil. Revision: muse--main--1.0--patch-154 * lisp/muse.el (muse-with-temp-buffer): Only kill the temp buffer when debug-on-error is nil. Use " *muse-temp*" for the buffer name. modified files: ChangeLog lisp/muse.el 2005-07-18 03:05:11 GMT Michael Olson <mwolson@gnu.org> patch-153 Summary: Expand Debian package description. Revision: muse--main--1.0--patch-153 * debian/control (Description): Expand this to make the package more enticing. * debian/copyright, debian/rules: Minor whitespace cleanups. * debian/changelog: Package 3.01.arch.152-1. modified files: ChangeLog Makefile.defs debian/changelog debian/control debian/copyright debian/rules 2005-07-18 02:33:12 GMT Michael Olson <mwolson@gnu.org> patch-152 Summary: Header/footer docfix; ChangeLog correction. Revision: muse--main--1.0--patch-152 * {arch}/.../patch-log/patch-144: Correct previous ChangeLog entry. Thanks to drkm for pointing out my error. Use better documentation and customize interface for headers and footers. Thanks to Chris McMahan. modified files: ChangeLog lisp/muse-blosxom.el lisp/muse-book.el lisp/muse-docbook.el lisp/muse-html.el lisp/muse-journal.el lisp/muse-latex.el lisp/muse-poem.el lisp/muse-texinfo.el muse.texi {arch}/muse/muse--main/muse--main--1.0/mwolson@gnu.org--2005/patch-log/patch-144 2005-07-18 00:53:34 GMT Michael Olson <mwolson@gnu.org> patch-151 Summary: Slight Debian version tweak. Revision: muse--main--1.0--patch-151 * Makefile.defs (VERSION): Use a slightly different version naming scheme. I've dropped the ".90". The new scheme is X.YY.arch.YYY where X.YY is the Muse version, and YYY is the patch level. * debian/changelog: Ditto. modified files: ChangeLog Makefile.defs debian/changelog 2005-07-17 23:23:34 GMT Michael Olson <mwolson@gnu.org> patch-150 Summary: Improve debian build and put together a package. Revision: muse--main--1.0--patch-150 * Makefile (debclean): New target that cleans up the mess that the `debian' target makes. (debian): Build using debuild rather than dpkg-buildpackage. Copy results to my debian dist dir two levels up. * Makefile.defs (VERSION): Set to 3.01.90.arch.149 for the debian build. * debian/changelog: Sign 3.01.90.arch.149-1 snapshot. * debian/control (Standards-Version): Update to 3.6.2. * debian/control (Depends): Add emacs21 and xemacs21 to make lintian shut up. * debian/copyright (Copyright): Improve. * debian/emacsen-install (FILES): Include contrib directory so that muse-http.el compiles properly. * debian/muse-el.examples: New file containing the example files to install. * debian/rules: Move example stuff to muse-el.examples. Install some additional documentation. new files: debian/.arch-ids/muse-el.examples.id debian/muse-el.examples modified files: ChangeLog Makefile Makefile.defs debian/changelog debian/control debian/copyright debian/emacsen-install debian/rules 2005-07-17 20:52:18 GMT Michael Olson <mwolson@gnu.org> patch-149 Summary: Fix links in table, links in verbatim, emphasis publishing, publishing from script. Revision: muse--main--1.0--patch-149 * lisp/muse-colors.el (muse-colors-emphasized): Fix an edge case where the beginning of a header would be emphasized if an asterisk came before it. (muse-colors-underlined): Don't allow end of underlined text to be the beginning of a line. Don't use memq to check for whitespace syntax; eq is sufficient. * lisp/muse-publish.el (muse-publish-markup-regexps): Mark links later on. We'll use a more clever trick to keep emphasis characters from being interpreted in explicit links -- add a custom 'noemphasis text property to them. Move mdash rule further down so that I can add designations after blockquoted text. * lisp/muse-publish.el (muse-publish-markup-word): If beginning or end of text has the 'noemphasis property, ignore it. (muse-publish-mark-noemphasis): New function that adds the 'noemphasis property to the text between BEG and END, or match beginning and end. * lisp/muse.el (muse-with-temp-buffer): Make sure the buffer is alive before trying to set buffer-modified to nil. This should fix a "selecting deleted buffer" error when publishing from command line. modified files: ChangeLog lisp/muse-colors.el lisp/muse-publish.el lisp/muse.el 2005-07-17 18:36:55 GMT Michael Olson <mwolson@gnu.org> patch-148 Summary: Journal validation fixes. Revision: muse--main--1.0--patch-148 * lisp/muse-html.el (muse-html-header): Use HTML 4.0 Transitional by default rather than HTML 4.0 [strict]. (muse-html-markup-strings): Include empty alt element. * lisp/muse-journal.el: Use "div class=..." rather than "div id=...". * muse.texi (Journal): Ditto. modified files: ChangeLog lisp/muse-html.el lisp/muse-journal.el muse.texi 2005-07-17 04:21:19 GMT Michael Olson <mwolson@gnu.org> patch-147 Summary: Add debian files; tweak Makefile. Revision: muse--main--1.0--patch-147 * Makefile (distclean): Remove directory created by dist rule. (dist): Make this only generate the directory, not the tarball. (release): New target that generates the tarball and zipfile. (debrelease): New target that builds the debian package for Muse. (upload): Depend on release target. * examples/mwolson/stylesheets: Add forgotten Arch id. new files: debian/.arch-ids/=id debian/.arch-ids/changelog.id debian/.arch-ids/control.id debian/.arch-ids/copyright.id debian/.arch-ids/emacsen-install.id debian/.arch-ids/emacsen-remove.id debian/.arch-ids/emacsen-startup.id debian/.arch-ids/muse-el.dirs.id debian/.arch-ids/muse-el.docs.id debian/.arch-ids/muse-el.info.id debian/.arch-ids/rules.id debian/changelog debian/control debian/copyright debian/emacsen-install debian/emacsen-remove debian/emacsen-startup debian/muse-el.dirs debian/muse-el.docs debian/muse-el.info debian/rules examples/mwolson/stylesheets/.arch-ids/=id examples/mwolson/stylesheets/.arch-ids/blog.css.id examples/mwolson/stylesheets/.arch-ids/common.css.id examples/mwolson/stylesheets/.arch-ids/print.css.id examples/mwolson/stylesheets/.arch-ids/screen.css.id examples/mwolson/stylesheets/blog.css examples/mwolson/stylesheets/common.css examples/mwolson/stylesheets/print.css examples/mwolson/stylesheets/screen.css modified files: ChangeLog Makefile new directories: debian debian/.arch-ids examples/mwolson/stylesheets examples/mwolson/stylesheets/.arch-ids 2005-07-16 05:10:31 GMT Michael Olson <mwolson@gnu.org> patch-146 Summary: Allow `muse-index-as-string' to remove current file from output. Revision: muse--main--1.0--patch-146 * lisp/muse-mode.el (muse-index-as-string): Add EXCLUDE-CURRENT option, which excludes the current file from the output. Improve documentation. modified files: ChangeLog lisp/muse-mode.el 2005-07-16 04:56:02 GMT Michael Olson <mwolson@gnu.org> patch-145 Summary: S-TAB issue with Windows. Revision: muse--main--1.0--patch-145 * lisp/muse-mode.el (muse-mode-map): Try once more to fix the Shift-TAB issue with Windows. modified files: ChangeLog lisp/muse-mode.el 2005-07-16 04:39:52 GMT Michael Olson <mwolson@gnu.org> patch-144 Summary: Improve temp buffer usage. Revision: muse--main--1.0--patch-144 * lisp/muse-publish.el (muse-publish-file): Omit second argument to `insert-file-contents'. This should further help with the temp buffer problem. Thanks to Peter K. Lee and drkm for the research into this problem. * lisp/muse.el (muse-with-temp-buffer): Renamed from `muse-with-temp-buffer-no-prompt'. Report any errors that occur, but make sure the temp buffer is killed. I didn't implement an option to save the contents of the temp buffer. modified files: ChangeLog lisp/muse-book.el lisp/muse-http.el lisp/muse-mode.el lisp/muse-poem.el lisp/muse-publish.el lisp/muse.el 2005-07-16 03:39:02 GMT Michael Olson <mwolson@gnu.org> patch-143 Summary: muse-docbook: split-string Emacs21 fix. Revision: muse--main--1.0--patch-143 * lisp/muse-docbook.el (muse-docbook-get-author): Omit 3rd argument of split-string to fix an Emacs21 issue. modified files: ChangeLog lisp/muse-docbook.el 2005-07-15 04:40:26 GMT Michael Olson <mwolson@gnu.org> patch-142 Summary: muse-docbook: Parse author directive so that it validates properly. Revision: muse--main--1.0--patch-142 * lisp/muse-docbook.el (muse-docbook-get-author): New function that attempts to publish the contents a DocBook-usable <author> tag. (muse-docbook-header): Use `muse-docbook-get-author'. modified files: ChangeLog lisp/muse-docbook.el 2005-07-15 01:57:51 GMT Michael Olson <mwolson@gnu.org> patch-141 Summary: Be a bit more clever with our consecutive list regexp. Revision: muse--main--1.0--patch-141 * lisp/muse-docbook.el (muse-docbook-markup-regexps): Be a bit more clever with our consecutive list regexp. modified files: ChangeLog lisp/muse-docbook.el 2005-07-15 01:50:05 GMT Michael Olson <mwolson@gnu.org> patch-140 Summary: Do the right thing with consecutive list items, hopefully. Revision: muse--main--1.0--patch-140 * lisp/muse-docbook.el: Apply patch from Dale Smith and add to it. (muse-docbook-header): Add DTD string. (muse-docbook-markup-regexps): Add rule that merges consecutive list tags. (muse-docbook-merged-tags, muse-docbook-fixup-tags): Removed. ("docbook"): Change :before-end back to 'muse-docbook-fixup-sections. modified files: ChangeLog lisp/muse-docbook.el 2005-07-15 01:07:35 GMT Michael Olson <mwolson@gnu.org> patch-139 Summary: Improve customize interface for `muse-project-alist' once more. Revision: muse--main--1.0--patch-139 * lisp/muse-project.el (muse-project-alist-get): Allow cdr of each setting to be anything, since we now support settings that use lists. (muse-project): Vastly improve this by naming each setting and showing what exact type is required. Handle case where a function is not defined yet. Use a set for styles, which looks nice. This is about as good as it can be ... unless we add some sort of inline documentation later on. A setting was added for Yann's :force-publish tag. * lisp/muse.el (muse-eval-lisp): Fix compile warning by not displaying project name. modified files: ChangeLog lisp/muse-project.el lisp/muse.el 2005-07-14 23:27:14 GMT Michael Olson <mwolson@gnu.org> patch-138 Summary: Merged from hodique@lifl.fr--2005 (patch 24-33) Revision: muse--main--1.0--patch-138 Patches applied: * hodique@lifl.fr--2005/muse--yh--1.0--patch-24 Merged from mwolson@gnu.org--2005 (patch 96) * hodique@lifl.fr--2005/muse--yh--1.0--patch-25 Merged from mwolson@gnu.org--2005 (patch 97-101) * hodique@lifl.fr--2005/muse--yh--1.0--patch-26 Merged from mwolson@gnu.org--2005 (patch 102-106) * hodique@lifl.fr--2005/muse--yh--1.0--patch-27 Merged from mwolson@gnu.org--2005 (patch 107-120) * hodique@lifl.fr--2005/muse--yh--1.0--patch-28 Merged from mwolson@gnu.org--2005 (patch 121-131) * hodique@lifl.fr--2005/muse--yh--1.0--patch-29 Merged from mwolson@gnu.org--2005 (patch 132) * hodique@lifl.fr--2005/muse--yh--1.0--patch-30 Merged from mwolson@gnu.org--2005 (patch 133-135) * hodique@lifl.fr--2005/muse--yh--1.0--patch-31 Merged from mwolson@gnu.org--2005 (patch 136) * hodique@lifl.fr--2005/muse--yh--1.0--patch-32 Merged from mwolson@gnu.org--2005 (patch 137) * hodique@lifl.fr--2005/muse--yh--1.0--patch-33 Introduce :force-publish project keyword. Fix bug #2637 modified files: ChangeLog lisp/muse-project.el 2005-07-14 20:48:56 GMT Michael Olson <mwolson@gnu.org> patch-137 Summary: Prevent temp buffers from prompting for save; handle lisp errors better. Revision: muse--main--1.0--patch-137 * lisp/muse-colors.el (muse-colors-region): Try to fix "Invalid search bound" error. I don't know for certain where this is coming from, though ... *grumble*. * lisp/muse.el (muse-eval-lisp): Wrap this in a `condition-case', much like how emacs-wiki does it. Warn the user about lisp errors, returning "<!--INVALID LISP CODE-->" if an error occurs. This will publish as something valid in most markup styles, with increased emphasis on those that don't support it. That's a win-win ... I think :^) . * lisp/muse.el (muse-with-temp-buffer-no-prompt): New macro that acts like `with-temp-buffer', but sets buffer-modfied-p to nil before trying to kill the buffer so we don't get any annoying prompts. I *strongly* believe that this should be the default behavior of `with-temp-buffer'. * lisp/muse-book.el (muse-book-publish-project): Use `muse-with-temp-buffer-no-prompt'. * lisp/muse-http.el (muse-http-reject): Ditto. * lisp/muse-mode.el (muse-index-as-string): Ditto. * lisp/muse-poem.el (muse-poem-markup-tag): Ditto. * lisp/muse-publish.el (muse-publish-markup-string, muse-publish-file): (muse-publish-markup-email, muse-published-contents): Ditto. modified files: ChangeLog lisp/muse-book.el lisp/muse-colors.el lisp/muse-http.el lisp/muse-mode.el lisp/muse-poem.el lisp/muse-publish.el lisp/muse.el 2005-07-14 18:49:56 GMT Michael Olson <mwolson@gnu.org> patch-136 Summary: Customization error; Makefile tweaks. Revision: muse--main--1.0--patch-136 * Makefile (dist): Use a tla-specific method to create the tarball. Create a zip file as well. (upload): New rule that uploads the tarball and zip file to gna.org. * Makefile.defs (VERSION): New variable that determines the version string to use in the `dist' and `upload' targets. * lisp/muse.el (muse-implicit-link-functions) (muse-explicit-link-functions): Use :type of hook so that the options get recognized. modified files: ChangeLog Makefile Makefile.defs lisp/muse.el 2005-07-13 23:20:12 GMT Michael Olson <mwolson@gnu.org> patch-135 Summary: Prepare Muse 3.01.90 (3.02 RC1). Revision: muse--main--1.0--patch-135 modified files: ChangeLog lisp/muse.el muse.texi 2005-07-13 23:11:08 GMT Michael Olson <mwolson@gnu.org> patch-134 Summary: Attempt to get the right file extension when publishing; more examples. Revision: muse--main--1.0--patch-134 * examples/mwolson/muse-init.el: Update my configuration. * examples/mwolson/templates: Store my web page templates here. * examples/mwolson/stylesheets: Store my CSS stylesheets here. * lisp/muse-publish.el (muse-publish-markup-link): Fix mangling of descriptions. Yet another reason to implement my list-returning from handlers idea. * lisp/muse-wiki.el (muse-wiki-resolve-project-page): Deal gracefully with a few more edge cases. Throw together a rough hack for determining when to include the output file extension. * lisp/muse-wiki.el (muse-wiki-colors-nop-tag): Make this less odious, but still ineffective. new files: examples/mwolson/templates/.arch-ids/=id examples/mwolson/templates/.arch-ids/footer.html.id examples/mwolson/templates/.arch-ids/generic-footer.html.id examples/mwolson/templates/.arch-ids/generic-header.html.id examples/mwolson/templates/.arch-ids/header.html.id examples/mwolson/templates/footer.html examples/mwolson/templates/generic-footer.html examples/mwolson/templates/generic-header.html examples/mwolson/templates/header.html modified files: ChangeLog examples/mwolson/muse-init.el lisp/muse-publish.el lisp/muse-wiki.el new directories: examples/mwolson/templates examples/mwolson/templates/.arch-ids 2005-07-13 21:12:27 GMT Michael Olson <mwolson@gnu.org> patch-133 Summary: Make published link handling do the right thing, plus misc. fixes. Revision: muse--main--1.0--patch-133 * lisp/muse-mode.el (muse-mode-hook): Add option for `muse-wiki-update-custom-values'. The :set function makes sure that this is always included in `muse-mode-hook' if muse-wiki is loaded. This probably isn't best-practice, but it works. * lisp/muse-project.el (muse-project-of-file): Fix some duplicated code. Save match data. * lisp/muse-publish.el (muse-publish-url-transforms): Add `muse-publish-prepare-url' to the listed options. * lisp/muse-publish.el (muse-publish-output-file): Handle case where output-dir is not specified. * lisp/muse-publish.el (muse-publish-markup-link): Call link handlers here instead of later on. * lisp/muse-wiki.el (muse-wiki-update-interwiki-regexp): Try to do the right thing when `muse-wiki-interwiki-alist' is nil. * lisp/muse-wiki.el (muse-wiki-output-name): Removed in favor of calling `muse-publish-output-file'. * lisp/muse-wiki.el (muse-wiki-transform-interwiki) (muse-wiki-transform-wikiword): Removed. We should not use the publishing transforms facility to handle these. * lisp/muse-wiki.el ("muse-publish"): Publish wikiwords and interwiki links as "link" rather than "url". * lisp/muse-wiki.el (muse-wiki-update-custom-values): New function that takes care of any customization cleaups that need to happen whenever muse-mode is entered. * lisp/muse.el (muse-implicit-link-functions): Add options for `muse-handle-url' and the wiki handlers. (muse-explicit-link-functions): Add option for `muse-wiki-handle-internal'. modified files: ChangeLog lisp/muse-mode.el lisp/muse-project.el lisp/muse-publish.el lisp/muse-wiki.el lisp/muse.el 2005-07-13 03:38:52 GMT Michael Olson <mwolson@gnu.org> patch-132 Summary: Add invalid directory assertion. Revision: muse--main--1.0--patch-132 * lisp/muse-project.el (muse-project-file-entries): Add assertion so that any invalid directories will trigger an error. modified files: ChangeLog lisp/muse-project.el 2005-07-12 07:54:08 GMT Michael Olson <mwolson@gnu.org> patch-131 Summary: AUTHORS: Fix typo, add that Yann authored muse-wiki.el. Revision: muse--main--1.0--patch-131 modified files: AUTHORS ChangeLog 2005-07-12 07:52:25 GMT Michael Olson <mwolson@gnu.org> patch-130 Summary: Yann's assignment form came in! Revision: muse--main--1.0--patch-130 modified files: AUTHORS ChangeLog 2005-07-12 07:18:27 GMT Michael Olson <mwolson@gnu.org> patch-129 Summary: Compilation fix, minor shuffling in `muse-mode'. Revision: muse--main--1.0--patch-129 * lisp/muse.el (muse-file-extension): Make sure sym is bound before accessing it. Fixes Yet Another Compiler Error. * lisp/muse-mode.el (muse-mode): Move font-lock setup to very end so that project-specific settings happen first. modified files: ChangeLog lisp/muse-mode.el lisp/muse.el 2005-07-12 07:12:49 GMT Michael Olson <mwolson@gnu.org> patch-128 Summary: Fix annoying initial buffer coloring problem. Revision: muse--main--1.0--patch-128 * lisp/muse-wiki.el (muse-wiki-resolve-project-page): Handle the case where even buffer-file-name is not set. This happens the first time we attempt to colorize the buffer. I'm rather astonished that I had to do this. modified files: ChangeLog lisp/muse-wiki.el 2005-07-12 06:12:08 GMT Michael Olson <mwolson@gnu.org> patch-127 Summary: Jump to bad and good links on TAB; mode-choosing fix. Revision: muse--main--1.0--patch-127 * lisp/muse-mode.el (muse-mode-choose-mode): New function that always pics a major mode for a file. If one is specified in the project of file, use it. Otherwise, use muse-mode. (muse-next-reference, muse-previous-reference): Jump to bad links as well as good ones. * lisp/muse.el (muse-file-extension): Use `muse-mode-choose-mode' instead of `muse-mode'. modified files: ChangeLog lisp/muse-mode.el lisp/muse.el 2005-07-12 05:56:42 GMT Michael Olson <mwolson@gnu.org> patch-126 Summary: Add specified Muse file extension to auto-mode-alist. Revision: muse--main--1.0--patch-126 * lisp/muse.el (muse-file-extension): If extension is specified, remove the old extension from auto-mode-alist and add the new one. This eliminates the need to set muse-mode-auto-p when you have specified a Muse file extension. * examples/mwolson/muse-init.el: Sync. modified files: ChangeLog examples/mwolson/muse-init.el lisp/muse.el 2005-07-11 10:08:45 GMT Michael Olson <mwolson@gnu.org> patch-125 Summary: Make `muse-project-alist' more intuitively customizable. Revision: muse--main--1.0--patch-125 * examples/mwolson/muse-init.el (muse-project-alist): Resync with my settings. * lisp/muse-project.el: Thanks to jessealama on IRC for the suggestion. (muse-project-alist-get): New function that pre-parses `muse-projects-alist' before customization in order to work around an annoying limitation in the customize interface. (muse-project-alist-set): New function that takes the value that customize gave us and turns it into something Muse can use. (muse-project): New widget that outlines the form of the `muse-project-alist' variable. (muse-project-alist): Use the `muse-project' widget and specify :set and :get. modified files: ChangeLog examples/mwolson/muse-init.el lisp/muse-project.el 2005-07-10 22:41:49 GMT Michael Olson <mwolson@gnu.org> patch-124 Summary: Silence compiler warnings. Revision: muse--main--1.0--patch-124 * lisp/muse-docbook.el (muse-docbook-fixup-tags): Docfix. * lisp/muse-html.el (muse-html-escape-string): Let-bind `ch' to silence a compiler warning. * lisp/muse-project.el (muse-project-applicable-styles): Call `muse-assert' with only 1 argument to silence a compiler warning. modified files: ChangeLog lisp/muse-docbook.el lisp/muse-html.el lisp/muse-project.el 2005-07-10 22:19:26 GMT Michael Olson <mwolson@gnu.org> patch-123 Summary: muse-docbook: Merge several other types of tags if necessary. Revision: muse--main--1.0--patch-123 * lisp/muse-docbook.el (muse-docbook-fixup-tags): Renamed from `muse-docbook-fixup-sections'. For each TAG in `muse-docbook-merged-tags', if consecutive groupings of TAG exist, merge them together. Thanks to Dale P. Smith for the suggestion. (muse-docbook-merged-tags): Customizable list of tags that need merging. modified files: ChangeLog lisp/muse-docbook.el 2005-07-10 22:04:50 GMT Michael Olson <mwolson@gnu.org> patch-122 Summary: muse-docbook: Output an XML tag with encoding at the beginning of document. Revision: muse--main--1.0--patch-122 * lisp/muse-docbook.el (muse-docbook-header): Add <xml> tag at beginning of document. (muse-docbook-encoding-default): New option that determines which Emacs buffer encoding to use by default in Muse DocBook files if none is found. (muse-docbook-charset-default): New option that determines the DocBook XML charset to use if no translation is found in muse-docbook-encoding-map. (muse-docbook-encoding-map): New option alist that maps an emacs coding system to its associated DocBook coding system. (muse-docbook-transform-content-type): New function that determines the DocBook XML encoding to use based on the contents of muse-docbook-encoding-map. (muse-docbook-encoding): New function that calls muse-docbook-transform-content-type. (muse-docbook-finalize-buffer): New function that sets the buffer file coding system to the value of muse-docbook-encoding-default, but only if the buffers contents have no special characters. ("docbook"): Include :after tag that calls muse-docbook-finalize-buffer. modified files: ChangeLog lisp/muse-docbook.el 2005-07-10 21:35:49 GMT Michael Olson <mwolson@gnu.org> patch-121 Summary: Apply muse-docbook patch from Dale P. Smith. Revision: muse--main--1.0--patch-121 * lisp/muse-docbook.el (muse-docbook-markup-strings): Apply patch from Dale P. Smith to make the markup much better. modified files: AUTHORS ChangeLog lisp/muse-docbook.el 2005-07-10 00:27:13 GMT Michael Olson <mwolson@gnu.org> patch-120 Summary: Use different mapping for S-tab on Windows. Revision: muse--main--1.0--patch-120 * lisp/muse-mode.el (muse-mode-map): If using either XEmacs or on Windows, use [(shift tab)] for `muse-previous-reference'. modified files: ChangeLog lisp/muse-mode.el 2005-07-09 20:24:40 GMT Michael Olson <mwolson@gnu.org> patch-119 Summary: XEmacs wiki fix. Revision: muse--main--1.0--patch-119 * lisp/muse-wiki.el (muse-wiki-colors-wikiword): Use `muse-match-string-no-properties' so XEmacs doesn't complain. modified files: ChangeLog lisp/muse-wiki.el 2005-07-09 08:53:33 GMT Michael Olson <mwolson@gnu.org> patch-118 Summary: Handle a few edge cases with project-page resolution gracefully. Revision: muse--main--1.0--patch-118 * lisp/muse-project.el (muse-project-applicable-styles): Add assertion to make sure that PAGE is specified. STYLES should be generated automatically, but it could theoretically fail. I'm managing to trigger this when messing with unsaved Muse files. Handle case where buffer has not yet been saved. (muse-project-find-file): Don't try to resolve relative links; just open them. * lisp/muse-wiki.el (muse-wiki-resolve-project-page): Fix point-of-reference bug. No need to call muse-project-page-of-file since buffer-file-name and muse-publishing-current-file both give us full paths. * lisp/muse-mode.el (muse-link-at-point): For some reason, `skip-chars-backward' only respects the newline some of the time. Damned annoying. modified files: ChangeLog lisp/muse-mode.el lisp/muse-project.el lisp/muse-wiki.el 2005-07-09 07:41:44 GMT Michael Olson <mwolson@gnu.org> patch-117 Summary: Fix image-link goof-up and add pretty titles. Revision: muse--main--1.0--patch-117 * lisp/muse-html.el (muse-html-markup-paragraph): Use <p class="image-link"> instead of <div class="image-link">. I found a bug with the way I was handling both, so I decided to simplify things. * lisp/muse-wiki.el (muse-wiki-output-name): New function that acts like `muse-publish-output-name', but keeps the directory prefix. (muse-wiki-transform-interwiki): Use `muse-publish-output-name'. * lisp/muse-wiki.el (muse-wiki-publish-small-title-words): New customizable option that determines the words to downcase in title. (muse-wiki-publish-pretty-title): New function that Makes a Nicely Capitalized Title out of either a string or the current title. This is not currently used by any other function -- for now it is meant to be called by the user. modified files: ChangeLog lisp/muse-html.el lisp/muse-wiki.el 2005-07-09 05:22:12 GMT Michael Olson <mwolson@gnu.org> patch-116 Summary: Escape specials in link descriptions. Revision: muse--main--1.0--patch-116 * lisp/muse-publish.el (muse-publish-escape-specials-in-string): New function that escapes special characters in the given string according to the current publishing style. (muse-publish-url): Use the above function to escape the description part of extended links. (muse-publish-prepare-url): Don't make string read-only; it does nothing. * lisp/muse-wiki.el (muse-wiki-transform-interwiki) (muse-wiki-transform-wikiword): Don't make string read-only. modified files: ChangeLog lisp/muse-publish.el lisp/muse-wiki.el 2005-07-09 03:59:44 GMT Michael Olson <mwolson@gnu.org> patch-115 Summary: Escape "&", "<", and ">" in URL text. Revision: muse--main--1.0--patch-115 * lisp/muse-html.el (muse-html-escape-string): Escape "&", "<", and ">" specially. Thanks to John Sullivan for the suggestion. modified files: ChangeLog lisp/muse-html.el 2005-07-09 03:24:01 GMT Michael Olson <mwolson@gnu.org> patch-114 Summary: Update my example configuration. Revision: muse--main--1.0--patch-114 * examples/mwolson/muse-init.el (muse-project-alist): Rename the "Web" project to "WebSite" in order to make it more distinct. (muse-wiki-interwiki-alist): Add mapping for "TheEmacsWiki". (my-muse-blosxom-finalize): Don't run the Xanga preparation code anymore. (my-muse-prepare-entry-for-xanga): Make this able to figure out the published name of the current file. I really should make a function called `muse-published-name' or something similar! ("\C-cpx"): Use this key sequence for `my-muse-prepare-entry-for-xanga'. (muse-file-extension): I'm making use of this so I can figure out its intricacies. modified files: ChangeLog examples/mwolson/muse-init.el 2005-07-09 03:11:28 GMT Michael Olson <mwolson@gnu.org> patch-113 Summary: Tackle a project name interwiki highlighting snafu. Revision: muse--main--1.0--patch-113 * lisp/muse-wiki.el (muse-wiki-resolve-project-page): Hack still more on this. It seems to be more robust now. Highlighting is going the way I want it. modified files: ChangeLog lisp/muse-wiki.el 2005-07-09 02:25:26 GMT Michael Olson <mwolson@gnu.org> patch-112 Summary: Fix some gross mistakes. Revision: muse--main--1.0--patch-112 * lisp/muse-blosxom.el (muse-blosxom-update-page-date-alist): Fix several gross misspellings. * lisp/muse-project.el (muse-project-file-entries): If `muse-file-extension' is defined, use it to filter the entries. * lisp/muse.el (muse-file-extension): Fix messed up attempt to set variable. Move higher in file. * lisp/muse.el (muse-update-ignored-extensions-regexp): Use given argument instead of the real name of the variable. modified files: ChangeLog lisp/muse-blosxom.el lisp/muse-project.el lisp/muse.el 2005-07-09 00:10:01 GMT Michael Olson <mwolson@gnu.org> patch-111 Summary: Make natural interwiki links between projects mostly work. Revision: muse--main--1.0--patch-111 * lisp/muse-wiki.el (muse-wiki-resolve-project-page): Uncomment this function and flesh it out. This seems to work properly, though for some reason, interwiki links using projects are a bit flakey. (muse-wiki-handle-interwiki): Deal with case where we have a project name in an interwiki link. modified files: ChangeLog lisp/muse-wiki.el 2005-07-08 22:57:55 GMT Michael Olson <mwolson@gnu.org> patch-110 Summary: Fix Emacs21 issue with muse-insert-tag. Revision: muse--main--1.0--patch-110 * lisp/muse-mode.el (muse-insert-tag): Pass a list of lists to completing-read to appease older Emacsen. modified files: ChangeLog lisp/muse-mode.el 2005-07-08 22:55:20 GMT Michael Olson <mwolson@gnu.org> patch-109 Summary: Fix error with `muse-blosxom-new-entry' and Emacs21. Revision: muse--main--1.0--patch-109 * lisp/muse-blosxom.el (muse-blosxom-new-entry): Mess with call to `completing-read' so that old versions of Emacs don't complain. modified files: ChangeLog lisp/muse-blosxom.el 2005-07-08 21:59:41 GMT Michael Olson <mwolson@gnu.org> patch-108 Summary: Try to fix an error with `muse-blosxom-get-categories'. Revision: muse--main--1.0--patch-108 * lisp/muse-blosxom.el (muse-blosxom-get-categories): Be extra cautious about processing directories. modified files: ChangeLog examples/johnw/publish-johnw lisp/muse-blosxom.el 2005-07-08 21:11:53 GMT Michael Olson <mwolson@gnu.org> patch-107 Summary: Make a distinction between implicit and explicit links at publish-time. Revision: muse--main--1.0--patch-107 * lisp/muse-html.el (muse-html-escape-string): Ignore other arguments. * lisp/muse-http.el (muse-http-prepare-url): Handle `explicit' argument. * lisp/muse-publish.el (muse-publish-url, muse-publish-insert-url): Pass `explicit' argument. * lisp/muse-publish.el (muse-publish-markup-link): Determine whether or not we are dealing with an explicit link. * lisp/muse-publish.el (muse-publish-prepare-url): Ignore other arguments. * lisp/muse-wiki.el (muse-wiki-transform-interwiki): Take `explicit' argument, but ignore it. * lisp/muse-wiki.el (muse-wiki-transform-wikiword): Only apply transforms when link is not explicit. modified files: ChangeLog lisp/muse-html.el lisp/muse-http.el lisp/muse-publish.el lisp/muse-wiki.el 2005-07-08 06:40:30 GMT Michael Olson <mwolson@gnu.org> patch-106 Summary: Implement several WikiWord handling fixes. Revision: muse--main--1.0--patch-106 * lisp/muse-colors.el (muse-link-face): Handle case where no link is found by the handlers. Don't send implicit links through some of the advanced checks. * lisp/muse-mode.el (muse-link-at-point): Move to beginning of first part of interwiki link before calling `muse-handle-explicit-link'. * lisp/muse-wiki.el (muse-wiki-update-interwiki-regexp): Append forgotten "\\|" separator between project-alist entries and interwiki entries. Force a reconfiguration of muse-colors-markup. * lisp/muse-wiki.el (muse-wiki-handle-wikiword): Add several checks to be sure that we don't colorize WikiNames that don't go with any file. modified files: ChangeLog lisp/muse-colors.el lisp/muse-mode.el lisp/muse-wiki.el 2005-07-07 21:34:12 GMT Michael Olson <mwolson@gnu.org> patch-105 Summary: Attempt to simplify muse-wiki a bit. Revision: muse--main--1.0--patch-105 * lisp/muse-colors.el (muse-use-font-lock): Set up muse-colors-markup here. * lisp/muse-wiki.el (muse-wiki-wikiword-colors-markup) (muse-wiki-update-use-wikiword-colors, muse-wiki-wikiword-markup-regexp) (muse-wiki-update-use-wikiword-markup-regexp) (muse-wiki-update-use-wikiword-link-function) (muse-wiki-update-use-wikiword-url-transforms): Remove. (muse-wiki-update-use-wikiword): Not :set function is needed anymore. * lisp/muse-wiki.el (muse-wiki-transform-wikiword): Only modify URL if `muse-wiki-use-wikiword' is specified. * lisp/muse-wiki.el (muse-wiki-handle-wikiword): Don't process the URL unless `muse-wiki-use-wikiword' is specified. * lisp/muse-wiki.el ("muse-colors"): Add muse-wiki-wikiword-regexp to muse-colors-markup. * lisp/muse-wiki.el ("muse-publish"): Add muse-wiki-wikiword-regexp to muse-publish-markup-regexps. * lisp/muse-wiki.el ("muse-publish"): Add muse-wiki-transform-wikiword to muse-publish-url-transforms. * lisp/muse-wiki.el (muse-implicit-link-functions): Add muse-wiki-handle-wikiword to muse-implicit-link-functions. modified files: ChangeLog lisp/muse-colors.el lisp/muse-wiki.el 2005-07-07 20:06:35 GMT Michael Olson <mwolson@gnu.org> patch-104 Summary: Make muse-blosxom use relative name of published file in page-date alist. Revision: muse--main--1.0--patch-104 * lisp/muse-blosxom.el (muse-blosxom-base-directory): Move higher in file. (muse-blosxom-update-page-date-alist): Renamed from `muse-blosxom-markup-date-directive'. Make the current file name relative to the base directory and strip file extension if necessary. modified files: ChangeLog lisp/muse-blosxom.el 2005-07-07 19:14:38 GMT Michael Olson <mwolson@gnu.org> patch-103 Summary: Hack on muse-blosxom timestamps somewhat. Revision: muse--main--1.0--patch-103 * lisp/muse-blosxom.el (muse-blosxom-markup-date-directive): Make this actually do something useful. This should have a different name, really. ("blosxom-html", "blosxom-xhtml"): Call `muse-blosxom-markup-date-directive' after publishing each entry. modified files: ChangeLog lisp/muse-blosxom.el 2005-07-07 06:27:02 GMT Michael Olson <mwolson@gnu.org> patch-102 Summary: Fix several startup and compile errors. Revision: muse--main--1.0--patch-102 * lisp/muse-wiki.el ("muse-publish"): Use correct name of function. This fixes an error that occurred during startup. * lisp/muse-regexps.el (muse-ignored-extensions-regexp) (muse-update-ignored-extensions-regexp, muse-ignored-extensions): Move to muse.el. * lisp/muse.el (muse-update-ignored-extensions-regexp): Fix ordering so that the nasty compile errors go away. Fix a few typos. (muse-ignored-extensions): Fix docstring. (muse-file-extension): Move this higher in the file. modified files: ChangeLog lisp/muse-regexps.el lisp/muse-wiki.el lisp/muse.el 2005-07-07 05:57:51 GMT Michael Olson <mwolson@gnu.org> patch-101 Summary: Note that muse-file-extension should not have "." in front. Revision: muse--main--1.0--patch-101 * lisp/muse-project.el (muse-project-find-file): Handle case where muse-file-extension is not specified. * lisp/muse.el (muse-file-extension): Note that the period at the beginning of this value should be omitted. * lisp/muse-regexps.el (muse-update-ignored-extensions-regexp): Quote file extension so that regexp characters inside the extension will not goof it up. This should never be a problem in normal cases, but let's be robust. modified files: ChangeLog lisp/muse-project.el lisp/muse-regexps.el lisp/muse.el 2005-07-07 05:36:53 GMT Michael Olson <mwolson@gnu.org> patch-100 Summary: Implement optional file extension of Muse files. Revision: muse--main--1.0--patch-100 * lisp/muse-mode.el (muse-mode): Make sure `muse-update-ignored-extensions-regexp' gets updated every time we enter Muse mode. This works around a bug in the customize interface -- if a user changes an option using setq, the :set function sometimes does not get executed. I should really try to determine whether or not this is really an issue anymore. * lisp/muse-project.el (muse-project-find-file): Make use of `muse-file-extension'. * lisp/muse-regexps.el (muse-ignored-extensions-regexp): This is not customizable; it is autogenerated from `muse-ignored-extensions'. (muse-update-ignored-extensions-regexp): New function that sets the value of `muse-ignored-extensions-regexp'. This is needed in order to make sure that the value of `muse-file-extension' is taken into account. (muse-ignored-extensions): New option that determines which file extensions to ignore. It is in the form of a list of regexps. * lisp/muse.el (muse-file-extension): New option that allows the user to specify the file extension to be used for Muse files. By default, this is nil, which means that no extension will be used. * lisp/muse.el (muse-page-name): Handle case where `muse-ignored-extensions-regexp' is nil. modified files: ChangeLog lisp/muse-mode.el lisp/muse-project.el lisp/muse-regexps.el lisp/muse.el 2005-07-07 03:16:38 GMT Michael Olson <mwolson@gnu.org> patch-99 Summary: Document new blosxom convenience feature. Revision: muse--main--1.0--patch-99 * lisp/muse-blosxom.el: Document `muse-blosxom-project-alist-dirs' and `muse-blosxom-project-alist-entry'. An example is provided in the header. modified files: ChangeLog lisp/muse-blosxom.el 2005-07-06 23:17:35 GMT Michael Olson <mwolson@gnu.org> patch-98 Summary: Further work on `muse-project-alist' entry generation for blosxom. Revision: muse--main--1.0--patch-98 * examples/mwolson/muse-init.el (muse-project-alist): Use proper syntax. Include subdirectories in first part of "Blog" entry. * lisp/muse-blosxom.el (muse-blosxom-project-alist-dirs): New function that returns a list of dirs that are to be used with the first part of a `muse-project-alist' entry. modified files: ChangeLog examples/mwolson/muse-init.el lisp/muse-blosxom.el 2005-07-06 22:42:35 GMT Michael Olson <mwolson@gnu.org> patch-97 Summary: New function: muse-blosxom-project-alist-entry. Revision: muse--main--1.0--patch-97 * examples/mwolson/muse-init.el: Update from my latest settings. (muse-project-alist): Make use of `muse-blosxom-project-alist-entry'. * lisp/muse-blosxom.el (muse-blosxom-project-alist-entry): New function that generates the latter part of an entry for `muse-project-alist'. modified files: ChangeLog examples/mwolson/muse-init.el lisp/muse-blosxom.el 2005-07-06 20:52:03 GMT Michael Olson <mwolson@gnu.org> patch-96 Summary: Merged from hodique@lifl.fr--2005 (patch 12-23) Revision: muse--main--1.0--patch-96 Patches applied: * hodique@lifl.fr--2005/muse--yh--1.0--patch-12 Merged from mwolson@gnu.org--2005 (patch 68-76) * hodique@lifl.fr--2005/muse--yh--1.0--patch-13 Merged from mwolson@gnu.org--2005 (patch 77-80) * hodique@lifl.fr--2005/muse--yh--1.0--patch-14 Merged from mwolson@gnu.org--2005 (patch 81) * hodique@lifl.fr--2005/muse--yh--1.0--patch-15 Merged from mwolson@gnu.org--2005 (patch 82) * hodique@lifl.fr--2005/muse--yh--1.0--patch-16 Escape % in latex publishing * hodique@lifl.fr--2005/muse--yh--1.0--patch-17 bugfix * hodique@lifl.fr--2005/muse--yh--1.0--patch-18 small improvement on muse-make-link * hodique@lifl.fr--2005/muse--yh--1.0--patch-19 Fix customization of muse-wiki-wikiword-regexp * hodique@lifl.fr--2005/muse--yh--1.0--patch-20 Allow full customization of WikiWords * hodique@lifl.fr--2005/muse--yh--1.0--patch-21 Fix mouse-2 yank bug in muse-mode * hodique@lifl.fr--2005/muse--yh--1.0--patch-22 Fix interpretation order * hodique@lifl.fr--2005/muse--yh--1.0--patch-23 Merged from mwolson@gnu.org--2005 (patch 83-95) modified files: ChangeLog lisp/muse-wiki.el 2005-07-06 19:55:48 GMT Michael Olson <mwolson@gnu.org> patch-95 Summary: Minor docfixes. Revision: muse--main--1.0--patch-95 * lisp/muse-mode.el (muse-follow-name-at-point) (muse-follow-name-at-mouse): Docfixes. modified files: ChangeLog lisp/muse-mode.el 2005-07-06 19:30:34 GMT Michael Olson <mwolson@gnu.org> patch-94 Summary: Fix goof-up in instructions for using `muse-blosxom-new-entry'. Revision: muse--main--1.0--patch-94 * lisp/muse-blosxom.el: Fix goof-up in instructions for using `muse-blosxom-new-entry'. * muse.texi (Blosxom Entries): Ditto. modified files: ChangeLog lisp/muse-blosxom.el muse.texi 2005-07-06 18:54:52 GMT Michael Olson <mwolson@gnu.org> patch-93 Summary: Re-add global mouse-2 event. Revision: muse--main--1.0--patch-93 * lisp/muse-mode.el (muse-mode-map): Re-add the global binding for mouse-2, since Yann found a way around the problem I was facing. (muse-follow-name-at-mouse): Call the event that would normally be used here if we don't have a link at point. modified files: ChangeLog lisp/muse-mode.el 2005-07-06 07:19:41 GMT Michael Olson <mwolson@gnu.org> patch-92 Summary: Fix publishing error. Revision: muse--main--1.0--patch-92 * lisp/muse-project.el (muse-project-publish-file): Don't try to fetch the cdr of output-dir. This was a code fragment from a previous attempt to refactor this function. modified files: ChangeLog lisp/muse-project.el 2005-07-06 06:39:21 GMT Michael Olson <mwolson@gnu.org> patch-91 Summary: Work on getting to the point where we can resolve project interwiki links. Revision: muse--main--1.0--patch-91 * lisp/muse-blosxom.el (muse-blosxom-markup-date-directive): Use `muse-publishing-current-file'. * lisp/muse-project.el (muse-project-of-file): Ditto. * lisp/muse-project.el (muse-project-applicable-styles): New function that returns the usable styles for a file, given either a list of styles or a project name. This is useful for removing styles that will be ignored for a file. (muse-project-publish-file): Split :include and :exclude processing into `muse-project-applicable-styles'. * lisp/muse-publish.el (muse-publish-output-name): Use `muse-publishing-current-file'. * lisp/muse-publish.el (muse-publish-file): Don't set `muse-current-file'. * lisp/muse-wiki.el (muse-wiki-update-interwiki-regexp): Recognize project names. * lisp/muse-wiki.el (muse-wiki-transform-wikiword): Don't cause project names to be uninterpreted. Remove need for muse-assoc-string. * lisp/muse-wiki.el (muse-wiki-resolve-project-page): First draft of function that will be called to fetch a link to a page from a Muse project from the output file of the currently-published file. This is commented out for now since I ran out of energy. * lisp/muse-wiki.el (muse-wiki-handle-interwiki): Use `muse-wiki-resolve-project-page' for handling Muse project interwiki links, but only when no match was found in `muse-wiki-interwiki-alist'. Handle case where no interwiki can be found, even though this should never happen. * lisp/muse-wiki.el (muse-mode-hook): Update `muse-wiki-interwiki-regexp' whenever Muse mode is entered. That way we don't have to enter an extra command in our .emacs. * lisp/muse.el (muse-current-file): Remove this, since a variable called `muse-publishing-current-file' already exists that does the same thing. How embarrassing. * lisp/muse.el (muse-page-name): Use `muse-publishing-current-file'. * lisp/muse.el (muse-assoc-string): Remove this, since we no longer need to use it. modified files: ChangeLog lisp/muse-blosxom.el lisp/muse-project.el lisp/muse-publish.el lisp/muse-wiki.el lisp/muse.el 2005-07-06 04:00:57 GMT Michael Olson <mwolson@gnu.org> patch-90 Summary: Mouse-2 on regular text will yank rather than give an error. Revision: muse--main--1.0--patch-90 * lisp/muse-mode.el (muse-mode-map): Remove mappings for mouse-2, since this seems to be more trouble than it's worth. (muse-follow-name-at-mouse): Don't call `muse-follow-name-at-point'; use our own implementation. modified files: ChangeLog lisp/muse-mode.el 2005-07-06 02:25:56 GMT Michael Olson <mwolson@gnu.org> patch-89 Summary: Make interwiki links publish with the correct extension. Revision: muse--main--1.0--patch-89 * lisp/muse-wiki.el (muse-wiki-transform-interwiki): Add the correct prefix and suffix to interwiki names, as well as stripping out unwanted extensions. modified files: ChangeLog lisp/muse-wiki.el 2005-07-06 02:02:42 GMT Michael Olson <mwolson@gnu.org> patch-88 Summary: Fix publishing of bare interwiki names. Revision: muse--main--1.0--patch-88 * lisp/muse-wiki.el (muse-wiki-transform-wikiword): Use `setq' instead of `set'. Use `muse-assoc-string' instead of `assoc'. * lisp/muse.el (muse-assoc-string): New compatibility function that makes `assoc-string' functionality usable with Emacs21 and XEmacs. modified files: ChangeLog lisp/muse-wiki.el lisp/muse.el 2005-07-06 01:41:24 GMT Michael Olson <mwolson@gnu.org> patch-87 Summary: Apply a few fixes from Yann's branch. Revision: muse--main--1.0--patch-87 Background: I hacked on Muse over the weekend while offline, and so did Yann. His changes to muse-wiki.el are different than the ones that I made, so we should probably figure out the best way to handle this when we both get on IRC again. For now, I've merged in the bugfixes that he's made, omitting most of the changes to muse-wiki. * lisp/muse-latex.el (muse-latex-markup-regexps): Escape %. * lisp/muse-wiki.el (muse-wiki-colors-wikiword): Add docstring. * lisp/muse.el (muse-page-name): Fix a bug that was inadvertently introduced previously. modified files: ChangeLog lisp/muse-latex.el lisp/muse-wiki.el lisp/muse.el 2005-07-05 20:41:49 GMT Michael Olson <mwolson@gnu.org> patch-86 Summary: Warn if file not published; hack further on Wiki stuff. Revision: muse--main--1.0--patch-86 * lisp/muse-html.el (muse-html-markup-paragraph): Make this only try to complete <div> tags that are of the class "image-link". It is hoped that this will prevent user-added <div> tags from being mangled. * lisp/muse-mode.el (muse-link-at-point): Don't pass an argument to `muse-handle-implicit-link' or `muse-handle-explicit-link' since they need to look at the text at point. * lisp/muse-publish.el (muse-publish-this-file): Warn the user if the current file has not been published since it was up-to-date. Thanks to Bill Freeman for the suggestion. * lisp/muse-publish.el (muse-publish-url): Handle case when returned url is nil. If this happens, return the original URL. * lisp/muse-wiki.el (muse-wiki-interwiki-regexp): Set using `muse-wiki-update-interwiki-regexp.' (muse-wiki-update-interwiki-regexp): New function that sets the value of `muse-wiki-interwiki-regexp'. (muse-wiki-interwiki-alist): Call `muse-wiki-update-interwiki-regexp' on :set. * lisp/muse-wiki.el (muse-wiki-transform-interwiki): Renamed from `muse-wiki-expand-interwiki'. (muse-wiki-transform-wikiword): New function that prevents WikiWords with no matching file from being published as links. * lisp/muse-wiki.el (muse-wiki-handle-interwiki): Accept an optional string argument once again, since this behavior is needed when publishing. (muse-wiki-handle-wikiword): Ditto. * lisp/muse.el (muse-handle-url): Ditto. * lisp/muse.el (muse-handle-implicit-link): Ditto. Restore match data after every unsuccessful attempt at handling the link. If argument is given, restore match-data at end, too. * lisp/muse.el (muse-handle-explicit-link): Accept optional string argument. Match data is always saved. If argument is not given, assume that `muse-implicit-link-regexp' has been matched against, and return the 1st match string if no handlers worked. modified files: ChangeLog lisp/muse-html.el lisp/muse-mode.el lisp/muse-publish.el lisp/muse-wiki.el lisp/muse.el 2005-07-04 23:00:06 GMT Michael Olson <mwolson@gnu.org> patch-85 Summary: Hack on WikiName handling and make TAB work for Wiki links. Revision: muse--main--1.0--patch-85 * lisp/muse-colors.el (muse-colors-markup): Use `muse-explicit-link-regexp' instead of `muse-link-regexp'. * lisp/muse-colors.el (muse-link-face): Add new argument EXPLICIT. If nil, don't color bad links. If non-nil, color bad links. * lisp/muse-colors.el (muse-colors-link): Pass `t' to `muse-link-face'. * lisp/muse-journal.el (muse-journal-rss-markup-regexps): Use `muse-explicit-link-regexp' instead of `muse-link-regexp'. (muse-journal-rss-munge-buffer): Ditto. * lisp/muse-mode.el (muse-mode-fill-nobreak-p, muse-link-at-point): Docfix. * lisp/muse-mode.el (muse-link-at-point): Rewrite so that explicit links are handled first, then implicit ones. It should work better in all cases. For now, we depend on the value of `muse-implicit-link-regexp' to determine how far to scan for an implicit link. This defaults to the text between the point and the next space. * lisp/muse-mode.el (muse-visit-link-default): Refactored code from `muse-visit-link'. If the ANCHOR argument is a string, search for it literally after opening the buffer. Hopefully this can be of use in custom visit-link functions, when necessary. * lisp/muse-mode.el (muse-visit-link): Docfix. Call `muse-visit-link-default'. * lisp/muse-mode.el (muse-next-reference, muse-previous-reference): Search by text properties instead of regexps. This allows Muse to find links without having to have a massive regexp that contains all link types. The downside is that this will not work if the user defontifies the buffer. But it would somewhat defeat the purpose of following links if you can't see them. * lisp/muse-project.el (muse-project-batch-publish): Handle case when not enough command line args are passed in batch mode. * lisp/muse-publish.el (muse-publish-markup-regexps): Use `muse-explicit-link-regexp'. * lisp/muse-regexps.el (muse-explicit-link-regexp): Renamed from `muse-link-regexp'. * lisp/muse-regexps.el (muse-implicit-link-regexp): New option that specifies the "common ground" of all implicit links, like URLs, bare WikiNames, and -- in the future -- email addresses. * lisp/muse-wiki.el (muse-wiki-hide-nop-tag): Quote 'boolean. * lisp/muse-wiki.el (muse-wiki-handle-interwiki): Arg URL is no longer optional. That was a bad idea on my part. Renamed from `muse-wiki-interwiki-handle'. Hopefully all this renaming doesn't annoy anyone :^) . * lisp/muse-wiki.el (muse-wiki-expand-interwiki): Renamed from `muse-wiki-interwiki-expand'. (muse-wiki-handle-wikiword): Renamed from `muse-wiki-wikiword-handle'. * lisp/muse-wiki.el ("muse-colors", "muse-publish"): Use a string value for the eval-after-load arg since XEmacs chokes on constants. * lisp/muse-wiki.el (muse-wiki-colors-wikiword): Don't display a bad-link face on WikiWords that don't correspond with a file. If people really want this to appear in bad-link face, I could accommodate that. * lisp/muse.el (muse-handle-url): New function that detects whether the given string is a URL. (muse-implicit-link-functions): Renamed from `muse-mode-link-functions'. Defaults to `muse-handle-url'. (muse-explicit-link-functions): Renamed from `muse-mode-handler-functions'. (muse-handle-implicit-link): New function that handles all implicit links by calling functions from `muse-implicit-link-functions'. (muse-handle-explicit-link): Renamed from `muse-handled-url'. modified files: ChangeLog lisp/muse-colors.el lisp/muse-journal.el lisp/muse-mode.el lisp/muse-project.el lisp/muse-publish.el lisp/muse-regexps.el lisp/muse-wiki.el lisp/muse.el 2005-07-04 14:40:31 GMT Michael Olson <mwolson@gnu.org> patch-84 Summary: Allow WikiWords to be ignored with <nop> or "''''". Revision: muse--main--1.0--patch-84 * lisp/muse-mode.el (muse-browse-result): Docfixes. * lisp/muse-wiki.el (muse-wiki-hide-nop-tag): New option that determines whether to hide <nop> tags when coloring a Muse buffer. (muse-wiki-wikiword-at-point): Docfix. (muse-wiki-colors-nop-tag): New function that colors <nop> tags. (muse-wiki-publish-nop-tag): New function that interprets <nop> tags during publishing. (muse-colors-tags, muse-publish-markup-tags): Interpret <nop> tags, which keeps the WikiWord that follows it from being interpreted. (muse-publish-markup-regexps): Allow 4 single quotes to function as a WikiWord delimiter. modified files: ChangeLog lisp/muse-mode.el lisp/muse-wiki.el 2005-07-04 11:20:50 GMT Michael Olson <mwolson@gnu.org> patch-83 Summary: Update postal address of FSF in muse-wiki.el. Revision: muse--main--1.0--patch-83 * lisp/muse-wiki.el: Update postal address of the FSF. modified files: ChangeLog lisp/muse-wiki.el 2005-07-01 22:48:51 GMT Michael Olson <mwolson@gnu.org> patch-82 Summary: Interpret explicit links before emphasis. Revision: muse--main--1.0--patch-82 * lisp/muse-publish.el (muse-publish-markup-regexps): Interpret explicit links before emphasis. * lisp/muse-wiki.el (muse-publish): Make rules use a multiple of 100 just for the heck of it. modified files: ChangeLog lisp/muse-publish.el lisp/muse-wiki.el 2005-06-26 22:55:55 GMT Michael Olson <mwolson@gnu.org> patch-81 Summary: Wiki hacking, regexp tweaks. Revision: muse--main--1.0--patch-81 * lisp/muse-project.el (muse-project-ignore-regexp): Change group to muse-regexp. * lisp/muse-regexps.el (muse-regexp-use-character-classes): New variable that indicates whether or not to use character classes in regexps. The default is to let Muse try to figure it out. (muse-extreg-usable-p): Make use of this variable. * lisp/muse-regexps.el (muse-url-regexp): There's too much whitespace in this regexp. I'm guessing it was supposed to have a TAB in there at one time. Replace this stuff with muse-regexp-space. * lisp/muse-wiki.el (muse-wiki-interwiki-alist): Use wikified EmacsWiki by default. * lisp/muse-wiki.el (muse-wiki-interwiki-alist): Use "choice" instead of "or". * lisp/muse-wiki.el (muse-wiki-interwiki-regexp): Include the page delimiter as part of the regexp. Allow "#" or "::" to be a delimiter. We'll fix those anchor problems eventually! * lisp/muse-wiki.el (muse-wiki-interwiki-at-point): New function that uses `muse-interwiki-handle' to determine whether an interwiki link is at point. * lisp/muse-wiki.el (muse-wiki-interwiki-handle): Make URL optional and look for a suitable value at point if needed. * lisp/muse-wiki.el: Make interwiki regexps color the same as wikiwords. * lisp/muse-wiki.el: Add publishing rule for muse-wiki-interwiki-regexp. * lisp/muse-wiki.el (muse-mode-link-functions): Add interwiki handling. modified files: ChangeLog lisp/muse-project.el lisp/muse-regexps.el lisp/muse-wiki.el 2005-06-25 04:44:00 GMT Michael Olson <mwolson@gnu.org> patch-80 Summary: Make installation of manual when not using Debian go smoothly. Revision: muse--main--1.0--patch-80 * Makefile.defs (INSTALLINFO): New variable that specifies what command and options are to be used when insinuating the Muse documentation into the Info menu. * Makefile (install): Make use of INSTALLINFO. * README (Installation): Give directions for changing INSTALLINFO on a Debian system and changing where Muse is installed. * muse.texi: Ditto. modified files: ChangeLog Makefile Makefile.defs README muse.texi 2005-06-25 04:09:15 GMT Michael Olson <mwolson@gnu.org> patch-79 Summary: Fix compiler warning induced by last patch. Revision: muse--main--1.0--patch-79 * lisp/muse-project.el (muse-current-file): Move to muse.el to fix compiler warning. modified files: ChangeLog lisp/muse-project.el lisp/muse.el 2005-06-25 04:02:11 GMT Michael Olson <mwolson@gnu.org> patch-78 Summary: Add `muse-current-file', fix minor QuickStart issue. Revision: muse--main--1.0--patch-78 * examples/QuickStart: Make John Wiegley the author. * lisp/muse-blosxom.el (muse-blosxom-markup-date-directive): Use `muse-current-file' instead of `buffer-file-name'. * lisp/muse-project.el (muse-current-project): Document. * lisp/muse-project.el (muse-current-file): New variable indicating the name, including path, of the file that is currently being published. (muse-project-of-file): Make use of `muse-current-file'. * lisp/muse-publish.el (muse-publish-file): Set `muse-current-file' here. * lisp/muse.el (muse-page-name): Make use of `muse-current-file'. modified files: ChangeLog examples/QuickStart lisp/muse-blosxom.el lisp/muse-poem.el lisp/muse-project.el lisp/muse-publish.el lisp/muse.el 2005-06-24 21:15:35 GMT Michael Olson <mwolson@gnu.org> patch-77 Summary: Make muse-replace-regexp-in-string closer to its parent; no func change. Revision: muse--main--1.0--patch-77 * lisp/muse.el (muse-replace-regexp-in-string): Add 2 more optional args to implement all functionality of `replace-regexp-in-string'. No functionality change. modified files: ChangeLog lisp/muse.el 2005-06-24 00:22:12 GMT Michael Olson <mwolson@gnu.org> patch-76 Summary: Play nicely with fill, adaptive-fill, and flyspell. Revision: muse--main--1.0--patch-76 * muse-mode.el (muse-mode-intangible-links): New function used to determine whether links will be considered intangible. * lisp/muse-mode.el (muse-mode-link-functions) (muse-mode-handler-functions): Minor docfix. * lisp/muse-mode.el (muse-mode): Don't split long links when performing fill. Play nicely with adaptive-fill. Avoid lockup with flyspell by making links intangible by default, but this may be adjusted by use of the `muse-mode-intangible-links' function. * lisp/muse-mode.el (muse-mode-fill-nobreak-p): New function that returns nil if we should allow a fill to occur here. Keeps links from being broken up. * lisp/muse-mode.el (muse-mode-flyspell-p): New function that returns non-nil if we allow spell-checking to occur here. Keeps links from being improperly colorized. * lisp/muse-wiki.el (muse-wiki-interwiki-handle): Break up long line; no functionality change. modified files: ChangeLog lisp/muse-mode.el lisp/muse-wiki.el 2005-06-23 07:13:35 GMT Michael Olson <mwolson@gnu.org> patch-75 Summary: Minor doc changes and code prettification. Revision: muse--main--1.0--patch-75 * AUTHORS: Note that YH's assignment is in the mail. * README (scripts): Explain better the contents of the `scripts' directory. * lisp/muse-wiki.el (muse-wiki-wikiword-regexp): Split long line. modified files: AUTHORS ChangeLog README lisp/muse-wiki.el 2005-06-23 05:20:04 GMT Michael Olson <mwolson@gnu.org> patch-74 Summary: Merged from hodique@lifl.fr--2005 (patch 7-11) Revision: muse--main--1.0--patch-74 Patches applied: * hodique@lifl.fr--2005/muse--yh--1.0--patch-7 split WikiWords and InterWiki links into their own package * hodique@lifl.fr--2005/muse--yh--1.0--patch-8 Merged from mwolson@gnu.org--2005 (patch 63-67), adapted muse-wiki features * hodique@lifl.fr--2005/muse--yh--1.0--patch-9 Mimic experimental behavior for interwiki * hodique@lifl.fr--2005/muse--yh--1.0--patch-10 fix notes publishing * hodique@lifl.fr--2005/muse--yh--1.0--patch-11 various minor fixes new files: lisp/.arch-ids/muse-wiki.el.id lisp/muse-wiki.el modified files: ChangeLog lisp/muse-colors.el lisp/muse-html.el lisp/muse-mode.el lisp/muse-publish.el lisp/muse.el renamed files: experimental/.arch-ids/muse-wiki.el.id ==> experimental/.arch-ids/muse-wiki-old.el.id experimental/muse-wiki.el ==> experimental/muse-wiki-old.el 2005-06-22 23:05:33 GMT Michael Olson <mwolson@gnu.org> patch-73 Summary: Tell people where to find on-line version of manual. Revision: muse--main--1.0--patch-73 * README: Add on-line locations for manual. * muse.texi: Remove @include directive. This makes generating a PDF of this documentation a lot easier. * muse.texi (Preface): Add on-line locations for manual. modified files: ChangeLog README muse.texi 2005-06-22 19:57:42 GMT Michael Olson <mwolson@gnu.org> patch-72 Summary: Try to make Muse play nice with outline minor mode. Revision: muse--main--1.0--patch-72 * lisp/muse-colors.el (muse-colors-emphasized, muse-colors-emphasized) (muse-colors-underlined, muse-use-font-lock, muse-link-properties): Use "muse" instead of "t" when adding invisibility to text or checking for invisibility. * lisp/muse.el (muse-add-to-invisibility-spec): New function that is a compatibility wrapper for `add-to-invisibility-spec'; XEmacs doesn't have this function. modified files: ChangeLog lisp/muse-colors.el lisp/muse.el 2005-06-22 08:02:58 GMT Michael Olson <mwolson@gnu.org> patch-71 Summary: Minor grammar fix in Introduction section of manual. Revision: muse--main--1.0--patch-71 * muse.texi (Introduction): Minor grammar fix. modified files: ChangeLog muse.texi 2005-06-22 06:32:02 GMT Michael Olson <mwolson@gnu.org> patch-70 Summary: Release Muse 3.01. Revision: muse--main--1.0--patch-70 * lisp/muse-colors.el: Remove unnecessary use of Version in header. * lisp/muse-html.el (muse-html-encoding-map): Add mapping for iso-8859-1. * lisp/muse-poem.el (muse-poem-markup-strings) (muse-poem-chapbook-strings): Make customizable. * lisp/muse-poem.el (muse-chapbook-latex-header) (muse-chapbook-latex-footer): Docfix. * lisp/muse-texinfo.el (muse-texinfo-info-extension) (muse-texinfo-pdf-extension): Ditto. * lisp/muse.el (muse-version): Change to 3.01. * muse.texi (Poem, Texinfo): Last two publishing styles complete. We're done, for now! modified files: ChangeLog lisp/muse-colors.el lisp/muse-html.el lisp/muse-poem.el lisp/muse-texinfo.el lisp/muse.el muse.texi 2005-06-20 02:29:08 GMT Michael Olson <mwolson@gnu.org> patch-69 Summary: Tweak documentation thoroughly; still incomplete. Revision: muse--main--1.0--patch-69 * README: Minor tweaks. * muse.texi: Massively rename chapters so that the titles are more descriptive. Clean up grammar. * muse.texi (Obtaining Muse): Move content of Installation node here, stripping out any customization tips, since those are covered later. Re-work this chapter since I was dissatisfied with it. * muse.texi (Installation): This node has the content of README regarding installation, which fits the title of the node much better than the previous content. * muse.texi (Blosxom): Turn the sections of this section into subsections. * muse.texi (Getting Help and Reporting Bugs): Turn this into a list. I like lists! * muse.texi (History): Add a "2005" item. modified files: ChangeLog README muse.texi 2005-06-19 07:15:45 GMT Michael Olson <mwolson@gnu.org> patch-68 Summary: Finish documenting 2 more publishing styles. Revision: muse--main--1.0--patch-68 * lisp/muse-blosxom.el, lisp/muse-latex.el: Minor docfixes throughout. * lisp/muse-journal.el: Docfixes. * lisp/muse-publish.el (muse-publish-markup-functions): Add significant documentation to this function. * muse.texi (Blosxom Options): New node containing the publishing styles and options provided by Blosxom. (Book): Add usage note, as I suspect a lot of people might be confused by this style. (HTML): Space out entries better. (Journal, LaTeX): New nodes for publishing styles. (Common Elements): Document a few options that are present in `muse-publish.el'. modified files: ChangeLog lisp/muse-blosxom.el lisp/muse-journal.el lisp/muse-latex.el lisp/muse-publish.el muse.texi 2005-06-19 04:45:46 GMT Michael Olson <mwolson@gnu.org> patch-67 Summary: Make Muse installable and correct an Emacs21 issue. Revision: muse--main--1.0--patch-67 * Makefile (.PRECIOUS): Indicate that .info and .html files in this directory will be generated. (all): Compile muse.info by default. (doc): Refactor into individual generation rules for .html and .info files. (install): New rule that installs Muse source code, compiled .elc files, and the manual into proper places. * Makefile.defs (ELISPDIR, INFODIR): Correct minor goof-up. * README (Insinuation): Move old content of Installation here. (Installation): Fill out this section. (Further Documentation): Add link to my website and note that a full manual is included with Muse. * lisp/Makefile (EL): Populate with .el files. (install): New rule that installs both .elc and .el files. * lisp/muse-texinfo.el (muse-texinfo-info-generate): If we're running Emacs21, hack in a handler for the @documentencoding tag so that it doesn't error out. modified files: ChangeLog Makefile Makefile.defs README lisp/Makefile lisp/muse-texinfo.el 2005-06-19 03:05:38 GMT Michael Olson <mwolson@gnu.org> patch-66 Summary: Cater even more to XEmacs and its annoying whims. Revision: muse--main--1.0--patch-66 * examples/Makefile (%.html, %.pdf, %.info): Pass EMACS value as environment variable. * lisp/Makefile (%.elc, test): Don't use "-L" option since XEmacs can't handle it. Load `muse-build.el' instead. * lisp/muse-colors.el (muse-colors-link): Add note that `link' is not used. * lisp/muse-journal.el (muse-journal-latex-munge-buffer) (muse-journal-rss-munge-buffer): Add note that the `qotd' binding is not used. * lisp/muse-journal.el (muse-journal-generate-pages): Add note that this function does not appear to be used. * lisp/muse.el (muse-replace-regexp-in-string): Use in place of `replace-regexp-in-string', since XEmacs doesn't have this function. We only implement the first 3 args, but this could be extended if we need to do so. * lisp/muse-blosxom.el (muse-blosxom-title-to-file): Use `muse-replace-regexp-in-string' in place of `replace-regexp-in-string' * lisp/muse-journal.el (muse-journal-anchorize-title): Ditto. * lisp/muse-colors.el (muse-colors-custom-tags): Remove unused binding to make XEmacs shut up. * lisp/muse-convert.el (muse-write-footnote): Ditto. * lisp/muse-html.el (muse-html-markup-table): Ditto. * lisp/muse-http.el (muse-winnow-list): Ditto. * lisp/muse-poem.el (muse-poem-markup-tag): Ditto. * lisp/muse-project.el (muse-project-file-entries): Ditto. * lisp/muse-publish.el (muse-publish-markup): Ditto. * scripts/muse-build.el: Add contrib path first; probably doesn't change anything. * scripts/publish: Use EMACS environment variable instead of hard-coding it. modified files: ChangeLog examples/Makefile lisp/Makefile lisp/muse-blosxom.el lisp/muse-colors.el lisp/muse-convert.el lisp/muse-html.el lisp/muse-http.el lisp/muse-journal.el lisp/muse-latex.el lisp/muse-poem.el lisp/muse-project.el lisp/muse-publish.el lisp/muse.el scripts/muse-build.el scripts/publish 2005-06-19 00:43:54 GMT Michael Olson <mwolson@gnu.org> patch-65 Summary: Move lisp files to `lisp' directory; hack on Makefiles, XEmacs compat. Revision: muse--main--1.0--patch-65 * AUTHORS: Update entry. * muse-*.el: Move to the lisp directory. * lisp/Makefile: New file containing rules to test and compile the source. * Makefile.defs: New file that contains common definitions for all other Makefiles, such as Emacs command to use. * Makefile: Move lisp-specific rules to lisp/Makefile. (SUBDIRS): New variable containing subdirectories to clean. * README: Update to reflect new location of source files. Give updated directions for compiling with XEmacs. * examples/Makefile (.PRECIOUS): Added to denote which type of files to compile. (%.html): Pass SITEFLAG as an environment variable to ../scripts/publish. * examples/QuickStart (The): Re-add the stray <comment> tag since it seems to be needed to keep the process from failing. This has *got* to be a bug in Muse, but I don't want to deal with it now. * lisp/muse-colors.el (muse-make-faces): Bind newsym locally. * lisp/muse-convert.el: Move line to commentary section. * lisp/muse-latex.el (muse-latex-markup-table): Note that the locally-bound `type' variable isn't used here. * lisp/muse-mode.el (muse-index-as-string): Remove unused `file' binding. * lisp/muse-texinfo.el (muse-texinfo-markup-table): Remove unused `field' binding. * scripts/muse-build.el (load-path): Correct paths. * scripts/muse-build.el (muse-elint-files): Add a few variables here so as to avoid spurious warnings. * scripts/publish (style): Make use of SITEFLAG environment variable, if it exists. * lisp/muse.el (muse-line-end-position, muse-line-beginning-position): (muse-match-string-no-properties): New functions that take the place of `line-end-position', `line-beginning-position', and `match-string-no-properties', respectively. * examples/johnw/muse-johnw.el (muse-my-html-insert-contents) (muse-my-journal-find-entries): Use Muse-specific version of `match-string-no-properties', `line-beginning-position', and `line-end-position' since these do not exist in XEmacs. * lisp/muse-colors.el (muse-colors-emphasized, muse-colors-region) (muse-colors-custom-tags, muse-colors-link, muse-colors-title): Ditto. * lisp/muse-convert.el (muse-latex-transform): Ditto. * lisp/muse-html.el (muse-html-insert-anchor, muse-html-markup-footnote) (muse-html-insert-contents): Ditto. * lisp/muse-journal.el (muse-journal-rss-munge-buffer): Ditto. * lisp/muse-mode.el (muse-link-at-point, muse-edit-link-at-point): Ditto. * lisp/muse-poem.el (muse-poem-prepare-buffer): Ditto. * lisp/muse-publish.el (muse-publish-markup-tag) (muse-publish-markup-footnote, muse-publish-markup-leading-space) (muse-published-buffer-contents): Ditto. * scripts/muse-build.el (muse-elint-files): Ditto. new files: .arch-ids/Makefile.defs.id Makefile.defs lisp/.arch-ids/=id lisp/.arch-ids/Makefile.id lisp/Makefile modified files: AUTHORS ChangeLog Makefile README examples/Makefile examples/QuickStart examples/johnw/muse-johnw.el lisp/muse-colors.el lisp/muse-convert.el lisp/muse-html.el lisp/muse-journal.el lisp/muse-latex.el lisp/muse-mode.el lisp/muse-poem.el lisp/muse-publish.el lisp/muse-texinfo.el lisp/muse.el scripts/muse-build.el scripts/publish renamed files: .arch-ids/muse-blosxom.el.id ==> lisp/.arch-ids/muse-blosxom.el.id .arch-ids/muse-book.el.id ==> lisp/.arch-ids/muse-book.el.id .arch-ids/muse-colors.el.id ==> lisp/.arch-ids/muse-colors.el.id .arch-ids/muse-convert.el.id ==> lisp/.arch-ids/muse-convert.el.id .arch-ids/muse-docbook.el.id ==> lisp/.arch-ids/muse-docbook.el.id .arch-ids/muse-html.el.id ==> lisp/.arch-ids/muse-html.el.id .arch-ids/muse-http.el.id ==> lisp/.arch-ids/muse-http.el.id .arch-ids/muse-journal.el.id ==> lisp/.arch-ids/muse-journal.el.id .arch-ids/muse-latex.el.id ==> lisp/.arch-ids/muse-latex.el.id .arch-ids/muse-mode.el.id ==> lisp/.arch-ids/muse-mode.el.id .arch-ids/muse-poem.el.id ==> lisp/.arch-ids/muse-poem.el.id .arch-ids/muse-project.el.id ==> lisp/.arch-ids/muse-project.el.id .arch-ids/muse-publish.el.id ==> lisp/.arch-ids/muse-publish.el.id .arch-ids/muse-regexps.el.id ==> lisp/.arch-ids/muse-regexps.el.id .arch-ids/muse-texinfo.el.id ==> lisp/.arch-ids/muse-texinfo.el.id .arch-ids/muse.el.id ==> lisp/.arch-ids/muse.el.id muse-blosxom.el ==> lisp/muse-blosxom.el muse-book.el ==> lisp/muse-book.el muse-colors.el ==> lisp/muse-colors.el muse-convert.el ==> lisp/muse-convert.el muse-docbook.el ==> lisp/muse-docbook.el muse-html.el ==> lisp/muse-html.el muse-http.el ==> lisp/muse-http.el muse-journal.el ==> lisp/muse-journal.el muse-latex.el ==> lisp/muse-latex.el muse-mode.el ==> lisp/muse-mode.el muse-poem.el ==> lisp/muse-poem.el muse-project.el ==> lisp/muse-project.el muse-publish.el ==> lisp/muse-publish.el muse-regexps.el ==> lisp/muse-regexps.el muse-texinfo.el ==> lisp/muse-texinfo.el muse.el ==> lisp/muse.el new directories: lisp lisp/.arch-ids 2005-06-18 20:12:05 GMT Michael Olson <mwolson@gnu.org> patch-64 Summary: Massively untabify files. Revision: muse--main--1.0--patch-64 modified files: ChangeLog ChangeLog.2004 experimental/muse-message.el experimental/muse-wiki.el muse-book.el muse-colors.el muse-convert.el muse-docbook.el muse-html.el muse-http.el muse-journal.el muse-latex.el muse-mode.el muse-poem.el muse-project.el muse-publish.el muse-regexps.el muse-texinfo.el muse.el 2005-06-18 19:57:44 GMT Michael Olson <mwolson@gnu.org> patch-63 Summary: Merged from hodique@lifl.fr--2005 (patch 2-6), without the WikiWord change. Revision: muse--main--1.0--patch-63 (Summary of changes that Yann made) * muse-colors.el (muse-colors-link): Whitespace cleanup. * muse-mode.el (muse-generate-index): Move index generation code into `muse-index-as-string'. (muse-index-as-string): New function that generates an index and returns it as a string, instead of placing it in a buffer like `muse-generate-index' used to. Patches applied: * hodique@lifl.fr--2005/muse--yh--1.0--patch-2 merge from mwolson@gnu.org--2005 * hodique@lifl.fr--2005/muse--yh--1.0--patch-3 Accept WikiWords as links [mostly rescinded] * hodique@lifl.fr--2005/muse--yh--1.0--patch-4 merge from mwolson@gnu.org--2005/muse--main--1.0 * hodique@lifl.fr--2005/muse--yh--1.0--patch-5 Merged from mwolson@gnu.org--2005 (patch 60-62) * hodique@lifl.fr--2005/muse--yh--1.0--patch-6 provide a string view of the index modified files: ChangeLog muse-colors.el muse-latex.el muse-mode.el 2005-06-18 06:21:19 GMT Michael Olson <mwolson@gnu.org> patch-62 Summary: Document Blosxom, Book, DocBook, and HTML publishing styles. Revision: muse--main--1.0--patch-62 * muse-blosxom.el: Clean up header. * muse-book.el (muse-before-book-publish-hook): Rename to `muse-book-before-publish-hook'. (muse-after-book-publish-hook): Rename to `muse-book-after-publish-hook'. * muse-html.el (muse-html-anchor-on-word, muse-html-table-attributes) (muse-html-markup-strings, muse-xhtml-markup-strings) (muse-html-meta-content-type, muse-html-meta-content-encoding) (muse-html-charset-default, muse-html-encoding-default) (muse-html-encoding-map): Docfixes. * muse.texi (Blosxom, Book, DocBook, HTML, Deriving Styles): New sections. modified files: ChangeLog muse-blosxom.el muse-book.el muse-html.el muse.texi 2005-06-18 01:35:33 GMT Michael Olson <mwolson@gnu.org> patch-61 Summary: Begin work on Publishing Styles section of manual. Revision: muse--main--1.0--patch-61 * Makefile (.PHONY): Add "doc" to list. (doc): New rule that generates Info and HTML files from muse.texi. (dist): Rely on `distclean', not `clean'. * examples/QuickStart (Authoring mode): Remove empty section. * muse.texi: Call this program "the Emacs Muse" in title. (Publishing Styles): Begin to populate section. (Deriving Styles): First subsection of Publishing Styles. (Contributors): Remove spurious copyright section, since we address this in the title. * README: Actually remember to add this file. new files: .arch-ids/README.id README modified files: ChangeLog Makefile examples/QuickStart muse.texi 2005-06-17 01:10:41 GMT Michael Olson <mwolson@gnu.org> patch-60 Summary: Document Markup Rules. Revision: muse--main--1.0--patch-60 * examples/QuickStart: Remove stray <comment> tag. * muse.texi (Top): Comment every menu line. (Markup Rules): New section with plenty of subsections. modified files: ChangeLog examples/QuickStart muse.texi 2005-06-15 23:50:12 GMT Michael Olson <mwolson@gnu.org> patch-59 Summary: Release this as Muse 3.00.90 (RC1). Revision: muse--main--1.0--patch-59 * Makefile (%.elc): Use -q instead of --no-init-file because the former is compatible with both Emacs and XEmacs. * examples/README: Renamed to QuickStart. * examples/Makefile (EXAMPLES): Reflect name change of README. * muse.el: Ditto. modified files: ChangeLog Makefile examples/Makefile muse.el renamed files: examples/.arch-ids/README.id ==> examples/.arch-ids/QuickStart.id examples/README ==> examples/QuickStart 2005-06-15 22:47:05 GMT Michael Olson <mwolson@gnu.org> patch-58 Summary: Makefile refactoring. Revision: muse--main--1.0--patch-58 * Makefile (.PHONY): List all non-file targets. (examples): New rule that calls Make in the examples directory. (atranslit): Removed, since this isn't (yet) bundled with Muse. * README: Move to the examples directory. I'd prefer to distribute a very basic plain text README and use this as a quickstart + markup example + publishing example. * examples/Makefile: Move all README-related rules here. * examples/README: Add an "About this document" section. * scripts/publish (style): Do not include the contrib directory, since we don't use any code from there. Since this is only invoked from the examples directory, make sure add the parent directory to the load path. * muse.texi: Change version to 3.00.90 (RC1). * muse.el: Change location of the README file in header. * muse.el (muse-version): Update to 3.00.90 (RC1). new files: examples/.arch-ids/Makefile.id examples/Makefile modified files: ChangeLog Makefile examples/README muse.el muse.texi scripts/publish renamed files: .arch-ids/README.id ==> examples/.arch-ids/README.id README ==> examples/README 2005-06-14 03:14:05 GMT Michael Olson <mwolson@gnu.org> patch-57 Summary: Update my example configuration. Revision: muse--main--1.0--patch-57 * examples/mwolson/muse-init.el: Update to reflect use of outline faces and experimental status of muse-message. modified files: ChangeLog examples/mwolson/muse-init.el 2005-06-14 03:08:54 GMT Michael Olson <mwolson@gnu.org> patch-56 Summary: Provide optional outline-style faces; customization fixes; experimental stuff. Revision: muse--main--1.0--patch-56 * muse-colors.el (muse-colors-autogen-headings): New user-customizable option that determines what the header faces should look like. If 'outline, use outline-style faces. If nil, don't generate the faces at all, which allows the user to specify their own. Otherwise, use the scaled faces, which is the default behavior. (muse-colors-outline-faces-list): List of faces to use. In case the outline faces are not available, provide reasonable defaults. (muse-make-faces): Use dolist instead of mapc. Implement the possibility of having outline-style colors for heading. Don't call this function immediately -- give the users time to make their changes through the customize interface. Once we call this function, Emcs from CVS will not allow the faces to be changed easily, which is a shame. * muse-message.el (muse-message-contents-tag): Copied from `muse-publish-contents-tag' in order to keep the customization interface from making the `muse-markup-tags' option from throwing a type mismatch error. This function is untested and will likely do nothing useful. This file has been moved to the experimental folder until it gets fleshed out more. * experimental/muse-wiki.el: New file from johnw's initial attempt at a file that could eventually provide wiki-like ability. Currently this is just a collection of functions that were pruned out when he remade Muse, so don't get too excited. I plan to eventually merge Yann Hodique's work here, probably after the first release of Muse. * muse-regexps.el (muse-regexp): Improve description. * muse-project.el (muse-project-ignore-regexp): Make this be a part of the muse-regexp group since it is just a single regexp. Lists of regexps don't have to be in muse-regexp, however. * muse-blosxom.el (muse-blosxom): Change use of `behaviour' to `behavior' since the Emacs devel mailing list seems to not want Britain-izations in Emacs code. * muse-colors.el (muse-colors): Ditto. * muse-docbook.el (muse-docbook): Ditto. * muse-html.el (muse-html): Ditto. * muse-http.el (muse-http): Ditto. * muse-message.el (muse-message): Ditto. * muse-mode.el (muse-mode): Ditto. * muse-project.el (muse-project): Ditto. * muse-publish.el (muse-publish): Ditto. * muse.el (muse): Ditto. new files: experimental/.arch-ids/=id experimental/.arch-ids/muse-wiki.el.id experimental/muse-wiki.el modified files: ChangeLog experimental/muse-message.el muse-blosxom.el muse-colors.el muse-docbook.el muse-html.el muse-http.el muse-mode.el muse-project.el muse-publish.el muse-regexps.el muse.el renamed files: .arch-ids/muse-message.el.id ==> experimental/.arch-ids/muse-message.el.id muse-message.el ==> experimental/muse-message.el new directories: experimental experimental/.arch-ids 2005-06-13 22:37:20 GMT Michael Olson <mwolson@gnu.org> patch-55 Summary: Fix publishing error when given an empty string for header/footer. Revision: muse--main--1.0--patch-55 * muse-publish.el (muse-insert-file-or-string): Don't pass argument to `file-readable-p' if it is an empty string. For some reason, `file-readable-p' and `insert-file-contents' were treating an empty string as if it were the current directory. modified files: ChangeLog muse-publish.el 2005-06-13 22:01:00 GMT Michael Olson <mwolson@gnu.org> patch-54 Summary: WYSIWYG emphasis, XEmacs compatibility hacks. Revision: muse--main--1.0--patch-54 * muse-colors.el (muse-colors-emphasized): Make emphasis more WYSIWIG compliant. Only colorize if we end with the same number of asterisks as we start with, preventing unnoticed syntax errors. Don't colorize in the middle of a word. (muse-colors-underlined): Make underlining more WYSIWIG compliant. Only colorize if we end with an underscore. Don't colorize in the middle of a word. * muse-docbook.el (muse-docbook-markup-paragraph): Move question mark inside of group. This will probably not do anything, but it seems syntactically good. * muse-html.el (muse-html-markup-paragraph): Attempt to deal with case where we start with an image link. JohnW didn't seem to like having <p> tags inserted before image links, but they don't validate properly as they are. For now, I will surround such links/paragraphs with <div class="image-link"> in an attempt to be as not invasive and yet standards compliant as possible. * muse-html.el (muse-html-escape-string): Work around distinction between int and char types in XEmacs. Deal with an annoying replace-match bug in XEmacs that rears its head at times. * muse-publish.el (muse-publish-markup-word): Allow underlines to be multi-line. modified files: ChangeLog muse-colors.el muse-docbook.el muse-html.el muse-publish.el 2005-06-13 01:13:08 GMT Michael Olson <mwolson@gnu.org> patch-53 Summary: Minor code cleanup to address elint issues. Revision: muse--main--1.0--patch-53 * Makefile (test): Don't build README files during this rule. Remove spurious "make clean" statement. * muse-colors.el (muse-colors-tags): Make sure that this appears in the `muse-colors' group, and give it a proper type. * muse-mode.el: Wrap condition-case around `eval-when-compile'. * examples/johnw/muse-johnw.el (muse-my-html-insert-contents, muse-my-journal-find-entries): Replace `string-to-int' with `string-to-number'. * muse-html.el (muse-html-insert-contents): Ditto. * muse-journal.el (muse-journal-html-munge-buffer, muse-journal-latex-munge-buffer): Ditto. * muse-journal.el (muse-journal-rss-munge-buffer): Ditto. * muse-publish.el (muse-publish-markup-footnote, muse-publish-contents-tag): Ditto. * muse-regexps.el (muse-extreg-usable-p): Ditto. modified files: ChangeLog Makefile examples/johnw/muse-johnw.el muse-colors.el muse-html.el muse-journal.el muse-mode.el muse-publish.el muse-regexps.el 2005-06-13 00:41:10 GMT Michael Olson <mwolson@gnu.org> patch-52 Summary: Add ability to automate the creation a new blosxom entry. Revision: muse--main--1.0--patch-52 * examples/mwolson/muse-init.el: Move new entry section to muse-blosxom.el. Modify the key settings in my example accordingly. * muse-blosxom.el (muse-blosxom-footer): Just use the empty string, since Muse always makes sure that the file ends with a newline. * muse-blosxom.el (muse-blosxom-markup-regexps): Remove this, since planner markup is now provided automatically by the planner port to Muse, and we don't have any customized markup. * muse-blosxom.el (muse-blosxom-base-directory): New customizable variable that specifies where the base directory of your blog entries is found. * muse-blosxom.el (muse-blosxom-get-categories): Get the categories from the base directory. Explore categories recursively. * muse-blosxom.el (muse-blosxom-title-to-file): Helper function for `muse-blosxom-new-entry'. Turns the given title into a lowercase, sans special characters file name. * muse-blosxom.el (muse-blosxom-new-entry): Automate the process of making a new blog entry. It will prompt you for a category, then a title, and then will create a new file that has the date and title inserted. modified files: ChangeLog examples/mwolson/muse-init.el muse-blosxom.el 2005-06-12 22:11:20 GMT Michael Olson <mwolson@gnu.org> patch-51 Summary: Change mailing address of FSF, add AUTHORS file. Revision: muse--main--1.0--patch-51 * muse-*.el, muse.texi: Change mailing address of FSF. * muse.texi (Contributors): Fix typo. * AUTHORS: New file containing a list of all of those who have contributed code or documentation to Muse, how many lines were changed, etc. new files: .arch-ids/AUTHORS.id AUTHORS modified files: ChangeLog muse-blosxom.el muse-convert.el muse-docbook.el muse-html.el muse-http.el muse-journal.el muse-latex.el muse-message.el muse-mode.el muse-poem.el muse-project.el muse-publish.el muse-regexps.el muse-texinfo.el muse.el muse.texi 2005-06-12 21:33:24 GMT Michael Olson <mwolson@gnu.org> patch-50 Summary: Merged from hodique@lifl.fr--2005 (patch 0-1) Revision: muse--main--1.0--patch-50 Patches applied: * hodique@lifl.fr--2005/muse--yh--1.0--base-0 tag of mwolson@gnu.org--2005/muse--main--1.0--patch-49 * hodique@lifl.fr--2005/muse--yh--1.0--patch-1 fix .html (for example) in visible names for links modified files: ChangeLog muse-publish.el 2005-06-11 23:35:43 GMT Michael Olson <mwolson@gnu.org> patch-49 Summary: Make generated X(HT)ML show up in the right encoding in other modes. Revision: muse--main--1.0--patch-49 * muse-html.el (muse-xhtml-header): Add "encoding=..." to first line. Thanks to Zhiqiang Ye for the suggestion. This attempts to make generated (X)HTML files show up in the right coding system when editing them with another Emacs mode. * muse-journal.el (muse-journal-rss-header): Automatically determine the encoding instead of hard-coding it. * muse-message.el: Add content to Commentary section, explaining the use of this publishing style. modified files: ChangeLog muse-html.el muse-journal.el muse-message.el 2005-06-11 01:28:01 GMT Michael Olson <mwolson@gnu.org> patch-48 Summary: Move regexps to same group, only make 4 heading faces. Revision: muse--main--1.0--patch-48 * muse-colors.el (muse-make-faces): Only create 4 header faces since we can only publish 3 of them specially, leaving the fourth to be in plain text. (muse-colors-markup): Only recognize 4 levels of heading. * muse-regexps.el (muse-tag-regexp, muse-link-regexp, muse-url-regexp) (muse-file-regexp, muse-image-regexp) (muse-ignored-extensions-regexp): Moved here from muse.el. It seems like a good idea to have all the regexps in the same group. modified files: ChangeLog muse-colors.el muse-regexps.el muse.el 2005-06-09 19:48:02 GMT Michael Olson <mwolson@gnu.org> patch-47 Summary: Update my example config, minor code cleanup. Revision: muse--main--1.0--patch-47 * examples/mwolson/muse-init.el (muse-project-alist): Shorten project names and add "Plans" project. * muse-docbook.el (looking-back): Delete. * muse-html.el (looking-back): Delete. * muse-html.el (muse-html-markup-paragraph): Use `muse-looking-back' instead of `looking-back'. * muse.el (muse-looking-back): Instead of redefining the `looking-back' function, use this function. If `looking-back' exists, call it; otherwise, use a workaround. removed files: contrib/.arch-ids/pcomplete.el.id contrib/pcomplete.el modified files: ChangeLog examples/mwolson/muse-init.el muse-docbook.el muse-html.el muse.el 2005-05-30 22:15:13 GMT Michael Olson <mwolson@gnu.org> patch-46 Summary: Handle a few paragraph publishing edge cases better. Revision: muse--main--1.0--patch-46 * muse-docbook.el (muse-docbook-markup-regexps): Consolidate the beginning-of-document, end-of-document, and paragraph separator regexps so that one markup rule can be used in all these cases. (muse-docbook-markup-paragraph): Handle more cases correctly. In particular, blockquote or center at beginning or end of document will be published properly. Hopefully this won't slow things down too much. (muse-docbook-markup-paragraph-close): Removed. * muse-blosxom.el (muse-blosxom-markup-regexps): Ditto. * muse-html.el (muse-html-markup-regexps, muse-html-markup-paragraph): Ditto. (muse-html-markup-paragraph-close): Removed. modified files: ChangeLog muse-blosxom.el muse-docbook.el muse-html.el 2005-05-28 23:37:11 GMT Michael Olson <mwolson@gnu.org> patch-45 Summary: Improve prompt when reading a tag. Revision: muse--main--1.0--patch-45 * muse-mode.el (muse-insert-tag): Add a colon after "default" like some other Emacs modes seem to do. modified files: ChangeLog muse-mode.el 2005-05-28 23:34:50 GMT Michael Olson <mwolson@gnu.org> patch-44 Summary: Warn user when publishing fails due to a private directory. Revision: muse--main--1.0--patch-44 * muse-project.el (muse-project-private-p): Warn users when publishing a file fails due to its directory not being readable by others. Make sure that you do a `chmod +o name_of_directory' if you want the contents of that directory to be publishable. modified files: ChangeLog muse-project.el 2005-05-28 23:21:39 GMT Michael Olson <mwolson@gnu.org> patch-43 Summary: Fix error with example tags and message publishing style. Revision: muse--main--1.0--patch-43 * muse-colors.el: Don't define `font-lock-mode' as a variable. Check to see if a previous definition for `font-lock-multiline' exists. * muse-message.el (muse-message-example-tag): Don't require two additional (unused) arguments. modified files: ChangeLog muse-colors.el muse-message.el 2005-05-22 05:58:40 GMT Michael Olson <mwolson@gnu.org> patch-42 Summary: Always end the published document with a newline. Revision: muse--main--1.0--patch-42 * muse-html.el (muse-html-markup-paragraph-close): Always end the published document with a newline. * muse-docbook.el (muse-docbook-markup-paragraph-close): Ditto. modified files: ChangeLog muse-docbook.el muse-html.el 2005-05-22 01:26:13 GMT Michael Olson <mwolson@gnu.org> patch-41 Summary: Don't let automatic backup files crash the publishing process. Revision: muse--main--1.0--patch-41 * muse-blosxom.el (muse-blosxom-markup-regexps): Remove rule for date directive since this value is already processed by `muse-publish-markup-directive', and may be obtained by using the code: (muse-publishing-directive "date"). * muse-colors.el (muse-colors-region): Make sure that we don't ever try to run (funcall nil); this happened once during a debugging process. * muse-project.el (muse-project-private-p): Skip any file for which we cannot fetch attributes. This fixes a bug where having an Emacs-generated automatic backup file in a publishing directory causes the publishing process to halt with an error. modified files: ChangeLog muse-blosxom.el muse-colors.el muse-project.el 2005-05-20 20:44:46 GMT Michael Olson <mwolson@gnu.org> patch-40 Summary: Apply fix in previous patch to the DocBook publishing style. Revision: muse--main--1.0--patch-40 * muse-docbook.el (muse-docbook-markup-paragraph-close): Apply fix from previous patch here as well. modified files: ChangeLog muse-docbook.el 2005-05-20 20:28:32 GMT Michael Olson <mwolson@gnu.org> patch-39 Summary: Fix newly-introduced lock-up during HTML publishing. Revision: muse--main--1.0--patch-39 * muse-blosxom.el (muse-blosxom-markup-regexps): Give date directive and planner rules higher priority in the publishing sequence. Hopefully this will not wreck anything; I don't use these rules, so I cannot tell. This wasn't a real bugfix, just an aesthetic code thing for me. * muse-html.el (muse-html-markup-paragraph-close): Don't use replace-match; that seems to be slightly evil. Return nil instead of a newline since otherwise Muse thinks that we are not done yet and gets into an infinite loop. This should fix the lock-up problem that resulted from the previous few patches. modified files: ChangeLog muse-blosxom.el muse-html.el 2005-05-19 23:44:16 GMT Michael Olson <mwolson@gnu.org> patch-38 Summary: Parenthesis goofup. Revision: muse--main--1.0--patch-38 * muse-blosxom.el (muse-blosxom-markup-regexps): Remove stray parenthesis. modified files: ChangeLog muse-blosxom.el 2005-05-19 23:41:54 GMT Michael Olson <mwolson@gnu.org> patch-37 Summary: Make docbook and blosxom modes close paragraphs properly at end. Revision: muse--main--1.0--patch-37 * muse-blosxom.el (muse-blosxom-markup-regexps): Use new rule from last patch. * muse-docbook.el (muse-docbook-markup-regexps): Ditto. (muse-docbook-markup-paragraph-close): Adapt from `muse-html-markup-paragraph-close'. * muse-html.el (muse-html-markup-paragraph-close): Add newline so that we preserve the same appearance as before the last patch. modified files: ChangeLog muse-blosxom.el muse-docbook.el muse-html.el 2005-05-19 23:26:50 GMT Michael Olson <mwolson@gnu.org> patch-36 Summary: Bugfix: Close P tag properly at end of file. Revision: muse--main--1.0--patch-36 * muse-blosxom.el: Fix bug where loading this file twice would cause an error. * muse-html.el (muse-html-markup-regexps): Use simpler mechanism for detecting whether or not a paragraph needs a closing P tag. (muse-html-markup-paragraph-close): New function that only inserts a closing P tag when an unclosed P tag is nearby. modified files: ChangeLog muse-blosxom.el muse-html.el 2005-05-18 06:07:02 GMT Michael Olson <mwolson@gnu.org> patch-35 Summary: Update my example settings. Revision: muse--main--1.0--patch-35 * examples/mwolson/muse-init.el: Synchronize with my current settings. modified files: ChangeLog examples/mwolson/muse-init.el 2005-05-18 06:03:07 GMT Michael Olson <mwolson@gnu.org> patch-34 Summary: Update documentation for C-c TAB feature. Revision: muse--main--1.0--patch-34 * muse.texi (Keystroke Summary): Note that C-c TAB calls `muse-insert-tag'. modified files: ChangeLog muse.texi 2005-05-18 06:00:27 GMT Michael Olson <mwolson@gnu.org> patch-33 Summary: New feature: tag completion with C-c TAB. Revision: muse--main--1.0--patch-33 * muse-mode.el (muse-mode-map): Map C-c TAB to `muse-insert-tag'. (muse-tag-history, muse-custom-tags): New variables that keep track of the tag history and newly-entered tags respectively for `muse-insert-tag'. (muse-insert-tag): New function that interactively prompts the user for a tag to use. modified files: ChangeLog muse-mode.el 2005-05-18 05:49:07 GMT Michael Olson <mwolson@gnu.org> patch-32 Summary: Fix XHTML validation error with <hr> and <br>. Revision: muse--main--1.0--patch-32 * muse-html.el (muse-xhtml-markup-strings): Use the proper form of the BR and HR tags for XHTML publishing. This should fix a few validation errors that I've been noticing lately. modified files: ChangeLog muse-html.el 2005-05-12 22:46:10 GMT Michael Olson <mwolson@gnu.org> patch-31 Summary: Remove flyspell overlays on links. Revision: muse--main--1.0--patch-31 * muse-colors.el (muse-colors-link): Remove flyspell overlays. This should make the link clickable. On Emacs21, the color will stay red, but other Emacsen should do the right thing, which is use the normal link color. Hopefully this will fix some strange flyspell-related link problems. modified files: ChangeLog muse-colors.el 2005-05-06 03:30:05 GMT Michael Olson <mwolson@gnu.org> patch-30 Summary: Update my example Muse settings. Revision: muse--main--1.0--patch-30 * examples/mwolson/muse-init.el: Update from my latest version. (muse-project-alist): Remove the francais part of my blog. (my-muse-mode-flyspell-p): Split old `my-muse-mode-affect-p' function into this and `my-muse-mode-fill-nobreak-p'. (muse-mode-hook): Tell fill mode to avoid breaking links; hopefully this is the best way to accomplish this. (my-muse-blosxom-title-to-file): Replace more non-alphanumeric characters in the title. (my-muse-prepare-entry-for-xanga): Treat example regions better. modified files: ChangeLog examples/mwolson/muse-init.el 2005-04-21 18:25:28 GMT Michael Olson <mwolson@gnu.org> patch-29 Summary: Add simple `muse-version' function. Revision: muse--main--1.0--patch-29 * muse.el (muse-version): New function that displays the value of the `muse-version' variable. This should be easier for the user to type than C-h v muse-version. modified files: ChangeLog muse.el 2005-04-21 18:19:02 GMT Michael Olson <mwolson@gnu.org> patch-28 Summary: Don't compile documentation by default. Revision: muse--main--1.0--patch-28 * Makefile (all): Don't compile documentation by default. (doc): Use this rule to compile documentation. modified files: ChangeLog Makefile 2005-04-16 18:08:24 GMT Michael Olson <mwolson@gnu.org> patch-27 Summary: Merge RSS 2.0 enclosure support for muse-journal.el from johnw Revision: muse--main--1.0--patch-27 2005-04-16 Michael Olson <mwolson@gnu.org> * muse-journal.el: Merge in enclosure support for RSS 2.0 from johnw. If a journal entry's title is a [[link]], then an <enclosure> tag will be added to the XML data giving the size and MIME type of the link target. This makes podcasting with Muse trivial. (muse-journal-rss-entry-template): Add enclosure usage to example. (muse-journal-rss-munge-buffer): Implement enclosures. modified files: ChangeLog muse-journal.el 2005-04-15 05:54:30 GMT Michael Olson <mwolson@gnu.org> patch-26 Summary: Standardize source headers, appease elint, don't require planner Revision: muse--main--1.0--patch-26 2005-04-15 Michael Olson <mwolson@gnu.org> * Makefile, scripts/muse-build.el: Moved muse-build.el to the `scripts' directory since it really isn't part of Muse proper; it is used to generate Muse output from the command line. * muse-blosxom.el: Handle case where planner is not loaded so that it isn't a hard requirement. * muse-colors.el: Move definition of `muse-colors-tag-info' up so that elint doesn't complain. * muse-message.el (muse-message-markup-link): Don't throw up on links with no description. * muse-blosxom.el, muse-book.el, muse-colors.el, muse-convert.el, muse-docbook.el, muse-html.el, muse-http.el, muse-journal.el, muse-latex.el, muse-message.el, muse-mode.el, muse-poem.el, muse-project.el, muse-publish.el, muse-regexps.el, muse-texinfo.el, muse.el: Add standard header for each file in preparation for the initial release, which will hopefully happen sometime within the next month. removed files: experimental/.arch-ids/=id modified files: ChangeLog Makefile muse-blosxom.el muse-book.el muse-colors.el muse-convert.el muse-docbook.el muse-html.el muse-http.el muse-journal.el muse-latex.el muse-message.el muse-mode.el muse-poem.el muse-project.el muse-publish.el muse-regexps.el muse-texinfo.el muse.el renamed files: .arch-ids/muse-build.el.id ==> scripts/.arch-ids/muse-build.el.id muse-build.el ==> scripts/muse-build.el removed directories: experimental experimental/.arch-ids 2005-04-14 23:46:47 GMT Michael Olson <mwolson@gnu.org> patch-25 Summary: Merge contents of muse-latexcjk.el into muse-latex.el. Revision: muse--main--1.0--patch-25 2005-04-14 Michael Olson <mwolson@gnu.org> * muse-latex.el (muse-latexcjk-header, muse-latexcjk-footer) (muse-latexcjk-encoding-map, muse-latexcjk-encoding-default) (muse-latexcjk-encoding, muse-latexcjk-transform-content-type): Merge in from muse-latexcjk.el. * muse-latexcjk.el: Removed, functionality merged with muse-latex.el removed files: .arch-ids/muse-latexcjk.el.id muse-latexcjk.el modified files: ChangeLog muse-latex.el 2005-04-06 23:25:47 GMT Michael Olson <mwolson@gnu.org> patch-24 Summary: Merge muse-xhtml.el into muse-html.el. Revision: muse--main--1.0--patch-24 2005-04-06 Michael Olson <mwolson@gnu.org> * examples/mwolson/muse-init.el: Update with respect to the muse-xhtml.el merge. * muse-html.el: The contents of muse-xhtml.el have been merged in as advised by John Wiegley. (muse-html-style-sheet): Add example for XHTML use in the function's documentation. (muse-xhtml-header, muse-xhtml-footer, muse-xhtml-markup-tags): Moved from muse-xhtml.el. * muse-xhtml.el: Removed; contents merged into muse-html.el. removed files: .arch-ids/muse-xhtml.el.id muse-xhtml.el modified files: ChangeLog examples/mwolson/muse-init.el muse-html.el 2005-04-06 03:18:55 GMT Michael Olson <mwolson@gnu.org> patch-23 Summary: Try to fix regexps for Emacs 21.4. Revision: muse--main--1.0--patch-23 2005-04-05 Michael Olson <mwolson@gnu.org> * muse-regexps.el (muse-extreg-usable-p): Try to make regexps work for Emacs 21.4. modified files: ChangeLog muse-regexps.el 2005-04-01 17:59:47 GMT Michael Olson <mwolson@gnu.org> patch-22 Summary: Add comments to the publish-project example script Revision: muse--main--1.0--patch-22 2005-04-01 Michael Olson <mwolson@gnu.org> * examples/publish-project: Moved here from scripts/publish-project. Added a few comments so people know what it is used for. modified files: ChangeLog examples/publish-project renamed files: scripts/.arch-ids/publish-project.id ==> examples/.arch-ids/publish-project.id scripts/publish-project ==> examples/publish-project 2005-04-01 02:27:08 GMT Michael Olson <mwolson@gnu.org> patch-21 Summary: New XHTML style, add more examples to my sample muse config Revision: muse--main--1.0--patch-21 2005-03-31 Michael Olson <mwolson@gnu.org> * examples/mwolson/muse-init.el: Give an example of deriving a custom publishing style. (my-muse-blosxom-finalize): Finalizes the "my-blosxom" style. (my-muse-prepare-entry-for-xanga): Mangle the published output from a blosxom project and copy the result to the clipboard for easy pasting into Xanga's web form. The file is untouched. * muse-html.el (muse-html-style-sheet): Include the <style type="text/css"></style> wrapper around the example. (muse-html-header): Don't add <style type="text/css"></style> around the value of `muse-html-style-sheet' anymore. This allows for the option of putting your stylesheet(s) in a separate file. An example of this is given in the documentation for this variable. * muse-xhtml: New file that implements a publishing style which is derived from HTML mode. It uses a slightly modified version of the HTML markup rules to generate XHTML-compliant output. * muse-blosxom.el: Add new "blosxom-xhtml" style. The old "blosxom" style has been renamed to "blosxom-html". Fix a few header gaffes. * muse-journal.el: Add new "journal-xhtml" style. * muse-message.el: Add new "message-xhtml" style. new files: .arch-ids/muse-xhtml.el.id muse-xhtml.el modified files: ChangeLog examples/mwolson/muse-init.el muse-blosxom.el muse-html.el muse-journal.el muse-message.el 2005-03-25 03:55:13 GMT Michael Olson <mwolson@gnu.org> patch-20 Summary: Add my muse configuration to the examples Revision: muse--main--1.0--patch-20 2005-03-24 Michael Olson <mwolson@gnu.org> * examples/johnw: Move John Wiegley's configuration to this directory. * examples/mwolson: My configuration files go here. * examples/mwolson/muse-init.el: My Muse configuration file. I just figured out how to keep links from being spell-checked or split up by fill-mode, so the implementation of this may be found here. I also made a function that sets up a blog entry for me. new files: examples/johnw/.arch-ids/=id examples/mwolson/.arch-ids/=id examples/mwolson/.arch-ids/muse-init.el.id examples/mwolson/muse-init.el modified files: ChangeLog renamed files: examples/.arch-ids/muse-johnw.el.id ==> examples/johnw/.arch-ids/muse-johnw.el.id examples/.arch-ids/publish-johnw.id ==> examples/johnw/.arch-ids/publish-johnw.id examples/muse-johnw.el ==> examples/johnw/muse-johnw.el examples/publish-johnw ==> examples/johnw/publish-johnw new directories: examples/johnw examples/johnw/.arch-ids examples/mwolson examples/mwolson/.arch-ids 2005-03-24 22:57:10 GMT Michael Olson <mwolson@gnu.org> patch-19 Summary: Add muse-blosxom script and plugin for pyblosxom Revision: muse--main--1.0--patch-19 2005-03-24 Michael Olson <mwolson@gnu.org> * muse-blosxom.el: Update copyright notice in headers and mention the pyblosxom scripts. * contrib/pyblosxom: New directory containing pyblosxom plugins and helper scripts. * contrib/getstamps.py: Script that generates the "timestamps" file, run on the local machine. * contrib/hardcodedates.py: PyBlosxom plugin that interprets the timestamps file. new files: contrib/pyblosxom/.arch-ids/=id contrib/pyblosxom/.arch-ids/getstamps.py.id contrib/pyblosxom/.arch-ids/hardcodedates.py.id contrib/pyblosxom/getstamps.py contrib/pyblosxom/hardcodedates.py modified files: ChangeLog muse-blosxom.el new directories: contrib/pyblosxom contrib/pyblosxom/.arch-ids 2005-03-23 19:05:09 GMT Michael Olson <mwolson@gnu.org> patch-18 Summary: muse-blosxom.el has matured past experimental status Revision: muse--main--1.0--patch-18 2005-03-23 Michael Olson <mwolson@gnu.org> * muse-blosxom.el: Remove common functionality that has already been implemented in `muse-html.el'. Derive this mode from `muse-html'. Update documentation. I now feel that this file is ready to be included in the top-level Muse directory. modified files: ChangeLog muse-blosxom.el renamed files: experimental/.arch-ids/muse-blosxom.el.id ==> .arch-ids/muse-blosxom.el.id experimental/muse-blosxom.el ==> muse-blosxom.el 2005-03-22 05:28:01 GMT Michael Olson <mwolson@gnu.org> patch-17 Summary: Make muse-blosxom.el slightly less experimental Revision: muse--main--1.0--patch-17 2005-03-22 Michael Olson <mwolson@gnu.org> * experimental/muse-blosxom.el (muse-blosxom-page-date-alist): Renamed from `blosxom-page-date-alist'. Currently it does nothing useful. (muse-blosxom-markup-regexps): Remove unnecessary first grouping from the `muse-blosxom-markup-date-directive' rule. (blosxom-set-time): Remove this function. We're not going to be touching the timestamp manually anymore -- it's too much of a hassle. Right now I've got a python program that compiles a timestamp file and a pyblosxom helper that reads it. Something similar could be arranged for blosxom, I'm sure. modified files: ChangeLog experimental/muse-blosxom.el 2005-03-20 19:40:10 GMT Michael Olson <mwolson@gnu.org> patch-16 Summary: Apply latest journal-related updates from johnw Revision: muse--main--1.0--patch-16 modified files: ChangeLog examples/muse-johnw.el muse-journal.el 2005-03-01 02:58:29 GMT Michael Olson <mwolson@gnu.org> patch-15 Summary: Add Projects node to the manual Revision: muse--main--1.0--patch-15 2005-02-28 Michael Olson <mwolson@gnu.org> * muse.texi: Change copyright notice since the FSF is now the copyright holder. (Projects): New node, based on a section from the README file. modified files: ChangeLog muse.texi 2005-03-01 02:25:15 GMT Michael Olson <mwolson@gnu.org> patch-14 Summary: Correct documentation, adding some content. Revision: muse--main--1.0--patch-14 2005-02-28 Michael Olson <mwolson@gnu.org> * muse.texi: Change license terms of the documentation to the GNU GPL instead of the GNU FDL, as per the consent of the copyright holders of the emacs-wiki manual, from which this is based. Some emacs-wiki-isms in the manual were corrected, and the Getting Started section was updated. modified files: ChangeLog muse.texi 2005-02-17 19:08:19 GMT Michael Olson <mwolson@gnu.org> patch-13 Summary: Make muse-blosxom.el a bit more sane, still need to bum it down a bit Revision: muse--main--1.0--patch-13 2005-02-17 Michael Olson <mwolson@gnu.org> * experimental/muse-blosxom.el: Somehow the contents of this file managed to get duplicated. I removed the duplicates. (muse-blosxom-date): Remove this, since it is not useful. (muse-blosxom-header): Use the standard header that blosxom.el has. modified files: ChangeLog experimental/muse-blosxom.el 2005-02-08 04:20:41 GMT Michael Olson <mwolson@gnu.org> patch-12 Summary: Initial commit of muse.texi, nothing substantial Revision: muse--main--1.0--patch-12 2005-02-07 Michael Olson <mwolson@gnu.org> * muse.texi: New file that provides the documentation for Muse. It is in a very rough form at the moment. Nothing substantial may be found here yet. Be ye warned. new files: .arch-ids/muse.texi.id muse.texi modified files: ChangeLog 2005-02-08 01:15:15 GMT Michael Olson <mwolson@gnu.org> patch-11 Summary: Add docstring, new trivial function Revision: muse--main--1.0--patch-11 2005-02-07 Michael Olson <mwolson@gnu.org> * muse-mode.el (muse-mode-map): Make "C-c =" trigger `muse-what-changed'. No functionality change. (muse-what-changed): New function that displays in diff format the changes made since the buffer was last saved. * muse-project.el (muse-project-publish): Add docstring. modified files: ChangeLog muse-mode.el muse-project.el 2005-02-04 18:42:08 GMT Michael Olson <mwolson@gnu.org> patch-10 Summary: Add experimental version of muse-blosxom.el to project Revision: muse--main--1.0--patch-10 2005-02-04 Michael Olson <mwolson@gnu.org> * Makefile (realclean): Remove file that gets generated when fonts are missing. * experimental/muse-bloxsom.el: New file that implements Blosxom support for Muse. It's in a very rough state, hence its placement in the `experimental' directory. new files: experimental/.arch-ids/=id experimental/.arch-ids/muse-blosxom.el.id experimental/muse-blosxom.el modified files: ChangeLog Makefile new directories: experimental experimental/.arch-ids 2005-02-04 18:19:44 GMT Michael Olson <mwolson@gnu.org> patch-9 Summary: Make permissions more consistent Revision: muse--main--1.0--patch-9 modified files: ChangeLog modified directories: contrib examples scripts 2005-02-04 18:13:56 GMT Michael Olson <mwolson@gnu.org> patch-8 Summary: Fix build problems Revision: muse--main--1.0--patch-8 2005-02-04 Michael Olson <mwolson@gnu.org> * muse-build.el: Add contrib directory to `load-path'. (muse-elint-files): Load `muse-regexps.el'. * scripts/publish: Change permissions so that this script is executable. Add contrib directory to load list. Add `muse-regexps.el' to list. modified files: ChangeLog muse-build.el scripts/publish 2005-01-31 21:04:43 GMT Michael Olson <mwolson@gnu.org> patch-7 Summary: Use "—" instead of "—" Revision: muse--main--1.0--patch-7 2005-01-31 Michael Olson <mwolson@gnu.org> * muse-docbook.el (muse-docbook-markup-strings): Replace "—" with "—" so that documents validate properly. Thanks to Björn Lindström for the suggestion. * muse-html.el (muse-html-markup-strings): Ditto. modified files: ChangeLog muse-docbook.el muse-html.el 2005-01-25 19:04:31 GMT Michael Olson <mwolson@gnu.org> patch-6 Summary: Fix use of "[:blank:]" in underline markup Revision: muse--main--1.0--patch-6 2005-01-25 Michael Olson <mwolson@gnu.org> * muse-colors.el (muse-colors-markup): Replace "[:blank:]" with use of `muse-regexp-blank'. modified files: ChangeLog muse-colors.el 2005-01-03 06:00:43 GMT Michael Olson <mwolson@member.fsf.org> patch-5 Summary: Fix problem with headings being given wrong face Revision: muse--main--1.0--patch-5 2005-01-03 Michael Olson <mwolson@gnu.org> * muse-colors.el: Add header. (muse-colors-emphasized): Headings were being given the coloring for the next level of heading instead of the real level (i.e. `muse-header-2' instead of `muse-header-1' for "* Heading"). Thanks to Lan Yufeng for finding this and sending a patch. * muse-regexps.el: Fix header. modified files: ChangeLog muse-colors.el muse-regexps.el 2005-01-02 00:02:15 GMT Michael Olson <mwolson@member.fsf.org> patch-4 Summary: Rotate ChangeLog Revision: muse--main--1.0--patch-4 2005-01-01 Michael Olson <mwolson@gnu.org> * ChangeLog: Move old ChangeLog to ChangeLog.2004. This new version will be automatically maintained by Arch. new files: .arch-ids/ChangeLog.id ChangeLog renamed files: .arch-ids/ChangeLog.id ==> .arch-ids/ChangeLog.2004.id ChangeLog ==> ChangeLog.2004 2004-12-30 07:26:48 GMT Michael Olson <mwolson@member.fsf.org> patch-3 Summary: Extended regexps fix, allow spaces in 1st part of links Revision: muse--main--1.0--patch-3 2004-12-30 Michael Olson <mwolson@gnu.org> * muse.el (muse-link-regexp): Allow spaces in the first part of links. * muse-colors.el, muse-convert.el, muse-docbook.el: Use customizable alternatives to extended character classes. * muse-html.el, muse-mode.el, muse-publish.el: Ditto. modified files: ChangeLog muse-colors.el muse-convert.el muse-docbook.el muse-html.el muse-mode.el muse-publish.el muse.el 2004-12-30 02:18:07 GMT Michael Olson <mwolson@member.fsf.org> patch-2 Summary: Begin to change regexp handling, tweak muse.el header Revision: muse--main--1.0--patch-2 2004-12-29 Michael Olson <mwolson@gnu.org> * muse.el: Change Copyright notice to FSF. Change Maintainer to myself. Update URL. * muse-regexps.el: New file that implements regexp handling. Generalized regexp options will be moved to it eventually. new files: .arch-ids/muse-regexps.el.id muse-regexps.el modified files: ChangeLog muse.el 2004-12-30 01:49:50 GMT Michael Olson <mwolson@member.fsf.org> patch-1 Summary: Do some early spring cleaning Revision: muse--main--1.0--patch-1 2004-12-29 Michael Olson <mwolson@gnu.org> * Makefile: Change path to `publish' script. * contrib/pcomplete.el: New file that is used by Muse without actually being a part of it: hence its location in the contrib directory. * contrib/cgi.el, contrib/httpd.el: New location. * examples/muse-johnw.el, examples/publish-johnw: Ditto. * scripts/publish, scripts/publish-project: Ditto. new files: contrib/.arch-ids/=id contrib/.arch-ids/pcomplete.el.id contrib/pcomplete.el examples/.arch-ids/=id scripts/.arch-ids/=id modified files: ChangeLog Makefile renamed files: .arch-ids/cgi.el.id ==> contrib/.arch-ids/cgi.el.id .arch-ids/httpd.el.id ==> contrib/.arch-ids/httpd.el.id .arch-ids/muse-johnw.el.id ==> examples/.arch-ids/muse-johnw.el.id .arch-ids/publish-johnw.id ==> examples/.arch-ids/publish-johnw.id .arch-ids/publish-project.id ==> scripts/.arch-ids/publish-project.id .arch-ids/publish.id ==> scripts/.arch-ids/publish.id cgi.el ==> contrib/cgi.el httpd.el ==> contrib/httpd.el muse-johnw.el ==> examples/muse-johnw.el publish ==> scripts/publish publish-johnw ==> examples/publish-johnw publish-project ==> scripts/publish-project new directories: contrib contrib/.arch-ids examples examples/.arch-ids scripts scripts/.arch-ids 2004-12-30 01:33:11 GMT Michael Olson <mwolson@member.fsf.org> base-0 Summary: tag of mwolson@member.fsf.org--2004/muse--main--1.0--patch-3 Revision: muse--main--1.0--base-0 (automatically generated log message) See ChangeLog.1 for earlier changes. ;; Local Variables: ;; coding: utf-8 ;; End: �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������muse-el-3.20+dfsg/lisp/�����������������������������������������������������������������������������0000755�0001750�0001750�00000000000�12070123677�014214� 5����������������������������������������������������������������������������������������������������ustar �taffit��������������������������taffit�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������muse-el-3.20+dfsg/lisp/muse-book.el�����������������������������������������������������������������0000644�0001750�0001750�00000026351�11331353120�016431� 0����������������������������������������������������������������������������������������������������ustar �taffit��������������������������taffit�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������;;; muse-book.el --- publish entries into a compilation ;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 ;; Free Software Foundation, Inc. ;; This file is part of Emacs Muse. It is not part of GNU Emacs. ;; Emacs Muse 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 3, or (at your ;; option) any later version. ;; Emacs Muse 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 Emacs Muse; see the file COPYING. If not, write to the ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;;; Contributors: ;;; Code: ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; Muse Book Publishing ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (require 'muse-publish) (require 'muse-project) (require 'muse-latex) (require 'muse-regexps) (defgroup muse-book nil "Module for publishing a series of Muse pages as a complete book. Each page will become a separate chapter in the book, unless the style keyword :nochapters is used, in which case they are all run together as if one giant chapter." :group 'muse-publish) (defcustom muse-book-before-publish-hook nil "A hook run in the book buffer before it is marked up." :type 'hook :group 'muse-book) (defcustom muse-book-after-publish-hook nil "A hook run in the book buffer after it is marked up." :type 'hook :group 'muse-book) (defcustom muse-book-latex-header "\\documentclass{book} \\usepackage[english]{babel} \\usepackage[latin1]{inputenc} \\usepackage[T1]{fontenc} \\begin{document} \\title{<lisp>(muse-publishing-directive \"title\")</lisp>} \\author{<lisp>(muse-publishing-directive \"author\")</lisp>} \\date{<lisp>(muse-publishing-directive \"date\")</lisp>} \\maketitle \\tableofcontents\n" "Header used for publishing books to LaTeX. This may be text or a filename." :type 'string :group 'muse-book) (defcustom muse-book-latex-footer "<lisp>(muse-latex-bibliography)</lisp> \\end{document}" "Footer used for publishing books to LaTeX. This may be text or a filename." :type 'string :group 'muse-book) (defun muse-book-publish-chapter (title entry style &optional nochapters) "Publish the chapter TITLE for the file ENTRY using STYLE. TITLE is a string, ENTRY is a cons of the form (PAGE-NAME . FILE), and STYLE is a Muse style list. This routine does the same basic work as `muse-publish-markup-buffer', but treating the page as if it were a single chapter within a book." (let ((muse-publishing-directives (list (cons "title" title))) (muse-publishing-current-file (cdr entry)) (beg (point)) end) (muse-insert-file-contents (cdr entry)) (setq end (copy-marker (point-max) t)) (muse-publish-markup-region beg end (car entry) style) (goto-char beg) (unless (or nochapters (muse-style-element :nochapters style)) (insert "\n") (muse-insert-markup (muse-markup-text 'chapter)) (insert (let ((chap (muse-publishing-directive "title"))) (if (string= chap title) (car entry) chap))) (muse-insert-markup (muse-markup-text 'chapter-end)) (insert "\n\n")) (save-restriction (narrow-to-region beg end) (muse-publish-markup (or title "") '((100 "<\\(lisp\\)>" 0 muse-publish-markup-tag))) (muse-style-run-hooks :after style)) (goto-char end))) (defun muse-book-publish-p (project target) "Determine whether the book in PROJECT is out-of-date." (let ((pats (cadr project))) (catch 'publish (while pats (if (symbolp (car pats)) (if (eq :book-end (car pats)) (throw 'publish nil) ;; skip past symbol-value pair (setq pats (cddr pats))) (dolist (entry (muse-project-file-entries (car pats))) (when (and (not (muse-project-private-p (cdr entry))) (file-newer-than-file-p (cdr entry) target)) (throw 'publish t))) (setq pats (cdr pats))))))) (defun muse-book-get-directives (file) "Interpret any publishing directives contained in FILE. This is meant to be called in a temp buffer that will later be used for publishing." (save-restriction (narrow-to-region (point) (point)) (unwind-protect (progn (muse-insert-file-contents file) (muse-publish-markup "attributes" `(;; Remove leading and trailing whitespace from the file (100 "\\(\\`\n+\\|\n+\\'\\)" 0 "") ;; Remove trailing whitespace from all lines (200 ,(concat "[" muse-regexp-blank "]+$") 0 "") ;; Handle any leading #directives (300 "\\`#\\([a-zA-Z-]+\\)\\s-+\\(.+\\)\n+" 0 muse-publish-markup-directive)))) (delete-region (point-min) (point-max))))) (defun muse-book-publish-project (project book title style &optional output-dir force) "Publish PROJECT under the name BOOK with the given TITLE and STYLE. BOOK should be a page name, i.e., letting the style determine the prefix and/or suffix. The book is published to OUTPUT-DIR. If FORCE is nil, the book is only published if at least one of its component pages has changed since it was last published." (interactive (let ((project (muse-read-project "Publish project as book: " nil t))) (append (list project (read-string "Basename of book (without extension): ") (read-string "Title of book: ")) (muse-publish-get-info)))) (setq project (muse-project project)) (let ((muse-current-project project)) ;; See if any of the project's files need saving first (muse-project-save-buffers project) ;; Publish the book (muse-book-publish book style output-dir force title))) (defun muse-book-publish (file style &optional output-dir force title) "Publish FILE as a book with the given TITLE and STYLE. The book is published to OUTPUT-DIR. If FORCE is nil, the book is only published if at least one of its component pages has changed since it was last published." ;; Cleanup some of the arguments (let ((style-name style)) (setq style (muse-style style)) (unless style (error "There is no style '%s' defined" style-name))) ;; Publish each page in the project as a chapter in one large book (let* ((output-path (muse-publish-output-file file output-dir style)) (output-suffix (muse-style-element :osuffix style)) (target output-path) (project muse-current-project) (published nil)) (when output-suffix (setq target (concat (muse-path-sans-extension target) output-suffix))) ;; Unless force is non-nil, determine if the book needs publishing (if (and (not force) (not (muse-book-publish-p project target))) (message "The book \"%s\" is up-to-date." file) ;; Create the book from all its component parts (muse-with-temp-buffer (let ((style-final (muse-style-element :final style t)) (style-header (muse-style-element :header style)) (style-footer (muse-style-element :footer style)) (muse-publishing-current-style style) (muse-publishing-directives (list (cons "title" (or title (muse-page-name file))) (cons "date" (format-time-string "%B %e, %Y")))) (muse-publishing-p t) (muse-current-project project) (pats (cadr project)) (nochapters nil)) (run-hooks 'muse-before-book-publish-hook) (let ((style-final style-final) (style-header style-header) (style-footer style-footer)) (unless title (muse-book-get-directives file) (setq title (muse-publishing-directive "title"))) (while pats (if (symbolp (car pats)) (cond ((eq :book-part (car pats)) (insert "\n") (muse-insert-markup (muse-markup-text 'part)) (insert (cadr pats)) (muse-insert-markup (muse-markup-text 'part-end)) (insert "\n") (setq pats (cddr pats))) ((eq :book-chapter (car pats)) (insert "\n") (muse-insert-markup (muse-markup-text 'chapter)) (insert (cadr pats)) (muse-insert-markup (muse-markup-text 'chapter-end)) (insert "\n") (setq pats (cddr pats))) ((eq :nochapters (car pats)) (setq nochapters t pats (cddr pats))) ((eq :book-style (car pats)) (setq style (muse-style (cadr pats))) (setq style-final (muse-style-element :final style t) style-header (muse-style-element :header style) style-footer (muse-style-element :footer style) muse-publishing-current-style style) (setq pats (cddr pats))) ((eq :book-funcall (car pats)) (funcall (cadr pats)) (setq pats (cddr pats))) ((eq :book-end (car pats)) (setq pats nil)) (t (setq pats (cddr pats)))) (let ((entries (muse-project-file-entries (car pats)))) (while (and entries (car entries) (caar entries)) (unless (muse-project-private-p (cdar entries)) (muse-book-publish-chapter title (car entries) style nochapters) (setq published t)) (setq entries (cdr entries)))) (setq pats (cdr pats))))) (goto-char (point-min)) (if style-header (muse-insert-file-or-string style-header file)) (goto-char (point-max)) (if style-footer (muse-insert-file-or-string style-footer file)) (run-hooks 'muse-after-book-publish-hook) (if (muse-write-file output-path) (if style-final (funcall style-final file output-path target)) (setq published nil))))) (if published (message "The book \"%s\" has been published." file)) published)) ;;; Register the Muse BOOK Publishers (muse-derive-style "book-latex" "latex" :header 'muse-book-latex-header :footer 'muse-book-latex-footer :publish 'muse-book-publish) (muse-derive-style "book-pdf" "pdf" :header 'muse-book-latex-header :footer 'muse-book-latex-footer :publish 'muse-book-publish) (provide 'muse-book) ;;; muse-book.el ends here ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������muse-el-3.20+dfsg/lisp/muse-texinfo.el��������������������������������������������������������������0000644�0001750�0001750�00000030004�11331353120�017141� 0����������������������������������������������������������������������������������������������������ustar �taffit��������������������������taffit�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������;;; muse-texinfo.el --- publish entries to Texinfo format or PDF ;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 ;; Free Software Foundation, Inc. ;; This file is part of Emacs Muse. It is not part of GNU Emacs. ;; Emacs Muse 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 3, or (at your ;; option) any later version. ;; Emacs Muse 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 Emacs Muse; see the file COPYING. If not, write to the ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;;; Contributors: ;;; Code: ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; Muse Texinfo Publishing ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (require 'muse-publish) (require 'muse-latex) (require 'texnfo-upd) (defgroup muse-texinfo nil "Rules for marking up a Muse file as a Texinfo article." :group 'muse-publish) (defcustom muse-texinfo-process-natively nil "If non-nil, use the Emacs `texinfmt' module to make Info files." :type 'boolean :require 'texinfmt :group 'muse-texinfo) (defcustom muse-texinfo-extension ".texi" "Default file extension for publishing Texinfo files." :type 'string :group 'muse-texinfo) (defcustom muse-texinfo-info-extension ".info" "Default file extension for publishing Info files." :type 'string :group 'muse-texinfo) (defcustom muse-texinfo-pdf-extension ".pdf" "Default file extension for publishing PDF files." :type 'string :group 'muse-texinfo) (defcustom muse-texinfo-header "\\input texinfo @c -*-texinfo-*- @setfilename <lisp>(concat (muse-page-name) \".info\")</lisp> @settitle <lisp>(muse-publishing-directive \"title\")</lisp> @documentencoding iso-8859-1 @iftex @finalout @end iftex @titlepage @title <lisp>(muse-publishing-directive \"title\")</lisp> @author <lisp>(muse-publishing-directive \"author\")</lisp> @end titlepage <lisp>(and muse-publish-generate-contents \"@contents\")</lisp> @node Top, Overview, , (dir) @top Overview @c Page published by Emacs Muse begins here\n\n" "Text to prepend to a Muse page being published as Texinfo. This may be text or a filename. It may contain <lisp> markup tags." :type 'string :group 'muse-texinfo) (defcustom muse-texinfo-footer "\n@c Page published by Emacs Muse ends here @bye\n" "Text to append to a Muse page being published as Texinfo. This may be text or a filename. It may contain <lisp> markup tags." :type 'string :group 'muse-texinfo) (defcustom muse-texinfo-markup-regexps nil "List of markup rules for publishing a Muse page to Texinfo. For more on the structure of this list, see `muse-publish-markup-regexps'." :type '(repeat (choice (list :tag "Markup rule" integer (choice regexp symbol) integer (choice string function symbol)) function)) :group 'muse-texinfo) (defcustom muse-texinfo-markup-functions '((table . muse-texinfo-markup-table) (heading . muse-texinfo-markup-heading)) "An alist of style types to custom functions for that kind of text. For more on the structure of this list, see `muse-publish-markup-functions'." :type '(alist :key-type symbol :value-type function) :group 'muse-texinfo) (defcustom muse-texinfo-markup-strings '((image-with-desc . "@center @image{%1%, , , %3%, %2%}@*\n@center %3%") (image . "@noindent @image{%s, , , , %s}") (image-link . "@uref{%s, %s.%s}") (anchor-ref . "@ref{%s, %s}") (url . "@uref{%s, %s}") (link . "@ref{Top, %2%, , %1%, }") (link-and-anchor . "@ref{%3%, %2%, , %1%, %3%}") (email-addr . "@email{%s}") (anchor . "@anchor{%s} ") (emdash . "---") (comment-begin . "@ignore\n") (comment-end . "\n@end ignore\n") (rule . "@sp 1") (no-break-space . "@w{ }") (line-break . "@*") (enddots . "@enddots{}") (dots . "@dots{}") (section . "@chapter ") (subsection . "@section ") (subsubsection . "@subsection ") (section-other . "@subsubheading ") (footnote . "@footnote{") (footnote-end . "}") (begin-underline . "_") (end-underline . "_") (begin-literal . "@samp{") (end-literal . "}") (begin-emph . "@emph{") (end-emph . "}") (begin-more-emph . "@strong{") (end-more-emph . "}") (begin-most-emph . "@strong{@emph{") (end-most-emph . "}}") (begin-verse . "@display\n") (end-verse-line . "") (verse-space . "@ @ ") (end-verse . "\n@end display") (begin-example . "@example\n") (end-example . "\n@end example") (begin-center . "@quotation\n") (end-center . "\n@end quotation") (begin-quote . "@quotation\n") (end-quote . "\n@end quotation") (begin-cite . "") (begin-cite-author . "") (begin-cite-year . "") (end-cite . "") (begin-uli . "@itemize @bullet\n") (end-uli . "\n@end itemize") (begin-uli-item . "@item\n") (begin-oli . "@enumerate\n") (end-oli . "\n@end enumerate") (begin-oli-item . "@item\n") (begin-dl . "@table @strong\n") (end-dl . "\n@end table") (begin-ddt . "@item ")) "Strings used for marking up text. These cover the most basic kinds of markup, the handling of which differs little between the various styles." :type '(alist :key-type symbol :value-type string) :group 'muse-texinfo) (defcustom muse-texinfo-markup-specials '((?@ . "@@") (?{ . "@{") (?} . "@}")) "A table of characters which must be represented specially." :type '(alist :key-type character :value-type string) :group 'muse-texinfo) (defcustom muse-texinfo-markup-specials-url '((?@ . "@@") (?{ . "@{") (?} . "@}") (?, . "@comma{}")) "A table of characters which must be represented specially. These are applied to URLs." :type '(alist :key-type character :value-type string) :group 'muse-texinfo) (defun muse-texinfo-decide-specials (context) "Determine the specials to escape, depending on CONTEXT." (cond ((memq context '(underline literal emphasis email url url-desc image footnote)) muse-texinfo-markup-specials-url) (t muse-texinfo-markup-specials))) (defun muse-texinfo-markup-table () (let* ((table-info (muse-publish-table-fields (match-beginning 0) (match-end 0))) (row-len (car table-info)) (field-list (cdr table-info))) (when table-info (muse-insert-markup "@multitable @columnfractions") (dotimes (field row-len) (muse-insert-markup " " (number-to-string (/ 1.0 row-len)))) (dolist (fields field-list) (let ((type (car fields))) (unless (eq type 'hline) (setq fields (cdr fields)) (if (= type 2) (muse-insert-markup "\n@headitem ") (muse-insert-markup "\n@item ")) (insert (car fields)) (setq fields (cdr fields)) (dolist (field fields) (muse-insert-markup " @tab ") (insert field))))) (muse-insert-markup "\n@end multitable") (insert ?\n)))) (defun muse-texinfo-remove-links (string) "Remove explicit links from STRING, replacing them with the link description. If no description exists for the link, use the link itself." (let ((start nil)) (while (setq start (string-match muse-explicit-link-regexp string start)) (setq string (replace-match (or (match-string 2 string) (match-string 1 string)) t t string))) string)) (defun muse-texinfo-protect-wikiwords (start end) "Protect all wikiwords from START to END from further processing." (and (boundp 'muse-wiki-wikiword-regexp) (featurep 'muse-wiki) (save-excursion (goto-char start) (while (re-search-forward muse-wiki-wikiword-regexp end t) (muse-publish-mark-read-only (match-beginning 0) (match-end 0)))))) (defun muse-texinfo-markup-heading () (save-excursion (muse-publish-markup-heading)) (let* ((eol (muse-line-end-position)) (orig-heading (buffer-substring (point) eol)) (beg (point))) (delete-region (point) eol) ;; don't allow links to be published in headings (insert (muse-texinfo-remove-links orig-heading)) (muse-texinfo-protect-wikiwords beg (point)))) (defun muse-texinfo-munge-buffer () (muse-latex-fixup-dquotes) (texinfo-insert-node-lines (point-min) (point-max) t) (texinfo-all-menus-update t)) (defun muse-texinfo-pdf-browse-file (file) (shell-command (concat "open " file))) (defun muse-texinfo-info-generate (file output-path final-target) ;; The version of `texinfmt.el' that comes with Emacs 21 doesn't ;; support @documentencoding, so hack it in. (when (and (not (featurep 'xemacs)) (eq emacs-major-version 21)) (put 'documentencoding 'texinfo-format 'texinfo-discard-line-with-args)) ;; Most versions of `texinfmt.el' do not support @headitem, so hack ;; it in. (unless (get 'headitem 'texinfo-format) (put 'headitem 'texinfo-format 'texinfo-multitable-item)) (muse-publish-transform-output file output-path final-target "Info" (function (lambda (file output-path) (if muse-texinfo-process-natively (save-window-excursion (save-excursion (find-file file) (let ((inhibit-read-only t)) (texinfo-format-buffer)) (save-buffer) (kill-buffer (current-buffer)) (let ((buf (get-file-buffer file))) (with-current-buffer buf (set-buffer-modified-p nil) (kill-buffer (current-buffer)))) t)) (let ((result (shell-command (concat "makeinfo --enable-encoding --output=" output-path " " file)))) (if (or (not (numberp result)) (eq result 0)) t nil))))))) (defun muse-texinfo-pdf-generate (file output-path final-target) (let ((muse-latex-pdf-program "pdftex") (muse-latex-pdf-cruft '(".aux" ".cp" ".fn" ".ky" ".log" ".pg" ".toc" ".tp" ".vr"))) (muse-latex-pdf-generate file output-path final-target))) ;;; Register the Muse TEXINFO Publishers (muse-define-style "texi" :suffix 'muse-texinfo-extension :regexps 'muse-texinfo-markup-regexps :functions 'muse-texinfo-markup-functions :strings 'muse-texinfo-markup-strings :specials 'muse-texinfo-decide-specials :after 'muse-texinfo-munge-buffer :header 'muse-texinfo-header :footer 'muse-texinfo-footer :browser 'find-file) (muse-derive-style "info" "texi" :final 'muse-texinfo-info-generate :link-suffix 'muse-texinfo-info-extension :osuffix 'muse-texinfo-info-extension :browser 'info) (muse-derive-style "info-pdf" "texi" :final 'muse-texinfo-pdf-generate :link-suffix 'muse-texinfo-pdf-extension :osuffix 'muse-texinfo-pdf-extension :browser 'muse-texinfo-pdf-browse-file) (provide 'muse-texinfo) ;;; muse-texinfo.el ends here ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������muse-el-3.20+dfsg/lisp/muse-docbook.el��������������������������������������������������������������0000644�0001750�0001750�00000032757�11331353120�017126� 0����������������������������������������������������������������������������������������������������ustar �taffit��������������������������taffit�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������;;; muse-docbook.el --- publish DocBook files ;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 ;; Free Software Foundation, Inc. ;; This file is part of Emacs Muse. It is not part of GNU Emacs. ;; Emacs Muse 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 3, or (at your ;; option) any later version. ;; Emacs Muse 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 Emacs Muse; see the file COPYING. If not, write to the ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;;; Contributors: ;; Dale P. Smith (dpsm AT en DOT com) improved the markup ;; significantly and made many valuable suggestions. ;;; Code: ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; Muse DocBook XML Publishing ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (require 'muse-publish) (require 'muse-regexps) (require 'muse-xml-common) (defgroup muse-docbook nil "Options controlling the behavior of Muse DocBook XML publishing. See `muse-docbook' for more information." :group 'muse-publish) (defcustom muse-docbook-extension ".xml" "Default file extension for publishing DocBook XML files." :type 'string :group 'muse-docbook) (defcustom muse-docbook-header "<?xml version=\"1.0\" encoding=\"<lisp> (muse-docbook-encoding)</lisp>\"?> <!DOCTYPE article PUBLIC \"-//OASIS//DTD DocBook V4.2//EN\" \"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd\"<lisp>(muse-docbook-entities)</lisp>> <article> <articleinfo> <title><lisp>(muse-publishing-directive \"title\")</lisp> (muse-docbook-get-author (muse-publishing-directive \"author\")) (muse-publishing-directive \"date\") \n" "Header used for publishing DocBook XML files. This may be text or a filename." :type 'string :group 'muse-docbook) (defcustom muse-docbook-footer " (muse-docbook-bibliography)\n" "Footer used for publishing DocBook XML files. This may be text or a filename." :type 'string :group 'muse-docbook) (defcustom muse-docbook-markup-regexps `(;; Beginning of doc, end of doc, or plain paragraph separator (10000 ,(concat "\\(\\(\n\\(?:[" muse-regexp-blank "]*\n\\)*" "\\([" muse-regexp-blank "]*\n\\)\\)" "\\|\\`\\s-*\\|\\s-*\\'\\)") 3 muse-docbook-markup-paragraph)) "List of markup rules for publishing a Muse page to DocBook XML. For more on the structure of this list, see `muse-publish-markup-regexps'." :type '(repeat (choice (list :tag "Markup rule" integer (choice regexp symbol) integer (choice string function symbol)) function)) :group 'muse-docbook) (defcustom muse-docbook-markup-functions '((anchor . muse-xml-markup-anchor) (table . muse-xml-markup-table)) "An alist of style types to custom functions for that kind of text. For more on the structure of this list, see `muse-publish-markup-functions'." :type '(alist :key-type symbol :value-type function) :group 'muse-docbook) (defcustom muse-docbook-markup-strings '((image-with-desc . " %3% ") (image . " ") (image-link . " ") (anchor-ref . "%s") (url . "%s") (link . "%s") (link-and-anchor . "%s") (email-addr . "%s") (anchor . "\n") (emdash . "%s—%s") (comment-begin . "") (rule . "") (no-break-space . " ") (enddots . "....") (dots . "...") (section . "
    ") (section-end . "") (subsection . "
    ") (subsection-end . "") (subsubsection . "
    ") (subsubsection-end . "") (section-other . "
    ") (section-other-end . "") (section-close . "
    ") (footnote . "") (footnote-end . "") (begin-underline . "") (end-underline . "") (begin-literal . "") (end-literal . "") (begin-emph . "") (end-emph . "") (begin-more-emph . "") (end-more-emph . "") (begin-most-emph . "") (end-most-emph . "") (begin-verse . "\n") (verse-space . " ") (end-verse . "") (begin-example . "") (end-example . "") (begin-center . "\n") (end-center . "\n") (begin-quote . "
    \n") (end-quote . "\n
    ") (begin-cite . "") (begin-cite-author . "A:") (begin-cite-year . "Y:") (end-cite . "") (begin-quote-item . "") (end-quote-item . "") (begin-uli . "\n") (end-uli . "\n") (begin-uli-item . "") (end-uli-item . "") (begin-oli . "\n") (end-oli . "\n") (begin-oli-item . "") (end-oli-item . "") (begin-dl . "\n") (end-dl . "\n") (begin-dl-item . "\n") (end-dl-item . "\n") (begin-ddt . "") (end-ddt . "") (begin-dde . "") (end-dde . "") (begin-table . "\n") (end-table . "") (begin-table-group . " \n") (end-table-group . " \n") (begin-table-row . " \n") (end-table-row . " \n") (begin-table-entry . " ") (end-table-entry . "\n")) "Strings used for marking up text. These cover the most basic kinds of markup, the handling of which differs little between the various styles." :type '(alist :key-type symbol :value-type string) :group 'muse-docbook) (defcustom muse-docbook-encoding-default 'utf-8 "The default Emacs buffer encoding to use in published files. This will be used if no special characters are found." :type 'symbol :group 'muse-docbook) (defcustom muse-docbook-charset-default "utf-8" "The default DocBook XML charset to use if no translation is found in `muse-docbook-encoding-map'." :type 'string :group 'muse-docbook) (defun muse-docbook-encoding () (muse-xml-transform-content-type (or (and (boundp 'buffer-file-coding-system) buffer-file-coding-system) muse-docbook-encoding-default) muse-docbook-charset-default)) (defun muse-docbook-markup-paragraph () (catch 'bail-out (let ((end (copy-marker (match-end 0) t))) (goto-char (match-beginning 0)) (when (save-excursion (save-match-data (and (not (get-text-property (max (point-min) (1- (point))) 'muse-no-paragraph)) (re-search-backward "<\\(/?\\)\\(para\\|footnote\\|literallayout\\)[ >]" nil t) (cond ((string= (match-string 2) "literallayout") (and (not (string= (match-string 1) "/")) (throw 'bail-out t))) ((string= (match-string 2) "para") (and (not (string= (match-string 1) "/")) ;; don't mess up nested lists (not (and (muse-looking-back "") (throw 'bail-out t))))) ((string= (match-string 2) "footnote") (string= (match-string 1) "/")) (t nil))))) (when (get-text-property (1- (point)) 'muse-end-list) (goto-char (previous-single-property-change (1- (point)) 'muse-end-list))) (muse-insert-markup "")) (goto-char end)) (cond ((eobp) (unless (bolp) (insert "\n"))) ((get-text-property (point) 'muse-no-paragraph) (forward-char 1) nil) ((eq (char-after) ?\<) (when (looking-at (concat "<\\(emphasis\\|systemitem\\|inlinemediaobject" "\\|u?link\\|anchor\\|email\\)[ >]")) (muse-insert-markup ""))) (t (muse-insert-markup ""))))) (defun muse-docbook-get-author (&optional author) "Split the AUTHOR directive into separate fields. AUTHOR should be of the form: \"Firstname Other Names Lastname\", and anything after `Firstname' is optional." (setq author (save-match-data (split-string author))) (let ((num-el (length author))) (cond ((eq num-el 1) (concat "" (car author) "")) ((eq num-el 2) (concat "" (nth 0 author) "" "" (nth 1 author) "")) ((eq num-el 3) (concat "" (nth 0 author) "" "" (nth 1 author) "" "" (nth 2 author) "")) (t (let (first last) (setq first (car author)) (setq author (nreverse (cdr author))) (setq last (car author)) (setq author (nreverse (cdr author))) (concat "" first "" "" (mapconcat 'identity author " ") "" "" last "")))))) (defun muse-docbook-fixup-images () (goto-char (point-min)) (while (re-search-forward (concat "$") nil t) (replace-match (upcase (match-string 1)) t t nil 1))) (defun muse-docbook-fixup-citations () ;; remove the role attribute if there is no role (goto-char (point-min)) (while (re-search-forward "<\\(citation role=\"nil\"\\)>" nil t) (replace-match "citation" t t nil 1)) ;; replace colons in multi-head citations with semicolons (goto-char (point-min)) (while (re-search-forward "" nil t) (let ((start (point)) (end (re-search-forward ""))) (save-restriction (narrow-to-region start end) (goto-char (point-min)) (while (re-search-forward "," nil t) (replace-match ";")))))) (defun muse-docbook-munge-buffer () (muse-docbook-fixup-images) (muse-docbook-fixup-citations)) (defun muse-docbook-entities () (save-excursion (goto-char (point-min)) (if (re-search-forward "\n]") ""))) (defun muse-docbook-bibliography () (save-excursion (goto-char (point-min)) (if (re-search-forward " tag and provided an implementation for emacs-wiki. ;; Charles Wang (wcy123 AT gmail DOT com) provided an initial ;; implementation of the tag for Muse. ;; Clinton Ebadi (clinton AT unknownlamer DOT org) provided further ;; ideas for the implementation of the tag. ;;; Code: ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; Muse HTML Publishing ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (require 'muse-publish) (require 'muse-regexps) (require 'muse-xml-common) (defgroup muse-html nil "Options controlling the behavior of Muse HTML publishing." :group 'muse-publish) (defcustom muse-html-extension ".html" "Default file extension for publishing HTML files." :type 'string :group 'muse-html) (defcustom muse-xhtml-extension ".html" "Default file extension for publishing XHTML files." :type 'string :group 'muse-html) (defcustom muse-html-style-sheet "" "Store your stylesheet definitions here. This is used in `muse-html-header'. You can put raw CSS in here or a tag to an external stylesheet. This text may contain markup tags. An example of using is as follows. " :type 'string :group 'muse-html) (defcustom muse-xhtml-style-sheet "" "Store your stylesheet definitions here. This is used in `muse-xhtml-header'. You can put raw CSS in here or a tag to an external stylesheet. This text may contain markup tags. An example of using is as follows. " :type 'string :group 'muse-html) (defcustom muse-html-header " <lisp> (concat (muse-publishing-directive \"title\") (let ((author (muse-publishing-directive \"author\"))) (if (not (string= author (user-full-name))) (concat \" (by \" author \")\"))))</lisp> muse-html-meta-http-equiv\" content=\"muse-html-meta-content-type\"> (let ((maintainer (muse-style-element :maintainer))) (when maintainer (concat \"\"))) (muse-style-element :style-sheet muse-publishing-current-style)

    (concat (muse-publishing-directive \"title\") (let ((author (muse-publishing-directive \"author\"))) (if (not (string= author (user-full-name))) (concat \" (by \" author \")\"))))

    \n" "Header used for publishing HTML files. This may be text or a filename." :type 'string :group 'muse-html) (defcustom muse-html-footer " \n" "Footer used for publishing HTML files. This may be text or a filename." :type 'string :group 'muse-html) (defcustom muse-xhtml-header " (muse-html-encoding)
    \"?> <lisp> (concat (muse-publishing-directive \"title\") (let ((author (muse-publishing-directive \"author\"))) (if (not (string= author (user-full-name))) (concat \" (by \" author \")\"))))</lisp> muse-html-meta-http-equiv\" content=\"muse-html-meta-content-type\" /> (let ((maintainer (muse-style-element :maintainer))) (when maintainer (concat \"\"))) (muse-style-element :style-sheet muse-publishing-current-style)

    (concat (muse-publishing-directive \"title\") (let ((author (muse-publishing-directive \"author\"))) (if (not (string= author (user-full-name))) (concat \" (by \" author \")\"))))

    \n" "Header used for publishing XHTML files. This may be text or a filename." :type 'string :group 'muse-html) (defcustom muse-xhtml-footer " \n" "Footer used for publishing XHTML files. This may be text or a filename." :type 'string :group 'muse-html) (defcustom muse-html-anchor-on-word nil "When true, anchors surround the closest word. This allows you to select them in a browser (i.e. for pasting), but has the side-effect of marking up headers in multiple colors if your header style is different from your link style." :type 'boolean :group 'muse-html) (defcustom muse-html-table-attributes " class=\"muse-table\" border=\"2\" cellpadding=\"5\"" "The attribute to be used with HTML tags. Note that Muse supports insertion of raw HTML tags, as long as you wrap the region in ." :type 'string :group 'muse-html) (defcustom muse-html-markup-regexps `(;; Beginning of doc, end of doc, or plain paragraph separator (10000 ,(concat "\\(\\(\n\\(?:[" muse-regexp-blank "]*\n\\)*" "\\([" muse-regexp-blank "]*\n\\)\\)" "\\|\\`\\s-*\\|\\s-*\\'\\)") ;; this is somewhat repetitive because we only require the ;; line just before the paragraph beginning to be not ;; read-only 3 muse-html-markup-paragraph)) "List of markup rules for publishing a Muse page to HTML. For more on the structure of this list, see `muse-publish-markup-regexps'." :type '(repeat (choice (list :tag "Markup rule" integer (choice regexp symbol) integer (choice string function symbol)) function)) :group 'muse-html) (defcustom muse-html-markup-functions '((anchor . muse-html-markup-anchor) (table . muse-html-markup-table) (footnote . muse-html-markup-footnote)) "An alist of style types to custom functions for that kind of text. For more on the structure of this list, see `muse-publish-markup-functions'." :type '(alist :key-type symbol :value-type function) :group 'muse-html) (defcustom muse-html-markup-strings '((image-with-desc . "
    \"%3%\"
    %3%
    ") (image . "\"\"") (image-link . " ") (anchor-ref . "%s") (url . "%s") (link . "%s") (link-and-anchor . "%s") (email-addr . "%s") (anchor . "") (emdash . "%s—%s") (comment-begin . "") (rule . "
    ") (fn-sep . "
    \n") (no-break-space . " ") (line-break . "
    ") (enddots . "....") (dots . "...") (section . "

    ") (section-end . "

    ") (subsection . "

    ") (subsection-end . "

    ") (subsubsection . "

    ") (subsubsection-end . "

    ") (section-other . "
    ") (section-other-end . "
    ") (begin-underline . "") (end-underline . "") (begin-literal . "") (end-literal . "") (begin-cite . "") (begin-cite-author . "") (begin-cite-year . "") (end-cite . "") (begin-emph . "") (end-emph . "") (begin-more-emph . "") (end-more-emph . "") (begin-most-emph . "") (end-most-emph . "") (begin-verse . "

    \n") (verse-space . "  ") (end-verse-line . "
    ") (end-last-stanza-line . "
    ") (empty-verse-line . "
    ") (end-verse . "

    ") (begin-example . "
    ")
        (end-example     . "
    ") (begin-center . "
    \n

    ") (end-center . "

    \n
    ") (begin-quote . "
    \n") (end-quote . "\n
    ") (begin-quote-item . "

    ") (end-quote-item . "

    ") (begin-uli . "
      \n") (end-uli . "\n
    ") (begin-uli-item . "
  • ") (end-uli-item . "
  • ") (begin-oli . "
      \n") (end-oli . "\n
    ") (begin-oli-item . "
  • ") (end-oli-item . "
  • ") (begin-dl . "
    \n") (end-dl . "\n
    ") (begin-ddt . "
    ") (end-ddt . "
    ") (begin-dde . "
    ") (end-dde . "
    ") (begin-table . "\n") (end-table . "") (begin-table-row . " \n") (end-table-row . " \n") (begin-table-entry . " <%s>") (end-table-entry . "\n")) "Strings used for marking up text as HTML. These cover the most basic kinds of markup, the handling of which differs little between the various styles." :type '(alist :key-type symbol :value-type string) :group 'muse-html) (defcustom muse-xhtml-markup-strings '((image-with-desc . "
    \"%3%\"
    %3%
    ") (image . "\"\"") (image-link . "
    \"\"") (rule . "
    ") (fn-sep . "
    \n") (line-break . "
    ") (begin-underline . "") (end-underline . "") (begin-center . "

    \n") (end-center . "\n

    ") (end-verse-line . "
    ") (end-last-stanza-line . "
    ") (empty-verse-line . "
    ")) "Strings used for marking up text as XHTML. These cover the most basic kinds of markup, the handling of which differs little between the various styles. If a markup rule is not found here, `muse-html-markup-strings' is searched." :type '(alist :key-type symbol :value-type string) :group 'muse-html) (defcustom muse-xhtml1.1-markup-strings '((anchor . "")) "Strings used for marking up text as XHTML 1.1. These cover the most basic kinds of markup, the handling of which differs little between the various styles. If a markup rule is not found here, `muse-xhtml-markup-strings' and `muse-html-markup-strings' are searched." :type '(alist :key-type symbol :value-type string) :group 'muse-html) (defcustom muse-html-markup-tags '(("class" t t t muse-html-class-tag) ("div" t t t muse-html-div-tag) ("src" t t nil muse-html-src-tag)) "A list of tag specifications, for specially marking up HTML." :type '(repeat (list (string :tag "Markup tag") (boolean :tag "Expect closing tag" :value t) (boolean :tag "Parse attributes" :value nil) (boolean :tag "Nestable" :value nil) function)) :group 'muse-html) (defcustom muse-html-meta-http-equiv "Content-Type" "The http-equiv attribute used for the HTML tag." :type 'string :group 'muse-html) (defcustom muse-html-meta-content-type "text/html" "The content type used for the HTML tag. If you are striving for XHTML 1.1 compliance, you may want to change this to \"application/xhtml+xml\"." :type 'string :group 'muse-html) (defcustom muse-html-meta-content-encoding (if (featurep 'mule) 'detect "iso-8859-1") "The charset to append to the HTML tag. If set to the symbol 'detect, use `muse-html-encoding-map' to try and determine the HTML charset from emacs's coding. If set to a string, this string will be used to force a particular charset" :type '(choice string symbol) :group 'muse-html) (defcustom muse-html-encoding-default 'iso-8859-1 "The default Emacs buffer encoding to use in published files. This will be used if no special characters are found." :type 'symbol :group 'muse-html) (defcustom muse-html-charset-default "iso-8859-1" "The default HTML meta charset to use if no translation is found in `muse-html-encoding-map'." :type 'string :group 'muse-html) (defcustom muse-html-src-allowed-modes t "Modes that we allow the tag to colorize. If t, permit the tag to colorize any mode. If a list of mode names, such as '(\"html\" \"latex\"), and the lang argument to is not in the list, then use fundamental mode instead." :type '(choice (const :tag "Any" t) (repeat (string :tag "Mode"))) :group 'muse-html) (defun muse-html-insert-anchor (anchor) "Insert an anchor, either around the word at point, or within a tag." (skip-chars-forward (concat muse-regexp-blank "\n")) (if (looking-at (concat "<\\([^" muse-regexp-blank "/>\n]+\\)>")) (let ((tag (match-string 1))) (goto-char (match-end 0)) (muse-insert-markup (muse-markup-text 'anchor anchor)) (when muse-html-anchor-on-word (or (and (search-forward (format "" tag) (muse-line-end-position) t) (goto-char (match-beginning 0))) (forward-word 1))) (muse-insert-markup "")) (muse-insert-markup (muse-markup-text 'anchor anchor)) (when muse-html-anchor-on-word (forward-word 1)) (muse-insert-markup "\n"))) (defun muse-html-markup-anchor () (unless (get-text-property (match-end 1) 'muse-link) (save-match-data (muse-html-insert-anchor (match-string 2))) (match-string 1))) (defun muse-html-markup-paragraph () (let ((end (copy-marker (match-end 0) t))) (goto-char (match-beginning 0)) (when (save-excursion (save-match-data (and (not (get-text-property (max (point-min) (1- (point))) 'muse-no-paragraph)) (re-search-backward "<\\(/?\\)p[ >]" nil t) (not (string-equal (match-string 1) "/"))))) (when (get-text-property (1- (point)) 'muse-end-list) (goto-char (previous-single-property-change (1- (point)) 'muse-end-list))) (muse-insert-markup "

    ")) (goto-char end)) (cond ((eobp) (unless (bolp) (insert "\n"))) ((get-text-property (point) 'muse-no-paragraph) (forward-char 1) nil) ((eq (char-after) ?\<) (cond ((looking-at "<\\(em\\|strong\\|code\\|span\\)[ >]") (muse-insert-markup "

    ")) ((looking-at "\n]+>") (muse-insert-markup "

    "))) ((looking-at "]") (muse-insert-markup "

    ")) (t (forward-char 1) nil))) ((muse-looking-back "\\(\\|


    \\)\n\n") (muse-insert-markup "

    ")) (t (muse-insert-markup "

    ")))) (defun muse-html-markup-footnote () (cond ((get-text-property (match-beginning 0) 'muse-link) nil) ((= (muse-line-beginning-position) (match-beginning 0)) (prog1 (let ((text (match-string 1))) (muse-insert-markup (concat "

    " "" text "."))) (save-excursion (save-match-data (let* ((beg (goto-char (match-end 0))) (end (and (search-forward "\n\n" nil t) (prog1 (copy-marker (match-beginning 0)) (goto-char beg))))) (while (re-search-forward (concat "^[" muse-regexp-blank "]+\\([^\n]\\)") end t) (replace-match "\\1" t))))) (replace-match ""))) (t (let ((text (match-string 1))) (muse-insert-markup (concat "" text ""))) (replace-match "")))) (defun muse-html-markup-table () (muse-xml-markup-table muse-html-table-attributes)) ;; Handling of tags for HTML (defun muse-html-strip-links (string) "Remove all HTML links from STRING." (muse-replace-regexp-in-string "\\(\\|\\)" "" string nil t)) (defun muse-html-insert-contents (depth) "Scan the current document and generate a table of contents at point. DEPTH indicates how many levels of headings to include. The default is 2." (let ((max-depth (or depth 2)) (index 1) base contents l end) (save-excursion (goto-char (point-min)) (search-forward "Page published by Emacs Muse begins here" nil t) (catch 'done (while (re-search-forward "\\(.+?\\)$" nil t) (unless (and (get-text-property (point) 'read-only) (not (get-text-property (match-beginning 0) 'muse-contents))) (remove-text-properties (match-beginning 0) (match-end 0) '(muse-contents nil)) (setq l (1- (string-to-number (match-string 1)))) (if (null base) (setq base l) (if (< l base) (throw 'done t))) (when (<= l max-depth) ;; escape specials now before copying the text, so that we ;; can deal sanely with both emphasis in titles and ;; special characters (goto-char (match-end 2)) (setq end (point-marker)) (muse-publish-escape-specials (match-beginning 2) end nil 'document) (muse-publish-mark-read-only (match-beginning 2) end) (setq contents (cons (cons l (buffer-substring-no-properties (match-beginning 2) end)) contents)) (set-marker end nil) (goto-char (match-beginning 2)) (muse-html-insert-anchor (concat "sec" (int-to-string index))) (setq index (1+ index))))))) (setq index 1 contents (nreverse contents)) (let ((depth 1) (sub-open 0) (p (point))) (muse-insert-markup "

    \n
    \n") (while contents (muse-insert-markup "
    \n" "" (muse-html-strip-links (cdar contents)) "\n" "
    \n") (setq index (1+ index) depth (caar contents) contents (cdr contents)) (when contents (cond ((< (caar contents) depth) (let ((idx (caar contents))) (while (< idx depth) (muse-insert-markup "
    \n\n") (setq sub-open (1- sub-open) idx (1+ idx))))) ((> (caar contents) depth) ; can't jump more than one ahead (muse-insert-markup "
    \n
    \n") (setq sub-open (1+ sub-open)))))) (while (> sub-open 0) (muse-insert-markup "
    \n
    \n") (setq sub-open (1- sub-open))) (muse-insert-markup "\n
    \n") (muse-publish-mark-read-only p (point))))) (defun muse-html-denote-headings () "Place a text property on any headings in the current buffer. This allows the headings to be picked up later on if publishing a table of contents." (save-excursion (goto-char (point-min)) (search-forward "Page published by Emacs Muse begins here" nil t) (while (re-search-forward "\\(.+?\\)$" nil t) (unless (get-text-property (point) 'read-only) (add-text-properties (match-beginning 0) (match-end 0) '(muse-contents t)))))) (defun muse-html-class-tag (beg end attrs) (let ((name (cdr (assoc "name" attrs)))) (when name (goto-char beg) (muse-insert-markup "") (save-excursion (goto-char end) (muse-insert-markup ""))))) (defun muse-html-div-tag (beg end attrs) "Publish a
    tag for HTML." (let ((id (cdr (assoc "id" attrs))) (style (cdr (assoc "style" attrs)))) (when (or id style) (goto-char beg) (if (null id) (muse-insert-markup "
    ") (muse-insert-markup "
    ")) (save-excursion (goto-char end) (muse-insert-markup "
    "))))) (defun muse-html-src-tag (beg end attrs) "Publish the region using htmlize. The language to use may be specified by the \"lang\" attribute. Muse will look for a function named LANG-mode, where LANG is the value of the \"lang\" attribute. This tag requires htmlize 1.34 or later in order to work." (if (condition-case nil (progn (require 'htmlize) (if (fboundp 'htmlize-region-for-paste) nil (muse-display-warning (concat "The `htmlize-region-for-paste' function was not" " found.\nThis is available in htmlize.el 1.34" " or later.")) t)) (error nil t)) ;; if htmlize.el was not found, treat this like an example tag (muse-publish-example-tag beg end) (muse-publish-ensure-block beg end) (let* ((lang (cdr (assoc "lang" attrs))) (mode (or (and (not (eq muse-html-src-allowed-modes t)) (not (member lang muse-html-src-allowed-modes)) 'fundamental-mode) (intern-soft (concat lang "-mode")))) (text (muse-delete-and-extract-region beg end)) (htmltext (with-temp-buffer (insert text) (if (functionp mode) (funcall mode) (fundamental-mode)) (font-lock-fontify-buffer) ;; silence the byte-compiler (when (fboundp 'htmlize-region-for-paste) ;; transform the region to HTML (htmlize-region-for-paste (point-min) (point-max)))))) (save-restriction (narrow-to-region (point) (point)) (insert htmltext) (goto-char (point-min)) (re-search-forward "]*\\)>\n?" nil t) (replace-match "
    ")
            (goto-char (point-max))
            (muse-publish-mark-read-only (point-min) (point-max))))))
    
    ;; Register the Muse HTML Publisher
    
    (defun muse-html-browse-file (file)
      (browse-url (concat "file:" file)))
    
    (defun muse-html-encoding ()
      (if (stringp muse-html-meta-content-encoding)
          muse-html-meta-content-encoding
        (muse-xml-transform-content-type
         (or (and (boundp 'buffer-file-coding-system)
                  buffer-file-coding-system)
             muse-html-encoding-default)
         muse-html-charset-default)))
    
    (defun muse-html-prepare-buffer ()
      (make-local-variable 'muse-html-meta-http-equiv)
      (set (make-local-variable 'muse-html-meta-content-type)
           (if (save-match-data
                 (string-match "charset=" muse-html-meta-content-type))
               muse-html-meta-content-type
             (concat muse-html-meta-content-type "; charset="
                     (muse-html-encoding)))))
    
    (defun muse-html-munge-buffer ()
      (if muse-publish-generate-contents
          (progn
            (goto-char (car muse-publish-generate-contents))
            (muse-html-insert-contents (cdr muse-publish-generate-contents))
            (setq muse-publish-generate-contents nil))
        (muse-html-denote-headings)))
    
    (defun muse-html-finalize-buffer ()
      (when (and (boundp 'buffer-file-coding-system)
                 (memq buffer-file-coding-system '(no-conversion undecided-unix)))
        ;; make it agree with the default charset
        (setq buffer-file-coding-system muse-html-encoding-default)))
    
    ;;; Register the Muse HTML and XHTML Publishers
    
    (muse-define-style "html"
                       :suffix    'muse-html-extension
                       :regexps   'muse-html-markup-regexps
                       :functions 'muse-html-markup-functions
                       :strings   'muse-html-markup-strings
                       :tags      'muse-html-markup-tags
                       :specials  'muse-xml-decide-specials
                       :before    'muse-html-prepare-buffer
                       :before-end 'muse-html-munge-buffer
                       :after     'muse-html-finalize-buffer
                       :header    'muse-html-header
                       :footer    'muse-html-footer
                       :style-sheet 'muse-html-style-sheet
                       :browser   'muse-html-browse-file)
    
    (muse-derive-style "xhtml" "html"
                       :suffix    'muse-xhtml-extension
                       :strings   'muse-xhtml-markup-strings
                       :header    'muse-xhtml-header
                       :footer    'muse-xhtml-footer
                       :style-sheet 'muse-xhtml-style-sheet)
    
    ;; xhtml1.0 is an alias for xhtml
    (muse-derive-style "xhtml1.0" "xhtml")
    
    ;; xhtml1.1 has some quirks that need attention from us
    (muse-derive-style "xhtml1.1" "xhtml"
                       :strings   'muse-xhtml1.1-markup-strings)
    
    (provide 'muse-html)
    
    ;;; muse-html.el ends here
    muse-el-3.20+dfsg/lisp/muse-regexps.el0000644000175000017500000002162611331353120017154 0ustar  taffittaffit;;; muse-regexps.el --- define regexps used by Muse
    
    ;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010
    ;;   Free Software Foundation, Inc.
    
    ;; This file is part of Emacs Muse.  It is not part of GNU Emacs.
    
    ;; Emacs Muse 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 3, or (at your
    ;; option) any later version.
    
    ;; Emacs Muse 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 Emacs Muse; 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 the part of the Muse project that describes regexps
    ;; that are used throughout the project.
    
    ;;; Contributors:
    
    ;;; Code:
    
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;
    ;; Muse Regular Expressions
    ;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    
    (defgroup muse-regexp nil
      "Regular expressions used in publishing and syntax highlighting."
      :group 'muse)
    
    ;;; Deal with the lack of character classes for regexps in Emacs21 and
    ;;; XEmacs
    
    (defcustom muse-regexp-use-character-classes 'undecided
      "Indicate whether to use extended character classes like [:space:].
    If 'undecided, Muse will use them if your emacs is known to support them.
    
    Emacs 22 and Emacs 21.3.50 are known to support them.  XEmacs
    does not support them.
    
    Emacs 21.2 or higher support them, but with enough annoying edge
    cases that the sanest default is to leave them disabled."
      :type '(choice (const :tag "Yes" t)
                     (const :tag "No" nil)
                     (const :tag "Let Muse decide" undecided))
      :group 'muse-regexp)
    
    (defvar muse-regexp-emacs-revision
      (save-match-data
        (and (string-match "^[0-9]+\\.[0-9]+\\.\\([0-9]+\\)"
                           emacs-version)
             (match-string 1 emacs-version)
             (string-to-number (match-string 1 emacs-version))))
      "The revision number of this version of Emacs.")
    
    (defun muse-extreg-usable-p ()
      "Return non-nil if extended character classes can be used,
    nil otherwise.
    
    This is used when deciding the initial values of the muse-regexp
    options."
      (cond
       ((eq muse-regexp-use-character-classes t)
        t)
       ((eq muse-regexp-use-character-classes nil)
        nil)
       ((featurep 'xemacs) nil)             ; unusable on XEmacs
       ((> emacs-major-version 21) t)       ; usable if > 21
       ((< emacs-major-version 21) nil)
       ((< emacs-minor-version 3) nil)
       ;; don't use if version is of format 21.x
       ((null muse-regexp-emacs-revision) nil)
       ;; only trust 21.3.50 or higher
       ((>= muse-regexp-emacs-revision 50) t)
       (t nil)))
    
    (defcustom muse-regexp-blank
      (if (muse-extreg-usable-p)
          "[:blank:]"
        " \t")
      "Regexp to use in place of \"[:blank:]\".
    This should be something that matches spaces and tabs.
    
    It is like a regexp, but should be embeddable inside brackets.
    Muse will detect the appropriate value correctly most of
    the time."
      :type 'string
      :options '("[:blank:]" " \t")
      :group 'muse-regexp)
    
    (defcustom muse-regexp-alnum
      (if (muse-extreg-usable-p)
          "[:alnum:]"
        "A-Za-z0-9")
      "Regexp to use in place of \"[:alnum:]\".
    This should be something that matches all letters and numbers.
    
    It is like a regexp, but should be embeddable inside brackets.
    muse will detect the appropriate value correctly most of
    the time."
      :type 'string
      :options '("[:alnum:]" "A-Za-z0-9")
      :group 'muse-regexp)
    
    (defcustom muse-regexp-lower
      (if (muse-extreg-usable-p)
          "[:lower:]"
        "a-z")
      "Regexp to use in place of \"[:lower:]\".
    This should match all lowercase characters.
    
    It is like a regexp, but should be embeddable inside brackets.
    muse will detect the appropriate value correctly most of
    the time."
      :type 'string
      :options '("[:lower:]" "a-z")
      :group 'muse-regexp)
    
    (defcustom muse-regexp-upper
      (if (muse-extreg-usable-p)
          "[:upper:]"
        "A-Z")
      "Regexp to use in place of \"[:upper:]\".
    This should match all uppercase characters.
    
    It is like a regexp, but should be embeddable inside brackets.
    muse will detect the appropriate value correctly most of
    the time."
      :type 'string
      :options '("[:upper:]" "A-Z")
      :group 'muse-regexp)
    
    ;;; Regexps used to define Muse publishing syntax
    
    (defcustom muse-list-item-regexp
      (concat "^%s\\(\\([^\n" muse-regexp-blank "].*?\\)?::"
              "\\(?:[" muse-regexp-blank "]+\\|$\\)"
              "\\|[" muse-regexp-blank "]-[" muse-regexp-blank "]*"
              "\\|[" muse-regexp-blank "][0-9]+\\.[" muse-regexp-blank "]*\\)")
      "Regexp used to match the beginning of a list item.
    The '%s' will be replaced with a whitespace regexp when publishing."
      :type 'regexp
      :group 'muse-regexp)
    
    (defcustom muse-ol-item-regexp (concat "\\`[" muse-regexp-blank "]+[0-9]+\\.")
      "Regexp used to match an ordered list item."
      :type 'regexp
      :group 'muse-regexp)
    
    (defcustom muse-ul-item-regexp (concat "\\`[" muse-regexp-blank "]+-")
      "Regexp used to match an unordered list item."
      :type 'regexp
      :group 'muse-regexp)
    
    (defcustom muse-dl-term-regexp
      (concat "[" muse-regexp-blank "]*\\(.+?\\)["
              muse-regexp-blank "]+::\\(?:[" muse-regexp-blank "]+\\|$\\)")
      "Regexp used to match a definition list term.
    The first match string must contain the term."
      :type 'regexp
      :group 'muse-regexp)
    
    (defcustom muse-dl-entry-regexp (concat "\\`[" muse-regexp-blank "]*::")
      "Regexp used to match a definition list entry."
      :type 'regexp
      :group 'muse-regexp)
    
    (defcustom muse-table-field-regexp
      (concat "[" muse-regexp-blank "]+\\(|+\\)\\(?:["
              muse-regexp-blank "]\\|$\\)")
      "Regexp used to match table separators when publishing."
      :type 'regexp
      :group 'muse-regexp)
    
    (defcustom muse-table-line-regexp (concat ".*" muse-table-field-regexp ".*")
      "Regexp used to match a table line when publishing."
      :type 'regexp
      :group 'muse-regexp)
    
    (defcustom muse-table-hline-regexp (concat "[" muse-regexp-blank
                                               "]*|[-+]+|[" muse-regexp-blank
                                               "]*")
      "Regexp used to match a horizontal separator line in a table."
      :type 'regexp
      :group 'muse-regexp)
    
    (defcustom muse-table-el-border-regexp (concat "[" muse-regexp-blank "]*"
                                                   "\\+\\(-*\\+\\)+"
                                                   "[" muse-regexp-blank "]*")
      "Regexp used to match the beginning and end of a table.el-style table."
      :type 'regexp
      :group 'muse-regexp)
    
    (defcustom muse-table-el-line-regexp (concat "[" muse-regexp-blank "]*"
                                                 "|\\(.*|\\)*"
                                               "[" muse-regexp-blank "]*")
      "Regexp used to match a table line of a table.el-style table."
      :type 'regexp
      :group 'muse-regexp)
    
    (defcustom muse-tag-regexp
      (concat "<\\([^/" muse-regexp-blank "\n][^" muse-regexp-blank
              "\n]*\\)\\(\\s-+[^<>]+[^\n]\\)?\\(/\\)?>")
      "A regexp used to find XML-style tags within a buffer when publishing.
    Group 1 should be the tag name, group 2 the properties, and group
    3 the optional immediate ending slash."
      :type 'regexp
      :group 'muse-regexp)
    
    (defcustom muse-explicit-link-regexp
      "\\[\\[\\([^][\n]+\\)\\]\\(?:\\[\\([^][\n]+\\)\\]\\)?\\]"
      "Regexp used to match [[target][description]] links.
    Paren group 1 must match the URL, and paren group 2 the description."
      :type 'regexp
      :group 'muse-regexp)
    
    (defcustom muse-implicit-link-regexp
      (concat "\\([^" muse-regexp-blank "\n]+\\)")
      "Regexp used to match an implicit link.
    An implicit link is the largest block of text to be checked for
    URLs and bare WikiNames by the `muse-link-at-point' function.
    Paren group 1 is the text to be checked.
    
    URLs are checked by default.  To get WikiNames, load
    muse-wiki.el.
    
    This is only used when you are using muse-mode.el, but not
    muse-colors.el.
    
    If the above applies, and you want to match things with spaces in
    them, you will have to modify this."
      :type 'regexp
      :group 'muse-regexp)
    
    ;;; Regexps used to determine file types
    
    (defcustom muse-file-regexp
      (concat "\\`[~/]\\|\\?\\|/\\'\\|\\."
              "\\(html?\\|pdf\\|mp3\\|el\\|zip\\|txt\\|tar\\)"
              "\\(\\.\\(gz\\|bz2\\)\\)?\\'")
      "A link matching this regexp will be regarded as a link to a file."
      :type 'regexp
      :group 'muse-regexp)
    
    (defcustom muse-image-regexp
      "\\.\\(eps\\|gif\\|jp\\(e?g\\)\\|p\\(bm\\|ng\\)\\|tiff\\|x\\([bp]m\\)\\)\\'"
      "A link matching this regexp will be published inline as an image.
    For example:
    
      [[./wife.jpg][A picture of my wife]]
    
    If you omit the description, the alt tag of the resulting HTML
    buffer will be the name of the file."
      :type 'regexp
      :group 'muse-regexp)
    
    (provide 'muse-regexps)
    
    ;;; muse-regexps.el ends here
    muse-el-3.20+dfsg/lisp/muse-publish.el0000644000175000017500000025532711331353120017154 0ustar  taffittaffit;;; muse-publish.el --- base publishing implementation
    
    ;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010
    ;;   Free Software Foundation, Inc.
    
    ;; This file is part of Emacs Muse.  It is not part of GNU Emacs.
    
    ;; Emacs Muse 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 3, or (at your
    ;; option) any later version.
    
    ;; Emacs Muse 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 Emacs Muse; see the file COPYING.  If not, write to the
    ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
    ;; Boston, MA 02110-1301, USA.
    
    ;;; Commentary:
    
    ;;; Contributors:
    
    ;; Yann Hodique (yann DOT hodique AT gmail DOT com) fixed an
    ;; unnecessary URL description transform in `muse-publish-url'.
    
    ;; Peter K. Lee (saint AT corenova DOT com) provided the
    ;; `muse-style-elements-list' function.
    
    ;; Jim Ottaway (j DOT ottaway AT lse DOT ac DOT uk) provided a
    ;; reference implementation for nested lists, as well as some code for
    ;; the "style" element of the  tag.
    
    ;; Deus Max (deusmax AT gmail DOT com) provided the  tag.
    
    ;;; Code:
    
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;
    ;; Muse Publishing
    ;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    
    (provide 'muse-publish)
    
    (require 'muse)
    (require 'muse-regexps)
    
    (defgroup muse-publish nil
      "Options controlling the general behavior of Muse publishing."
      :group 'muse)
    
    (defcustom muse-before-publish-hook nil
      "A hook run in the buffer to be published, before it is done."
      :type 'hook
      :group 'muse-publish)
    
    (defcustom muse-after-publish-hook nil
      "A hook run in the buffer to be published, after it is done."
      :type 'hook
      :group 'muse-publish)
    
    (defcustom muse-publish-url-transforms
      '(muse-resolve-url)
      "A list of functions used to prepare URLs for publication.
    Each is passed the URL.  The transformed URL should be returned."
      :type 'hook
      :options '(muse-resolve-url)
      :group 'muse-publish)
    
    (defcustom muse-publish-desc-transforms
      '(muse-publish-strip-URL)
      "A list of functions used to prepare URL desciptions for publication.
    Each is passed the description.  The modified description should
    be returned."
      :type 'hook
      :options '(muse-publish-strip-URL)
      :group 'muse-publish)
    
    (defcustom muse-publish-date-format "%B %e, %Y"
      "Format string for the date, used by `muse-publish-markup-buffer'.
    See `format-time-string' for details on the format options."
      :type 'string
      :group 'muse-publish)
    
    (defcustom muse-publish-comments-p nil
      "If nil, remove comments before publishing.
    If non-nil, publish comments using the markup of the current style."
      :type 'boolean
      :group 'muse-publish)
    
    (defcustom muse-publish-report-threshhold 100000
      "If a file is this size or larger, report publishing progress."
      :type 'integer
      :group 'muse-publish)
    
    (defcustom muse-publish-markup-regexps
      `(;; Remove leading and trailing whitespace from the file
        (1000 "\\(\\`\n+\\|\n+\\'\\)" 0 "")
    
        ;; Remove trailing whitespace from all lines
        (1100 ,(concat "[" muse-regexp-blank "]+$") 0 "")
    
        ;; Handle any leading #directives
        (1200 "\\`#\\([a-zA-Z-]+\\)\\s-+\\(.+\\)\n+" 0 directive)
    
        ;; commented lines
        (1250 ,(concat "^;\\(?:[" muse-regexp-blank "]+\\(.+\\)\\|$\\|'\\)")
              0 comment)
    
        ;; markup tags
        (1300 muse-tag-regexp 0 tag)
    
        ;; prevent emphasis characters in explicit links from being marked
        (1400 muse-explicit-link-regexp 0 muse-publish-mark-link)
    
        ;; emphasized or literal text
        (1600 ,(concat "\\(^\\|[-[" muse-regexp-blank
                       "<('`\"\n]\\)\\(=[^=" muse-regexp-blank
                       "\n]\\|_[^_" muse-regexp-blank
                       "\n]\\|\\*+[^*" muse-regexp-blank
                       "\n]\\)")
              2 word)
    
        ;; headings, outline-mode style
        (1700 "^\\(\\*+\\)\\s-+" 0 heading)
    
        ;; ellipses
        (1800 "\\.\\.\\.\\." 0 enddots)
        (1850 "\\.\\.\\." 0 dots)
    
        ;; horizontal rule, or section separator
        (1900 "^----+" 0 rule)
    
        ;; non-breaking space
        (1950 "~~" 0 no-break-space)
    
        ;; beginning of footnotes section
        (2000 "^Footnotes:?\\s-*" 0 fn-sep)
        ;; footnote definition/reference (def if at beginning of line)
        (2100 "\\[\\([1-9][0-9]*\\)\\]" 0 footnote)
    
        ;; unnumbered List items begin with a -.  numbered list items
        ;; begin with number and a period.  definition lists have a
        ;; leading term separated from the body with ::.  centered
        ;; paragraphs begin with at least six columns of whitespace; any
        ;; other whitespace at the beginning indicates a blockquote.  The
        ;; reason all of these rules are handled here, is so that
        ;; blockquote detection doesn't interfere with indented list
        ;; members.
        (2200 ,(format muse-list-item-regexp (concat "[" muse-regexp-blank "]*"))
              0 list)
    
        ;; support table.el style tables
        (2300 ,(concat "^" muse-table-el-border-regexp "\n"
                       "\\(\\(" muse-table-el-line-regexp "\n\\)+"
                       "\\(" muse-table-el-border-regexp "\\)"
                       "\\(\n\\|\\'\\)\\)+")
              0 table-el)
    
        ;; simple table markup is supported, nothing fancy.  use | to
        ;; separate cells, || to separate header cells, and ||| for footer
        ;; cells
        (2350 ,(concat "\\(\\([" muse-regexp-blank "]*\n\\)?"
                       "\\(\\(?:" muse-table-line-regexp "\\|"
                       muse-table-hline-regexp "\\)\\(?:\n\\|\\'\\)\\)\\)+")
              0 table)
    
        ;; blockquote and centered text
        (2400 ,(concat "^\\([" muse-regexp-blank "]+\\).+") 0 quote)
    
        ;; the emdash ("--" or "---")
        (2500 ,(concat "\\(^\\|[" muse-regexp-blank "]*\\)---?\\($\\|["
                       muse-regexp-blank "]*\\)")
              0 emdash)
    
        ;; "verse" text is indicated the same way as a quoted e-mail
        ;; response: "> text", where text may contain initial whitespace
        ;; (see below).
        (2600 ,(concat "^[" muse-regexp-blank "]*> ") 0 verse)
    
        ;; define anchor points
        (2700 "^\\(\\W*\\)#\\(\\S-+\\)\\s-*" 0 anchor)
    
        ;; replace links in the buffer (links to other pages)
        (2900 muse-explicit-link-regexp 0 link)
    
        ;; bare URLs
        (3000 muse-url-regexp 0 url)
    
        ;; bare email addresses
        (3500
         "\\([^[]\\)[-a-zA-Z0-9._]+@\\([-a-zA-z0-9_]+\\.\\)+[a-zA-Z0-9]+" 0 email)
        )
      "List of markup rules for publishing a page with Muse.
    The rules given in this variable are invoked first, followed by
    whatever rules are specified by the current style.
    
    Each member of the list is either a function, or a list of the form:
    
      (REGEXP/SYMBOL TEXT-BEGIN-GROUP REPLACEMENT-TEXT/FUNCTION/SYMBOL)
    
    REGEXP is a regular expression, or symbol whose value is a regular
    expression, which is searched for using `re-search-forward'.
    TEXT-BEGIN-GROUP is the matching group within that regexp which
    denotes the beginning of the actual text to be marked up.
    REPLACEMENT-TEXT is a string that will be passed to `replace-match'.
    If it is not a string, but a function, it will be called to determine
    what the replacement text should be (it must return a string).  If it
    is a symbol, the value of that symbol should be a string.
    
    The replacements are done in order, one rule at a time.  Writing
    the regular expressions can be a tricky business.  Note that case
    is never ignored.  `case-fold-search' is always bound to nil
    while processing the markup rules."
      :type '(repeat (choice
                      (list :tag "Markup rule"
                            integer
                            (choice regexp symbol)
                            integer
                            (choice string function symbol))
                      function))
      :group 'muse-publish)
    
    (defcustom muse-publish-markup-functions
      '((directive . muse-publish-markup-directive)
        (comment   . muse-publish-markup-comment)
        (anchor    . muse-publish-markup-anchor)
        (tag       . muse-publish-markup-tag)
        (word      . muse-publish-markup-word)
        (emdash    . muse-publish-markup-emdash)
        (enddots   . muse-publish-markup-enddots)
        (dots      . muse-publish-markup-dots)
        (rule      . muse-publish-markup-rule)
        (no-break-space . muse-publish-markup-no-break-space)
        (heading   . muse-publish-markup-heading)
        (footnote  . muse-publish-markup-footnote)
        (fn-sep    . muse-publish-markup-fn-sep)
        (list      . muse-publish-markup-list)
        (quote     . muse-publish-markup-quote)
        (verse     . muse-publish-markup-verse)
        (table     . muse-publish-markup-table)
        (table-el  . muse-publish-markup-table-el)
        (email     . muse-publish-markup-email)
        (link      . muse-publish-markup-link)
        (url       . muse-publish-markup-url))
      "An alist of style types to custom functions for that kind of text.
    
    Each member of the list is of the form:
    
      (SYMBOL FUNCTION)
    
    SYMBOL describes the type of text to associate with this rule.
    `muse-publish-markup-regexps' maps regexps to these symbols.
    
    FUNCTION is the function to use to mark up this kind of rule if
    no suitable function is found through the :functions tag of the
    current style."
      :type '(alist :key-type symbol :value-type function)
      :group 'muse-publish)
    
    (defcustom muse-publish-markup-tags
      '(("contents" nil t   nil muse-publish-contents-tag)
        ("verse"    t   nil nil muse-publish-verse-tag)
        ("example"  t   nil nil muse-publish-example-tag)
        ("src"      t   t   nil muse-publish-src-tag)
        ("code"     t   nil nil muse-publish-code-tag)
        ("quote"    t   nil t   muse-publish-quote-tag)
        ("literal"  t   t   nil muse-publish-literal-tag)
        ("verbatim" t   nil nil muse-publish-verbatim-tag)
        ("br"       nil nil nil muse-publish-br-tag)
        ("lisp"     t   t   nil muse-publish-lisp-tag)
        ("class"    t   t   nil muse-publish-class-tag)
        ("div"      t   t   nil muse-publish-div-tag)
        ("command"  t   t   nil muse-publish-command-tag)
        ("perl"     t   t   nil muse-publish-perl-tag)
        ("php"      t   t   nil muse-publish-php-tag)
        ("python"   t   t   nil muse-publish-python-tag)
        ("ruby"     t   t   nil muse-publish-ruby-tag)
        ("comment"  t   nil nil muse-publish-comment-tag)
        ("include"  nil t   nil muse-publish-include-tag)
        ("markup"   t   t   nil muse-publish-mark-up-tag)
        ("cite"     t   t   nil muse-publish-cite-tag))
      "A list of tag specifications, for specially marking up text.
    XML-style tags are the best way to add custom markup to Muse.
    This is easily accomplished by customizing this list of markup tags.
    
    For each entry, the name of the tag is given, whether it expects
    a closing tag, whether it takes an optional set of attributes,
    whether it is nestable, and a function that performs whatever
    action is desired within the delimited region.
    
    The tags themselves are deleted during publishing, before the
    function is called.  The function is called with three arguments,
    the beginning and end of the region surrounded by the tags.  If
    properties are allowed, they are passed as a third argument in
    the form of an alist.  The `end' argument to the function is
    always a marker.
    
    Point is always at the beginning of the region within the tags, when
    the function is called.  Wherever point is when the function finishes
    is where tag markup will resume.
    
    These tag rules are processed once at the beginning of markup, and
    once at the end, to catch any tags which may have been inserted
    in-between."
      :type '(repeat (list (string :tag "Markup tag")
                           (boolean :tag "Expect closing tag" :value t)
                           (boolean :tag "Parse attributes" :value nil)
                           (boolean :tag "Nestable" :value nil)
                           function))
      :group 'muse-publish)
    
    (defcustom muse-publish-markup-header-footer-tags
      '(("lisp"     t   t   nil muse-publish-lisp-tag)
        ("markup"   t   t   nil muse-publish-mark-up-tag))
      "Tags used when publishing headers and footers.
    See `muse-publish-markup-tags' for details."
      :type '(repeat (list (string :tag "Markup tag")
                           (boolean :tag "Expect closing tag" :value t)
                           (boolean :tag "Parse attributes" :value nil)
                           (boolean :tag "Nestable" :value nil)
                           function))
      :group 'muse-publish)
    
    (defcustom muse-publish-markup-specials nil
      "A table of characters which must be represented specially."
      :type '(alist :key-type character :value-type string)
      :group 'muse-publish)
    
    (defcustom muse-publish-enable-local-variables nil
      "If non-nil, interpret local variables in a file when publishing."
      :type 'boolean
      :group 'muse-publish)
    
    (defcustom muse-publish-enable-dangerous-tags t
      "If non-nil, publish tags like  and  that can
    call external programs or expose sensitive information.
    Otherwise, ignore tags like this.
    
    This is useful to set to nil when the file to publish is coming
    from an untrusted source."
      :type 'boolean
      :group 'muse-publish)
    
    (defvar muse-publishing-p nil
      "This is set to t while a page is being published.")
    (defvar muse-batch-publishing-p nil
      "This is set to t while a page is being batch published.")
    (defvar muse-inhibit-before-publish-hook nil
      "This is set to t when publishing a file rather than just a buffer.
    It is used by `muse-publish-markup-buffer'.")
    (defvar muse-publishing-styles nil
      "The publishing styles that Muse recognizes.
    This is automatically generated when loading publishing styles.")
    (defvar muse-publishing-current-file nil
      "The file that is currently being published.")
    (defvar muse-publishing-current-output-path nil
      "The path where the current file will be published to.")
    (defvar muse-publishing-current-style nil
      "The style of the file that is currently being published.")
    (defvar muse-publishing-directives nil
      "An alist of publishing directives from the top of a file.")
    (defvar muse-publish-generate-contents nil
      "Non-nil if a table of contents should be generated.
    If non-nil, it is a cons cell specifying (MARKER . DEPTH), to
    tell where the  was seen, and to what depth the
    contents were requested.")
    (defvar muse-publishing-last-position nil
      "Last position of the point when publishing.
    This is used to make sure that publishing doesn't get stalled.")
    
    (defvar muse-publish-inhibit-style-hooks nil
      "If non-nil, do not call the :before or :before-end hooks when publishing.")
    
    (defvar muse-publish-use-header-footer-tags nil
      "If non-nil, use `muse-publish-markup-header-footer-tags' for looking up
    tags.  Otherwise, use `muse-publish-markup-tags'.")
    
    (defvar muse-inhibit-style-tags nil
      "If non-nil, do not search for style-specific tags.
    This is used when publishing headers and footers.")
    
    ;; Functions for handling style information
    
    (defsubst muse-style (&optional style)
      "Resolve the given STYLE into a Muse style, if it is a string."
      (if (null style)
          muse-publishing-current-style
        (if (stringp style)
            (assoc style muse-publishing-styles)
          (muse-assert (consp style))
          style)))
    
    (defun muse-define-style (name &rest elements)
      (let ((entry (assoc name muse-publishing-styles)))
        (if entry
            (setcdr entry elements)
          (setq muse-publishing-styles
                (cons (append (list name) elements)
                      muse-publishing-styles)))))
    
    (defun muse-derive-style (new-name base-name &rest elements)
      (apply 'muse-define-style new-name
             (append elements (list :base base-name))))
    
    (defsubst muse-get-keyword (keyword list &optional direct)
      (let ((value (cadr (memq keyword list))))
        (if (and (not direct) (symbolp value))
            (symbol-value value)
          value)))
    
    (defun muse-style-elements-list (elem &optional style)
      "Return a list all references to ELEM in STYLE, including base styles.
    If STYLE is not specified, use current style."
      (let (base elements)
        (while style
          (setq style (muse-style style))
          (setq elements (append elements
                                 (muse-get-keyword elem style)))
          (setq style (muse-get-keyword :base style)))
        elements))
    
    (defun muse-style-element (elem &optional style direct)
      "Search for ELEM in STYLE, including base styles.
    If STYLE is not specified, use current style."
      (setq style (muse-style style))
      (let ((value (muse-get-keyword elem style direct)))
        (if value
            value
          (let ((base (muse-get-keyword :base style)))
            (if base
                (muse-style-element elem base direct))))))
    
    (defun muse-style-derived-p-1 (base style)
      "Internal function used by `muse-style-derived-p'."
      (if (and (stringp style)
               (string= style base))
          t
        (setq style (muse-style style))
        (let ((value (muse-get-keyword :base style)))
          (when value
            (muse-style-derived-p base value)))))
    
    (defun muse-style-derived-p (base &optional style)
      "Return non-nil if STYLE is equal to or derived from BASE,
    non-nil otherwise.
    
    BASE should be a string."
      (unless style
        (setq style (muse-style)))
      (when (and (consp style)
                 (stringp (car style)))
        (setq style (car style)))
      (muse-style-derived-p-1 base style))
    
    (defun muse-find-markup-element (keyword ident style)
      (let ((def (assq ident (muse-style-element keyword style))))
        (if def
            (cdr def)
          (let ((base (muse-style-element :base style)))
            (if base
                (muse-find-markup-element keyword ident base))))))
    
    (defun muse-markup-text (ident &rest args)
      "Insert ARGS into the text markup associated with IDENT.
    If the markup text has sections like %N%, this will be replaced
    with the N-1th argument in ARGS.  After that, `format' is applied
    to the text with ARGS as parameters."
      (let ((text (muse-find-markup-element :strings ident (muse-style))))
        (if (and text args)
            (progn
              (let (start repl-text)
                (while (setq start (string-match "%\\([1-9][0-9]*\\)%" text start))
                  ;; escape '%' in the argument text, since we will be
                  ;; using format on it
                  (setq repl-text (muse-replace-regexp-in-string
                                   "%" "%%"
                                   (nth (1- (string-to-number
                                             (match-string 1 text))) args)
                                   t t)
                        start (+ start (length repl-text))
                        text (replace-match repl-text t t text))))
              (apply 'format text args))
          (or text ""))))
    
    (defun muse-insert-markup (&rest args)
      (let ((beg (point)))
        (apply 'insert args)
        (muse-publish-mark-read-only beg (point))))
    
    (defun muse-find-markup-tag (keyword tagname style)
      (let ((def (assoc tagname (muse-style-element keyword style))))
        (or def
            (let ((base (muse-style-element :base style)))
              (if base
                  (muse-find-markup-tag keyword tagname base))))))
    
    (defun muse-markup-tag-info (tagname &rest args)
      (let ((tag-info (and (not muse-inhibit-style-tags)
                           (muse-find-markup-tag :tags tagname (muse-style)))))
        (or tag-info
            (assoc tagname
                   (if muse-publish-use-header-footer-tags
                       muse-publish-markup-header-footer-tags
                     muse-publish-markup-tags)))))
    
    (defsubst muse-markup-function (category)
      (let ((func (muse-find-markup-element :functions category (muse-style))))
        (or func
            (cdr (assq category muse-publish-markup-functions)))))
    
    ;; Publishing routines
    
    (defun muse-publish-markup (name rules)
      (let* ((case-fold-search nil)
             (inhibit-read-only t)
             (limit (* (length rules) (point-max)))
             (verbose (and muse-publish-report-threshhold
                           (> (point-max) muse-publish-report-threshhold)))
             (base 0))
        (while rules
          (goto-char (point-min))
          (let ((regexp (nth 1 (car rules)))
                (group (nth 2 (car rules)))
                (repl (nth 3 (car rules)))
                pos)
            (setq muse-publishing-last-position nil)
            (if (symbolp regexp)
                (setq regexp (symbol-value regexp)))
            (if (and verbose (not muse-batch-publishing-p))
                (message "Publishing %s...%d%%" name
                         (* (/ (float (+ (point) base)) limit) 100)))
            (while (and regexp (progn
                                 (when (and (get-text-property (point) 'read-only)
                                            (> (point) (point-min)))
                                   (goto-char (or (next-single-property-change
                                                   (point) 'read-only)
                                                  (point-max))))
                                 (setq pos (re-search-forward regexp nil t))))
              (if (and verbose (not muse-batch-publishing-p))
                  (message "Publishing %s...%d%%" name
                           (* (/ (float (+ (point) base)) limit) 100)))
              (unless (and (> (- (match-end 0) (match-beginning 0)) 0)
                           (match-beginning group)
                           (get-text-property (match-beginning group) 'read-only))
                (let* (func
                       (text (cond
                              ((and (symbolp repl)
                                    (setq func (muse-markup-function repl)))
                               (funcall func))
                              ((functionp repl)
                               (funcall repl))
                              ((symbolp repl)
                               (symbol-value repl))
                              (t repl))))
                  (if (stringp text)
                      (replace-match text t))))
              (if (and muse-publishing-last-position
                       (= pos muse-publishing-last-position))
                  (if (eobp)
                      (setq regexp nil)
                    (forward-char 1)))
              (setq muse-publishing-last-position pos)))
          (setq rules (cdr rules)
                base (+ base (point-max))))
        (if (and verbose (not muse-batch-publishing-p))
            (message "Publishing %s...done" name))))
    
    (defun muse-insert-file-or-string (file-or-string &optional title)
      (let ((beg (point)) end)
        (if (and (not (string-equal file-or-string ""))
                 (not (string-match "\n" file-or-string))
                 (file-readable-p file-or-string))
            (setq end (+ beg
                         (cadr (muse-insert-file-contents file-or-string))))
          (insert file-or-string)
          (setq end (point)))
        (save-restriction
          (narrow-to-region beg end)
          (remove-text-properties (point-min) (point-max)
                                  '(read-only nil rear-nonsticky nil))
          (goto-char (point-min))
          (let ((muse-inhibit-style-tags t)
                (muse-publish-use-header-footer-tags t))
            (muse-publish-markup (or title "")
                                 '((100 muse-tag-regexp 0
                                        muse-publish-markup-tag)))))))
    
    (defun muse-style-run-hooks (keyword style &rest args)
      (catch 'handled
        (let ((cache nil))
          (while (and style
                      (setq style (muse-style style)))
            (let ((func (muse-style-element keyword style t)))
              (when (and func
                         (not (member func cache)))
                (setq cache (cons func cache))
                (when (apply func args)
                  (throw 'handled t))))
            (setq style (muse-style-element :base style))))))
    
    (defun muse-publish-markup-region (beg end &optional title style)
      "Apply the given STYLE's markup rules to the given region.
    TITLE is used when indicating the publishing progress; it may be nil.
    
    The point is guaranteed to be at END if the routine terminates
    normally."
      (unless title (setq title ""))
      (unless style
        (or (setq style muse-publishing-current-style)
            (error "Cannot find any publishing styles to use")))
      (save-restriction
        (narrow-to-region beg end)
        (let ((muse-publish-generate-contents nil))
          (unless muse-publish-inhibit-style-hooks
            (muse-style-run-hooks :before style))
          (muse-publish-markup
           title
           (sort (copy-alist (append muse-publish-markup-regexps
                                     (muse-style-elements-list :regexps style)))
                 (function
                  (lambda (l r)
                    (< (car l) (car r))))))
          (unless muse-publish-inhibit-style-hooks
            (muse-style-run-hooks :before-end style))
          (muse-publish-escape-specials (point-min) (point-max) nil 'document))
        (goto-char (point-max))))
    
    (defun muse-publish-markup-buffer (title style)
      "Apply the given STYLE's markup rules to the current buffer."
      (setq style (muse-style style))
      (let ((style-header (muse-style-element :header style))
            (style-footer (muse-style-element :footer style))
            (muse-publishing-current-style style)
            (muse-publishing-directives
             (list (cons "title" title)
                   (cons "author" (user-full-name))
                   (cons "date" (format-time-string
                                 muse-publish-date-format
                                 (if muse-publishing-current-file
                                     (nth 5 (file-attributes
                                             muse-publishing-current-file))
                                   (current-time))))))
            (muse-publishing-p t)
            (inhibit-read-only t))
        (run-hooks 'muse-update-values-hook)
        (unless muse-inhibit-before-publish-hook
          (run-hooks 'muse-before-publish-hook))
        (muse-publish-markup-region (point-min) (point-max) title style)
        (goto-char (point-min))
        (when style-header
          (muse-insert-file-or-string style-header title))
        (goto-char (point-max))
        (when style-footer
          (muse-insert-file-or-string style-footer title))
        (muse-style-run-hooks :after style)
        (run-hooks 'muse-after-publish-hook)))
    
    (defun muse-publish-markup-string (string &optional style)
      "Markup STRING using the given STYLE's markup rules."
      (setq style (muse-style style))
      (muse-with-temp-buffer
        (insert string)
        (let ((muse-publishing-current-style style)
              (muse-publishing-p t))
          (muse-publish-markup "*string*" (muse-style-element :rules style)))
        (buffer-string)))
    
    ;; Commands for publishing files
    
    (defun muse-publish-get-style (&optional styles)
      (unless styles (setq styles muse-publishing-styles))
      (if (= 1 (length styles))
          (car styles)
        (when (catch 'different
                (let ((first (car (car styles))))
                  (dolist (style (cdr styles))
                    (unless (equal first (car style))
                      (throw 'different t)))))
          (setq styles (muse-collect-alist
                        styles
                        (funcall muse-completing-read-function
                                 "Publish with style: " styles nil t))))
        (if (or (= 1 (length styles))
                (not (muse-get-keyword :path (car styles))))
            (car styles)
          (setq styles (mapcar (lambda (style)
                                 (cons (muse-get-keyword :path style)
                                       style))
                               styles))
          (cdr (assoc (funcall muse-completing-read-function
                               "Publish to directory: " styles nil t)
                      styles)))))
    
    (defsubst muse-publish-get-output-dir (style)
      (let ((default-directory (or (muse-style-element :path style)
                                   default-directory)))
        (muse-read-directory-name "Publish to directory: " nil default-directory)))
    
    (defsubst muse-publish-get-info ()
      (let ((style (muse-publish-get-style)))
        (list style (muse-publish-get-output-dir style)
              current-prefix-arg)))
    
    (defsubst muse-publish-output-name (&optional file style)
      (setq style (muse-style style))
      (concat (muse-style-element :prefix style)
              (muse-page-name file)
              (muse-style-element :suffix style)))
    
    (defsubst muse-publish-output-file (file &optional output-dir style)
      (setq style (muse-style style))
      (if output-dir
          (expand-file-name (muse-publish-output-name file style) output-dir)
        (concat (file-name-directory file)
                (muse-publish-output-name file style))))
    
    (defsubst muse-publish-link-name (&optional file style)
      "Take FILE and add :prefix and either :link-suffix or :suffix from STYLE.
    We assume that FILE is a Muse file.
    
    We call `muse-page-name' on FILE to remove the directory part of
    FILE and any extensions that are in `muse-ignored-extensions'."
      (setq style (muse-style style))
      (concat (muse-style-element :prefix style)
              (muse-page-name file)
              (or (muse-style-element :link-suffix style)
                  (muse-style-element :suffix style))))
    
    (defsubst muse-publish-link-file (file &optional style)
      "Turn FILE into a URL.
    
    If FILE exists on the system as-is, return it without
    modification.  In the case of wanting to link to Muse files when
    `muse-file-extension' is nil, you should load muse-project.el.
    
    Otherwise, assume that it is a Muse file and call
    `muse-publish-link-name' to add :prefix, :link-suffix, :suffix,
    and removing ignored file extensions, but preserving the
    directory part of FILE."
      (setq style (muse-style style))
      (if (file-exists-p file)
          file
        (concat (file-name-directory file)
                (muse-publish-link-name file style))))
    
    (defsubst muse-publish-link-page (page)
      "Turn PAGE into a URL.
    
    This is called by `muse-publish-classify-url' to figure out what
    a link to another file or Muse page should look like.
    
    If muse-project.el is loaded, call `muse-project-link-page' for this.
    Otherwise, call `muse-publish-link-file'."
      (if (fboundp 'muse-project-link-page)
          (muse-project-link-page page)
        (muse-publish-link-file page)))
    
    (defmacro muse-publish-ensure-block (beg &optional end)
      "Ensure that block-level markup at BEG is published with at least one
    preceding blank line.  BEG must be an unquoted symbol that contains a
    position or marker.  BEG is modified to be the new position.
    The point is left at the new value of BEG.
    
    Additionally, make sure that BEG is placed on a blank line.
    
    If END is given, make sure that it is placed on a blank line.  In
    order to achieve this, END must be an unquoted symbol that
    contains a marker.  This is the case with Muse tag functions."
      `(progn
         (goto-char ,beg)
         (cond ((not (bolp)) (insert "\n\n"))
               ((eq (point) (point-min)) nil)
               ((prog2 (backward-char) (bolp) (forward-char)) nil)
               (t (insert "\n")))
         (unless (and (bolp) (eolp))
           (insert "\n")
           (backward-char))
         (setq ,beg (point))
         (when (markerp ,end)
           (goto-char ,end)
           (unless (and (bolp) (eolp))
             (insert-before-markers "\n")))
         (goto-char ,beg)))
    
    ;;;###autoload
    (defun muse-publish-region (beg end &optional title style)
      "Apply the given STYLE's markup rules to the given region.
    The result is placed in a new buffer that includes TITLE in its name."
      (interactive "r")
      (when (interactive-p)
        (unless title (setq title (read-string "Title: ")))
        (unless style (setq style (muse-publish-get-style))))
      (let ((text (buffer-substring beg end))
            (buf (generate-new-buffer (concat "*Muse: " title "*"))))
        (with-current-buffer buf
          (insert text)
          (muse-publish-markup-buffer title style)
          (goto-char (point-min))
          (let ((inhibit-read-only t))
            (remove-text-properties (point-min) (point-max)
                                    '(rear-nonsticky nil read-only nil))))
        (pop-to-buffer buf)))
    
    ;;;###autoload
    (defun muse-publish-file (file style &optional output-dir force)
      "Publish the given FILE in a particular STYLE to OUTPUT-DIR.
    If the argument FORCE is nil, each file is only published if it is
    newer than the published version.  If the argument FORCE is non-nil,
    the file is published no matter what."
      (interactive (cons (read-file-name "Publish file: ")
                         (muse-publish-get-info)))
      (let ((style-name style))
        (setq style (muse-style style))
        (unless style
          (error "There is no style '%s' defined" style-name)))
      (let* ((output-path (muse-publish-output-file file output-dir style))
             (output-suffix (muse-style-element :osuffix style))
             (muse-publishing-current-file file)
             (muse-publishing-current-output-path output-path)
             (target (if output-suffix
                         (concat (muse-path-sans-extension output-path)
                                 output-suffix)
                       output-path))
             (threshhold (nth 7 (file-attributes file))))
        (if (not threshhold)
            (message "Please save %s before publishing" file)
          (when (or force (file-newer-than-file-p file target))
            (if (and muse-publish-report-threshhold
                     (> threshhold
                        muse-publish-report-threshhold))
                (message "Publishing %s ..." file))
            (muse-with-temp-buffer
              (muse-insert-file-contents file)
              (run-hooks 'muse-before-publish-hook)
              (when muse-publish-enable-local-variables
                (hack-local-variables))
              (let ((muse-inhibit-before-publish-hook t))
                (muse-publish-markup-buffer (muse-page-name file) style))
              (when (muse-write-file output-path)
                (muse-style-run-hooks :final style file output-path target)))
            t))))
    
    ;;;###autoload
    (defun muse-publish-this-file (style output-dir &optional force)
      "Publish the currently-visited file.
    Prompt for both the STYLE and OUTPUT-DIR if they are not
    supplied."
      (interactive (muse-publish-get-info))
      (setq style (muse-style style))
      (if buffer-file-name
          (let ((muse-current-output-style (list :base (car style)
                                                 :path output-dir)))
            (unless (muse-publish-file buffer-file-name style output-dir force)
              (message (concat "The published version is up-to-date; use"
                               " C-u C-c C-T to force an update."))))
        (message "This buffer is not associated with any file")))
    
    (defun muse-batch-publish-files ()
      "Publish Muse files in batch mode."
      (let ((muse-batch-publishing-p t)
            (font-lock-verbose nil)
            muse-current-output-style
            style output-dir)
        ;; don't activate VC when publishing files
        (setq vc-handled-backends nil)
        (setq style (car command-line-args-left)
              command-line-args-left (cdr command-line-args-left)
              output-dir (car command-line-args-left)
              output-dir
              (if (string-match "\\`--output-dir=" output-dir)
                  (prog1
                      (substring output-dir (match-end 0))
                    (setq command-line-args-left (cdr command-line-args-left))))
              muse-current-output-style (list :base style :path output-dir))
        (setq auto-mode-alist
              (delete (cons (concat "\\." muse-file-extension "\\'")
                            'muse-mode-choose-mode)
                      auto-mode-alist))
        (dolist (file command-line-args-left)
          (muse-publish-file file style output-dir t))))
    
    ;; Default publishing rules
    
    (defun muse-publish-section-close (depth)
      "Seach forward for the closing tag of given DEPTH."
      (let (not-end)
        (save-excursion
          (while (and (setq not-end (re-search-forward
                                     (concat "^\\*\\{1," (number-to-string depth)
                                             "\\}\\s-+")
                                     nil t))
                      (get-text-property (match-beginning 0) 'read-only)))
          (if not-end
              (forward-line 0)
            (goto-char (point-max)))
          (cond ((not (eq (char-before) ?\n))
                 (insert "\n\n"))
                ((not (eq (char-before (1- (point))) ?\n))
                 (insert "\n")))
          (muse-insert-markup (muse-markup-text 'section-close depth))
          (insert "\n"))))
    
    (defun muse-publish-markup-directive (&optional name value)
      (unless name (setq name (match-string 1)))
      (unless value (setq value (match-string 2)))
      (let ((elem (assoc name muse-publishing-directives)))
        (if elem
            (setcdr elem value)
          (setq muse-publishing-directives
                (cons (cons name value)
                      muse-publishing-directives))))
      ;; Make sure we don't ever try to move the point forward (past the
      ;; beginning of buffer) while we're still searching for directives.
      (setq muse-publishing-last-position nil)
      (delete-region (match-beginning 0) (match-end 0)))
    
    (defsubst muse-publishing-directive (name)
      (cdr (assoc name muse-publishing-directives)))
    
    (defmacro muse-publish-get-and-delete-attr (attr attrs)
      "Delete attribute ATTR from ATTRS only once, destructively.
    
    This function returns the matching attribute value, if found."
      (let ((last (make-symbol "last"))
            (found (make-symbol "found"))
            (vals (make-symbol "vals")))
        `(let ((,vals ,attrs))
           (if (string= (caar ,vals) ,attr)
               (prog1 (cdar ,vals)
                 (setq ,attrs (cdr ,vals)))
             (let ((,last ,vals)
                   (,found nil))
               (while ,vals
                 (setq ,vals (cdr ,vals))
                 (when (string= (caar ,vals) ,attr)
                   (setq ,found (cdar ,vals))
                   (setcdr ,last (cdr ,vals))
                   (setq ,vals nil))
                 (setq ,last ,vals))
               ,found)))))
    
    (defun muse-publish-markup-anchor ()
      (unless (get-text-property (match-end 1) 'muse-link)
        (let ((text (muse-markup-text 'anchor (match-string 2))))
          (unless (string= text "")
            (save-match-data
              (skip-chars-forward (concat muse-regexp-blank "\n"))
              (muse-insert-markup text)))
          (match-string 1))))
    
    (defun muse-publish-markup-comment ()
      (if (null muse-publish-comments-p)
          ""
        (goto-char (match-end 0))
        (muse-insert-markup (muse-markup-text 'comment-end))
        (if (match-beginning 1)
            (progn
              (muse-publish-mark-read-only (match-beginning 1) (match-end 1))
              (delete-region (match-beginning 0) (match-beginning 1)))
          (delete-region (match-beginning 0) (match-end 0)))
        (goto-char (match-beginning 0))
        (muse-insert-markup (muse-markup-text 'comment-begin))))
    
    (defun muse-publish-markup-tag ()
      (let ((tag-info (muse-markup-tag-info (match-string 1))))
        (when (and tag-info
                   (not (get-text-property (match-beginning 0) 'read-only))
                   (nth 4 tag-info)
                   (or muse-publish-enable-dangerous-tags
                       (not (get (nth 4 tag-info) 'muse-dangerous-tag))))
          (let ((closed-tag (match-string 3))
                (start (match-beginning 0))
                (beg (point))
                end attrs)
            (when (nth 2 tag-info)
              (let ((attrstr (match-string 2)))
                (while (and attrstr
                            (string-match (concat "\\([^"
                                                  muse-regexp-blank
                                                  "=\n]+\\)\\(=\"\\"
                                                  "([^\"]+\\)\"\\)?")
                                          attrstr))
                  (let ((attr (cons (downcase
                                     (muse-match-string-no-properties 1 attrstr))
                                    (muse-match-string-no-properties 3 attrstr))))
                    (setq attrstr (replace-match "" t t attrstr))
                    (if attrs
                        (nconc attrs (list attr))
                      (setq attrs (list attr)))))))
            (if (and (cadr tag-info) (not closed-tag))
                (if (muse-goto-tag-end (car tag-info) (nth 3 tag-info))
                    (delete-region (match-beginning 0) (point))
                  (setq tag-info nil)))
            (when tag-info
              (setq end (point-marker))
              (delete-region start beg)
              (goto-char start)
              (let ((args (list start end)))
                (if (nth 2 tag-info)
                    (nconc args (list attrs)))
                (let ((muse-inhibit-style-tags nil))
                  ;; remove the inhibition
                  (apply (nth 4 tag-info) args)))
              (set-marker end nil)))))
      nil)
    
    (defun muse-publish-escape-specials (beg end &optional ignore-read-only context)
      "Escape specials from BEG to END using style-specific :specials.
    If IGNORE-READ-ONLY is non-nil, ignore the read-only property.
    CONTEXT is used to figure out what kind of specials to escape.
    
    The following contexts exist in Muse.
    'underline  _underlined text_
    'literal    =monospaced text= or  region (monospaced, escaped)
    'emphasis   *emphasized text*
    'email      email@example.com
    'url        http://example.com
    'url-desc   [[...][description of an explicit link]]
    'image      [[image.png]]
    'example     region (monospaced, block context, escaped)
    'verbatim    region (escaped)
    'footnote   footnote text
    'document   normal text"
      (let ((specials (muse-style-element :specials nil t)))
        (cond ((functionp specials)
               (setq specials (funcall specials context)))
              ((symbolp specials)
               (setq specials (symbol-value specials))))
        (if (functionp specials)
            (funcall specials beg end ignore-read-only)
          (save-excursion
            (save-restriction
            (narrow-to-region beg end)
            (goto-char (point-min))
            (while (< (point) (point-max))
              (if (and (not ignore-read-only)
                       (get-text-property (point) 'read-only))
                  (goto-char (or (next-single-property-change (point) 'read-only)
                                 (point-max)))
                (let ((repl (or (assoc (char-after) specials)
                                (assoc (char-after)
                                       muse-publish-markup-specials))))
                  (if (null repl)
                      (forward-char 1)
                    (delete-char 1)
                    (insert-before-markers (cdr repl)))))))))))
    
    (defun muse-publish-markup-word ()
      (let* ((beg (match-beginning 2))
             (end (1- (match-end 2)))
             (leader (buffer-substring-no-properties beg end))
             open-tag close-tag mark-read-only loc context)
        (cond
         ((string= leader "_")
          (setq context 'underline
                open-tag (muse-markup-text 'begin-underline)
                close-tag (muse-markup-text 'end-underline)))
         ((string= leader "=")
          (setq context 'literal
                open-tag (muse-markup-text 'begin-literal)
                close-tag (muse-markup-text 'end-literal))
          (setq mark-read-only t))
         (t
          (let ((l (length leader)))
            (setq context 'emphasis)
            (cond
             ((= l 1) (setq open-tag (muse-markup-text 'begin-emph)
                            close-tag (muse-markup-text 'end-emph)))
             ((= l 2) (setq open-tag (muse-markup-text 'begin-more-emph)
                            close-tag (muse-markup-text 'end-more-emph)))
             ((= l 3) (setq open-tag (muse-markup-text 'begin-most-emph)
                            close-tag (muse-markup-text 'end-most-emph)))
             (t (setq context nil))))))
        (if (and context
                 (not (get-text-property beg 'muse-link))
                 (setq loc (search-forward leader nil t))
                 (or (eobp) (not (eq (char-syntax (char-after loc)) ?w)))
                 (not (eq (char-syntax (char-before (point))) ?\ ))
                 (not (get-text-property (point) 'muse-link)))
            (progn
              (replace-match "")
              (delete-region beg end)
              (setq end (point-marker))
              (muse-insert-markup close-tag)
              (goto-char beg)
              (muse-insert-markup open-tag)
              (setq beg (point))
              (when mark-read-only
                (muse-publish-escape-specials beg end t context)
                (muse-publish-mark-read-only beg end))
              (set-marker end nil))
          (backward-char))
        nil))
    
    (defun muse-publish-markup-emdash ()
      (unless (get-text-property (match-beginning 0) 'muse-link)
        (let ((prespace (match-string 1))
              (postspace (match-string 2)))
          (delete-region (match-beginning 0) (match-end 0))
          (muse-insert-markup (muse-markup-text 'emdash prespace postspace))
          (when (eq (char-after) ?\<)
            (insert ?\n)))))
    
    (defun muse-publish-markup-enddots ()
      (unless (get-text-property (match-beginning 0) 'muse-link)
        (delete-region (match-beginning 0) (match-end 0))
        (muse-insert-markup (muse-markup-text 'enddots))))
    
    (defun muse-publish-markup-dots ()
      (unless (get-text-property (match-beginning 0) 'muse-link)
        (delete-region (match-beginning 0) (match-end 0))
        (muse-insert-markup (muse-markup-text 'dots))))
    
    (defun muse-publish-markup-rule ()
      (unless (get-text-property (match-beginning 0) 'muse-link)
        (delete-region (match-beginning 0) (match-end 0))
        (muse-insert-markup (muse-markup-text 'rule))))
    
    (defun muse-publish-markup-no-break-space ()
      (unless (get-text-property (match-beginning 0) 'muse-link)
        (delete-region (match-beginning 0) (match-end 0))
        (muse-insert-markup (muse-markup-text 'no-break-space))))
    
    (defun muse-publish-markup-heading ()
      (let* ((len (length (match-string 1)))
             (start (muse-markup-text
                     (cond ((= len 1) 'section)
                           ((= len 2) 'subsection)
                           ((= len 3) 'subsubsection)
                           (t 'section-other))
                     len))
             (end   (muse-markup-text
                     (cond ((= len 1) 'section-end)
                           ((= len 2) 'subsection-end)
                           ((= len 3) 'subsubsection-end)
                           (t 'section-other-end))
                     len)))
        (delete-region (match-beginning 0) (match-end 0))
        (muse-insert-markup start)
        (end-of-line)
        (when end
          (muse-insert-markup end))
        (forward-line 1)
        (unless (eq (char-after) ?\n)
          (insert "\n"))
        (muse-publish-section-close len)))
    
    (defvar muse-publish-footnotes nil)
    
    (defun muse-publish-markup-footnote ()
      "Scan ahead and snarf up the footnote body."
      (cond
       ((get-text-property (match-beginning 0) 'muse-link)
        nil)
       ((= (muse-line-beginning-position) (match-beginning 0))
        "")
       (t
        (let ((footnote (save-match-data
                          (string-to-number (match-string 1))))
              (oldtext (match-string 0))
              footnotemark)
          (delete-region (match-beginning 0) (match-end 0))
          (save-excursion
            (when (re-search-forward (format "^\\[%d\\]\\s-+" footnote) nil t)
              (let* ((start (match-beginning 0))
                     (beg (goto-char (match-end 0)))
                     (end (save-excursion
                            (if (search-forward "\n\n" nil t)
                                (copy-marker (match-beginning 0))
                              (goto-char (point-max))
                              (skip-chars-backward "\n")
                              (point-marker)))))
                (while (re-search-forward
                        (concat "^[" muse-regexp-blank "]+\\([^\n]\\)")
                        end t)
                  (replace-match "\\1" t))
                (let ((footnotemark-cmd (muse-markup-text 'footnotemark))
                      (footnotemark-end-cmd (muse-markup-text 'footnotemark-end)))
                  (if (string= "" footnotemark-cmd)
                      (setq footnotemark
                            (concat (muse-markup-text 'footnote)
                                    (muse-publish-escape-specials-in-string
                                     (buffer-substring-no-properties beg end)
                                     'footnote)
                                    (muse-markup-text 'footnote-end)))
                    (setq footnotemark (format footnotemark-cmd footnote
                                               footnotemark-end-cmd))
                    (unless muse-publish-footnotes
                      (set (make-local-variable 'muse-publish-footnotes)
                           (make-vector 256 nil)))
                    (unless (aref muse-publish-footnotes footnote)
                      (setq footnotemark
                            (concat
                             footnotemark
                             (concat (format (muse-markup-text 'footnotetext)
                                             footnote)
                                     (buffer-substring-no-properties beg end)
                                     (muse-markup-text 'footnotetext-end))))
                      (aset muse-publish-footnotes footnote footnotemark))))
                (goto-char end)
                (skip-chars-forward "\n")
                (delete-region start (point))
                (set-marker end nil))))
          (if footnotemark
              (muse-insert-markup footnotemark)
            (insert oldtext))))))
    
    (defun muse-publish-markup-fn-sep ()
      (delete-region (match-beginning 0) (match-end 0))
      (muse-insert-markup (muse-markup-text 'fn-sep)))
    
    (defun muse-insert-markup-end-list (&rest args)
      (let ((beg (point)))
        (apply 'insert args)
        (add-text-properties beg (point) '(muse-end-list t))
        (muse-publish-mark-read-only beg (point))))
    
    (defun muse-publish-determine-dl-indent (continue indent-sym determine-sym)
      ;; If the caller doesn't know how much indentation to use, figure it
      ;; out ourselves.  It is assumed that `muse-forward-list-item' has
      ;; been called just before this to set the match data.
      (when (and continue
                 (symbol-value determine-sym))
        (save-match-data
          ;; snarf all leading whitespace
          (let ((indent (and (match-beginning 2)
                             (buffer-substring (match-beginning 1)
                                               (match-beginning 2)))))
            (when (and indent
                       (not (string= indent "")))
              (set indent-sym indent)
              (set determine-sym nil))))))
    
    (defun muse-publish-surround-dl (indent post-indent)
      (let* ((beg-item (muse-markup-text 'begin-dl-item))
             (end-item (muse-markup-text 'end-dl-item))
             (beg-ddt (muse-markup-text 'begin-ddt)) ;; term
             (end-ddt (muse-markup-text 'end-ddt))
             (beg-dde (muse-markup-text 'begin-dde)) ;; definition
             (end-dde (muse-markup-text 'end-dde))
             (continue t)
             (no-terms t)
             beg)
        (while continue
          ;; envelope this as one term+definitions unit -- HTML does not
          ;; need this, but DocBook and Muse's custom XML format do
          (muse-insert-markup beg-item)
          (when (looking-at muse-dl-term-regexp)
            ;; find the term and wrap it with published markup
            (setq beg (point)
                  no-terms nil)
            (goto-char (match-end 1))
            (delete-region (point) (match-end 0))
            (muse-insert-markup-end-list end-ddt)
            ;; if definition is immediately after term, move to next line
            (unless (eq (char-after) ?\n)
              (insert ?\n))
            (save-excursion
              (goto-char beg)
              (delete-region (point) (match-beginning 1))
              (muse-insert-markup beg-ddt)))
          ;; handle pathological edge case where there is no term -- I
          ;; would prefer to just disallow this, but people seem to want
          ;; this behavior
          (when (and no-terms
                     (looking-at (concat "[" muse-regexp-blank "]*::"
                                         "[" muse-regexp-blank "]*")))
            (delete-region (point) (match-end 0))
            ;; but only do this once
            (setq no-terms nil))
          (setq beg (point)
                ;; move past current item
                continue (muse-forward-list-item 'dl-term indent))
          (save-restriction
            (narrow-to-region beg (point))
            (goto-char (point-min))
            ;; publish each definition that we find, defaulting to an
            ;; empty definition if none are found
            (muse-publish-surround-text beg-dde end-dde
             (lambda (indent)
               (muse-forward-list-item 'dl-entry indent))
             indent post-indent
             #'muse-publish-determine-dl-indent)
            (goto-char (point-max))
            (skip-chars-backward (concat muse-regexp-blank "\n"))
            (muse-insert-markup-end-list end-item)
            (when continue
              (goto-char (point-max)))))))
    
    (defun muse-publish-strip-list-indentation (list-item empty-line indent post-indent)
      (let ((list-nested nil)
            (indent-found nil))
        (while (< (point) (point-max))
          (when (and (looking-at list-item)
                     (not (or (get-text-property
                               (muse-list-item-critical-point) 'read-only)
                              (get-text-property
                               (muse-list-item-critical-point) 'muse-link))))
            ;; if we encounter a list item, allow no post-indent space
            (setq list-nested t))
          (when (and (not (looking-at empty-line))
                     (looking-at (concat indent "\\("
                                         (or (and list-nested "")
                                             post-indent)
                                         "\\)")))
            ;; if list is not nested, remove indentation
            (unless indent-found
              (setq post-indent (match-string 1)
                    indent-found t))
            (replace-match ""))
          (forward-line 1))))
    
    (defun muse-publish-surround-text (beg-tag end-tag move-func &optional indent post-indent determine-indent-func list-item)
      (unless list-item
        (setq list-item (format muse-list-item-regexp
                                (concat "[" muse-regexp-blank "]*"))))
      (let ((continue t)
            (empty-line (concat "^[" muse-regexp-blank "]*\n"))
            (determine-indent (if determine-indent-func t nil))
            (new-indent indent)
            (first t)
            beg)
        (unless indent
          (setq indent (concat "[" muse-regexp-blank "]+")))
        (if post-indent
            (setq post-indent (concat " \\{0," (number-to-string post-indent)
                                      "\\}"))
          (setq post-indent ""))
        (while continue
          (if (or (not end-tag) (string= end-tag ""))
              ;; if no end of list item markup exists, treat the beginning
              ;; of list item markup as it if it were the end -- this
              ;; prevents multiple-level lists from being confused
              (muse-insert-markup-end-list beg-tag)
            (muse-insert-markup beg-tag))
          (setq beg (point)
                ;; move past current item; continue is non-nil if there
                ;; are more like items to be processed
                continue (if (and determine-indent-func first)
                             (funcall move-func (concat indent post-indent))
                           (funcall move-func indent)))
          (when determine-indent-func
            (funcall determine-indent-func continue 'new-indent 'determine-indent))
          (when continue
              ;; remove list markup if we encountered another item of the
              ;; same type
              (replace-match "" t t nil 1))
          (save-restriction
            ;; narrow to current item
            (narrow-to-region beg (point))
            (goto-char (point-min))
            (if (looking-at empty-line)
                ;; if initial line is blank, move to first non-blank line
                (while (progn (forward-line 1)
                              (and (< (point) (point-max))
                                   (looking-at empty-line))))
              ;; otherwise, move to second line of text
              (forward-line 1))
            ;; strip list indentation
            (muse-publish-strip-list-indentation list-item empty-line
                                                 indent post-indent)
            (skip-chars-backward (concat muse-regexp-blank "\n"))
            (muse-insert-markup-end-list end-tag)
            (when determine-indent-func
              (setq indent new-indent))
            (when first
              (setq first nil))
            (when continue
              (goto-char (point-max)))))))
    
    (defun muse-publish-ensure-blank-line ()
      "Make sure that a blank line exists on the line before point."
      (let ((pt (point-marker)))
        (beginning-of-line)
        (cond ((eq (point) (point-min)) nil)
              ((prog2 (backward-char) (bolp) (forward-char)) nil)
              (t (insert-before-markers "\n")))
        (goto-char pt)
        (set-marker pt nil)))
    
    (defun muse-publish-markup-list ()
      "Markup a list entry.
    This function works by marking up items of the same list level
    and type, respecting the end-of-list property."
      (let* ((str (match-string 1))
             (type (muse-list-item-type str))
             (indent (buffer-substring (muse-line-beginning-position)
                                       (match-beginning 1)))
             (post-indent (length str)))
        (cond
         ((or (get-text-property (muse-list-item-critical-point) 'read-only)
              (get-text-property (muse-list-item-critical-point) 'muse-link))
          nil)
         ((eq type 'ul)
          (unless (eq (char-after (match-end 1)) ?-)
            (delete-region (match-beginning 0) (match-end 0))
            (muse-publish-ensure-blank-line)
            (muse-insert-markup (muse-markup-text 'begin-uli))
            (save-excursion
              (muse-publish-surround-text
               (muse-markup-text 'begin-uli-item)
               (muse-markup-text 'end-uli-item)
               (lambda (indent)
                 (muse-forward-list-item 'ul indent))
               indent post-indent)
              (muse-insert-markup-end-list (muse-markup-text 'end-uli)))
            (forward-line 1)))
         ((eq type 'ol)
          (delete-region (match-beginning 0) (match-end 0))
          (muse-publish-ensure-blank-line)
          (muse-insert-markup (muse-markup-text 'begin-oli))
          (save-excursion
            (muse-publish-surround-text
             (muse-markup-text 'begin-oli-item)
             (muse-markup-text 'end-oli-item)
             (lambda (indent)
               (muse-forward-list-item 'ol indent))
             indent post-indent)
            (muse-insert-markup-end-list (muse-markup-text 'end-oli)))
          (forward-line 1))
         (t
          (goto-char (match-beginning 0))
          (muse-publish-ensure-blank-line)
          (muse-insert-markup (muse-markup-text 'begin-dl))
          (save-excursion
            (muse-publish-surround-dl indent post-indent)
            (muse-insert-markup-end-list (muse-markup-text 'end-dl)))
          (forward-line 1))))
      nil)
    
    (defun muse-publish-markup-quote ()
      "Markup a quoted paragraph.
    The reason this function is so funky, is to prevent text properties
    like read-only from being inadvertently deleted."
      (let* ((ws (match-string 1))
             (centered (>= (string-width ws) 6))
             (begin-elem (if centered 'begin-center 'begin-quote-item))
             (end-elem (if centered 'end-center 'end-quote-item)))
        (replace-match "" t t nil 1)
        (unless centered
          (muse-insert-markup (muse-markup-text 'begin-quote)))
        (muse-publish-surround-text (muse-markup-text begin-elem)
                                    (muse-markup-text end-elem)
                                    (function (lambda (indent)
                                                (muse-forward-paragraph)
                                                nil)))
        (unless centered
          (muse-insert-markup (muse-markup-text 'end-quote)))))
    
    (defun muse-publish-markup-leading-space (markup-space multiple)
      (let (count)
        (when (and markup-space
                   (>= (setq count (skip-chars-forward " ")) 0))
          (delete-region (muse-line-beginning-position) (point))
          (while (> count 0)
            (muse-insert-markup markup-space)
            (setq count (- count multiple))))))
    
    (defun muse-publish-markup-verse ()
      (let ((leader (match-string 0)))
        (goto-char (match-beginning 0))
        (muse-insert-markup (muse-markup-text 'begin-verse))
        (while (looking-at leader)
          (replace-match "")
          (muse-publish-markup-leading-space (muse-markup-text 'verse-space) 2)
          (let ((beg (point)))
            (end-of-line)
            (cond
             ((bolp)
              (let ((text (muse-markup-text 'empty-verse-line)))
                (when text (muse-insert-markup text))))
             ((save-excursion
                (save-match-data
                  (forward-line 1)
                  (or (looking-at (concat leader "["
                                          muse-regexp-blank
                                          "]*$"))
                      (not (looking-at leader)))))
              (let ((begin-text (muse-markup-text 'begin-last-stanza-line))
                    (end-text (muse-markup-text 'end-last-stanza-line)))
                (when end-text (muse-insert-markup end-text))
                (goto-char beg)
                (when begin-text (muse-insert-markup begin-text))
                (end-of-line)))
             (t
              (let ((begin-text (muse-markup-text 'begin-verse-line))
                    (end-text (muse-markup-text 'end-verse-line)))
                (when end-text (muse-insert-markup end-text))
                (goto-char beg)
                (when begin-text (muse-insert-markup begin-text))
                (end-of-line))))
            (forward-line 1))))
      (muse-insert-markup (muse-markup-text 'end-verse))
      (insert ?\n))
    
    (defun muse-publish-trim-table (table)
      "Remove completely blank columns from table, if at start or end of row."
      ;; remove first
      (catch 'found
        (dolist (row (cdr table))
          (let ((el (cadr row)))
            (when (and (stringp el) (not (string= el "")))
              (throw 'found t))))
        (dolist (row (cdr table))
          (setcdr row (cddr row)))
        (setcar table (1- (car table))))
      ;; remove last
      (catch 'found
        (dolist (row (cdr table))
          (let ((el (car (last row))))
            (when (and (stringp el) (not (string= el "")))
              (throw 'found t))))
        (dolist (row (cdr table))
          (setcdr (last row 2) nil))
        (setcar table (1- (car table))))
      table)
    
    (defun muse-publish-table-fields (beg end)
      "Parse given region as a table, returning a cons cell.
    The car is the length of the longest row.
    
    The cdr is a list of the fields of the table, with the first
    element indicating the type of the row:
      1: body, 2: header, 3: footer, hline: separator.
    
    The existing region will be removed, except for initial blank lines."
      (unless (muse-publishing-directive "disable-tables")
        (let ((longest 0)
              (left 0)
              (seen-hline nil)
              fields field-list)
          (save-restriction
            (narrow-to-region beg end)
            (goto-char (point-min))
            (while (looking-at (concat "^[" muse-regexp-blank "]*$"))
              (forward-line 1))
            (setq beg (point))
            (while (= left 0)
              (cond
               ((looking-at muse-table-hline-regexp)
                (when field-list  ; skip if at the beginning of table
                  (if seen-hline
                      (setq field-list (cons (cons 'hline nil) field-list))
                    (dolist (field field-list)
                      ;; the preceding fields are header lines
                      (setcar field 2))
                    (setq seen-hline t))))
               ((looking-at muse-table-line-regexp)
                (setq fields (cons (length (match-string 1))
                                   (mapcar #'muse-trim-whitespace
                                           (split-string (match-string 0)
                                                         muse-table-field-regexp)))
                      field-list (cons fields field-list)
                      longest (max (length fields) longest))
                ;; strip initial bars, if they exist
                (let ((first (cadr fields)))
                  (when (and first (string-match "\\`|+\\s-*" first))
                    (setcar (cdr fields) (replace-match "" t t first))))))
              (setq left (forward-line 1))))
          (delete-region beg end)
          (if (= longest 0)
              (cons 0 nil)
            ;; if the last line was an hline, remove it
            (when (eq (caar field-list) 'hline)
              (setq field-list (cdr field-list)))
            (muse-publish-trim-table (cons (1- longest) (nreverse field-list)))))))
    
    (defun muse-publish-markup-table ()
      "Style does not support tables.\n")
    
    (defun muse-publish-table-el-table (variant)
      "Publish table.el-style tables in the format given by VARIANT."
      (when (condition-case nil
                (progn (require 'table)
                       t)
              (error nil))
        (let ((muse-buf (current-buffer)))
          (save-restriction
            (narrow-to-region (match-beginning 0) (match-end 0))
            (goto-char (point-min))
            (forward-line 1)
            (when (search-forward "|" nil t)
              (with-temp-buffer
                (let ((temp-buf (current-buffer)))
                  (with-current-buffer muse-buf
                    (table-generate-source variant temp-buf))
                  (with-current-buffer muse-buf
                    (delete-region (point-min) (point-max))
                    (insert-buffer-substring temp-buf)
                    (muse-publish-mark-read-only (point-min) (point-max))))))))))
    
    (defun muse-publish-markup-table-el ()
      "Mark up table.el-style tables."
      (cond ((muse-style-derived-p 'html)
             (muse-publish-table-el-table 'html))
            ((muse-style-derived-p 'latex)
             (muse-publish-table-el-table 'latex))
            ((muse-style-derived-p 'docbook)
             (muse-publish-table-el-table 'cals))
            (t "Style does not support table.el tables.\n")))
    
    (defun muse-publish-escape-specials-in-string (string &optional context)
      "Escape specials in STRING using style-specific :specials.
    CONTEXT is used to figure out what kind of specials to escape.
    
    See the documentation of the `muse-publish-escape-specials'
    function for the list of available contexts."
      (unless string
        (setq string ""))
      (let ((specials (muse-style-element :specials nil t)))
        (cond ((functionp specials)
               (setq specials (funcall specials context)))
              ((symbolp specials)
               (setq specials (symbol-value specials))))
        (if (functionp specials)
            (funcall specials string)
          (apply (function concat)
                 (mapcar
                  (lambda (ch)
                    (let ((repl (or (assoc ch specials)
                                    (assoc ch muse-publish-markup-specials))))
                      (if (null repl)
                          (char-to-string ch)
                        (cdr repl))))
                  (append string nil))))))
    
    (defun muse-publish-markup-email ()
      (let* ((beg (match-end 1))
             (addr (buffer-substring-no-properties beg (match-end 0))))
        (setq addr (muse-publish-escape-specials-in-string addr 'email))
        (goto-char beg)
        (delete-region beg (match-end 0))
        (if (or (eq (char-before (match-beginning 0)) ?\")
                (eq (char-after (match-end 0)) ?\"))
            (insert addr)
          (insert (format (muse-markup-text 'email-addr) addr addr)))
        (muse-publish-mark-read-only beg (point))))
    
    (defun muse-publish-classify-url (target)
      "Transform anchors and get published name, if TARGET is a page.
    The return value is two linked cons cells.  The car is the type
    of link, the cadr is the page name, and the cddr is the anchor."
      (save-match-data
        (cond ((or (null target) (string= target ""))
               nil)
              ((string-match "\\`[uU][rR][lL]:\\(.+\\)\\'" target)
               (cons 'url (cons (match-string 1 target) nil)))
              ((string-match muse-image-regexp target)
               (cons 'image (cons target nil)))
              ((string-match muse-url-regexp target)
               (cons 'url (cons target nil)))
              ((string-match muse-file-regexp target)
               (cons 'file (cons target nil)))
              ((string-match "#" target)
               (if (eq (aref target 0) ?\#)
                  (cons 'anchor-ref (cons nil (substring target 1)))
                 (cons 'link-and-anchor
                       ;; match-data is changed by
                       ;; `muse-publish-link-page' or descendants.
                       (cons (save-match-data
                               (muse-publish-link-page
                                (substring target 0 (match-beginning 0))))
                             (substring target (match-end 0))))))
              (t
               (cons 'link (cons (muse-publish-link-page target) nil))))))
    
    (defun muse-publish-url-desc (desc explicit)
      (when desc
        (dolist (transform muse-publish-desc-transforms)
          (setq desc (save-match-data
                       (when desc (funcall transform desc explicit)))))
        (setq desc (muse-link-unescape desc))
        (muse-publish-escape-specials-in-string desc 'url-desc)))
    
    (defun muse-publish-url (url &optional desc orig-url explicit)
      "Resolve a URL into its final  form."
      (let ((unesc-url url)
            (unesc-orig-url orig-url)
            (unesc-desc desc)
            type anchor)
        ;; Transform URL
        (dolist (transform muse-publish-url-transforms)
          (setq url (save-match-data (when url (funcall transform url explicit)))))
        ;; Classify URL
        (let ((target (muse-publish-classify-url url)))
          (setq type (car target)
                url (if (eq type 'image)
                        (muse-publish-escape-specials-in-string (cadr target)
                                                                'image)
                      (muse-publish-escape-specials-in-string (cadr target) 'url))
                anchor (muse-publish-escape-specials-in-string
                        (cddr target) 'url)))
        ;; Transform description
        (if desc
            (setq desc (muse-publish-url-desc desc explicit))
          (when orig-url
            (setq orig-url (muse-publish-url-desc orig-url explicit))))
        ;; Act on URL classification
        (cond ((eq type 'anchor-ref)
               (muse-markup-text 'anchor-ref anchor (or desc orig-url)))
              ((and unesc-desc (string-match muse-image-regexp unesc-desc))
               (let ((ext (or (file-name-extension desc) "")))
                 (setq desc (muse-publish-escape-specials-in-string unesc-desc
                                                                    'image))
                 (setq desc (muse-path-sans-extension desc))
                 (muse-markup-text 'image-link url desc ext)))
              ((string= url "")
               desc)
              ((eq type 'image)
               (let ((ext (or (file-name-extension url) "")))
                 (setq url (muse-path-sans-extension url))
                 (if desc
                     (muse-markup-text 'image-with-desc url ext desc)
                   (muse-markup-text 'image url ext))))
              ((eq type 'link-and-anchor)
               (muse-markup-text 'link-and-anchor url anchor
                                 (or desc orig-url)
                                 (muse-path-sans-extension url)))
              ((eq type 'link)
               (muse-markup-text 'link url (or desc orig-url)))
              (t
               (or (and (or desc
                            ;; compare the not-escaped versions of url and
                            ;; orig-url
                            (not (string= unesc-url unesc-orig-url)))
                        (let ((text (muse-markup-text 'url-and-desc url
                                                      (or desc orig-url))))
                          (and (not (string= text ""))
                               text)))
                   (muse-markup-text 'url url (or desc orig-url)))))))
    
    (defun muse-publish-insert-url (url &optional desc orig-url explicit)
      "Resolve a URL into its final  form."
      (delete-region (match-beginning 0) (match-end 0))
      (let ((text (muse-publish-url url desc orig-url explicit)))
        (when text
          (muse-insert-markup text))))
    
    (defun muse-publish-markup-link ()
      (let (desc explicit orig-link link)
        (setq explicit (save-match-data
                         (if (string-match muse-explicit-link-regexp
                                           (match-string 0))
                             t nil)))
        (setq orig-link (if explicit (match-string 1) (match-string 0)))
        (setq desc (when explicit (match-string 2)))
        (setq link (if explicit
                       (muse-handle-explicit-link orig-link)
                     (muse-handle-implicit-link orig-link)))
        (when (and link
                   (or explicit
                       (not (or (eq (char-before (match-beginning 0)) ?\")
                                (eq (char-after (match-end 0)) ?\")))))
          ;; if explicit link has no user-provided description, treat it
          ;; as if it were an implicit link
          (when (and explicit (not desc))
            (setq explicit nil))
          (muse-publish-insert-url link desc orig-link explicit))))
    
    (defun muse-publish-markup-url ()
      (unless (or (eq (char-before (match-beginning 0)) ?\")
                  (eq (char-after (match-end 0)) ?\"))
        (let ((url (match-string 0)))
          (muse-publish-insert-url url nil url))))
    
    ;; Default publishing tags
    
    (defcustom muse-publish-contents-depth 2
      "The number of heading levels to include with  tags."
      :type 'integer
      :group 'muse-publish)
    
    (defun muse-publish-contents-tag (beg end attrs)
      (set (make-local-variable 'muse-publish-generate-contents)
           (cons (copy-marker (point) t)
                 (let ((depth (cdr (assoc "depth" attrs))))
                   (or (and depth (string-to-number depth))
                       muse-publish-contents-depth)))))
    
    (defun muse-publish-verse-tag (beg end)
      (muse-publish-ensure-block beg end)
      (save-excursion
        (save-restriction
          (narrow-to-region beg end)
          (goto-char (point-min))
          (delete-char 1)
          (while (< (point) (point-max))
            (insert "> ")
            (forward-line))
          (if (eq ?\  (char-syntax (char-before)))
              (delete-char -1)))))
    
    (defun muse-publish-mark-read-only (beg end)
      "Add read-only properties to the given region."
      (add-text-properties beg end '(rear-nonsticky (read-only) read-only t))
      nil)
    
    (defun muse-publish-mark-link (&optional beg end)
      "Indicate that the given region is a Muse link, so that other
    markup elements respect it.  If a region is not specified, use
    the 0th match data to determine it.
    
    This is usually applied to explicit links."
      (unless beg (setq beg (match-beginning 0)))
      (unless end (setq end (match-end 0)))
      (add-text-properties beg end '(muse-link t))
      nil)
    
    (defun muse-publish-quote-tag (beg end)
      (muse-publish-ensure-block beg)
      (save-excursion
        (save-restriction
          (narrow-to-region beg end)
          (let ((quote-regexp "^\\(<\\(/?\\)quote>\\)"))
            (muse-insert-markup (muse-markup-text 'begin-quote))
            (while (progn
                     (unless (looking-at (concat "[" muse-regexp-blank "\n]*"
                                                 ""))
                       (muse-publish-surround-text
                        (muse-markup-text 'begin-quote-item)
                        (muse-markup-text 'end-quote-item)
                        (function
                         (lambda (indent)
                           (muse-forward-paragraph)
                           (goto-char (match-end 0))
                           (and (< (point) (point-max))
                                (not (looking-at quote-regexp)))))
                        nil nil nil
                        quote-regexp))
                     (if (>= (point) (point-max))
                         t
                       (and (search-forward "" nil t)
                            (muse-goto-tag-end "quote" t)
                            (progn (forward-line 1) t)
                            (< (point) (point-max))))))
            (goto-char (point-max))
            (muse-insert-markup (muse-markup-text 'end-quote))))))
    
    (defun muse-publish-code-tag (beg end)
      (muse-publish-escape-specials beg end nil 'literal)
      (goto-char beg)
      (insert (muse-markup-text 'begin-literal))
      (goto-char end)
      (insert (muse-markup-text 'end-literal))
      (muse-publish-mark-read-only beg (point)))
    
    (defun muse-publish-cite-tag (beg end attrs)
      (let* ((type (muse-publish-get-and-delete-attr "type" attrs))
             (citetag (cond ((string-equal type "author")
                             'begin-cite-author)
                            ((string-equal type "year")
                             'begin-cite-year)
                            (t
                             'begin-cite))))
        (goto-char beg)
        (insert (muse-markup-text citetag (muse-publishing-directive "bibsource")))
        (goto-char end)
        (insert (muse-markup-text 'end-cite))
        (muse-publish-mark-read-only beg (point))))
    
    (defun muse-publish-src-tag (beg end attrs)
      (muse-publish-example-tag beg end))
    
    (defun muse-publish-example-tag (beg end)
      (muse-publish-ensure-block beg end)
      (muse-publish-escape-specials beg end nil 'example)
      (goto-char beg)
      (insert (muse-markup-text 'begin-example))
      (goto-char end)
      (insert (muse-markup-text 'end-example))
      (muse-publish-mark-read-only beg (point)))
    
    (defun muse-publish-literal-tag (beg end attrs)
      "Ensure that the text between BEG and END is not interpreted later on.
    
    ATTRS is an alist of attributes.
    
    If it contains a \"style\" element, delete the region if the
    current style is neither derived from nor equal to this style.
    
    If it contains both a \"style\" element and an \"exact\" element
    with the value \"t\", delete the region only if the current style
    is exactly this style."
      (let* ((style (cdr (assoc "style" attrs)))
             (exact (cdr (assoc "exact" attrs)))
             (exactp (and (stringp exact) (string= exact "t"))))
        (if (or (not style)
                (and exactp (equal (muse-style style)
                                   muse-publishing-current-style))
                (and (not exactp) (muse-style-derived-p style)))
            (muse-publish-mark-read-only beg end)
          (delete-region beg end)
          (when (and (bolp) (eolp) (not (eobp)))
            (delete-char 1)))))
    
    (put 'muse-publish-literal-tag 'muse-dangerous-tag t)
    
    (defun muse-publish-verbatim-tag (beg end)
      (muse-publish-escape-specials beg end nil 'verbatim)
      (muse-publish-mark-read-only beg end))
    
    (defun muse-publish-br-tag (beg end)
      "Insert a line break."
      (delete-region beg end)
      (muse-insert-markup (muse-markup-text 'line-break)))
    
    (defalias 'muse-publish-class-tag 'ignore)
    (defalias 'muse-publish-div-tag 'ignore)
    
    (defun muse-publish-call-tag-on-buffer (tag &optional attrs)
      "Transform the current buffer as if it were surrounded by the tag TAG.
    If attributes ATTRS are given, pass them to the tag function."
      (let ((tag-info (muse-markup-tag-info tag)))
        (when tag-info
          (let* ((end (progn (goto-char (point-max)) (point-marker)))
                 (args (list (point-min) end))
                 (muse-inhibit-style-tags nil))
            (when (nth 2 tag-info)
              (nconc args (list attrs)))
            (apply (nth 4 tag-info) args)
            (set-marker end nil)))))
    
    (defun muse-publish-examplify-buffer (&optional attrs)
      "Transform the current buffer as if it were an  region."
      (muse-publish-call-tag-on-buffer "example" attrs))
    
    (defun muse-publish-srcify-buffer (&optional attrs)
      "Transform the current buffer as if it were a  region."
      (muse-publish-call-tag-on-buffer "src" attrs))
    
    (defun muse-publish-versify-buffer (&optional attrs)
      "Transform the current buffer as if it were a  region."
      (muse-publish-call-tag-on-buffer "verse" attrs)
      (muse-publish-markup ""
                           `((100 ,(concat "^[" muse-regexp-blank "]*> ") 0
                                  muse-publish-markup-verse)))
      (goto-char (point-min)))
    
    (defmacro muse-publish-markup-attribute (beg end attrs reinterp &rest body)
      "Evaluate BODY within the bounds of BEG and END.
    ATTRS is an alist.  Only the \"markup\" element of ATTRS is acted
    on.
    
    If it is omitted, publish the region with the normal Muse rules.
    If RE-INTERP is specified, this is done immediately in a new
    publishing process.  Currently, RE-INTERP is specified only by
    the  tag.
    
    If \"nil\", do not mark up the region at all, but prevent it from
    being further interpreted by Muse.
    
    If \"example\", treat the region as if it was surrounded by the
     tag.
    
    If \"src\", treat the region as if it was surrounded by the
     tag.
    
    If \"verse\", treat the region as if it was surrounded by the
     tag, to preserve newlines.
    
    Otherwise, it should be the name of a function to call in the
    narrowed region after evaluating BODY.  The function should
    take the ATTRS parameter.
    
    BEG is modified to be the start of the published markup."
      (let ((attrs-sym (make-symbol "attrs"))
            (markup (make-symbol "markup"))
            (markup-function (make-symbol "markup-function")))
        `(let* ((,attrs-sym ,attrs)
                (,markup (muse-publish-get-and-delete-attr "markup" ,attrs-sym)))
           (save-restriction
             (narrow-to-region ,beg ,end)
             (goto-char (point-min))
             ,@body
             (if (not ,markup)
                 (when ,reinterp
                   (muse-publish-markup-region (point-min) (point-max))
                   (muse-publish-mark-read-only (point-min) (point-max))
                   (goto-char (point-max)))
               (let ((,markup-function (read ,markup)))
                 (cond ((eq ,markup-function 'example)
                        (setq ,markup-function #'muse-publish-examplify-buffer))
                       ((eq ,markup-function 'src)
                        (setq ,markup-function #'muse-publish-srcify-buffer))
                       ((eq ,markup-function 'verse)
                        (setq ,markup-function #'muse-publish-versify-buffer))
                       ((and ,markup-function (not (functionp ,markup-function)))
                        (error "Invalid markup function `%s'" ,markup))
                       (t nil))
                 (if ,markup-function
                     (funcall ,markup-function ,attrs-sym)
                   (muse-publish-mark-read-only (point-min) (point-max))
                   (goto-char (point-max)))))))))
    
    (put 'muse-publish-markup-attribute 'lisp-indent-function 4)
    (put 'muse-publish-markup-attribute 'edebug-form-spec
         '(sexp sexp sexp sexp body))
    
    (defun muse-publish-lisp-tag (beg end attrs)
      (muse-publish-markup-attribute beg end attrs nil
        (save-excursion
          (save-restriction
            (let ((str (muse-eval-lisp
                        (prog1
                            (concat "(progn "
                                    (buffer-substring-no-properties (point-min)
                                                                    (point-max))
                                    ")")
                          (delete-region (point-min) (point-max))
                          (widen)))))
              (set-text-properties 0 (length str) nil str)
              (insert str))))))
    
    (put 'muse-publish-lisp-tag 'muse-dangerous-tag t)
    
    (defun muse-publish-command-tag (beg end attrs)
      (muse-publish-markup-attribute beg end attrs nil
        (while (looking-at "\\s-*$")
          (forward-line))
        (let ((interp (muse-publish-get-and-delete-attr "interp" attrs)))
          (if interp
              (shell-command-on-region (point) (point-max) interp t t)
            (shell-command
             (prog1
                 (buffer-substring-no-properties (point) (point-max))
               (delete-region (point-min) (point-max)))
             t)))
        ;; make sure there is a newline at end
        (goto-char (point-max))
        (forward-line 0)
        (unless (looking-at "\\s-*$")
          (goto-char (point-max))
          (insert ?\n))
        (goto-char (point-min))))
    
    (put 'muse-publish-command-tag 'muse-dangerous-tag t)
    
    (defun muse-publish-perl-tag (beg end attrs)
      (muse-publish-command-tag beg end
                                (cons (cons "interp" (executable-find "perl"))
                                      attrs)))
    
    (put 'muse-publish-perl-tag 'muse-dangerous-tag t)
    
    (defun muse-publish-php-tag (beg end attrs)
      (muse-publish-command-tag beg end
                                (cons (cons "interp" (executable-find "php"))
                                      attrs)))
    
    (put 'muse-publish-php-tag 'muse-dangerous-tag t)
    
    (defun muse-publish-python-tag (beg end attrs)
      (muse-publish-command-tag beg end
                                (cons (cons "interp" (executable-find "python"))
                                      attrs)))
    
    (put 'muse-publish-python-tag 'muse-dangerous-tag t)
    
    (defun muse-publish-ruby-tag (beg end attrs)
      (muse-publish-command-tag beg end
                                (cons (cons "interp" (executable-find "ruby"))
                                      attrs)))
    
    (put 'muse-publish-ruby-tag 'muse-dangerous-tag t)
    
    (defun muse-publish-comment-tag (beg end)
      (if (null muse-publish-comments-p)
          (delete-region beg end)
        (goto-char end)
        (muse-insert-markup (muse-markup-text 'comment-end))
        (muse-publish-mark-read-only beg end)
        (goto-char beg)
        (muse-insert-markup (muse-markup-text 'comment-begin))))
    
    (defun muse-publish-include-tag (beg end attrs)
      "Include the named file at the current location during publishing.
    
    
    
    The `markup' attribute controls how this file is marked up after
    being inserted.  See `muse-publish-markup-attribute' for an
    explanation of how it works."
      (let ((filename (muse-publish-get-and-delete-attr "file" attrs))
            (muse-publishing-directives (copy-alist muse-publishing-directives)))
        (if filename
            (setq filename (expand-file-name
                            filename
                            (file-name-directory muse-publishing-current-file)))
          (error "No file attribute specified in  tag"))
        (muse-publish-markup-attribute beg end attrs t
          (muse-insert-file-contents filename))))
    
    (put 'muse-publish-include-tag 'muse-dangerous-tag t)
    
    (defun muse-publish-mark-up-tag (beg end attrs)
      "Run an Emacs Lisp function on the region delimted by this tag.
    
    
    
    The optional \"function\" attribute controls how this section is
    marked up.  If used, it should be the name of a function to call
    with the buffer narrowed to the delimited region.  Note that no
    further marking-up will be performed on this region.
    
    If \"function\" is omitted, use the standard Muse markup function.
    This is useful for marking up content in headers and footers.
    
    The optional \"style\" attribute causes the region to be deleted
    if the current style is neither derived from nor equal to this
    style.
    
    If both a \"style\" attribute and an \"exact\" attribute are
    provided, and \"exact\" is \"t\", delete the region only if the
    current style is exactly this style."
      (let* ((style (cdr (assoc "style" attrs)))
             (exact (cdr (assoc "exact" attrs)))
             (exactp (and (stringp exact) (string= exact "t"))))
        (if (or (not style)
                (and exactp (equal (muse-style style)
                                   muse-publishing-current-style))
                (and (not exactp) (muse-style-derived-p style)))
            (let* ((function (cdr (assoc "function" attrs)))
                   (muse-publish-use-header-footer-tags nil)
                   (markup-function (and function (intern-soft function))))
              (if (and markup-function (functionp markup-function))
                  (save-restriction
                    (narrow-to-region beg end)
                    (funcall markup-function)
                    (goto-char (point-max)))
                (let ((muse-publish-inhibit-style-hooks t))
                  (muse-publish-markup-region beg end)))
              (muse-publish-mark-read-only beg (point)))
          (delete-region beg end))))
    
    (put 'muse-publish-mark-up-tag 'muse-dangerous-tag t)
    
    ;; Miscellaneous helper functions
    
    (defun muse-publish-strip-URL (string &rest ignored)
      "If the text \"URL:\" exists at the beginning of STRING, remove it.
    The text is removed regardless of whether and part of it is uppercase."
      (save-match-data
        (if (string-match "\\`[uU][rR][lL]:\\(.+\\)\\'" string)
            (match-string 1 string)
          string)))
    
    (defun muse-publish-markup-type (category default-func)
      (let ((rule (muse-find-markup-element :overrides category (muse-style))))
        (funcall (or rule default-func))))
    
    (defun muse-published-buffer-contents (buffer)
      (with-current-buffer buffer
        (goto-char (point-min))
        (let ((beg (and (search-forward "Emacs Muse begins here")
                        (muse-line-end-position)))
              (end (and (search-forward "Emacs Muse ends here")
                        (muse-line-beginning-position))))
          (buffer-substring-no-properties beg end))))
    
    (defun muse-published-contents (file)
      (when (file-readable-p file)
        (muse-with-temp-buffer
          (muse-insert-file-contents file)
          (muse-published-buffer-contents (current-buffer)))))
    
    (defun muse-publish-transform-output
      (file temp-file output-path name gen-func &rest cleanup-exts)
      "Transform the given TEMP-FILE into the OUTPUT-PATH, using GEN-FUNC."
      (setq file (muse-page-name file))
      (message "Generating %s output for %s..." name file)
      (if (not (funcall gen-func temp-file output-path))
          (message "Generating %s from %s...failed" name file)
        (message "Generating %s output for %s...done" name file)
        (muse-delete-file-if-exists temp-file)
        (dolist (ext cleanup-exts)
          (muse-delete-file-if-exists
           (expand-file-name (concat file ext)
                             (file-name-directory output-path))))
        (message "Wrote %s" output-path)))
    
    (defun muse-publish-read-only (string)
      (let ((end (1- (length string))))
        (add-text-properties 0 end
                             '(rear-nonsticky (read-only) read-only t)
                             string)
        string))
    
    ;;; muse-publish.el ends here
    muse-el-3.20+dfsg/lisp/muse-autoloads.el0000644000175000017500000002226112070123677017503 0ustar  taffittaffit;;; muse-autoloads.el --- autoloads for Muse
    ;;
    ;;; Code:
    
    ;;;### (autoloads nil "muse" "muse.el" (19559 54298))
    ;;; Generated autoloads from muse.el
     (add-to-list 'auto-mode-alist '("\\.muse\\'" . muse-mode-choose-mode))
    
    ;;;***
    
    ;;;### (autoloads (muse-colors-toggle-inline-images) "muse-colors"
    ;;;;;;  "muse-colors.el" (19559 54298))
    ;;; Generated autoloads from muse-colors.el
    
    (autoload 'muse-colors-toggle-inline-images "muse-colors" "\
    Toggle display of inlined images on/off.
    
    \(fn)" t nil)
    
    ;;;***
    
    ;;;### (autoloads (muse-import-docbook-files muse-import-docbook)
    ;;;;;;  "muse-import-docbook" "muse-import-docbook.el" (19559 54298))
    ;;; Generated autoloads from muse-import-docbook.el
    
    (autoload 'muse-import-docbook "muse-import-docbook" "\
    Convert the Docbook buffer SRC to Muse, writing output in the DEST buffer.
    
    \(fn SRC DEST)" t nil)
    
    (autoload 'muse-import-docbook-files "muse-import-docbook" "\
    Convert the Docbook file SRC to Muse, writing output to the DEST file.
    
    \(fn SRC DEST)" t nil)
    
    ;;;***
    
    ;;;### (autoloads (muse-import-latex) "muse-import-latex" "muse-import-latex.el"
    ;;;;;;  (19559 54298))
    ;;; Generated autoloads from muse-import-latex.el
    
    (autoload 'muse-import-latex "muse-import-latex" "\
    Not documented
    
    \(fn)" t nil)
    
    ;;;***
    
    ;;;### (autoloads (muse-message-markup) "muse-message" "../experimental/muse-message.el"
    ;;;;;;  (19559 41152))
    ;;; Generated autoloads from ../experimental/muse-message.el
    
    (autoload 'muse-message-markup "muse-message" "\
    Markup a wiki-ish e-mail message as HTML alternative e-mail.
    This step is manual by default, to give the author a chance to review
    the results and ensure they are appropriate.
    If you wish it to be automatic (a risky proposition), just add this
    function to `message-send-hook'.
    
    \(fn)" t nil)
    
    ;;;***
    
    ;;;### (autoloads (muse-list-edit-minor-mode muse-insert-tag muse-index
    ;;;;;;  muse-find-backlinks muse-search muse-search-with-command
    ;;;;;;  muse-what-changed muse-previous-reference muse-next-reference
    ;;;;;;  muse-follow-name-at-point-other-window muse-follow-name-at-point
    ;;;;;;  muse-browse-result muse-edit-link-at-point muse-insert-relative-link-to-file
    ;;;;;;  muse-decrease-list-item-indentation muse-increase-list-item-indentation
    ;;;;;;  muse-insert-list-item muse-mode-choose-mode muse-mode) "muse-mode"
    ;;;;;;  "muse-mode.el" (19559 54298))
    ;;; Generated autoloads from muse-mode.el
    
    (autoload 'muse-mode "muse-mode" "\
    Muse is an Emacs mode for authoring and publishing documents.
    \\{muse-mode-map}
    
    \(fn)" t nil)
    
    (autoload 'muse-mode-choose-mode "muse-mode" "\
    Turn the proper Emacs Muse related mode on for this file.
    
    \(fn)" nil nil)
    
    (autoload 'muse-insert-list-item "muse-mode" "\
    Insert a list item at the current point, taking into account
    your current list type and indentation level.
    
    \(fn)" t nil)
    
    (autoload 'muse-increase-list-item-indentation "muse-mode" "\
    Increase the indentation of the current list item.
    
    \(fn)" t nil)
    
    (autoload 'muse-decrease-list-item-indentation "muse-mode" "\
    Decrease the indentation of the current list item.
    
    \(fn)" t nil)
    
    (autoload 'muse-insert-relative-link-to-file "muse-mode" "\
    Insert a relative link to a file, with optional description, at point.
    
    \(fn)" t nil)
    
    (autoload 'muse-edit-link-at-point "muse-mode" "\
    Edit the current link.
    Do not rename the page originally referred to.
    
    \(fn)" t nil)
    
    (autoload 'muse-browse-result "muse-mode" "\
    Visit the current page's published result.
    
    \(fn STYLE &optional OTHER-WINDOW)" t nil)
    
    (autoload 'muse-follow-name-at-point "muse-mode" "\
    Visit the link at point.
    
    \(fn &optional OTHER-WINDOW)" t nil)
    
    (autoload 'muse-follow-name-at-point-other-window "muse-mode" "\
    Visit the link at point in other window.
    
    \(fn)" t nil)
    
    (autoload 'muse-next-reference "muse-mode" "\
    Move forward to next Muse link or URL, cycling if necessary.
    
    \(fn)" t nil)
    
    (autoload 'muse-previous-reference "muse-mode" "\
    Move backward to the next Muse link or URL, cycling if necessary.
    In case of Emacs x <= 21 and ignoring of intangible properties (see
    `muse-mode-intangible-links').
    
    This function is not entirely accurate, but it's close enough.
    
    \(fn)" t nil)
    
    (autoload 'muse-what-changed "muse-mode" "\
    Show the unsaved changes that have been made to the current file.
    
    \(fn)" t nil)
    
    (autoload 'muse-search-with-command "muse-mode" "\
    Search for the given TEXT string in the project directories
    using the specified command.
    
    \(fn TEXT)" t nil)
    
    (autoload 'muse-search "muse-mode" "\
    Search for the given TEXT using the default grep command.
    
    \(fn)" t nil)
    
    (autoload 'muse-find-backlinks "muse-mode" "\
    Grep for the current pagename in all the project directories.
    
    \(fn)" t nil)
    
    (autoload 'muse-index "muse-mode" "\
    Display an index of all known Muse pages.
    
    \(fn)" t nil)
    
    (autoload 'muse-insert-tag "muse-mode" "\
    Insert a tag interactively with a blank line after it.
    
    \(fn TAG)" t nil)
    
    (autoload 'muse-list-edit-minor-mode "muse-mode" "\
    This is a global minor mode for editing files with lists.
    It is meant to be used with other major modes, and not with Muse mode.
    
    Interactively, with no prefix argument, toggle the mode.
    With universal prefix ARG turn mode on.
    With zero or negative ARG turn mode off.
    
    This minor mode provides the Muse keybindings for editing lists,
    and support for filling lists properly.
    
    It recognizes not only Muse-style lists, which use the \"-\"
    character or numbers, but also lists that use asterisks or plus
    signs.  This should make the minor mode generally useful.
    
    Definition lists and footnotes are also recognized.
    
    Note that list items may omit leading spaces, for compatibility
    with modes that set `left-margin', such as
    `debian-changelog-mode'.
    
    \\{muse-list-edit-minor-mode-map}
    
    \(fn &optional ARG)" t nil)
    
    ;;;***
    
    ;;;### (autoloads (muse-project-publish muse-project-publish-this-file
    ;;;;;;  muse-project-find-file) "muse-project" "muse-project.el"
    ;;;;;;  (19559 54298))
    ;;; Generated autoloads from muse-project.el
    
    (autoload 'muse-project-find-file "muse-project" "\
    Open the Muse page given by NAME in PROJECT.
    If COMMAND is non-nil, it is the function used to visit the file.
    If DIRECTORY is non-nil, it is the directory in which the page
    will be created if it does not already exist.  Otherwise, the
    first directory within the project's fileset is used.
    
    \(fn NAME PROJECT &optional COMMAND DIRECTORY)" t nil)
    
    (autoload 'muse-project-publish-this-file "muse-project" "\
    Publish the currently-visited file according to `muse-project-alist',
    prompting if more than one style applies.
    
    If FORCE is given, publish the file even if it is up-to-date.
    
    If STYLE is given, use that publishing style rather than
    prompting for one.
    
    \(fn &optional FORCE STYLE)" t nil)
    
    (autoload 'muse-project-publish "muse-project" "\
    Publish the pages of PROJECT that need publishing.
    
    \(fn PROJECT &optional FORCE)" t nil)
    
    ;;;***
    
    ;;;### (autoloads (muse-browse-url) "muse-protocols" "muse-protocols.el"
    ;;;;;;  (19559 54298))
    ;;; Generated autoloads from muse-protocols.el
    
    (autoload 'muse-browse-url "muse-protocols" "\
    Handle URL with the function specified in `muse-url-protocols'.
    If OTHER-WINDOW is non-nil, open in a different window.
    
    \(fn URL &optional OTHER-WINDOW)" t nil)
    
    ;;;***
    
    ;;;### (autoloads (muse-publish-this-file muse-publish-file muse-publish-region)
    ;;;;;;  "muse-publish" "muse-publish.el" (19559 54298))
    ;;; Generated autoloads from muse-publish.el
    
    (autoload 'muse-publish-region "muse-publish" "\
    Apply the given STYLE's markup rules to the given region.
    The result is placed in a new buffer that includes TITLE in its name.
    
    \(fn BEG END &optional TITLE STYLE)" t nil)
    
    (autoload 'muse-publish-file "muse-publish" "\
    Publish the given FILE in a particular STYLE to OUTPUT-DIR.
    If the argument FORCE is nil, each file is only published if it is
    newer than the published version.  If the argument FORCE is non-nil,
    the file is published no matter what.
    
    \(fn FILE STYLE &optional OUTPUT-DIR FORCE)" t nil)
    
    (autoload 'muse-publish-this-file "muse-publish" "\
    Publish the currently-visited file.
    Prompt for both the STYLE and OUTPUT-DIR if they are not
    supplied.
    
    \(fn STYLE OUTPUT-DIR &optional FORCE)" t nil)
    
    ;;;***
    
    ;;;### (autoloads nil nil ("../contrib/cgi.el" "../contrib/htmlize-hack.el"
    ;;;;;;  "../contrib/httpd.el" "../experimental/muse-cite.el" "../experimental/muse-mathml.el"
    ;;;;;;  "../experimental/muse-protocol-iw.el" "../experimental/muse-split.el"
    ;;;;;;  "muse-backlink.el" "muse-book.el" "muse-context.el" "muse-docbook.el"
    ;;;;;;  "muse-groff.el" "muse-html.el" "muse-http.el" "muse-ikiwiki.el"
    ;;;;;;  "muse-import-xml.el" "muse-ipc.el" "muse-journal.el" "muse-latex.el"
    ;;;;;;  "muse-latex2png.el" "muse-poem.el" "muse-regexps.el" "muse-texinfo.el"
    ;;;;;;  "muse-wiki.el" "muse-xml-common.el" "muse-xml.el") (19563
    ;;;;;;  39108 530627))
    
    ;;;***
    
    ;;;### (autoloads (muse-blosxom-new-entry) "muse-blosxom" "muse-blosxom.el"
    ;;;;;;  (19559 54298))
    ;;; Generated autoloads from muse-blosxom.el
    
    (autoload 'muse-blosxom-new-entry "muse-blosxom" "\
    Start a new blog entry with given CATEGORY.
    The filename of the blog entry is derived from TITLE.
    The page will be initialized with the current date and TITLE.
    
    \(fn CATEGORY TITLE)" t nil)
    
    ;;;***
    
    (provide 'muse-autoloads)
    ;;; muse-autoloads.el ends here
    ;;
    ;; Local Variables:
    ;; version-control: never
    ;; no-byte-compile: t
    ;; no-update-autoloads: t
    ;; End:
    
    muse-el-3.20+dfsg/lisp/muse-groff.el0000644000175000017500000002247111331353120016601 0ustar  taffittaffit;;; muse-groff.el --- publish groff -mom -mwww files
    
    ;; Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010
    ;;   Free Software Foundation, Inc.
    
    ;; Author: Andrew J. Korty (ajk AT iu DOT edu)
    ;; Date: Tue 5-Jul-2005
    
    ;; This file is part of Emacs Muse.  It is not part of GNU Emacs.
    
    ;; Emacs Muse 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 3, or (at your
    ;; option) any later version.
    
    ;; Emacs Muse 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 Emacs Muse; see the file COPYING.  If not, write to the
    ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
    ;; Boston, MA 02110-1301, USA.
    
    ;;; Commentary:
    
    ;;; Contributors:
    
    ;;; Code:
    
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;
    ;; Muse Publishing Using groff -mom -mwww
    ;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    
    (require 'muse-publish)
    
    (defgroup muse-groff nil
      "Rules for marking up a Muse file with groff -mom -mwww macros."
      :group 'muse-publish)
    
    (defcustom muse-groff-extension ".groff"
      "Default file extension for publishing groff -mom -mwww files."
      :type 'string
      :group 'muse-groff)
    
    (defcustom muse-groff-pdf-extension ".pdf"
      "Default file extension for publishing groff -mom -mwww files to PDF."
      :type 'string
      :group 'muse-groff)
    
    (defcustom muse-groff-header
      ".TITLE \"(muse-publishing-directive \"title\")\"
    .SUBTITLE \"(muse-publishing-directive \"date\")\"
    .AUTHOR \"(muse-publishing-directive \"author\")\"
    .PRINTSTYLE TYPESET
    .de list
    .    LIST \\$1
    .    SHIFT_LIST \\$2
    ..
    .PARA_INDENT 0
    .START
    (and muse-publish-generate-contents \".TOC\n\")\n"
      "Header used for publishing groff -mom -mwww files."
      :type '(choice string file)
      :group 'muse-groff)
    
    (defcustom muse-groff-footer " "
      "Footer used for publishing groff -mom -mwww files."
      :type '(choice string file)
      :group 'muse-groff)
    
    (defcustom muse-groff-markup-regexps
      `((10400 ,(concat "\\(\n\\)?\n"
                        "\\(["
                        muse-regexp-blank
                        "]*\n\\)+\\(<\\(blockquote\\|center\\)>\n\\)?")
               0 muse-groff-markup-paragraph))
    "List of markup regexps for identifying regions in a Muse page.
    For more on the structure of this list, see `muse-publish-markup-regexps'."
      :type '(repeat (choice
                      (list :tag "Markup rule"
                            integer
                            (choice regexp symbol)
                            integer
                            (choice string function symbol))
                      function))
      :group 'muse-groff)
    
    (defcustom muse-groff-markup-functions
      '((table . muse-groff-markup-table))
      "An alist of style types to custom functions for that kind of text.
    For more on the structure of this list, see
    `muse-publish-markup-functions'."
      :type '(alist :key-type symbol :value-type function)
      :group 'muse-groff)
    
    (defcustom muse-groff-markup-tags
      '()
      "A list of tag specifications, for specially marking up GROFF."
      :type '(repeat (list (string :tag "Markup tag")
                           (boolean :tag "Expect closing tag" :value t)
                           (boolean :tag "Parse attributes" :value nil)
                           (boolean :tag "Nestable" :value nil)
                           function))
      :group 'muse-groff)
    
    (defcustom muse-groff-markup-strings
      `((image-with-desc . "\n.MPIMG -R %s.%s\n")
        (image           . "\n.MPIMG -R %s.%s\n")
        (image-link      . "\n.\\\" %s\n.MPIMG -R %s.%s")
        (url             . "\n.URL %s %s\n\\z")
        (link            . "\n.URL %s %s\n\\z")
        (email-addr      . "\f[C]%s\f[]")
        (emdash          . "\\(em")
        (rule            . "\n.RULE\n")
        (no-break-space  . "\\h")
        (line-break      . "\\p")
        (enddots         . "....")
        (dots            . "...")
    ;;     (part            . "\\part{")
    ;;     (part-end        . "}")
    ;;     (chapter         . "\\chapter{")
    ;;     (chapter-end     . "}")
        (section         . ".HEAD \"")
        (section-end     . "\"")
        (subsection      . ".SUBHEAD \"")
        (subsection-end  . "\"")
        (subsubsection   . ".PARAHEAD \"")
        (subsubsection-end . "\"")
    ;;     (footnote        . "\\c\n.FOOTNOTE\n")
    ;;     (footnote-end    . "\n.FOOTNOTE OFF\n")
    ;;     (footnotemark    . "\\footnotemark[%d]")
    ;;     (footnotetext    . "\\footnotetext[%d]{")
    ;;     (footnotetext-end . "}")
        (begin-underline . "\n.UNDERSCORE \"")
        (end-underline   . "\"\n")
        (begin-literal   . "\\fC")
        (end-literal     . "\\fP")
        (begin-emph      . "\\fI")
        (end-emph        . "\\fP")
        (begin-more-emph . "\\fB")
        (end-more-emph   . "\\fP")
        (begin-most-emph . "\\f(BI")
        (end-most-emph   . "\\fP")
        (begin-verse     . ".QUOTE")
        (end-verse       . ".QUOTE OFF")
        (begin-center    . "\n.CENTER\n")
        (end-center      . "\n.QUAD L\n")
        (begin-example   . ,(concat
                             ".QUOTE_FONT CR\n.QUOTE_INDENT 1\n"".QUOTE_SIZE -2\n"
                             ".UNDERLINE_QUOTES OFF\n.QUOTE"))
        (end-example     . ".QUOTE OFF")
        (begin-quote     . ".BLOCKQUOTE")
        (end-quote       . ".BLOCKQUOTE OFF")
        (begin-cite     . "")
        (begin-cite-author . "")
        (begin-cite-year . "")
        (end-cite        . "")
        (begin-uli       . ".list BULLET\n.SHIFT_LIST 2m\n.ITEM\n")
        (end-uli         . "\n.LIST OFF")
        (begin-oli       . ".list DIGIT\n.SHIFT_LIST 2m\n.ITEM\n")
        (end-oli         . "\n.LIST OFF")
        (begin-ddt       . "\\fB")
        (begin-dde       . "\\fP\n.IR 4P\n")
        (end-ddt         . ".IRX CLEAR"))
      "Strings used for marking up text.
    These cover the most basic kinds of markup, the handling of which
    differs little between the various styles."
      :type '(alist :key-type symbol :value-type string)
      :group 'muse-groff)
    
    (defcustom muse-groff-markup-specials
      '((?\\ . "\\e"))
      "A table of characters which must be represented specially."
      :type '(alist :key-type character :value-type string)
      :group 'muse-groff)
    
    (defun muse-groff-markup-paragraph ()
      (let ((end (copy-marker (match-end 0) t)))
        (goto-char (1+ (match-beginning 0)))
        (delete-region (point) end)
        (unless (looking-at "\.\\(\\(\\(SUB\\|PARA\\)?HEAD \\)\\|RULE$\\)")
          (muse-insert-markup ".ALD .5v\n.PP\n.ne 2\n"))))
    
    (defun muse-groff-protect-leading-chars ()
      "Protect leading periods and apostrophes from being interpreted as
    command characters."
      (while (re-search-forward "^[.']" nil t)
        (replace-match "\\\\&\\&" t)))
    
    (defun muse-groff-concat-lists ()
      "Join like lists."
      (let ((type "")
            arg begin)
        (while (re-search-forward "^\.LIST[ \t]+\\(.*\\)\n" nil t)
          (setq arg (match-string 1))
          (if (string= arg "OFF")
              (setq begin (match-beginning 0))
            (if (and begin (string= type arg))
                (delete-region begin (match-end 0))
              (setq type arg
                    begin 0))))))
    
    (defun muse-groff-fixup-dquotes ()
      "Fixup double quotes."
      (let ((open t))
        (while (search-forward "\"" nil t)
          (unless (get-text-property (match-beginning 0) 'read-only)
            (if (and (bolp) (eq (char-before) ?\n))
                (setq open t))
            (if open
                (progn
                  (replace-match "``")
                  (setq open nil))
              (replace-match "''")
              (setq open t))))))
    
    (defun muse-groff-prepare-buffer ()
      (goto-char (point-min))
      (muse-groff-protect-leading-chars))
    
    (defun muse-groff-munge-buffer ()
      (goto-char (point-min))
      (muse-groff-concat-lists))
    
    (defun muse-groff-pdf-browse-file (file)
      (shell-command (concat "open " file)))
    
    (defun muse-groff-pdf-generate (file output-path final-target)
      (muse-publish-transform-output
       file output-path final-target "PDF"
       (function
        (lambda (file output-path)
          (let ((command
                 (format
                  (concat "file=%s; ext=%s; cd %s && cp $file$ext $file.ref && "
                          "groff -mom -mwww -t $file$ext > $file.ps && "
                          "pstopdf $file.ps")
                  (file-name-sans-extension file)
                  muse-groff-extension
                  (file-name-directory output-path))))
            (shell-command command))))
       ".ps"))
    
    ;;; Register the Muse GROFF Publisher
    
    (muse-define-style "groff"
                       :suffix    'muse-groff-extension
                       :regexps   'muse-groff-markup-regexps
    ;;;		   :functions 'muse-groff-markup-functions
                       :strings   'muse-groff-markup-strings
                       :tags      'muse-groff-markup-tags
                       :specials  'muse-groff-markup-specials
                       :before    'muse-groff-prepare-buffer
                       :before-end 'muse-groff-munge-buffer
                       :header    'muse-groff-header
                       :footer    'muse-groff-footer
                       :browser   'find-file)
    
    (muse-derive-style "groff-pdf" "groff"
                       :final   'muse-groff-pdf-generate
                       :browser 'muse-groff-pdf-browse-file
                       :osuffix 'muse-groff-pdf-extension)
    
    (provide 'muse-groff)
    
    ;;; muse-groff.el ends here
    ;;
    ;; Local Variables:
    ;; indent-tabs-mode: nil
    ;; End:
    muse-el-3.20+dfsg/lisp/muse-xml.el0000644000175000017500000002412111331353120016270 0ustar  taffittaffit;;; muse-xml.el --- publish XML files
    
    ;; Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010
    ;;   Free Software Foundation, Inc.
    
    ;; Author: Michael Olson 
    ;; Date: Sat 23-Jul-2005
    
    ;; This file is part of Emacs Muse.  It is not part of GNU Emacs.
    
    ;; Emacs Muse 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 3, or (at your
    ;; option) any later version.
    
    ;; Emacs Muse 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 Emacs Muse; see the file COPYING.  If not, write to the
    ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
    ;; Boston, MA 02110-1301, USA.
    
    ;;; Commentary:
    
    ;; James Clarke's nxml-mode can be used for editing and validating
    ;; Muse-generated XML files.  If you are in nxml-mode use the command
    ;; C-c C-s C-f to point to the schema in `contrib/muse.rnc', which
    ;; comes with Muse.  Say yes if you are asked if you want to copy the
    ;; file to your location.  C-c C-s C-a can then be used to reload the
    ;; schema if you make changes to the file.
    
    ;;; Contributors:
    
    ;; Peter K. Lee (saint AT corenova DOT com) made the initial
    ;; implementation of planner-publish.el, which was heavily borrowed
    ;; from.
    
    ;; Brad Collins (brad AT chenla DOT org) provided a Compact RelaxNG
    ;; schema.
    
    ;;; Code:
    
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;
    ;; Muse XML Publishing
    ;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    
    (require 'muse-publish)
    (require 'muse-regexps)
    (require 'muse-xml-common)
    
    (defgroup muse-xml nil
      "Options controlling the behavior of Muse XML publishing.
    See `muse-xml' for more information."
      :group 'muse-publish)
    
    (defcustom muse-xml-extension ".xml"
      "Default file extension for publishing XML files."
      :type 'string
      :group 'muse-xml)
    
    (defcustom muse-xml-header
      "
      (muse-xml-encoding)\"?>
    
      
        <lisp>(muse-publishing-directive \"title\")</lisp>
        (muse-publishing-directive \"author\")
        (muse-style-element :maintainer)
        (muse-publishing-directive \"date\")
      
      \n"
      "Header used for publishing XML files.
    This may be text or a filename."
      :type 'string
      :group 'muse-xml)
    
    (defcustom muse-xml-footer "
      
    \n"
      "Footer used for publishing XML files.
    This may be text or a filename."
      :type 'string
      :group 'muse-xml)
    
    (defcustom muse-xml-markup-regexps
      `(;; Beginning of doc, end of doc, or plain paragraph separator
        (10000 ,(concat "\\(\\(\n\\(?:[" muse-regexp-blank "]*\n\\)*"
                        "\\([" muse-regexp-blank "]*\n\\)\\)"
                        "\\|\\`\\s-*\\|\\s-*\\'\\)")
               ;; this is somewhat repetitive because we only require the
               ;; line just before the paragraph beginning to be not
               ;; read-only
               3 muse-xml-markup-paragraph))
      "List of markup rules for publishing a Muse page to XML.
    For more on the structure of this list, see `muse-publish-markup-regexps'."
      :type '(repeat (choice
                      (list :tag "Markup rule"
                            integer
                            (choice regexp symbol)
                            integer
                            (choice string function symbol))
                      function))
      :group 'muse-xml)
    
    (defcustom muse-xml-markup-functions
      '((anchor . muse-xml-markup-anchor)
        (table . muse-xml-markup-table))
      "An alist of style types to custom functions for that kind of text.
    For more on the structure of this list, see
    `muse-publish-markup-functions'."
      :type '(alist :key-type symbol :value-type function)
      :group 'muse-xml)
    
    (defcustom muse-xml-markup-strings
      '((image-with-desc . "%s")
        (image           . "")
        (image-link      . "%s.%s")
        (anchor-ref      . "%s")
        (url             . "%s")
        (link            . "%s")
        (link-and-anchor . "%s")
        (email-addr      . "%s")
        (anchor          . "\n")
        (emdash          . "%s--%s")
        (comment-begin   . "")
        (rule            . "
    ") (fn-sep . "
    \n") (no-break-space . " ") (line-break . "
    ") (enddots . "....") (dots . "...") (section . "
    ") (section-end . "") (subsection . "
    ") (subsection-end . "") (subsubsection . "
    ") (subsubsection-end . "") (section-other . "
    ") (section-other-end . "") (section-close . "
    ") (footnote . "") (footnote-end . "") (begin-underline . "") (end-underline . "") (begin-literal . "") (end-literal . "") (begin-emph . "") (end-emph . "") (begin-more-emph . "") (end-more-emph . "") (begin-most-emph . "") (end-most-emph . "") (begin-verse . "\n") (begin-verse-line . "") (end-verse-line . "") (empty-verse-line . "") (begin-last-stanza-line . "") (end-last-stanza-line . "") (end-verse . "") (begin-example . "") (end-example . "") (begin-center . "

    \n") (end-center . "\n

    ") (begin-quote . "
    \n") (end-quote . "\n
    ") (begin-cite . "") (begin-cite-author . "") (begin-cite-year . "") (end-cite . "") (begin-quote-item . "

    ") (end-quote-item . "

    ") (begin-uli . "\n") (end-uli . "\n") (begin-uli-item . "") (end-uli-item . "") (begin-oli . "\n") (end-oli . "\n") (begin-oli-item . "") (end-oli-item . "") (begin-dl . "\n") (end-dl . "\n") (begin-dl-item . "\n") (end-dl-item . "\n") (begin-ddt . "") (end-ddt . "") (begin-dde . "") (end-dde . "") (begin-table . "\n") (end-table . "") (begin-table-row . " \n") (end-table-row . " \n") (begin-table-entry . " <%s>") (end-table-entry . "\n")) "Strings used for marking up text. These cover the most basic kinds of markup, the handling of which differs little between the various styles." :type '(alist :key-type symbol :value-type string) :group 'muse-xml) (defcustom muse-xml-encoding-default 'utf-8 "The default Emacs buffer encoding to use in published files. This will be used if no special characters are found." :type 'symbol :group 'muse-xml) (defcustom muse-xml-charset-default "utf-8" "The default XML charset to use if no translation is found in `muse-xml-encoding-map'." :type 'string :group 'muse-xml) (defun muse-xml-encoding () (muse-xml-transform-content-type (or (and (boundp 'buffer-file-coding-system) buffer-file-coding-system) muse-xml-encoding-default) muse-xml-charset-default)) (defun muse-xml-markup-paragraph () (let ((end (copy-marker (match-end 0) t))) (goto-char (match-beginning 0)) (when (save-excursion (save-match-data (and (not (get-text-property (max (point-min) (1- (point))) 'muse-no-paragraph)) (re-search-backward "<\\(/?\\)p[ >]" nil t) (not (string-equal (match-string 1) "/"))))) (when (get-text-property (1- (point)) 'muse-end-list) (goto-char (previous-single-property-change (1- (point)) 'muse-end-list))) (muse-insert-markup "

    ")) (goto-char end)) (cond ((eobp) (unless (bolp) (insert "\n"))) ((get-text-property (point) 'muse-no-paragraph) (forward-char 1) nil) ((eq (char-after) ?\<) (when (looking-at (concat "<\\(format\\|code\\|link\\|image" "\\|anchor\\|footnote\\)[ >]")) (muse-insert-markup "

    "))) (t (muse-insert-markup "

    ")))) (defun muse-xml-finalize-buffer () (when (boundp 'buffer-file-coding-system) (when (memq buffer-file-coding-system '(no-conversion undecided-unix)) ;; make it agree with the default charset (setq buffer-file-coding-system muse-xml-encoding-default)))) ;;; Register the Muse XML Publisher (muse-define-style "xml" :suffix 'muse-xml-extension :regexps 'muse-xml-markup-regexps :functions 'muse-xml-markup-functions :strings 'muse-xml-markup-strings :specials 'muse-xml-decide-specials :after 'muse-xml-finalize-buffer :header 'muse-xml-header :footer 'muse-xml-footer :browser 'find-file) (provide 'muse-xml) ;;; muse-xml.el ends here muse-el-3.20+dfsg/lisp/muse-ipc.el0000644000175000017500000001525111331353120016247 0ustar taffittaffit;;; muse-ipc.el --- publish Muse documents from other processes ;; Copyright (C) 2009, 2010 Free Software Foundation, Inc. ;; This file is part of Emacs Muse. It is not part of GNU Emacs. ;; Emacs Muse 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 3, or (at your ;; option) any later version. ;; Emacs Muse 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 Emacs Muse; 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 still in alpha state. Not for production use! ;;; Contributors: ;;; Code: ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; Muse Inter-Process Communication ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (eval-when-compile (require 'cl)) (require 'muse) (require 'muse-publish) (defgroup muse-ipc nil "Options controlling the behavior of Muse's IPC module." :group 'muse-publish) (defcustom muse-ipc-timeout 60 "Maximum time to wait for a client to respond." :group 'muse-ipc :type 'number) (defcustom muse-ipc-ignore-done nil "If non-nil, ignore any 'done' messages that we get from clients." :group 'muse-ipc :type 'boolean) (defvar muse-ipc-server-port nil "Port of the Emacs server.") (defvar muse-ipc-server-process nil "Process of the Emacs server.") (defvar muse-ipc-server-registered nil "Whether we have successfully registered our port with the client.") (defun muse-ipc-init-filter (proc string) "Handle data from client while initiating a connection." (unless muse-ipc-server-registered (when (string-match "\\`ok$" string) (setq muse-ipc-server-registered t)))) (defun muse-ipc-delete-client (proc) "Delete a client." (let ((buffer (process-get proc :buffer))) (when (and buffer (buffer-live-p buffer)) (with-current-buffer buffer (set-buffer-modified-p nil)) (kill-buffer buffer))) (when (eq (process-status proc) 'open) (delete-process proc))) (defun* muse-ipc-server-filter (proc string) "Handle data from a client after it connects." ;; Authenticate (unless (process-get proc :authenticated) (if (and (string-match "\\`begin \\(.+\\)$" string) (equal (match-string 1 string) (process-get proc :shared-secret))) (progn (setq string (substring string (match-end 0))) (process-put proc :authenticated t) (process-send-string proc "ok\n")) (process-send-string proc "nok\n") (delete-process proc)) (return-from muse-ipc-server-filter)) ;; Handle case where the client is sending data to be published (when (process-get proc :sending-data) (with-current-buffer (process-get proc :buffer) (insert string) (let ((buf-len (1- (point))) (expected-len (process-get proc :data-bytes))) (cond ((= buf-len expected-len) (process-put proc :sending-data nil)) ((> buf-len expected-len) (process-send-string proc "nok\n") (muse-ipc-delete-client proc))))) (return-from muse-ipc-server-filter)) ;; Dispatch commands (cond ((string-match "\\`done$" string) ;; done, close the server (unless muse-ipc-ignore-done (muse-ipc-stop-server))) ((string-match "\\`name \\(.+\\)$" string) ;; set name (process-put proc :file-name (match-string 1 string)) (process-send-string proc "ok\n")) ((string-match "\\`title \\(.+\\)$" string) ;; set title (process-put proc :title (match-string 1 string)) (process-send-string proc "ok\n")) (t ;; unrecognized command (process-send-string proc "nok\n")))) (defun muse-ipc-stop-server () "Stop Muse IPC server and reset connection data." (stop-process muse-ipc-server-process) (delete-process muse-ipc-server-process) (setq muse-ipc-server-port nil) (setq muse-ipc-server-process nil)) (defun muse-ipc-start (shared-secret publish-fn client-port &optional server-port) "Start an IPC connection and send a response to CLIENT-PORT. If SERVER-PORT is provided, start the IPC server on that port, otherwise choose a random port. SHARED-SECRET is used as a very minimal security measure to authenticate the Muse IPC server during initialization, and also any incoming clients once the server is started. PUBLISH-FN is the function which should be called in buffer of the received contents. It should transform the buffer into a published state. It must take at least two arguments. The first argument is the full path of the file that the contents correspond with. The second argument is the title to use when publishing the file." (when (stringp client-port) (setq client-port (string-to-number client-port))) (when (stringp server-port) (setq server-port (string-to-number server-port))) (setq muse-ipc-server-process (make-network-process :name "muse-ipc" :buffer nil :host 'local :service (or server-port t) :server t :noquery t :nowait t :plist (list :authenticated nil :shared-secret shared-secret :publish-fn publish-fn) :filter 'muse-ipc-server-filter)) (unless muse-ipc-server-process (error "Error: Could not start Muse IPC Server process")) (set-process-coding-system muse-ipc-server-process 'raw-text-unix 'raw-text-unix) (setq muse-ipc-server-port (number-to-string (cadr (process-contact muse-ipc-server-process)))) (let ((client-proc (make-network-process :name "muse-ipc-client" :buffer nil :host 'local :service client-port :noquery t :filter 'muse-ipc-init-filter))) (setq muse-ipc-server-registered nil) (process-send-string client-proc (concat "begin " shared-secret "\n")) (accept-process-output client-proc muse-ipc-timeout nil t) (unless muse-ipc-server-registered (error "Error: Did not register listener")) (process-send-string client-proc (concat "port " muse-ipc-server-port "\n")) (stop-process client-proc) (delete-process client-proc)) ;; Accept process output until the server dies (while muse-ipc-server-process (accept-process-output nil 1))) (provide 'muse-ipc) ;;; muse-ipc.el ends here muse-el-3.20+dfsg/lisp/muse.el0000644000175000017500000010217311331353120015476 0ustar taffittaffit;;; muse.el --- an authoring and publishing tool for Emacs ;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 ;; Free Software Foundation, Inc. ;; Emacs Lisp Archive Entry ;; Filename: muse.el ;; Version: 3.20 ;; Date: Sun 31 Jan-2010 ;; Keywords: hypermedia ;; Author: John Wiegley ;; Maintainer: Michael Olson ;; Description: An authoring and publishing tool for Emacs ;; URL: http://mwolson.org/projects/EmacsMuse.html ;; Compatibility: Emacs21 XEmacs21 Emacs22 ;; This file is part of Emacs Muse. It is not part of GNU Emacs. ;; Emacs Muse 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 3, or (at your ;; option) any later version. ;; Emacs Muse 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 Emacs Muse; see the file COPYING. If not, write to the ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;; Muse is a tool for easily authoring and publishing documents. It ;; allows for rapid prototyping of hyperlinked text, which may then be ;; exported to multiple output formats -- such as HTML, LaTeX, ;; Texinfo, etc. ;; The markup rules used by Muse are intended to be very friendly to ;; people familiar with Emacs. See the included manual for more ;; information. ;;; Contributors: ;;; Code: ;; Indicate that this version of Muse supports nested tags (provide 'muse-nested-tags) (defvar muse-version "3.20" "The version of Muse currently loaded") (defun muse-version (&optional insert) "Display the version of Muse that is currently loaded. If INSERT is non-nil, insert the text instead of displaying it." (interactive "P") (if insert (insert muse-version) (message muse-version))) (defgroup muse nil "Options controlling the behavior of Muse. The markup used by Muse is intended to be very friendly to people familiar with Emacs." :group 'hypermedia) (defvar muse-under-windows-p (memq system-type '(ms-dos windows-nt))) (provide 'muse) (condition-case nil (require 'derived) (error nil)) (require 'wid-edit) (require 'muse-regexps) (defvar muse-update-values-hook nil "Hook for values that are automatically generated. This is to be used by add-on modules for Muse. It is run just before colorizing or publishing a buffer.") (defun muse-update-values () "Update various values that are automatically generated. Call this after changing `muse-project-alist'." (interactive) (run-hooks 'muse-update-values-hook) (dolist (buffer (buffer-list)) (when (buffer-live-p buffer) (with-current-buffer buffer (when (derived-mode-p 'muse-mode) (and (boundp 'muse-current-project) (fboundp 'muse-project-of-file) (setq muse-current-project nil) (setq muse-current-project (muse-project-of-file)))))))) ;; Default file extension ;; By default, use the .muse file extension. ;;;###autoload (add-to-list 'auto-mode-alist '("\\.muse\\'" . muse-mode-choose-mode)) ;; We need to have this at top-level, as well, so that any Muse or ;; Planner documents opened during init will just work. (add-to-list 'auto-mode-alist '("\\.muse\\'" . muse-mode-choose-mode)) (eval-when-compile (defvar muse-ignored-extensions)) (defvar muse-ignored-extensions-regexp nil "A regexp of extensions to omit from the ending of a Muse page name. This is autogenerated from `muse-ignored-extensions'.") (defun muse-update-file-extension (sym val) "Update the value of `muse-file-extension'." (let ((old (and (boundp sym) (symbol-value sym)))) (set sym val) (when (and (featurep 'muse-mode) (or (not (stringp val)) (not (stringp old)) (not (string= old val)))) ;; remove old auto-mode-alist association (when (and (boundp sym) (stringp old)) (setq auto-mode-alist (delete (cons (concat "\\." old "\\'") 'muse-mode-choose-mode) auto-mode-alist))) ;; associate the new file extension with muse-mode (when (stringp val) (add-to-list 'auto-mode-alist (cons (concat "\\." val "\\'") 'muse-mode-choose-mode))) ;; update the ignored extensions regexp (when (fboundp 'muse-update-ignored-extensions-regexp) (muse-update-ignored-extensions-regexp 'muse-ignored-extensions muse-ignored-extensions))))) (defcustom muse-file-extension "muse" "File extension of Muse files. Omit the period at the beginning. If you don't want Muse files to have an extension, set this to nil." :type '(choice (const :tag "None" nil) (string)) :set 'muse-update-file-extension :group 'muse) (defcustom muse-completing-read-function 'completing-read "Function to call when prompting user to choose between a list of options. This should take the same arguments as `completing-read'." :type 'function :group 'muse) (defun muse-update-ignored-extensions-regexp (sym val) "Update the value of `muse-ignored-extensions-regexp'." (set sym val) (if val (setq muse-ignored-extensions-regexp (concat "\\.\\(" (regexp-quote (or muse-file-extension "")) "\\|" (mapconcat 'identity val "\\|") "\\)\\'")) (setq muse-ignored-extensions-regexp (if muse-file-extension (concat "\\.\\(" muse-file-extension "\\)\\'") nil)))) (add-hook 'muse-update-values-hook (lambda () (muse-update-ignored-extensions-regexp 'muse-ignored-extensions muse-ignored-extensions))) (defcustom muse-ignored-extensions '("bz2" "gz" "[Zz]") "A list of extensions to omit from the ending of a Muse page name. These are regexps. Don't put a period at the beginning of each extension unless you understand that it is part of a regexp." :type '(repeat (regexp :tag "Extension")) :set 'muse-update-ignored-extensions-regexp :group 'muse) (defun muse-update-file-extension-after-init () ;; This is short, but it has to be a function, otherwise Emacs21 ;; does not load it properly when running after-init-hook (unless (string= muse-file-extension "muse") (let ((val muse-file-extension) (muse-file-extension "muse")) (muse-update-file-extension 'muse-file-extension val)))) ;; Once the user's init file has been processed, determine whether ;; they want a file extension (add-hook 'after-init-hook 'muse-update-file-extension-after-init) ;; URL protocols (require 'muse-protocols) ;; Helper functions (defsubst muse-delete-file-if-exists (file) (when (file-exists-p file) (delete-file file) (message "Removed %s" file))) (defsubst muse-time-less-p (t1 t2) "Say whether time T1 is less than time T2." (or (< (car t1) (car t2)) (and (= (car t1) (car t2)) (< (nth 1 t1) (nth 1 t2))))) (eval-when-compile (defvar muse-publishing-current-file nil)) (defun muse-current-file () "Return the name of the currently visited or published file." (or (and (boundp 'muse-publishing-current-file) muse-publishing-current-file) (buffer-file-name) (concat default-directory (buffer-name)))) (defun muse-page-name (&optional name) "Return the canonical form of a Muse page name. What this means is that the directory part of NAME is removed, and the file extensions in `muse-ignored-extensions' are also removed from NAME." (save-match-data (unless (and name (not (string= name ""))) (setq name (muse-current-file))) (if name (let ((page (file-name-nondirectory name))) (if (and muse-ignored-extensions-regexp (string-match muse-ignored-extensions-regexp page)) (replace-match "" t t page) page))))) (defun muse-display-warning (message) "Display the given MESSAGE as a warning." (if (fboundp 'display-warning) (display-warning 'muse message (if (featurep 'xemacs) 'warning :warning)) (let ((buf (get-buffer-create "*Muse warnings*"))) (with-current-buffer buf (goto-char (point-max)) (insert "Warning (muse): " message) (unless (bolp) (newline))) (display-buffer buf) (sit-for 0)))) (defun muse-eval-lisp (form) "Evaluate the given form and return the result as a string." (require 'pp) (save-match-data (condition-case err (let ((object (eval (read form)))) (cond ((stringp object) object) ((and (listp object) (not (eq object nil))) (let ((string (pp-to-string object))) (substring string 0 (1- (length string))))) ((numberp object) (number-to-string object)) ((eq object nil) "") (t (pp-to-string object)))) (error (muse-display-warning (format "%s: Error evaluating %s: %s" (muse-page-name) form err)) "; INVALID LISP CODE")))) (defmacro muse-with-temp-buffer (&rest body) "Create a temporary buffer, and evaluate BODY there like `progn'. See also `with-temp-file' and `with-output-to-string'. Unlike `with-temp-buffer', this will never attempt to save the temp buffer. It is meant to be used along with `insert-file-contents' or `muse-insert-file-contents'. The undo feature will be disabled in the new buffer. If `debug-on-error' is set to t, keep the buffer around for debugging purposes rather than removing it." (let ((temp-buffer (make-symbol "temp-buffer"))) `(let ((,temp-buffer (generate-new-buffer " *muse-temp*"))) (buffer-disable-undo ,temp-buffer) (unwind-protect (if debug-on-error (with-current-buffer ,temp-buffer ,@body) (condition-case err (with-current-buffer ,temp-buffer ,@body) (error (if (and (boundp 'muse-batch-publishing-p) muse-batch-publishing-p) (progn (message "%s: Error occured: %s" (muse-page-name) err) (backtrace)) (muse-display-warning (format (concat "An error occurred while publishing" " %s:\n %s\n\nSet debug-on-error to" " `t' if you would like a backtrace.") (muse-page-name) err)))))) (when (buffer-live-p ,temp-buffer) (with-current-buffer ,temp-buffer (set-buffer-modified-p nil)) (unless debug-on-error (kill-buffer ,temp-buffer))))))) (put 'muse-with-temp-buffer 'lisp-indent-function 0) (put 'muse-with-temp-buffer 'edebug-form-spec '(body)) (defun muse-insert-file-contents (filename &optional visit) "Insert the contents of file FILENAME after point. Do character code conversion and end-of-line conversion, but none of the other unnecessary things like format decoding or `find-file-hook'. If VISIT is non-nil, the buffer's visited filename and last save file modtime are set, and it is marked unmodified. If visiting and the file does not exist, visiting is completed before the error is signaled." (let ((format-alist nil) (after-insert-file-functions nil) (inhibit-file-name-handlers (append '(jka-compr-handler image-file-handler epa-file-handler) inhibit-file-name-handlers)) (inhibit-file-name-operation 'insert-file-contents)) (insert-file-contents filename visit))) (defun muse-write-file (filename &optional nomessage) "Write current buffer into file FILENAME. Unlike `write-file', this does not visit the file, try to back it up, or interact with vc.el in any way. If the file was not written successfully, return nil. Otherwise, return non-nil. If the NOMESSAGE argument is non-nil, suppress the \"Wrote file\" message." (when nomessage (setq nomessage 'nomessage)) (let ((backup-inhibited t) (buffer-file-name filename) (buffer-file-truename (file-truename filename))) (save-current-buffer (save-restriction (widen) (if (not (file-writable-p buffer-file-name)) (prog1 nil (muse-display-warning (format "Cannot write file %s:\n %s" buffer-file-name (let ((dir (file-name-directory buffer-file-name))) (if (not (file-directory-p dir)) (if (file-exists-p dir) (format "%s is not a directory" dir) (format "No directory named %s exists" dir)) (if (not (file-exists-p buffer-file-name)) (format "Directory %s write-protected" dir) "File is write-protected")))))) (let ((coding-system-for-write (or (and (boundp 'save-buffer-coding-system) save-buffer-coding-system) coding-system-for-write))) (write-region (point-min) (point-max) buffer-file-name nil nomessage)) (when (boundp 'last-file-coding-system-used) (when (boundp 'buffer-file-coding-system-explicit) (setq buffer-file-coding-system-explicit last-coding-system-used)) (if save-buffer-coding-system (setq save-buffer-coding-system last-coding-system-used) (setq buffer-file-coding-system last-coding-system-used))) t))))) (defun muse-collect-alist (list element &optional test) "Collect items from LIST whose car is equal to ELEMENT. If TEST is specified, use it to compare ELEMENT." (unless test (setq test 'equal)) (let ((items nil)) (dolist (item list) (when (funcall test element (car item)) (setq items (cons item items)))) items)) (defmacro muse-sort-with-closure (list predicate closure) "Sort LIST, stably, comparing elements using PREDICATE. Returns the sorted list. LIST is modified by side effects. PREDICATE is called with two elements of list and CLOSURE. PREDICATE should return non-nil if the first element should sort before the second." `(sort ,list (lambda (a b) (funcall ,predicate a b ,closure)))) (put 'muse-sort-with-closure 'lisp-indent-function 0) (put 'muse-sort-with-closure 'edebug-form-spec '(form function-form form)) (defun muse-sort-by-rating (rated-list &optional test) "Sort RATED-LIST according to the rating of each element. The rating is stripped out in the returned list. Default sorting is highest-first. If TEST if specified, use it to sort the list. The default test is '>." (unless test (setq test '>)) (mapcar (function cdr) (muse-sort-with-closure rated-list (lambda (a b closure) (let ((na (numberp (car a))) (nb (numberp (car b)))) (cond ((and na nb) (funcall closure (car a) (car b))) (na (not nb)) (t nil)))) test))) (defun muse-escape-specials-in-string (specials string &optional reverse) "Apply the transformations in SPECIALS to STRING. The transforms should form a fully reversible and non-ambiguous syntax when STRING is parsed from left to right. If REVERSE is specified, reverse an already-escaped string." (let ((rules (mapcar (lambda (rule) (cons (regexp-quote (if reverse (cdr rule) (car rule))) (if reverse (car rule) (cdr rule)))) specials))) (save-match-data (with-temp-buffer (insert string) (goto-char (point-min)) (while (not (eobp)) (unless (catch 'found (dolist (rule rules) (when (looking-at (car rule)) (replace-match (cdr rule) t t) (throw 'found t)))) (forward-char))) (buffer-string))))) (defun muse-trim-whitespace (string) "Return a version of STRING with no initial nor trailing whitespace." (muse-replace-regexp-in-string (concat "\\`[" muse-regexp-blank "]+\\|[" muse-regexp-blank "]+\\'") "" string)) (defun muse-path-sans-extension (path) "Return PATH sans final \"extension\". The extension, in a file name, is the part that follows the last `.', except that a leading `.', if any, doesn't count. This differs from `file-name-sans-extension' in that it will never modify the directory part of the path." (concat (file-name-directory path) (file-name-nondirectory (file-name-sans-extension path)))) ;; The following code was extracted from cl (defun muse-const-expr-p (x) (cond ((consp x) (or (eq (car x) 'quote) (and (memq (car x) '(function function*)) (or (symbolp (nth 1 x)) (and (eq (and (consp (nth 1 x)) (car (nth 1 x))) 'lambda) 'func))))) ((symbolp x) (and (memq x '(nil t)) t)) (t t))) (put 'muse-assertion-failed 'error-conditions '(error)) (put 'muse-assertion-failed 'error-message "Assertion failed") (defun muse-list* (arg &rest rest) "Return a new list with specified args as elements, cons'd to last arg. Thus, `(list* A B C D)' is equivalent to `(nconc (list A B C) D)', or to `(cons A (cons B (cons C D)))'." (cond ((not rest) arg) ((not (cdr rest)) (cons arg (car rest))) (t (let* ((n (length rest)) (copy (copy-sequence rest)) (last (nthcdr (- n 2) copy))) (setcdr last (car (cdr last))) (cons arg copy))))) (defmacro muse-assert (form &optional show-args string &rest args) "Verify that FORM returns non-nil; signal an error if not. Second arg SHOW-ARGS means to include arguments of FORM in message. Other args STRING and ARGS... are arguments to be passed to `error'. They are not evaluated unless the assertion fails. If STRING is omitted, a default message listing FORM itself is used." (let ((sargs (and show-args (delq nil (mapcar (function (lambda (x) (and (not (muse-const-expr-p x)) x))) (cdr form)))))) (list 'progn (list 'or form (if string (muse-list* 'error string (append sargs args)) (list 'signal '(quote muse-assertion-failed) (muse-list* 'list (list 'quote form) sargs)))) nil))) ;; Compatibility functions (if (fboundp 'looking-back) (defalias 'muse-looking-back 'looking-back) (defun muse-looking-back (regexp &optional limit &rest ignored) (save-excursion (re-search-backward (concat "\\(?:" regexp "\\)\\=") limit t)))) (eval-and-compile (if (fboundp 'line-end-position) (defalias 'muse-line-end-position 'line-end-position) (defun muse-line-end-position (&optional n) (save-excursion (end-of-line n) (point)))) (if (fboundp 'line-beginning-position) (defalias 'muse-line-beginning-position 'line-beginning-position) (defun muse-line-beginning-position (&optional n) (save-excursion (beginning-of-line n) (point)))) (if (fboundp 'match-string-no-properties) (defalias 'muse-match-string-no-properties 'match-string-no-properties) (defun muse-match-string-no-properties (num &optional string) (match-string num string)))) (defun muse-replace-regexp-in-string (regexp replacement text &optional fixedcase literal) "Replace REGEXP with REPLACEMENT in TEXT. Return a new string containing the replacements. If fourth arg FIXEDCASE is non-nil, do not alter case of replacement text. If fifth arg LITERAL is non-nil, insert REPLACEMENT literally." (cond ((and (featurep 'xemacs) (fboundp 'replace-in-string)) (and (fboundp 'replace-in-string) ; stupid byte-compiler warning (replace-in-string text regexp replacement literal))) ((fboundp 'replace-regexp-in-string) (replace-regexp-in-string regexp replacement text fixedcase literal)) (t (error (concat "Neither `replace-in-string' nor " "`replace-regexp-in-string' was found"))))) (if (fboundp 'add-to-invisibility-spec) (defalias 'muse-add-to-invisibility-spec 'add-to-invisibility-spec) (defun muse-add-to-invisibility-spec (element) "Add ELEMENT to `buffer-invisibility-spec'. See documentation for `buffer-invisibility-spec' for the kind of elements that can be added." (if (eq buffer-invisibility-spec t) (setq buffer-invisibility-spec (list t))) (setq buffer-invisibility-spec (cons element buffer-invisibility-spec)))) (if (fboundp 'read-directory-name) (defalias 'muse-read-directory-name 'read-directory-name) (defun muse-read-directory-name (prompt &optional dir default-dirname mustmatch initial) "Read directory name - see `read-file-name' for details." (unless dir (setq dir default-directory)) (read-file-name prompt dir (or default-dirname (if initial (expand-file-name initial dir) dir)) mustmatch initial))) (defun muse-file-remote-p (file) "Test whether FILE specifies a location on a remote system. Return non-nil if the location is indeed remote. For example, the filename \"/user@host:/foo\" specifies a location on the system \"/user@host:\"." (cond ((fboundp 'file-remote-p) (file-remote-p file)) ((fboundp 'tramp-handle-file-remote-p) (tramp-handle-file-remote-p file)) ((and (boundp 'ange-ftp-name-format) (string-match (car ange-ftp-name-format) file)) t) (t nil))) (if (fboundp 'delete-and-extract-region) (defalias 'muse-delete-and-extract-region 'delete-and-extract-region) (defun muse-delete-and-extract-region (start end) "Delete the text between START and END and return it." (prog1 (buffer-substring start end) (delete-region start end)))) (if (fboundp 'delete-dups) (defalias 'muse-delete-dups 'delete-dups) (defun muse-delete-dups (list) "Destructively remove `equal' duplicates from LIST. Store the result in LIST and return it. LIST must be a proper list. Of several `equal' occurrences of an element in LIST, the first one is kept." (let ((tail list)) (while tail (setcdr tail (delete (car tail) (cdr tail))) (setq tail (cdr tail)))) list)) ;; Set face globally in a predictable fashion (defun muse-copy-face (old new) "Copy face OLD to NEW." (if (featurep 'xemacs) (copy-face old new 'all) (copy-face old new))) ;; Widget compatibility functions (defun muse-widget-type-value-create (widget) "Convert and instantiate the value of the :type attribute of WIDGET. Store the newly created widget in the :children attribute. The value of the :type attribute should be an unconverted widget type." (let ((value (widget-get widget :value)) (type (widget-get widget :type))) (widget-put widget :children (list (widget-create-child-value widget (widget-convert type) value))))) (defun muse-widget-child-value-get (widget) "Get the value of the first member of :children in WIDGET." (widget-value (car (widget-get widget :children)))) (defun muse-widget-type-match (widget value) "Non-nil if the :type value of WIDGET matches VALUE. The value of the :type attribute should be an unconverted widget type." (widget-apply (widget-convert (widget-get widget :type)) :match value)) ;; Link-handling functions and variables (defun muse-get-link (&optional target) "Based on the match data, retrieve the link. Use TARGET to get the string, if it is specified." (muse-match-string-no-properties 1 target)) (defun muse-get-link-desc (&optional target) "Based on the match data, retrieve the link description. Use TARGET to get the string, if it is specified." (muse-match-string-no-properties 2 target)) (defvar muse-link-specials '(("[" . "%5B") ("]" . "%5D") ("%" . "%%")) "Syntax used for escaping and unescaping links. This allows brackets to occur in explicit links as long as you use the standard Muse functions to create them.") (defun muse-link-escape (text) "Escape characters in TEXT that conflict with the explicit link regexp." (when (stringp text) (muse-escape-specials-in-string muse-link-specials text))) (defun muse-link-unescape (text) "Un-escape characters in TEXT that conflict with the explicit link regexp." (when (stringp text) (muse-escape-specials-in-string muse-link-specials text t))) (defun muse-handle-url (&optional string) "If STRING or point has a URL, match and return it." (if (if string (string-match muse-url-regexp string) (looking-at muse-url-regexp)) (match-string 0 string))) (defcustom muse-implicit-link-functions '(muse-handle-url) "A list of functions to handle an implicit link. An implicit link is one that is not surrounded by brackets. By default, Muse handles URLs only. If you want to handle WikiWords, load muse-wiki.el." :type 'hook :options '(muse-handle-url) :group 'muse) (defun muse-handle-implicit-link (&optional link) "Handle implicit links. If LINK is not specified, look at point. An implicit link is one that is not surrounded by brackets. By default, Muse handles URLs only. If you want to handle WikiWords, load muse-wiki.el. This function modifies the match data so that match 0 is the link. The match data is restored after each unsuccessful handler function call. If LINK is specified, only restore at very end. This behavior is needed because the part of the buffer that `muse-implicit-link-regexp' matches must be narrowed to the part that is an accepted link." (let ((funcs muse-implicit-link-functions) (res nil) (data (match-data t))) (while funcs (setq res (funcall (car funcs) link)) (if res (setq funcs nil) (unless link (set-match-data data)) (setq funcs (cdr funcs)))) (when link (set-match-data data)) res)) (defcustom muse-explicit-link-functions nil "A list of functions to handle an explicit link. An explicit link is one [[like][this]] or [[this]]." :type 'hook :group 'muse) (defun muse-handle-explicit-link (&optional link) "Handle explicit links. If LINK is not specified, look at point. An explicit link is one that looks [[like][this]] or [[this]]. The match data is preserved. If no handlers are able to process LINK, return LINK (if specified) or the 1st match string. If LINK is not specified, it is assumed that Muse has matched against `muse-explicit-link-regexp' before calling this function." (let ((funcs muse-explicit-link-functions) (res nil)) (save-match-data (while funcs (setq res (funcall (car funcs) link)) (if res (setq funcs nil) (setq funcs (cdr funcs))))) (muse-link-unescape (if res res (or link (muse-get-link)))))) ;; Movement functions (defun muse-list-item-type (str) "Determine the type of list given STR. Returns either 'ul, 'ol, 'dl-term, 'dl-entry, or nil." (save-match-data (cond ((or (string= str "") (< (length str) 2)) nil) ((string-match muse-dl-entry-regexp str) 'dl-entry) ((string-match muse-dl-term-regexp str) 'dl-term) ((string-match muse-ol-item-regexp str) 'ol) ((string-match muse-ul-item-regexp str) 'ul) (t nil)))) (defun muse-list-item-critical-point (&optional offset) "Figure out where the important markup character for the currently-matched list item is. If OFFSET is specified, it is the number of groupings outside of the contents of `muse-list-item-regexp'." (unless offset (setq offset 0)) (if (match-end (+ offset 2)) ;; at a definition list (match-end (+ offset 2)) ;; at a different kind of list (match-beginning (+ offset 1)))) (defun muse-forward-paragraph (&optional pattern) "Move forward safely by one paragraph, or according to PATTERN." (when (get-text-property (point) 'muse-end-list) (goto-char (next-single-property-change (point) 'muse-end-list))) (setq pattern (if pattern (concat "^\\(?:" pattern "\\|\n\\|\\'\\)") "^\\s-*\\(\n\\|\\'\\)")) (let ((next-list-end (or (next-single-property-change (point) 'muse-end-list) (point-max)))) (forward-line 1) (if (re-search-forward pattern nil t) (goto-char (match-beginning 0)) (goto-char (point-max))) (when (> (point) next-list-end) (goto-char next-list-end)))) (defun muse-forward-list-item-1 (type empty-line indented-line) "Determine whether a nested list item is after point." (if (match-beginning 1) ;; if we are given a dl entry, skip past everything on the same ;; level, except for other dl entries (and (eq type 'dl-entry) (not (eq (char-after (match-beginning 2)) ?\:))) ;; blank line encountered with no list item on the same ;; level after it (let ((beg (point))) (forward-line 1) (if (save-match-data (and (looking-at indented-line) (not (looking-at empty-line)))) ;; found that this blank line is followed by some ;; indentation, plus other text, so we'll keep ;; going t (goto-char beg) nil)))) (defun muse-forward-list-item (type indent &optional no-skip-nested) "Move forward to the next item of TYPE. Return non-nil if successful, nil otherwise. The beginning indentation is given by INDENT. If NO-SKIP-NESTED is non-nil, do not skip past nested items. Note that if you desire this behavior, you will also need to provide a very liberal INDENT value, such as \(concat \"[\" muse-regexp-blank \"]*\")." (let* ((list-item (format muse-list-item-regexp indent)) (empty-line (concat "^[" muse-regexp-blank "]*\n")) (indented-line (concat "^" indent "[" muse-regexp-blank "]")) (list-pattern (concat "\\(?:" empty-line "\\)?" "\\(" list-item "\\)"))) (while (progn (muse-forward-paragraph list-pattern) ;; make sure we don't go past boundary (and (not (or (get-text-property (point) 'muse-end-list) (>= (point) (point-max)))) ;; move past markup that is part of another construct (or (and (match-beginning 1) (or (get-text-property (muse-list-item-critical-point 1) 'muse-link) (and (derived-mode-p 'muse-mode) (get-text-property (muse-list-item-critical-point 1) 'face)))) ;; skip nested items (and (not no-skip-nested) (muse-forward-list-item-1 type empty-line indented-line)))))) (cond ((or (get-text-property (point) 'muse-end-list) (>= (point) (point-max))) ;; at a list boundary, so stop nil) ((let ((str (when (match-beginning 2) ;; get the entire line (save-excursion (goto-char (match-beginning 2)) (buffer-substring (muse-line-beginning-position) (muse-line-end-position)))))) (and str (eq type (muse-list-item-type str)))) ;; same type, so indicate that there are more items to be ;; parsed (goto-char (match-beginning 1))) (t (when (match-beginning 1) (goto-char (match-beginning 1))) ;; move to just before foreign list item markup nil)))) (defun muse-goto-tag-end (tag nested) "Move forward past the end of TAG. If NESTED is non-nil, look for other instances of this tag that may be nested inside of this tag, and skip past them." (if (not nested) (search-forward (concat "") nil t) (let ((nesting 1) (tag-regexp (concat "\\(<\\(/?\\)" tag "\\([ >]\\)\\)")) (match-found nil)) (while (and (> nesting 0) (setq match-found (re-search-forward tag-regexp nil t))) ;; for the sake of font-locking code, skip matches in comments (unless (get-text-property (match-beginning 0) 'muse-comment) (if (string-equal (match-string 2) "/") (and (string-equal (match-string 3) ">") (setq nesting (1- nesting))) (setq nesting (1+ nesting))))) match-found))) ;;; muse.el ends here muse-el-3.20+dfsg/lisp/Makefile0000644000175000017500000000503111331353120015636 0ustar taffittaffit.PHONY: all lisp autoloads clean realclean distclean fullclean install test .PRECIOUS: %.elc DEFS = $(shell test -f ../Makefile.defs && echo ../Makefile.defs \ || echo ../Makefile.defs.default) include $(DEFS) EL = $(filter-out $(PROJECT)-autoloads.el,$(wildcard *.el)) ELC = $(patsubst %.el,%.elc,$(EL)) all: lisp lisp: autoloads $(ELC) $(PROJECT)-build.elc: ../scripts/$(PROJECT)-build.el @echo $(PROJECT)-build.el is not byte-compiled autoloads: $(PROJECT)-autoloads.el $(PROJECT)-autoloads.el: $(EL) @$(EMACS) -q $(SITEFLAG) -batch -l ../scripts/$(PROJECT)-build.el \ -f $(PROJECT)-generate-autoloads . ../contrib ../experimental %.elc: %.el @$(EMACS) -q $(SITEFLAG) -batch -l ../scripts/$(PROJECT)-build.el \ -f batch-byte-compile $< clean distclean: -rm -f *.elc *~ realclean fullclean: clean -rm -f $(PROJECT)-autoloads.el install: autoloads $(ELC) install -d $(ELISPDIR) install -m 0644 $(PROJECT)-autoloads.el $(EL) $(ELC) $(ELISPDIR) test: $(ELC) $(EMACS) -q $(SITEFLAG) -batch -l ../scripts/$(PROJECT)-build.el \ -f $(PROJECT)-elint-files $(EL) # Dependencies # # This allows us to recompile Muse safely after an update. muse-backlink.elc: muse-mode.elc muse-publish.elc muse.elc muse-blosxom.elc: muse-html.elc muse-project.elc muse-publish.elc muse-book.elc: muse-latex.elc muse-project.elc muse-publish.elc muse-book.elc: muse-regexps.elc muse-colors.elc: muse-mode.elc muse-regexps.elc muse-context.elc: muse-publish.elc muse-docbook.elc: muse-publish.elc muse-regexps.elc muse-xml-common.elc muse-groff.elc: muse-publish.elc muse-html.elc: muse-publish.elc muse-regexps.elc muse-xml-common.elc muse-http.elc: muse-html.elc muse-project.elc muse-ikiwiki.elc: muse-html.elc muse-ipc.elc muse-publish.elc muse.elc muse-import-docbook.elc: muse-import-xml.elc muse-import-latex.elc: muse-regexps.elc muse.elc muse-ipc.elc: muse-publish.elc muse.elc muse-journal.elc: muse-book.elc muse-html.elc muse-latex.elc muse-journal.elc: muse-publish.elc muse-latex.elc: muse-publish.elc muse-latex2png.elc: muse-publish.elc muse-mode.elc: muse-regexps.elc muse-project.elc muse-poem.elc: muse-latex.elc muse-project.elc muse-project.elc: muse-publish.elc muse.elc muse-protocols.elc: muse-regexps.elc muse-publish.elc: muse-regexps.elc muse.elc muse-texinfo.elc: muse-latex.elc muse-publish.elc muse-wiki.elc: muse-colors.elc muse-regexps.elc muse-mode.elc muse-xml-common.elc: muse-publish.elc muse-regexps.elc muse-xml.elc: muse-publish.elc muse-regexps.elc muse-xml-common.elc muse.elc: muse-protocols.elc muse-regexps.elc muse-el-3.20+dfsg/lisp/muse-latex2png.el0000644000175000017500000002444511331353120017405 0ustar taffittaffit;; muse-latex2png.el --- generate PNG images from inline LaTeX code ;; Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 ;; Free Software Foundation, Inc. ;; Author: Michael Olson ;; Created: 12-Oct-2005 ;; This file is part of Emacs Muse. It is not part of GNU Emacs. ;; Emacs Muse 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 3, or (at your ;; option) any later version. ;; Emacs Muse 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 Emacs Muse; 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 was taken from latex2png.el, by Ganesh Swami , which was made for emacs-wiki. It has since ;; been extensively rewritten for Muse. ;;; To do ;; Remove stale image files. This could be done by making a function ;; for `muse-before-publish-hook' that deletes according to ;; (muse-page-name). ;;; Code (require 'muse-publish) (defgroup muse-latex2png nil "Publishing LaTeX formulas as PNG files." :group 'muse-publish) (defcustom muse-latex2png-img-dest "./latex" "The folder where the generated images will be placed. This is relative to the current publishing directory." :type 'string :group 'muse-latex2png) (defcustom muse-latex2png-scale-factor 2.5 "The scale factor to be used for sizing the resulting LaTeX output." :type 'number :group 'muse-latex2png) (defcustom muse-latex2png-fg "Black" "The foreground color." :type 'string :group 'muse-latex2png) (defcustom muse-latex2png-bg "Transparent" "The background color." :type 'string :group 'muse-latex2png) (defcustom muse-latex2png-template "\\documentclass{article} \\usepackage{fullpage} \\usepackage{amssymb} \\usepackage[usenames]{color} \\usepackage{amsmath} \\usepackage{latexsym} \\usepackage[mathscr]{eucal} %preamble% \\pagestyle{empty} \\begin{document} {%code%} \\end{document}\n" "The LaTeX template to use." :type 'string :group 'muse-latex2png) (defun muse-latex2png-move2pubdir (file prefix pubdir) "Move FILE to the PUBDIR folder. This is done so that the resulting images do not clutter your main publishing directory. Old files with PREFIX in the name are deleted." (when file (if (file-exists-p file) (progn (unless (file-directory-p pubdir) (message "Creating latex directory %s" pubdir) (make-directory pubdir)) (copy-file file (expand-file-name (file-name-nondirectory file) pubdir) t) (delete-file file) (concat muse-latex2png-img-dest "/" (file-name-nondirectory file))) (message "Cannot find %s!" file)))) (defun muse-latex2png (code prefix preamble) "Convert the LaTeX CODE into a png file beginning with PREFIX. PREAMBLE indicates extra packages and definitions to include." (unless preamble (setq preamble "")) (unless prefix (setq prefix "muse-latex2png")) (let* ((tmpdir (cond ((boundp 'temporary-file-directory) temporary-file-directory) ((fboundp 'temp-directory) (temp-directory)) (t "/tmp"))) (texfile (expand-file-name (concat prefix "__" (format "%d" (abs (sxhash code)))) tmpdir)) (defalt-directory default-directory)) (with-temp-file (concat texfile ".tex") (insert muse-latex2png-template) (goto-char (point-min)) (while (search-forward "%preamble%" nil t) (replace-match preamble nil t)) (goto-char (point-min)) (while (search-forward "%code%" nil t) (replace-match code nil t))) (setq default-directory tmpdir) (call-process "latex" nil nil nil texfile) (if (file-exists-p (concat texfile ".dvi")) (progn (call-process "dvipng" nil nil nil "-E" "-fg" muse-latex2png-fg "-bg" muse-latex2png-bg "-T" "tight" "-x" (format "%s" (* muse-latex2png-scale-factor 1000)) "-y" (format "%s" (* muse-latex2png-scale-factor 1000)) "-o" (concat texfile ".png") (concat texfile ".dvi")) (if (file-exists-p (concat texfile ".png")) (progn (delete-file (concat texfile ".dvi")) (delete-file (concat texfile ".tex")) (delete-file (concat texfile ".aux")) (delete-file (concat texfile ".log")) (concat texfile ".png")) (message "Failed to create png file") nil)) (message (concat "Failed to create dvi file " texfile)) nil))) (defun muse-latex2png-region (beg end attrs) "Generate an image for the Latex code between BEG and END. If a Muse page is currently being published, replace the given region with the appropriate markup that displays the image. Otherwise, just return the path of the generated image. Valid keys for the ATTRS alist are as follows. prefix: The prefix given to the image file. preamble: Extra text to add to the Latex preamble. inline: Display image as inline, instead of a block." (let ((end-marker (set-marker (make-marker) (1+ end))) (pubdir (expand-file-name muse-latex2png-img-dest (file-name-directory muse-publishing-current-output-path)))) (save-restriction (narrow-to-region beg end) (let* ((text (buffer-substring-no-properties beg end)) ;; the prefix given to the image file. (prefix (cdr (assoc "prefix" attrs))) ;; preamble (for extra options) (preamble (cdr (assoc "preamble" attrs))) ;; display inline or as a block (display (car (assoc "inline" attrs)))) (when muse-publishing-p (delete-region beg end) (goto-char (point-min))) (unless (file-directory-p pubdir) (make-directory pubdir)) (let ((path (muse-latex2png-move2pubdir (muse-latex2png text prefix preamble) prefix pubdir))) (when path (when muse-publishing-p (muse-insert-markup (if (muse-style-derived-p "html") (concat "\"latex2png" ">") (muse-insert-markup "")) (let ((ext (or (file-name-extension path) "")) (path (muse-path-sans-extension path))) (muse-markup-text 'image path ext)))) (goto-char (point-max))) path)))))) (defun muse-publish-latex-tag (beg end attrs) "If the current style is not Latex-based, generate an image for the given Latex code. Otherwise, don't do anything to the region. See `muse-latex2png-region' for valid keys for ATTRS." (unless (assoc "prefix" attrs) (setq attrs (cons (cons "prefix" (concat "latex2png-" (muse-page-name))) attrs))) (if (or (muse-style-derived-p "latex") (muse-style-derived-p "context")) (muse-publish-mark-read-only beg end) (muse-latex2png-region beg end attrs))) (put 'muse-publish-latex-tag 'muse-dangerous-tag t) (defun muse-publish-math-tag (beg end) "Surround the given region with \"$\" characters. Then, if the current style is not Latex-based, generate an image for the given Latex math code. If 6 or more spaces come before the tag, and the end of the tag is at the end of a line, then surround the region with the equivalent of \"$$\" instead. This causes the region to be centered in the published output, among other things." (let* ((centered (and (re-search-backward (concat "^[" muse-regexp-blank "]\\{6,\\}\\=") nil t) (save-excursion (save-match-data (goto-char end) (looking-at (concat "[" muse-regexp-blank "]*$")))) (prog1 t (replace-match "") (when (and (or (muse-style-derived-p "latex") (muse-style-derived-p "context")) (not (bobp))) (backward-char 1) (if (bolp) (delete-char 1) (forward-char 1))) (setq beg (point))))) (tag-beg (if centered (if (muse-style-derived-p "context") "\\startformula " "\\[ ") "$")) (tag-end (if centered (if (muse-style-derived-p "context") " \\stopformula" " \\]") "$")) (attrs (nconc (list (cons "prefix" (concat "latex2png-" (muse-page-name)))) (if centered nil '(("inline" . t)))))) (goto-char beg) (muse-insert-markup tag-beg) (goto-char end) (muse-insert-markup tag-end) (if (or (muse-style-derived-p "latex") (muse-style-derived-p "context")) (muse-publish-mark-read-only beg (point)) (muse-latex2png-region beg (point) attrs)))) (put 'muse-publish-math-tag 'muse-dangerous-tag t) ;;; Insinuate with muse-publish (add-to-list 'muse-publish-markup-tags '("latex" t t nil muse-publish-latex-tag) t) (add-to-list 'muse-publish-markup-tags '("math" t nil nil muse-publish-math-tag) t) (provide 'muse-latex2png) ;;; muse-latex2png.el ends here muse-el-3.20+dfsg/lisp/muse-latex.el0000644000175000017500000005335511331353120016620 0ustar taffittaffit;;; muse-latex.el --- publish entries in LaTex or PDF format ;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 ;; Free Software Foundation, Inc. ;; This file is part of Emacs Muse. It is not part of GNU Emacs. ;; Emacs Muse 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 3, or (at your ;; option) any later version. ;; Emacs Muse 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 Emacs Muse; see the file COPYING. If not, write to the ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;;; Contributors: ;; Li Daobing (lidaobing AT gmail DOT com) provided CJK support. ;; Trent Buck (trentbuck AT gmail DOT com) gave valuable advice for ;; how to treat LaTeX specials and the like. ;; Matthias Kegelmann (mathias DOT kegelmann AT sdm DOT de) provided a ;; scenario where we would need to respect the tag. ;; Jean Magnan de Bornier (jean AT bornier DOT net) provided the ;; markup string for link-and-anchor. ;; Jim Ottaway (j DOT ottaway AT lse DOT ac DOT uk) implemented slides ;; and lecture notes. ;; Karl Berry (karl AT freefriends DOT org) suggested how to escape ;; additional special characters in image filenames. ;;; Code: ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; Muse LaTeX Publishing ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (require 'muse-publish) (defgroup muse-latex nil "Rules for marking up a Muse file as a LaTeX article." :group 'muse-publish) (defcustom muse-latex-extension ".tex" "Default file extension for publishing LaTeX files." :type 'string :group 'muse-latex) (defcustom muse-latex-pdf-extension ".pdf" "Default file extension for publishing LaTeX files to PDF." :type 'string :group 'muse-latex) (defcustom muse-latex-pdf-browser "open %s" "The program to use when browsing a published PDF file. This should be a format string." :type 'string :group 'muse-latex) (defcustom muse-latex-pdf-program "pdflatex" "The program that is called to generate PDF content from LaTeX content." :type 'string :group 'muse-latex) (defcustom muse-latex-pdf-cruft '(".aux" ".log" ".nav" ".out" ".snm" ".toc" ".vrb") "Extensions of files to remove after generating PDF output successfully." :type 'string :group 'muse-latex) (defcustom muse-latex-header "\\documentclass{article} \\usepackage[english]{babel} \\usepackage{ucs} \\usepackage[utf8x]{inputenc} \\usepackage[T1]{fontenc} \\usepackage{hyperref} \\usepackage[pdftex]{graphicx} \\def\\museincludegraphics{% \\begingroup \\catcode`\\|=0 \\catcode`\\\\=12 \\catcode`\\#=12 \\includegraphics[width=0.75\\textwidth] } \\begin{document} \\title{(muse-publish-escape-specials-in-string (muse-publishing-directive \"title\") 'document)} \\author{(muse-publishing-directive \"author\")} \\date{(muse-publishing-directive \"date\")} \\maketitle (and muse-publish-generate-contents (not muse-latex-permit-contents-tag) \"\\\\tableofcontents\n\\\\newpage\")\n\n" "Header used for publishing LaTeX files. This may be text or a filename." :type 'string :group 'muse-latex) (defcustom muse-latex-footer "(muse-latex-bibliography) \\end{document}\n" "Footer used for publishing LaTeX files. This may be text or a filename." :type 'string :group 'muse-latex) (defcustom muse-latexcjk-header "\\documentclass{article} \\usepackage{CJK} \\usepackage{indentfirst} \\usepackage[CJKbookmarks=true]{hyperref} \\usepackage[pdftex]{graphicx} \\begin{document} \\begin{CJK*}(muse-latexcjk-encoding) \\title{(muse-publish-escape-specials-in-string (muse-publishing-directive \"title\") 'document)} \\author{(muse-publishing-directive \"author\")} \\date{(muse-publishing-directive \"date\")} \\maketitle (and muse-publish-generate-contents (not muse-latex-permit-contents-tag) \"\\\\tableofcontents\n\\\\newpage\")\n\n" "Header used for publishing LaTeX files (CJK). This may be text or a filename." :type 'string :group 'muse-latex) (defcustom muse-latexcjk-footer "\n\\end{CJK*} \\end{document}\n" "Footer used for publishing LaTeX files (CJK). This may be text or a filename." :type 'string :group 'muse-latex) (defcustom muse-latex-slides-header "\\documentclass[ignorenonframetext]{beamer} \\usepackage[english]{babel} \\usepackage{ucs} \\usepackage[utf8x]{inputenc} \\usepackage[T1]{fontenc} \\usepackage{hyperref} \\def\\museincludegraphics{% \\begingroup \\catcode`\\|=0 \\catcode`\\\\=12 \\catcode`\\#=12 \\includegraphics[width=0.50\\textwidth] } \\title{(muse-publish-escape-specials-in-string (muse-publishing-directive \"title\") 'document)} \\author{(muse-publishing-directive \"author\")} \\date{(muse-publishing-directive \"date\")} \\begin{document} \\frame{\\titlepage} (and muse-publish-generate-contents \"\\\\frame{\\\\tableofcontents}\")\n\n" "Header for publishing of slides using LaTeX. This may be text or a filename. You must have the Beamer extension for LaTeX installed for this to work." :type 'string :group 'muse-latex) (defcustom muse-latex-lecture-notes-header "\\documentclass{article} \\usepackage{beamerarticle} \\usepackage[english]{babel} \\usepackage{ucs} \\usepackage[utf8x]{inputenc} \\usepackage[T1]{fontenc} \\usepackage{hyperref} \\usepackage[pdftex]{graphicx} \\def\\museincludegraphics{% \\begingroup \\catcode`\\|=0 \\catcode`\\\\=12 \\catcode`\\#=12 \\includegraphics[width=0.50\\textwidth] } \\title{(muse-publish-escape-specials-in-string (muse-publishing-directive \"title\") 'document)} \\author{(muse-publishing-directive \"author\")} \\date{(muse-publishing-directive \"date\")} \\begin{document} \\frame{\\titlepage} (and muse-publish-generate-contents \"\\\\frame{\\\\tableofcontents}\")\n\n" "Header for publishing of lecture notes using LaTeX. This may be text or a filename. You must have the Beamer extension for LaTeX installed for this to work." :type 'string :group 'muse-latex) (defcustom muse-latex-markup-regexps `(;; numeric ranges (10000 "\\([0-9]+\\)-\\([0-9]+\\)" 0 "\\1--\\2") ;; be careful of closing quote pairs (10100 "\"'" 0 "\"\\\\-'")) "List of markup regexps for identifying regions in a Muse page. For more on the structure of this list, see `muse-publish-markup-regexps'." :type '(repeat (choice (list :tag "Markup rule" integer (choice regexp symbol) integer (choice string function symbol)) function)) :group 'muse-latex) (defcustom muse-latex-markup-functions '((table . muse-latex-markup-table)) "An alist of style types to custom functions for that kind of text. For more on the structure of this list, see `muse-publish-markup-functions'." :type '(alist :key-type symbol :value-type function) :group 'muse-latex) (defcustom muse-latex-markup-strings '((image-with-desc . "\\begin{figure}[h] \\centering\\museincludegraphics{%s.%s}|endgroup \\caption{%s} \\end{figure}") (image . "\\begin{figure}[h] \\centering\\museincludegraphics{%s.%s}|endgroup \\end{figure}") (image-link . "%% %s \\museincludegraphics{%s.%s}|endgroup") (anchor-ref . "\\ref{%s}") (url . "\\url{%s}") (url-and-desc . "\\href{%s}{%s}\\footnote{%1%}") (link . "\\href{%s}{%s}\\footnote{%1%}") (link-and-anchor . "\\href{%1%}{%3%}\\footnote{%1%}") (email-addr . "\\verb|%s|") (anchor . "\\label{%s}") (emdash . "---") (comment-begin . "% ") (rule . "\\vspace{.5cm}\\hrule\\vspace{.5cm}") (no-break-space . "~") (line-break . "\\\\") (enddots . "\\ldots{}") (dots . "\\dots{}") (part . "\\part{") (part-end . "}") (chapter . "\\chapter{") (chapter-end . "}") (section . "\\section{") (section-end . "}") (subsection . "\\subsection{") (subsection-end . "}") (subsubsection . "\\subsubsection{") (subsubsection-end . "}") (section-other . "\\paragraph{") (section-other-end . "}") (footnote . "\\footnote{") (footnote-end . "}") (footnotetext . "\\footnotetext[%d]{") (begin-underline . "\\underline{") (end-underline . "}") (begin-literal . "\\texttt{") (end-literal . "}") (begin-emph . "\\emph{") (end-emph . "}") (begin-more-emph . "\\textbf{") (end-more-emph . "}") (begin-most-emph . "\\textbf{\\emph{") (end-most-emph . "}}") (begin-verse . "\\begin{verse}\n") (end-verse-line . " \\\\") (verse-space . "~~~~") (end-verse . "\n\\end{verse}") (begin-example . "\\begin{quote}\n\\begin{verbatim}") (end-example . "\\end{verbatim}\n\\end{quote}") (begin-center . "\\begin{center}\n") (end-center . "\n\\end{center}") (begin-quote . "\\begin{quote}\n") (end-quote . "\n\\end{quote}") (begin-cite . "\\cite{") (begin-cite-author . "\\citet{") (begin-cite-year . "\\citet{") (end-cite . "}") (begin-uli . "\\begin{itemize}\n") (end-uli . "\n\\end{itemize}") (begin-uli-item . "\\item ") (begin-oli . "\\begin{enumerate}\n") (end-oli . "\n\\end{enumerate}") (begin-oli-item . "\\item ") (begin-dl . "\\begin{description}\n") (end-dl . "\n\\end{description}") (begin-ddt . "\\item[") (end-ddt . "] \\mbox{}\n")) "Strings used for marking up text. These cover the most basic kinds of markup, the handling of which differs little between the various styles." :type '(alist :key-type symbol :value-type string) :group 'muse-latex) (defcustom muse-latex-slides-markup-tags '(("slide" t t nil muse-latex-slide-tag)) "A list of tag specifications, for specially marking up LaTeX slides." :type '(repeat (list (string :tag "Markup tag") (boolean :tag "Expect closing tag" :value t) (boolean :tag "Parse attributes" :value nil) (boolean :tag "Nestable" :value nil) function)) :group 'muse-latex) (defcustom muse-latexcjk-encoding-map '((utf-8 . "{UTF8}{song}") (japanese-iso-8bit . "[dnp]{JIS}{min}") (chinese-big5 . "{Bg5}{bsmi}") (mule-utf-8 . "{UTF8}{song}") (chinese-iso-8bit . "{GB}{song}") (chinese-gbk . "{GBK}{song}")) "An alist mapping emacs coding systems to appropriate CJK codings. Use the base name of the coding system (ie, without the -unix)." :type '(alist :key-type coding-system :value-type string) :group 'muse-latex) (defcustom muse-latexcjk-encoding-default "{GB}{song}" "The default Emacs buffer encoding to use in published files. This will be used if no special characters are found." :type 'string :group 'muse-latex) (defun muse-latexcjk-encoding () (when (boundp 'buffer-file-coding-system) (muse-latexcjk-transform-content-type buffer-file-coding-system))) (defun muse-latexcjk-transform-content-type (content-type) "Using `muse-cjklatex-encoding-map', try and resolve an emacs coding system to an associated CJK coding system." (let ((match (and (fboundp 'coding-system-base) (assoc (coding-system-base content-type) muse-latexcjk-encoding-map)))) (if match (cdr match) muse-latexcjk-encoding-default))) (defcustom muse-latex-markup-specials-document '((?\\ . "\\textbackslash{}") (?\_ . "\\textunderscore{}") (?\< . "\\textless{}") (?\> . "\\textgreater{}") (?^ . "\\^{}") (?\~ . "\\~{}") (?\@ . "\\@") (?\$ . "\\$") (?\% . "\\%") (?\{ . "\\{") (?\} . "\\}") (?\& . "\\&") (?\# . "\\#")) "A table of characters which must be represented specially. These are applied to the entire document, sans already-escaped regions." :type '(alist :key-type character :value-type string) :group 'muse-latex) (defcustom muse-latex-markup-specials-example '() "A table of characters which must be represented specially. These are applied to regions. With the default interpretation of regions, no specials need to be escaped." :type '(alist :key-type character :value-type string) :group 'muse-latex) (defcustom muse-latex-markup-specials-literal '((?\n . "\\\n") (?\\ . "\\textbackslash{}") (?_ . "\\textunderscore{}") (?\< . "\\textless{}") (?\> . "\\textgreater{}") (?^ . "\\^{}") (?\~ . "\\~{}") (?\$ . "\\$") (?\% . "\\%") (?\{ . "\\{") (?\} . "\\}") (?\& . "\\&") (?\# . "\\#")) "A table of characters which must be represented specially. This applies to =monospaced text= and regions." :type '(alist :key-type character :value-type string) :group 'muse-latex) (defcustom muse-latex-markup-specials-url '((?\\ . "\\textbackslash{}") (?\_ . "\\_") (?\< . "\\<") (?\> . "\\>") (?\$ . "\\$") (?\% . "\\%") (?\{ . "\\{") (?\} . "\\}") (?\& . "\\&") (?\# . "\\#")) "A table of characters which must be represented specially. These are applied to URLs." :type '(alist :key-type character :value-type string) :group 'muse-latex) (defcustom muse-latex-markup-specials-image '((?\\ . "\\\\") (?\< . "\\<") (?\> . "\\>") (?\$ . "\\$") (?\% . "\\%") (?\{ . "\\{") (?\} . "\\}") (?\& . "\\&") (?\# . "\\#") (?\| . "\\|")) "A table of characters which must be represented specially. These are applied to image filenames." :type '(alist :key-type character :value-type string) :group 'muse-latex) (defun muse-latex-decide-specials (context) "Determine the specials to escape, depending on CONTEXT." (cond ((memq context '(underline emphasis document url-desc verbatim footnote)) muse-latex-markup-specials-document) ((eq context 'image) muse-latex-markup-specials-image) ((memq context '(email url)) muse-latex-markup-specials-url) ((eq context 'literal) muse-latex-markup-specials-literal) ((eq context 'example) muse-latex-markup-specials-example) (t (error "Invalid context '%s' in muse-latex" context)))) (defcustom muse-latex-permit-contents-tag nil "If nil, ignore tags. Otherwise, insert table of contents. Most of the time, it is best to have a table of contents on the first page, with a new page immediately following. To make this work with documents published in both HTML and LaTeX, we need to ignore the tag. If you don't agree with this, then set this option to non-nil, and it will do what you expect." :type 'boolean :group 'muse-latex) (defun muse-latex-markup-table () (let* ((table-info (muse-publish-table-fields (match-beginning 0) (match-end 0))) (row-len (car table-info)) (field-list (cdr table-info))) (when table-info (muse-insert-markup "\\begin{tabular}{" (make-string row-len ?l) "}\n") (dolist (fields field-list) (let ((type (car fields))) (setq fields (cdr fields)) (if (eq type 'hline) (muse-insert-markup "\\hline\n") (when (= type 3) (muse-insert-markup "\\hline\n")) (insert (car fields)) (setq fields (cdr fields)) (dolist (field fields) (muse-insert-markup " & ") (insert field)) (muse-insert-markup " \\\\\n") (when (= type 2) (muse-insert-markup "\\hline\n"))))) (muse-insert-markup "\\end{tabular}")))) ;;; Tags for LaTeX (defun muse-latex-slide-tag (beg end attrs) "Publish the tag in LaTeX. This is used by the slides and lecture-notes publishing styles." (let ((title (cdr (assoc "title" attrs)))) (goto-char beg) (muse-insert-markup "\\begin{frame}[fragile]\n") (when title (muse-insert-markup "\\frametitle{") (insert title) (muse-insert-markup "}\n")) (save-excursion (goto-char end) (muse-insert-markup "\n\\end{frame}")))) ;;; Post-publishing functions (defun muse-latex-fixup-dquotes () "Fixup double quotes." (goto-char (point-min)) (let ((open t)) (while (search-forward "\"" nil t) (unless (get-text-property (match-beginning 0) 'read-only) (when (or (bobp) (eq (char-before) ?\n)) (setq open t)) (if open (progn (replace-match "``") (setq open nil)) (replace-match "''") (setq open t)))))) (defun muse-latex-fixup-citations () "Replace semicolons in multi-head citations with colons." (goto-char (point-min)) (while (re-search-forward "\\\\cite.?{" nil t) (let ((start (point)) (end (re-search-forward "}"))) (save-restriction (narrow-to-region start end) (goto-char (point-min)) (while (re-search-forward ";" nil t) (replace-match ",")))))) (defun muse-latex-fixup-headings () "Remove footnotes in headings, since LaTeX does not permit them to exist. This can happen if there is a link in a heading, because by default Muse will add a footnote for each link." (goto-char (point-min)) (while (re-search-forward "^\\\\section.?{" nil t) (save-restriction (narrow-to-region (match-beginning 0) (muse-line-end-position)) (goto-char (point-min)) (while (re-search-forward "\\\\footnote{[^}\n]+}" nil t) (replace-match "")) (forward-line 1)))) (defun muse-latex-munge-buffer () (muse-latex-fixup-dquotes) (muse-latex-fixup-citations) (muse-latex-fixup-headings) (when (and muse-latex-permit-contents-tag muse-publish-generate-contents) (goto-char (car muse-publish-generate-contents)) (muse-insert-markup "\\tableofcontents"))) (defun muse-latex-bibliography () (save-excursion (goto-char (point-min)) (if (re-search-forward "\\\\cite.?{" nil t) (concat "\\bibliography{" (muse-publishing-directive "bibsource") "}\n") ""))) (defun muse-latex-pdf-browse-file (file) (shell-command (format muse-latex-pdf-browser file))) (defun muse-latex-pdf-generate (file output-path final-target) (apply #'muse-publish-transform-output file output-path final-target "PDF" (function (lambda (file output-path) (let* ((fnd (file-name-directory output-path)) (command (format "%s \"%s\"" muse-latex-pdf-program (file-relative-name file fnd))) (times 0) (default-directory fnd) result) ;; XEmacs can sometimes return a non-number result. We'll err ;; on the side of caution by continuing to attempt to generate ;; the PDF if this happens and treat the final result as ;; successful. (while (and (< times 2) (or (not (numberp result)) (not (eq result 0)) ;; table of contents takes 2 passes (file-readable-p (muse-replace-regexp-in-string "\\.tex\\'" ".toc" file t t)))) (setq result (shell-command command) times (1+ times))) (if (or (not (numberp result)) (eq result 0)) t nil)))) muse-latex-pdf-cruft)) ;;; Register the Muse LATEX Publishers (muse-define-style "latex" :suffix 'muse-latex-extension :regexps 'muse-latex-markup-regexps :functions 'muse-latex-markup-functions :strings 'muse-latex-markup-strings :specials 'muse-latex-decide-specials :before-end 'muse-latex-munge-buffer :header 'muse-latex-header :footer 'muse-latex-footer :browser 'find-file) (muse-derive-style "pdf" "latex" :final 'muse-latex-pdf-generate :browser 'muse-latex-pdf-browse-file :link-suffix 'muse-latex-pdf-extension :osuffix 'muse-latex-pdf-extension) (muse-derive-style "latexcjk" "latex" :header 'muse-latexcjk-header :footer 'muse-latexcjk-footer) (muse-derive-style "pdfcjk" "latexcjk" :final 'muse-latex-pdf-generate :browser 'muse-latex-pdf-browse-file :link-suffix 'muse-latex-pdf-extension :osuffix 'muse-latex-pdf-extension) (muse-derive-style "slides" "latex" :header 'muse-latex-slides-header :tags 'muse-latex-slides-markup-tags) (muse-derive-style "slides-pdf" "pdf" :header 'muse-latex-slides-header :tags 'muse-latex-slides-markup-tags) (muse-derive-style "lecture-notes" "slides" :header 'muse-latex-lecture-notes-header) (muse-derive-style "lecture-notes-pdf" "slides-pdf" :header 'muse-latex-lecture-notes-header) (provide 'muse-latex) ;;; muse-latex.el ends here muse-el-3.20+dfsg/lisp/muse-import-xml.el0000644000175000017500000000546211331353120017607 0ustar taffittaffit;;; muse-import-xml.el --- common to all from-xml converters ;; Copyright (C) 2006, 2007, 2008, 2009, 2010 ;; Free Software Foundation, Inc. ;; Author: Elena Pomohaci ;; This file is part of Emacs Muse. It is not part of GNU Emacs. ;; Emacs Muse 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 3, or (at your ;; option) any later version. ;; Emacs Muse 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 Emacs Muse; see the file COPYING. If not, write to the ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;;; Contributors: ;;; Code: (provide 'muse-import-xml) (require 'xml) (require 'muse) (defvar muse-import-xml-prefix "" "The name prefix for tag functions") (defvar muse-import-xml-generic-function-name "muse-import-xml-generic" "The generic function name") (defun muse-import-xml-convert-to-list (buf) "Convert xml BUF in a xml-list" (with-temp-buffer (insert-buffer-substring buf) (goto-char (point-min)) (while (re-search-forward ">[ \n\t]*<" nil t) (replace-match "><" nil nil)) ; clean all superfluous blank characters (xml-parse-region (point-min) (point-max) (current-buffer)))) (defun muse-import-xml-generic (node) "The generic function called when there is no node specific function." (let ((name (xml-node-name node))) (insert "<" (symbol-name name) ">") (muse-import-xml-node node) (insert ""))) (defun muse-import-xml-parse-tree (lst) "Parse an xml tree list" (mapc #'muse-import-xml-parse-node lst)) (defun muse-import-xml-parse-node (node) "Parse a xml tree node" (if (stringp node) (insert (muse-replace-regexp-in-string "^[ \t]+" "" node)) (let ((fname (intern-soft (concat muse-import-xml-prefix (symbol-name (xml-node-name node)))))) (if (functionp fname) (funcall fname node) (funcall (intern muse-import-xml-generic-function-name) node))))) (defun muse-import-xml-node (node) "Default node function" (muse-import-xml-parse-tree (xml-node-children node))) (defun muse-import-xml (src dest) "Convert the xml SRC buffer in a muse DEST buffer" (set-buffer (get-buffer-create dest)) (when (fboundp 'muse-mode) (muse-mode)) (muse-import-xml-parse-tree (muse-import-xml-convert-to-list src))) ;;; muse-import-xml.el ends here muse-el-3.20+dfsg/lisp/muse-journal.el0000644000175000017500000007373511331353120017161 0ustar taffittaffit;;; muse-journal.el --- keep and publish a journal ;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 ;; Free Software Foundation, Inc. ;; This file is part of Emacs Muse. It is not part of GNU Emacs. ;; Emacs Muse 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 3, or (at your ;; option) any later version. ;; Emacs Muse 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 Emacs Muse; see the file COPYING. If not, write to the ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;; The module facilitates the keeping and publication of a journal. ;; When publishing to HTML, it assumes the form of a web log, or blog. ;; ;; The input format for each entry is as follows: ;; ;; * 20040317: Title of entry ;; ;; Text for the entry. ;; ;; ;; "You know who you are. It comes down to a simple gut check: You ;; either love what you do or you don't. Period." -- P. Bronson ;; ;; ;; The "qotd", or Quote of the Day, is entirely optional. When ;; generated to HTML, this entry is rendered as: ;; ;;

    ;;
    ;;

    Quote of the Day:

    ;;

    "You know who you are. It comes down to a simple gut ;; check: You either love what you do or you don't. Period." ;; -- P. Bronson

    ;;
    ;;
    ;;
    ;; ;;
    ;;

    Title of entry

    ;;
    ;;
    ;;
    ;;

    Text for the entry.

    ;;
    ;;
    ;;
    ;; ;; The plurality of "div" tags makes it possible to display the ;; entries in any form you wish, using a CSS style. ;; ;; Also, an .RDF file can be generated from your journal by publishing ;; it with the "rdf" style. It uses the first two sentences of the ;; first paragraph of each entry as its "description", and ;; autogenerates tags for linking to the various entries. ;;; Contributors: ;; René Stadler (mail AT renestadler DOT de) provided a patch that ;; causes dates in RSS feeds to be generated in a format that RSS ;; readers can parse. ;;; Code: ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; Muse Journal Publishing ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (require 'muse-publish) (require 'muse-html) (require 'muse-latex) (require 'muse-book) (defgroup muse-journal nil "Rules for transforming a journal into its final form." :group 'muse-publish) (defcustom muse-journal-heading-regexp "\\(?:\\([0-9]+\\)\\(?:: \\)?\\)?\\(.+?\\)?" "A regexp that matches a journal heading. Paren group 1 is the ISO date, group 2 is the optional category, and group 3 is the optional heading for the entry." :type 'regexp :group 'muse-journal) (defcustom muse-journal-date-format "%a, %e %b %Y" "Date format to use for journal entries." :type 'string :group 'muse-journal) (defcustom muse-journal-html-heading-regexp (concat "^\n]*>" muse-journal-heading-regexp "$") "A regexp that matches a journal heading from an HTML document. Paren group 1 is the ISO date, group 2 is the optional category, and group 3 is the optional heading for the entry." :type 'regexp :group 'muse-journal) (defcustom muse-journal-rss-heading-regexp (concat "^\\* " muse-journal-heading-regexp "$") "A regexp that matches a journal heading from an HTML document. Paren group 1 is the ISO date, group 2 is the optional category, and group 3 is the optional heading for the entry." :type 'regexp :group 'muse-journal) (defcustom muse-journal-html-entry-template "
     
    %date%

    %title%

    %qotd%

    %text%
    \n\n" "Template used to publish individual journal entries as HTML. This may be text or a filename." :type 'string :group 'muse-journal) (defcustom muse-journal-latex-section "\\section*{%title% \\hfill {\\normalsize %date%}} \\addcontentsline{toc}{chapter}{%title%}" "Template used to publish a LaTeX section." :type 'string :group 'muse-journal) (defcustom muse-journal-latex-subsection "\\subsection*{%title%} \\addcontentsline{toc}{section}{%title%}" "Template used to publish a LaTeX subsection." :type 'string :group 'muse-journal) (defcustom muse-journal-markup-tags '(("qotd" t nil nil muse-journal-qotd-tag)) "A list of tag specifications, for specially marking up Journal entries. See `muse-publish-markup-tags' for more info. This is used by journal-latex and its related styles, as well as the journal-rss-entry style, which both journal-rdf and journal-rss use." :type '(repeat (list (string :tag "Markup tag") (boolean :tag "Expect closing tag" :value t) (boolean :tag "Parse attributes" :value nil) (boolean :tag "Nestable" :value nil) function)) :group 'muse-journal) ;; FIXME: This doesn't appear to be used. (defun muse-journal-generate-pages () (let ((output-dir (muse-style-element :path))) (goto-char (point-min)) (while (re-search-forward muse-journal-heading-regexp nil t) (let* ((date (match-string 1)) (category (match-string 1)) (category-file (concat output-dir category "/index.html")) (heading (match-string 1))) t)))) (defcustom muse-journal-rdf-extension ".rdf" "Default file extension for publishing RDF (RSS 1.0) files." :type 'string :group 'muse-journal) (defcustom muse-journal-rdf-base-url "" "The base URL of the website referenced by the RDF file." :type 'string :group 'muse-journal) (defcustom muse-journal-rdf-header " (concat (muse-style-element :base-url) (muse-publish-link-name))\"> <lisp>(muse-publishing-directive \"title\")</lisp> (concat (muse-style-element :base-url) (concat (muse-page-name) muse-html-extension)) (muse-publishing-directive \"desc\") (concat (muse-style-element :base-url) (concat (muse-page-name) muse-html-extension))\"/> \n" "Header used for publishing RDF (RSS 1.0) files. This may be text or a filename." :type 'string :group 'muse-journal) (defcustom muse-journal-rdf-footer "\n" "Footer used for publishing RDF (RSS 1.0) files. This may be text or a filename." :type 'string :group 'muse-journal) (defcustom muse-journal-rdf-date-format "%Y-%m-%dT%H:%M:%S" "Date format to use for RDF entries." :type 'string :group 'muse-journal) (defcustom muse-journal-rdf-entry-template "\n %title% %desc% %link%#%anchor% %date% %maintainer% \n" "Template used to publish individual journal entries as RDF. This may be text or a filename." :type 'string :group 'muse-journal) (defcustom muse-journal-rdf-summarize-entries nil "If non-nil, include only summaries in the RDF file, not the full data. The default is nil, because this annoys some subscribers." :type 'boolean :group 'muse-journal) (defcustom muse-journal-rss-extension ".xml" "Default file extension for publishing RSS 2.0 files." :type 'string :group 'muse-journal) (defcustom muse-journal-rss-base-url "" "The base URL of the website referenced by the RSS file." :type 'string :group 'muse-journal) (defcustom muse-journal-rss-header "<\?xml version=\"1.0\" encoding=\" (muse-html-encoding)\"?> <lisp>(muse-publishing-directive \"title\")</lisp> (concat (muse-style-element :base-url) (concat (muse-page-name) muse-html-extension)) (muse-publishing-directive \"desc\") en-us Emacs Muse\n\n" "Header used for publishing RSS 2.0 files. This may be text or a filename." :type 'string :group 'muse-journal) (defcustom muse-journal-rss-footer "\n\n \n" "Footer used for publishing RSS 2.0 files. This may be text or a filename." :type 'string :group 'muse-journal) (defcustom muse-journal-rss-date-format "%a, %d %b %Y %H:%M:%S %Z" "Date format to use for RSS 2.0 entries." :type 'string :group 'muse-journal) (defcustom muse-journal-rss-entry-template "\n %title% %link%#%anchor% %desc% (muse-publishing-directive \"author\") %date% %link%#%anchor% %enclosure% \n" "Template used to publish individual journal entries as RSS 2.0. This may be text or a filename." :type 'string :group 'muse-journal) (defcustom muse-journal-rss-enclosure-types-alist '(("mp3" . "audio/mpeg")) "File types that are accepted as RSS enclosures. This is an alist that maps file extension to content type. Useful for podcasting." :type '(alist :key-type string :value-type string) :group 'muse-journal) (defcustom muse-journal-rss-summarize-entries nil "If non-nil, include only summaries in the RSS file, not the full data. The default is nil, because this annoys some subscribers." :type 'boolean :group 'muse-journal) (defcustom muse-journal-rss-markup-regexps '((10000 muse-explicit-link-regexp 0 "\\2")) "List of markup rules for publishing a Muse journal page to RSS 2.0. For more information on the structure of this list, see `muse-publish-markup-regexps'." :type '(repeat (choice (list :tag "Markup rule" integer (choice regexp symbol) integer (choice string function symbol)) function)) :group 'muse-journal) (defcustom muse-journal-rss-markup-functions '((email . ignore) (link . ignore) (url . ignore)) "An alist of style types to custom functions for that kind of text. For more on the structure of this list, see `muse-publish-markup-functions'." :type '(alist :key-type symbol :value-type function) :group 'muse-journal) (defun muse-journal-anchorize-title (title) "This strips tags from TITLE, truncates TITLE at begin parenthesis, and escapes any remaining non-alphanumeric characters." (save-match-data (if (string-match "(" title) (setq title (substring title 0 (match-beginning 0)))) (if (string-match "<[^>]+>" title) (setq title (replace-match "" nil nil title))) (let (pos code len ch) (while (setq pos (string-match (concat "[^" muse-regexp-alnum "_]") title pos)) (setq ch (aref title pos) code (format "%%%02X" (cond ((fboundp 'char-to-ucs) (char-to-ucs ch)) ((fboundp 'char-to-int) (char-to-int ch)) (t ch))) len (length code) title (concat (substring title 0 pos) code (when (< pos (length title)) (substring title (1+ pos) nil))) pos (+ len pos))) title))) (defun muse-journal-sort-entries (&optional direction) (interactive "P") (sort-subr direction (function (lambda () (if (re-search-forward "^\\* [0-9]+" nil t) (goto-char (match-beginning 0)) (goto-char (point-max))))) (function (lambda () (if (re-search-forward "^\\* [0-9]+" nil t) (goto-char (1- (match-beginning 0))) (goto-char (point-max))))) (function (lambda () (forward-char 2))) (function (lambda () (end-of-line))))) (defun muse-journal-qotd-tag (beg end) (muse-publish-ensure-block beg end) (muse-insert-markup (muse-markup-text 'begin-quote)) (muse-insert-markup (muse-markup-text 'begin-quote-item)) (goto-char end) (muse-insert-markup (muse-markup-text 'end-quote-item)) (muse-insert-markup (muse-markup-text 'end-quote))) (defun muse-journal-html-munge-buffer () (goto-char (point-min)) (let ((heading-regexp muse-journal-html-heading-regexp) (inhibit-read-only t)) (while (re-search-forward heading-regexp nil t) (let* ((date (match-string 1)) (orig-date date) (title (match-string 2)) (clean-title title) datestamp qotd text) (delete-region (match-beginning 0) (match-end 0)) (if clean-title (save-match-data (while (string-match "\\(^<[^>]+>\\|<[^>]+>$\\)" clean-title) (setq clean-title (replace-match "" nil nil clean-title))))) (save-match-data (when (and date (string-match (concat "\\`\\([1-9][0-9][0-9][0-9]\\)[./]?" "\\([0-1][0-9]\\)[./]?\\([0-3][0-9]\\)") date)) (setq datestamp (encode-time 0 0 0 (string-to-number (match-string 3 date)) (string-to-number (match-string 2 date)) (string-to-number (match-string 1 date)) nil) date (concat (format-time-string muse-journal-date-format datestamp) (substring date (match-end 0)))))) (save-restriction (narrow-to-region (point) (if (re-search-forward (concat "\\(^
    $\\|" heading-regexp "\\)") nil t) (match-beginning 0) (point-max))) (goto-char (point-max)) (while (and (not (bobp)) (eq ?\ (char-syntax (char-before)))) (delete-char -1)) (goto-char (point-min)) (while (and (not (eobp)) (eq ?\ (char-syntax (char-after)))) (delete-char 1)) (save-excursion (when (search-forward "" nil t) (let ((tag-beg (match-beginning 0)) (beg (match-end 0)) end) (re-search-forward "\n*") (setq end (point-marker)) (save-restriction (narrow-to-region beg (match-beginning 0)) (muse-publish-escape-specials (point-min) (point-max) nil 'document) (setq qotd (buffer-substring-no-properties (point-min) (point-max)))) (delete-region tag-beg end) (set-marker end nil)))) (setq text (buffer-string)) (delete-region (point-min) (point-max)) (let ((entry muse-journal-html-entry-template)) (muse-insert-file-or-string entry) (muse-publish-mark-read-only (point-min) (point-max)) (goto-char (point-min)) (while (search-forward "%date%" nil t) (remove-text-properties (match-beginning 0) (match-end 0) '(read-only nil rear-nonsticky nil)) (replace-match (or date "") nil t)) (goto-char (point-min)) (while (search-forward "%title%" nil t) (remove-text-properties (match-beginning 0) (match-end 0) '(read-only nil rear-nonsticky nil)) (replace-match (or title " ") nil t)) (goto-char (point-min)) (while (search-forward "%anchor%" nil t) (replace-match (muse-journal-anchorize-title (or clean-title orig-date)) nil t)) (goto-char (point-min)) (while (search-forward "%qotd%" nil t) (save-restriction (narrow-to-region (match-beginning 0) (match-end 0)) (delete-region (point-min) (point-max)) (when qotd (muse-insert-markup qotd)))) (goto-char (point-min)) (while (search-forward "%text%" nil t) (remove-text-properties (match-beginning 0) (match-end 0) '(read-only nil rear-nonsticky nil)) (replace-match text nil t)) (when (null qotd) (goto-char (point-min)) (when (search-forward "
    " nil t) (let ((beg (match-beginning 0))) (re-search-forward "
    \n*" nil t) (delete-region beg (point)))))))))) ;; indicate that we are to continue the :before-end processing nil) (defun muse-journal-latex-munge-buffer () (goto-char (point-min)) (let ((heading-regexp (concat "^" (regexp-quote (muse-markup-text 'section)) muse-journal-heading-regexp (regexp-quote (muse-markup-text 'section-end)) "$")) (inhibit-read-only t)) (when (re-search-forward heading-regexp nil t) (goto-char (match-beginning 0)) (sort-subr nil (function (lambda () (if (re-search-forward heading-regexp nil t) (goto-char (match-beginning 0)) (goto-char (point-max))))) (function (lambda () (if (re-search-forward heading-regexp nil t) (goto-char (1- (match-beginning 0))) (goto-char (point-max))))) (function (lambda () (forward-char 2))) (function (lambda () (end-of-line))))) (while (re-search-forward heading-regexp nil t) (let ((date (match-string 1)) (title (match-string 2)) ;; FIXME: Nothing is done with qotd qotd section) (save-match-data (when (and date (string-match (concat "\\([1-9][0-9][0-9][0-9]\\)[./]?" "\\([0-1][0-9]\\)[./]?\\([0-3][0-9]\\)") date)) (setq date (encode-time 0 0 0 (string-to-number (match-string 3 date)) (string-to-number (match-string 2 date)) (string-to-number (match-string 1 date)) nil) date (format-time-string muse-journal-date-format date)))) (save-restriction (narrow-to-region (match-beginning 0) (match-end 0)) (delete-region (point-min) (point-max)) (muse-insert-markup muse-journal-latex-section) (goto-char (point-min)) (while (search-forward "%title%" nil t) (replace-match (or title "Untitled") nil t)) (goto-char (point-min)) (while (search-forward "%date%" nil t) (replace-match (or date "") nil t)))))) (goto-char (point-min)) (let ((subheading-regexp (concat "^" (regexp-quote (muse-markup-text 'subsection)) "\\([^\n}]+\\)" (regexp-quote (muse-markup-text 'subsection-end)) "$")) (inhibit-read-only t)) (while (re-search-forward subheading-regexp nil t) (let ((title (match-string 1))) (save-restriction (narrow-to-region (match-beginning 0) (match-end 0)) (delete-region (point-min) (point-max)) (muse-insert-markup muse-journal-latex-subsection) (goto-char (point-min)) (while (search-forward "%title%" nil t) (replace-match title nil t)))))) ;; indicate that we are to continue the :before-end processing nil) (defun muse-journal-rss-munge-buffer () (goto-char (point-min)) (let ((heading-regexp muse-journal-rss-heading-regexp) (inhibit-read-only t)) (while (re-search-forward heading-regexp nil t) (let* ((date (match-string 1)) (orig-date date) (title (match-string 2)) ;; FIXME: Nothing is done with qotd enclosure qotd desc) (if title (save-match-data (if (string-match muse-explicit-link-regexp title) (setq enclosure (muse-get-link title) title (muse-get-link-desc title))))) (save-match-data (when (and date (string-match (concat "\\([1-9][0-9][0-9][0-9]\\)[./]?" "\\([0-1][0-9]\\)[./]?\\([0-3][0-9]\\)") date)) (setq date (encode-time 0 0 0 (string-to-number (match-string 3 date)) (string-to-number (match-string 2 date)) (string-to-number (match-string 1 date)) nil) ;; make sure that date is in a format that RSS ;; readers can handle date (let ((system-time-locale "C")) (format-time-string (muse-style-element :date-format) date))))) (save-restriction (narrow-to-region (match-beginning 0) (if (re-search-forward heading-regexp nil t) (match-beginning 0) (if (re-search-forward "^Footnotes:" nil t) (match-beginning 0) (point-max)))) (goto-char (point-min)) (delete-region (point) (muse-line-end-position)) (re-search-forward "\n+" nil t) (while (and (char-after) (eq ?\ (char-syntax (char-after)))) (delete-char 1)) (let ((beg (point))) (if (muse-style-element :summarize) (progn (forward-sentence 2) (setq desc (concat (buffer-substring beg (point)) "..."))) (save-restriction (muse-publish-markup-buffer "rss-entry" "journal-rss-entry") (goto-char (point-min)) (if (re-search-forward "Page published by Emacs Muse" nil t) (goto-char (muse-line-end-position)) (muse-display-warning (concat "Cannot find 'Page published by Emacs Muse begins here'.\n" "You will probably need this text in your header.")) (goto-char (point-min))) (setq beg (point)) (if (re-search-forward "Page published by Emacs Muse" nil t) (goto-char (muse-line-beginning-position)) (muse-display-warning (concat "Cannot find 'Page published by Emacs Muse ends here'.\n" "You will probably need this text in your footer.")) (goto-char (point-max))) (setq desc (buffer-substring beg (point)))))) (unless (string= desc "") (setq desc (concat ""))) (delete-region (point-min) (point-max)) (let ((entry (muse-style-element :entry-template))) (muse-insert-file-or-string entry) (goto-char (point-min)) (while (search-forward "%date%" nil t) (replace-match (or date "") nil t)) (goto-char (point-min)) (while (search-forward "%title%" nil t) (replace-match "") (save-restriction (narrow-to-region (point) (point)) (insert (or title "Untitled")) (remove-text-properties (match-beginning 0) (match-end 0) '(read-only nil rear-nonsticky nil)) (let ((muse-publishing-current-style (muse-style "html"))) (muse-publish-escape-specials (point-min) (point-max) nil 'document)))) (goto-char (point-min)) (while (search-forward "%desc%" nil t) (replace-match desc nil t)) (goto-char (point-min)) (while (search-forward "%enclosure%" nil t) (replace-match (if (null enclosure) "" (save-match-data (format "" (if (string-match "//" enclosure) enclosure (concat (muse-style-element :base-url) enclosure)) (let ((file (expand-file-name enclosure (muse-style-element :path)))) (if (file-readable-p file) (format "length=\"%d\" " (nth 7 (file-attributes file))) "")) (if (string-match "\\.\\([^.]+\\)$" enclosure) (let* ((ext (match-string 1 enclosure)) (type (assoc ext muse-journal-rss-enclosure-types-alist))) (if type (cdr type) "application/octet-stream")))))) nil t)) (goto-char (point-min)) (while (search-forward "%link%" nil t) (replace-match (concat (muse-style-element :base-url) (concat (muse-page-name) muse-html-extension)) nil t)) (goto-char (point-min)) (while (search-forward "%anchor%" nil t) (replace-match (muse-journal-anchorize-title (or title orig-date)) nil t)) (goto-char (point-min)) (while (search-forward "%maintainer%" nil t) (replace-match (or (muse-style-element :maintainer) (concat "webmaster@" (system-name))) nil t))))))) ;; indicate that we are to continue the :before-end processing nil) ;;; Register the Muse Journal Publishers (muse-derive-style "journal-html" "html" :before-end 'muse-journal-html-munge-buffer) (muse-derive-style "journal-xhtml" "xhtml" :before-end 'muse-journal-html-munge-buffer) (muse-derive-style "journal-latex" "latex" :tags 'muse-journal-markup-tags :before-end 'muse-journal-latex-munge-buffer) (muse-derive-style "journal-pdf" "pdf" :tags 'muse-journal-markup-tags :before-end 'muse-journal-latex-munge-buffer) (muse-derive-style "journal-book-latex" "book-latex" ;;:nochapters :tags 'muse-journal-markup-tags :before-end 'muse-journal-latex-munge-buffer) (muse-derive-style "journal-book-pdf" "book-pdf" ;;:nochapters :tags 'muse-journal-markup-tags :before-end 'muse-journal-latex-munge-buffer) (muse-define-style "journal-rdf" :suffix 'muse-journal-rdf-extension :regexps 'muse-journal-rss-markup-regexps :functions 'muse-journal-rss-markup-functions :before 'muse-journal-rss-munge-buffer :header 'muse-journal-rdf-header :footer 'muse-journal-rdf-footer :date-format 'muse-journal-rdf-date-format :entry-template 'muse-journal-rdf-entry-template :base-url 'muse-journal-rdf-base-url :summarize 'muse-journal-rdf-summarize-entries) (muse-define-style "journal-rss" :suffix 'muse-journal-rss-extension :regexps 'muse-journal-rss-markup-regexps :functions 'muse-journal-rss-markup-functions :before 'muse-journal-rss-munge-buffer :header 'muse-journal-rss-header :footer 'muse-journal-rss-footer :date-format 'muse-journal-rss-date-format :entry-template 'muse-journal-rss-entry-template :base-url 'muse-journal-rss-base-url :summarize 'muse-journal-rss-summarize-entries) ;; Used by `muse-journal-rss-munge-buffer' to mark up individual entries (muse-derive-style "journal-rss-entry" "html" :tags 'muse-journal-markup-tags) (provide 'muse-journal) ;;; muse-journal.el ends here muse-el-3.20+dfsg/lisp/muse-colors.el0000644000175000017500000012257211331353120017002 0ustar taffittaffit;;; muse-colors.el --- coloring and highlighting used by Muse ;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 ;; Free Software Foundation, Inc. ;; Author: John Wiegley (johnw AT gnu DOT org) ;; Keywords: hypermedia ;; Date: Thu 11-Mar-2004 ;; This file is part of Emacs Muse. It is not part of GNU Emacs. ;; Emacs Muse 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 3, or (at your ;; option) any later version. ;; Emacs Muse 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 Emacs Muse; see the file COPYING. If not, write to the ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;;; Contributors: ;; Lan Yufeng (nlany DOT web AT gmail DOT com) found an error where ;; headings were being given the wrong face, contributing a patch to ;; fix this. ;; Sergey Vlasov (vsu AT altlinux DOT ru) fixed an issue with coloring ;; links that are in consecutive lines. ;; Jim Ottaway ported the tag from emacs-wiki. ;; Per B. Sederberg (per AT med DOT upenn DOT edu) contributed the ;; viewing of inline images. ;;; Code: ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; Emacs Muse Highlighting ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (require 'muse-mode) (require 'muse-regexps) (require 'font-lock) (defgroup muse-colors nil "Options controlling the behavior of Emacs Muse highlighting. See `muse-colors-buffer' for more information." :group 'muse-mode) (defcustom muse-colors-autogen-headings t "Specify whether the heading faces should be auto-generated. The default is to scale them. Choosing 'outline will copy the colors from the outline-mode headings. If you want to customize each of the headings individually, set this to nil." :type '(choice (const :tag "Default (scaled) headings" t) (const :tag "Use outline-mode headings" outline) (const :tag "Don't touch the headings" nil)) :group 'muse-colors) (defcustom muse-colors-evaluate-lisp-tags t "Specify whether to evaluate the contents of tags at display time. If nil, don't evaluate them. If non-nil, evaluate them. The actual contents of the buffer are not changed, only the displayed text." :type 'boolean :group 'muse-colors) (defcustom muse-colors-inline-images t "Specify whether to inline images inside the Emacs buffer. If nil, don't inline them. If non-nil, an image link will be replaced by the image. The actual contents of the buffer are not changed, only whether an image is displayed." :type 'boolean :group 'muse-colors) (defcustom muse-colors-inline-image-method 'default-directory "Determine how to locate inline images. Setting this to 'default-directory uses the current directory of the current Muse buffer. Setting this to a function calls that function with the filename of the image to be inlined. The value that is returned will be used as the filename of the image." :type '(choice (const :tag "Current directory" default-directory) (const :tag "Publishing directory" muse-colors-use-publishing-directory) (function :tag "Custom function")) :group 'muse-colors) (defvar muse-colors-region-end nil "Indicate the end of the region that is currently being font-locked.") (make-variable-buffer-local 'muse-colors-region-end) ;;;###autoload (defun muse-colors-toggle-inline-images () "Toggle display of inlined images on/off." (interactive) ;; toggle the custom setting (if (not muse-colors-inline-images) (setq muse-colors-inline-images t) (setq muse-colors-inline-images nil)) ;; reprocess the buffer (muse-colors-buffer) ;; display informative message (if muse-colors-inline-images (message "Images are now displayed inline") (message "Images are now displayed as links"))) (defvar muse-colors-outline-faces-list (if (facep 'outline-1) '(outline-1 outline-2 outline-3 outline-4 outline-5) ;; these are equivalent in coloring to the outline faces '(font-lock-function-name-face font-lock-variable-name-face font-lock-keyword-face font-lock-builtin-face font-lock-comment-face)) "Outline faces to use when assigning Muse header faces.") (defun muse-make-faces-default (&optional later) "Generate the default face definitions for headers." (dolist (num '(1 2 3 4 5)) (let ((newsym (intern (concat "muse-header-" (int-to-string num)))) (docstring (concat "Muse header face. See " "`muse-colors-autogen-headings' before changing it."))) ;; put in the proper group and give documentation (if later (unless (featurep 'xemacs) (muse-copy-face 'variable-pitch newsym) (set-face-attribute newsym nil :height (1+ (* 0.1 (- 5 num))) :weight 'bold)) (if (featurep 'xemacs) (eval `(defface ,newsym '((t (:size ,(nth (1- num) '("24pt" "18pt" "14pt" "12pt" "11pt")) :bold t))) ,docstring :group 'muse-colors)) (eval `(defface ,newsym '((t (:height ,(1+ (* 0.1 (- 5 num))) :inherit variable-pitch :weight bold))) ,docstring :group 'muse-colors))))))) (progn (muse-make-faces-default)) (defun muse-make-faces (&optional frame) "Generate face definitions for headers based the user's preferences." (cond ((not muse-colors-autogen-headings) nil) ((eq muse-colors-autogen-headings t) (muse-make-faces-default t)) (t (dolist (num '(1 2 3 4 5)) (let ((newsym (intern (concat "muse-header-" (int-to-string num))))) ;; copy the desired face definition (muse-copy-face (nth (1- num) muse-colors-outline-faces-list) newsym)))))) ;; after displaying the Emacs splash screen, the faces are wiped out, ;; so recover from that (add-hook 'window-setup-hook #'muse-make-faces) ;; ditto for when a new frame is created (when (boundp 'after-make-frame-functions) (add-hook 'after-make-frame-functions #'muse-make-faces)) (defface muse-link '((((class color) (background light)) (:foreground "blue" :underline "blue" :bold t)) (((class color) (background dark)) (:foreground "cyan" :underline "cyan" :bold t)) (t (:bold t))) "Face for Muse cross-references." :group 'muse-colors) (defface muse-bad-link '((((class color) (background light)) (:foreground "red" :underline "red" :bold t)) (((class color) (background dark)) (:foreground "coral" :underline "coral" :bold t)) (t (:bold t))) "Face for bad Muse cross-references." :group 'muse-colors) (defface muse-verbatim '((((class color) (background light)) (:foreground "slate gray")) (((class color) (background dark)) (:foreground "gray"))) "Face for verbatim text." :group 'muse-colors) (defface muse-emphasis-1 '((t (:italic t))) "Face for italic emphasized text." :group 'muse-colors) (defface muse-emphasis-2 '((t (:bold t))) "Face for bold emphasized text." :group 'muse-colors) (defface muse-emphasis-3 '((t (:bold t :italic t))) "Face for bold italic emphasized text." :group 'muse-colors) (muse-copy-face 'italic 'muse-emphasis-1) (muse-copy-face 'bold 'muse-emphasis-2) (muse-copy-face 'bold-italic 'muse-emphasis-3) (defcustom muse-colors-buffer-hook nil "A hook run after a region is highlighted. Each function receives three arguments: BEG END VERBOSE. BEG and END mark the range being highlighted, and VERBOSE specifies whether progress messages should be displayed to the user." :type 'hook :group 'muse-colors) (defvar muse-colors-highlighting-registry nil "The rules for highlighting Muse and Muse-derived buffers. This is automatically generated when using font-lock in Muse buffers. This an alist of major-mode symbols to `muse-colors-rule' objects.") (defun muse-colors-make-highlighting-struct () (list nil nil nil)) (defconst muse-colors-highlighting.regexp 0 "Regexp matching each car of the markup of the current rule.") (defconst muse-colors-highlighting.vector 1 "Vector of all characters that are part of the markup of the current rule. This is composed of the 2nd element of each markup entry.") (defconst muse-colors-highlighting.remaining 2 "Expressions for highlighting a buffer which have no corresponding entry in the vector.") (defsubst muse-colors-highlighting-entry (mode) "Return the highlighting rules for MODE." (assq mode muse-colors-highlighting-registry)) (defun muse-colors-find-highlighting (mode) "Return the highlighting rules to be used for MODE. If MODE does not have highlighting rules, check its parent modes." (let ((seen nil)) (catch 'rules (while (and mode (not (memq mode seen))) (let ((entry (muse-colors-highlighting-entry mode))) (when entry (throw 'rules (cdr entry)))) (setq seen (cons mode seen)) (setq mode (get mode 'derived-mode-parent))) nil))) (defun muse-colors-define-highlighting (mode markup) "Create or update the markup rules for MODE, using MARKUP. See `muse-colors-markup' for an explanation of the format that MARKUP should take." (unless (and (symbolp mode) mode (consp markup)) (error "Invalid arguments")) (let* ((highlighting-entry (muse-colors-highlighting-entry mode)) (struct (cdr highlighting-entry)) (regexp nil) (vector nil) (remaining nil)) ;; Initialize struct (if struct (setq vector (nth muse-colors-highlighting.vector struct)) (setq struct (muse-colors-make-highlighting-struct))) ;; Initialize vector (if vector (let ((i 0)) (while (< i 128) (aset vector i nil) (setq i (1+ i)))) (setq vector (make-vector 128 nil))) ;; Determine vector, regexp, remaining (let ((regexps nil) (rules nil)) (dolist (rule markup) (let ((value (cond ((symbolp (car rule)) (symbol-value (car rule))) ((stringp (car rule)) (car rule)) (t nil)))) (when value (setq rules (cons rule rules)) (setq regexps (cons value regexps))))) (setq regexps (nreverse regexps)) (setq regexp (concat "\\(" (mapconcat #'identity regexps "\\|") "\\)")) (dolist (rule rules) (if (eq (nth 1 rule) t) (setq remaining (cons (cons (nth 0 rule) (nth 2 rule)) remaining)) (aset vector (nth 1 rule) (cons (cons (nth 0 rule) (nth 2 rule)) (aref vector (nth 1 rule))))))) ;; Update the struct (setcar (nthcdr muse-colors-highlighting.regexp struct) regexp) (setcar (nthcdr muse-colors-highlighting.vector struct) vector) (setcar (nthcdr muse-colors-highlighting.remaining struct) remaining) ;; Update entry for mode in muse-colors-highlighting-registry (if highlighting-entry (setcdr highlighting-entry struct) (setq muse-colors-highlighting-registry (cons (cons mode struct) muse-colors-highlighting-registry))))) (defun muse-configure-highlighting (sym val) "Extract color markup information from VAL and set to SYM. This is usually called with `muse-colors-markup' as both arguments." (muse-colors-define-highlighting 'muse-mode val) (set sym val)) (defun muse-colors-emphasized () "Color emphasized text and headings." ;; Here we need to check four different points - the start and end ;; of the leading *s, and the start and end of the trailing *s. We ;; allow the outsides to be surrounded by whitespace or punctuation, ;; but no word characters, and the insides must not be surrounded by ;; whitespace or punctuation. Thus the following are valid: ;; ;; " *foo bar* " ;; "**foo**," ;; and the following is invalid: ;; "** testing **" (let* ((beg (match-beginning 0)) (e1 (match-end 0)) (leader (- e1 beg)) b2 e2 multiline) (unless (or (eq (get-text-property beg 'invisible) 'muse) (get-text-property beg 'muse-comment) (get-text-property beg 'muse-directive)) ;; check if it's a header (if (eq (char-after e1) ?\ ) (when (or (= beg (point-min)) (eq (char-before beg) ?\n)) (add-text-properties (muse-line-beginning-position) (muse-line-end-position) (list 'face (intern (concat "muse-header-" (int-to-string leader)))))) ;; beginning of line or space or symbol (when (or (= beg (point-min)) (eq (char-syntax (char-before beg)) ?\ ) (memq (char-before beg) '(?\- ?\[ ?\< ?\( ?\' ?\` ?\" ?\n))) (save-excursion (skip-chars-forward "^*<>\n" muse-colors-region-end) (when (eq (char-after) ?\n) (setq multiline t) (skip-chars-forward "^*<>" muse-colors-region-end)) (setq b2 (point)) (skip-chars-forward "*" muse-colors-region-end) (setq e2 (point)) ;; Abort if space exists just before end ;; or bad leader ;; or no '*' at end ;; or word constituent follows (unless (or (> leader 5) (not (eq leader (- e2 b2))) (eq (char-syntax (char-before b2)) ?\ ) (not (eq (char-after b2) ?*)) (and (not (eobp)) (eq (char-syntax (char-after (1+ b2))) ?w))) (add-text-properties beg e1 '(invisible muse)) (add-text-properties e1 b2 (list 'face (cond ((= leader 1) 'muse-emphasis-1) ((= leader 2) 'muse-emphasis-2) ((= leader 3) 'muse-emphasis-3)))) (add-text-properties b2 e2 '(invisible muse)) (when multiline (add-text-properties beg e2 '(font-lock-multiline t)))))))))) (defun muse-colors-underlined () "Color underlined text." (let ((start (match-beginning 0)) multiline) (unless (or (eq (get-text-property start 'invisible) 'muse) (get-text-property start 'muse-comment) (get-text-property start 'muse-directive)) ;; beginning of line or space or symbol (when (or (= start (point-min)) (eq (char-syntax (char-before start)) ?\ ) (memq (char-before start) '(?\- ?\[ ?\< ?\( ?\' ?\` ?\" ?\n))) (save-excursion (skip-chars-forward "^_<>\n" muse-colors-region-end) (when (eq (char-after) ?\n) (setq multiline t) (skip-chars-forward "^_<>" muse-colors-region-end)) ;; Abort if space exists just before end ;; or no '_' at end ;; or word constituent follows (unless (or (eq (char-syntax (char-before (point))) ?\ ) (not (eq (char-after (point)) ?_)) (and (not (eobp)) (eq (char-syntax (char-after (1+ (point)))) ?w))) (add-text-properties start (1+ start) '(invisible muse)) (add-text-properties (1+ start) (point) '(face underline)) (add-text-properties (point) (min (1+ (point)) (point-max)) '(invisible muse)) (when multiline (add-text-properties start (min (1+ (point)) (point-max)) '(font-lock-multiline t))))))))) (defun muse-colors-verbatim () "Render in teletype and suppress further parsing." (let ((start (match-beginning 0)) multiline) (unless (or (eq (get-text-property start 'invisible) 'muse) (get-text-property start 'muse-comment) (get-text-property start 'muse-directive)) ;; beginning of line or space or symbol (when (or (= start (point-min)) (eq (char-syntax (char-before start)) ?\ ) (memq (char-before start) '(?\- ?\[ ?\< ?\( ?\' ?\` ?\" ?\n))) (let ((pos (point))) (skip-chars-forward "^=\n" muse-colors-region-end) (when (eq (char-after) ?\n) (setq multiline t) (skip-chars-forward "^=" muse-colors-region-end)) ;; Abort if space exists just before end ;; or no '=' at end ;; or word constituent follows (unless (or (eq (char-syntax (char-before (point))) ?\ ) (not (eq (char-after (point)) ?=)) (and (not (eobp)) (eq (char-syntax (char-after (1+ (point)))) ?w))) (setq pos (min (1+ (point)) (point-max))) (add-text-properties start (1+ start) '(invisible muse)) (add-text-properties (1+ start) (point) '(face muse-verbatim)) (add-text-properties (point) (min (1+ (point)) (point-max)) '(invisible muse)) (when multiline (add-text-properties start (min (1+ (point)) (point-max)) '(font-lock-multiline t)))) (goto-char pos)))))) (defcustom muse-colors-markup `(;; make emphasized text appear emphasized ("\\*\\{1,5\\}" ?* muse-colors-emphasized) ;; make underlined text appear underlined (,(concat "_[^" muse-regexp-blank "_\n]") ?_ muse-colors-underlined) ("^#title " ?\# muse-colors-title) (muse-explicit-link-regexp ?\[ muse-colors-explicit-link) ;; render in teletype and suppress further parsing (,(concat "=[^" muse-regexp-blank "=\n]") ?= muse-colors-verbatim) ;; highlight any markup tags encountered (muse-tag-regexp ?\< muse-colors-custom-tags) ;; display comments (,(concat "^;[" muse-regexp-blank "]") ?\; muse-colors-comment) ;; this has to come later since it doesn't have a special ;; character in the second cell (muse-url-regexp t muse-colors-implicit-link) ) "Expressions to highlight an Emacs Muse buffer. These are arranged in a rather special fashion, so as to be as quick as possible. Each element of the list is itself a list, of the form: (LOCATE-REGEXP TEST-CHAR MATCH-FUNCTION) LOCATE-REGEXP is a partial regexp, and should be the smallest possible regexp to differentiate this rule from other rules. It may also be a symbol containing such a regexp. The buffer region is scanned only once, and LOCATE-REGEXP indicates where the scanner should stop to look for highlighting possibilities. TEST-CHAR is a char or t. The character should match the beginning text matched by LOCATE-REGEXP. These chars are used to build a vector for fast MATCH-FUNCTION calling. MATCH-FUNCTION is the function called when a region has been identified. It is responsible for adding the appropriate text properties to change the appearance of the buffer. This markup is used to modify the appearance of the original text to make it look more like the published HTML would look (like making some markup text invisible, inlining images, etc). font-lock is used to apply the markup rules, so that they can happen on a deferred basis. They are not always accurate, but you can use \\[font-lock-fontifty-block] near the point of error to force fontification in that area." :type '(repeat (list :tag "Highlight rule" (choice (regexp :tag "Locate regexp") (symbol :tag "Regexp symbol")) (choice (character :tag "Confirm character") (const :tag "Default rule" t)) function)) :set 'muse-configure-highlighting :group 'muse-colors) ;; XEmacs users don't have `font-lock-multiline'. (unless (boundp 'font-lock-multiline) (defvar font-lock-multiline nil)) (defun muse-use-font-lock () "Set up font-locking for Muse." (muse-add-to-invisibility-spec 'muse) (set (make-local-variable 'font-lock-multiline) 'undecided) (set (make-local-variable 'font-lock-defaults) `(nil t nil nil beginning-of-line (font-lock-fontify-region-function . muse-colors-region) (font-lock-unfontify-region-function . muse-unhighlight-region))) (set (make-local-variable 'font-lock-fontify-region-function) 'muse-colors-region) (set (make-local-variable 'font-lock-unfontify-region-function) 'muse-unhighlight-region) (muse-make-faces) (muse-colors-define-highlighting 'muse-mode muse-colors-markup) (font-lock-mode t)) (defun muse-colors-buffer () "Re-highlight the entire Muse buffer." (interactive) (muse-colors-region (point-min) (point-max) t)) (defvar muse-colors-fontifying-p nil "Indicate whether Muse is fontifying the current buffer.") (make-variable-buffer-local 'muse-colors-fontifying-p) (defvar muse-colors-delayed-commands nil "Commands to be run immediately after highlighting a region. This is meant to accommodate highlighting in #title directives after everything else. It may be modified by Muse functions during highlighting, but not the user.") (make-variable-buffer-local 'muse-colors-delayed-commands) (defun muse-colors-region (beg end &optional verbose) "Apply highlighting according to `muse-colors-markup'. Note that this function should NOT change the buffer, nor should any of the functions listed in `muse-colors-markup'." (let ((buffer-undo-list t) (inhibit-read-only t) (inhibit-point-motion-hooks t) (inhibit-modification-hooks t) (modified-p (buffer-modified-p)) (muse-colors-fontifying-p t) (muse-colors-region-end (muse-line-end-position end)) (muse-colors-delayed-commands nil) (highlighting (muse-colors-find-highlighting major-mode)) regexp vector remaining deactivate-mark) (unless highlighting (error "No highlighting found for this mode")) (setq regexp (nth muse-colors-highlighting.regexp highlighting) vector (nth muse-colors-highlighting.vector highlighting) remaining (nth muse-colors-highlighting.remaining highlighting)) (unwind-protect (save-excursion (save-restriction (widen) ;; check to see if we should expand the beg/end area for ;; proper multiline matches (when (and font-lock-multiline (> beg (point-min)) (get-text-property (1- beg) 'font-lock-multiline)) ;; We are just after or in a multiline match. (setq beg (or (previous-single-property-change beg 'font-lock-multiline) (point-min))) (goto-char beg) (setq beg (muse-line-beginning-position))) (when font-lock-multiline (setq end (or (text-property-any end (point-max) 'font-lock-multiline nil) (point-max)))) (goto-char end) (setq end (muse-line-beginning-position 2)) ;; Undo any fontification in the area. (font-lock-unfontify-region beg end) ;; And apply fontification based on `muse-colors-markup' (let ((len (float (- end beg))) (case-fold-search nil) markup-list) (goto-char beg) (while (and (< (point) end) (re-search-forward regexp end t)) (if verbose (message "Highlighting buffer...%d%%" (* (/ (float (- (point) beg)) len) 100))) (let ((ch (char-after (match-beginning 0)))) (when (< ch 128) (setq markup-list (aref vector ch)))) (unless markup-list (setq markup-list remaining)) (let ((prev (point))) ;; backtrack and figure out which rule matched (goto-char (match-beginning 0)) (catch 'done (dolist (entry markup-list) (let ((value (cond ((symbolp (car entry)) (symbol-value (car entry))) ((stringp (car entry)) (car entry)) (t nil)))) (when (and (stringp value) (looking-at value)) (goto-char (match-end 0)) (when (cdr entry) (funcall (cdr entry))) (throw 'done t)))) ;; if no rule matched, which should never happen, ;; return to previous position so that forward ;; progress is ensured (goto-char prev)))) (dolist (command muse-colors-delayed-commands) (apply (car command) (cdr command))) (run-hook-with-args 'muse-colors-buffer-hook beg end verbose) (if verbose (message "Highlighting buffer...done"))))) (set-buffer-modified-p modified-p)))) (defcustom muse-colors-tags '(("example" t nil nil muse-colors-example-tag) ("code" t nil nil muse-colors-example-tag) ("verbatim" t nil nil muse-colors-literal-tag) ("lisp" t t nil muse-colors-lisp-tag) ("literal" t nil nil muse-colors-literal-tag)) "A list of tag specifications for specially highlighting text. XML-style tags are the best way to add custom highlighting to Muse. This is easily accomplished by customizing this list of markup tags. For each entry, the name of the tag is given, whether it expects a closing tag and/or an optional set of attributes, whether it is nestable, and a function that performs whatever action is desired within the delimited region. The function is called with three arguments, the beginning and end of the region surrounded by the tags. If properties are allowed, they are passed as a third argument in the form of an alist. The `end' argument to the function is the last character of the enclosed tag or region. Functions should not modify the contents of the buffer." :type '(repeat (list (string :tag "Markup tag") (boolean :tag "Expect closing tag" :value t) (boolean :tag "Parse attributes" :value nil) (boolean :tag "Nestable" :value nil) function)) :group 'muse-colors) (defvar muse-colors-inhibit-tags-in-directives t "If non-nil, don't allow tags to be interpreted in directives. This is used to delay highlighting of tags in #title until later.") (make-variable-buffer-local 'muse-colors-inhibit-tags-in-directives) (defsubst muse-colors-tag-info (tagname &rest args) "Get tag info associated with TAGNAME, ignoring ARGS." (assoc tagname muse-colors-tags)) (defun muse-colors-custom-tags () "Highlight `muse-colors-tags'." (let ((tag-info (muse-colors-tag-info (match-string 1)))) (unless (or (not tag-info) (get-text-property (match-beginning 0) 'muse-comment) (and muse-colors-inhibit-tags-in-directives (get-text-property (match-beginning 0) 'muse-directive))) (let ((closed-tag (match-string 3)) (start (match-beginning 0)) end attrs) (when (nth 2 tag-info) (let ((attrstr (match-string 2))) (while (and attrstr (string-match (concat "\\([^" muse-regexp-blank "=\n]+\\)\\(=\"" "\\([^\"]+\\)\"\\)?") attrstr)) (let ((attr (cons (downcase (muse-match-string-no-properties 1 attrstr)) (muse-match-string-no-properties 3 attrstr)))) (setq attrstr (replace-match "" t t attrstr)) (if attrs (nconc attrs (list attr)) (setq attrs (list attr))))))) (if (and (cadr tag-info) (not closed-tag)) (if (muse-goto-tag-end (car tag-info) (nth 3 tag-info)) (setq end (match-end 0)) (setq tag-info nil))) (when tag-info (let ((args (list start end))) (if (nth 2 tag-info) (nconc args (list attrs))) (apply (nth 4 tag-info) args))))))) (defun muse-unhighlight-region (begin end &optional verbose) "Remove all visual highlights in the buffer (except font-lock)." (let ((buffer-undo-list t) (inhibit-read-only t) (inhibit-point-motion-hooks t) (inhibit-modification-hooks t) (modified-p (buffer-modified-p)) deactivate-mark) (unwind-protect (remove-text-properties begin end '(face nil font-lock-multiline nil end-glyph nil invisible nil intangible nil display nil mouse-face nil keymap nil help-echo nil muse-link nil muse-directive nil muse-comment nil muse-no-implicit-link nil muse-no-flyspell nil)) (set-buffer-modified-p modified-p)))) (defun muse-colors-example-tag (beg end) "Strip properties and colorize with `muse-verbatim'." (muse-unhighlight-region beg end) (let ((multi (save-excursion (goto-char beg) (forward-line 1) (> end (point))))) (add-text-properties beg end `(face muse-verbatim font-lock-multiline ,multi)))) (defun muse-colors-literal-tag (beg end) "Strip properties and mark as literal." (muse-unhighlight-region beg end) (let ((multi (save-excursion (goto-char beg) (forward-line 1) (> end (point))))) (add-text-properties beg end `(font-lock-multiline ,multi)))) (defun muse-colors-lisp-tag (beg end attrs) "Color the region enclosed by a tag." (if (not muse-colors-evaluate-lisp-tags) (muse-colors-literal-tag beg end) (muse-unhighlight-region beg end) (let (beg-lisp end-lisp) (save-match-data (goto-char beg) (setq beg-lisp (and (looking-at "<[^>]+>") (match-end 0))) (goto-char end) (setq end-lisp (and (muse-looking-back "]+>") (match-beginning 0)))) (add-text-properties beg end (list 'font-lock-multiline t 'display (muse-eval-lisp (concat "(progn " (buffer-substring-no-properties beg-lisp end-lisp) ")")) 'intangible t))))) (defvar muse-mode-local-map (let ((map (make-sparse-keymap))) (define-key map [return] 'muse-follow-name-at-point) (define-key map [(control ?m)] 'muse-follow-name-at-point) (define-key map [(shift return)] 'muse-follow-name-at-point-other-window) (if (featurep 'xemacs) (progn (define-key map [(button2)] 'muse-follow-name-at-mouse) (define-key map [(shift button2)] 'muse-follow-name-at-mouse-other-window)) (define-key map [(shift control ?m)] 'muse-follow-name-at-point-other-window) (define-key map [mouse-2] 'muse-follow-name-at-mouse) (define-key map [(shift mouse-2)] 'muse-follow-name-at-mouse-other-window) (unless (eq emacs-major-version 21) (set-keymap-parent map muse-mode-map))) map) "Local keymap used by Muse while on a link.") (defvar muse-keymap-property (if (or (featurep 'xemacs) (>= emacs-major-version 21)) 'keymap 'local-map) "The name of the keymap or local-map property.") (defsubst muse-link-properties (help-str &optional face) "Determine text properties to use for a link." (append (if face (list 'face face 'mouse-face 'highlight 'muse-link t) (list 'invisible 'muse 'intangible t)) (list 'help-echo help-str 'rear-nonsticky t muse-keymap-property muse-mode-local-map))) (defun muse-link-face (link-name &optional explicit) "Return the type of LINK-NAME as a face symbol. For EXPLICIT links, this is either a normal link or a bad-link face. For implicit links, it is either colored normally or ignored." (save-match-data (let ((link (if explicit (muse-handle-explicit-link link-name) (muse-handle-implicit-link link-name)))) (when link (cond ((string-match muse-url-regexp link) 'muse-link) ((muse-file-remote-p link) 'muse-link) ((string-match muse-file-regexp link) (when (string-match "/[^/]+#[^#./]+\\'" link) ;; strip anchor from the end of a path (setq link (substring link 0 (match-beginning 0)))) (if (file-exists-p link) 'muse-link 'muse-bad-link)) ((not (featurep 'muse-project)) 'muse-link) (t (if (string-match "#" link) (setq link (substring link 0 (match-beginning 0)))) (if (or (and (muse-project-of-file) (muse-project-page-file link muse-current-project t)) (file-exists-p link)) 'muse-link 'muse-bad-link))))))) (defun muse-colors-use-publishing-directory (link) "Make LINK relative to the directory where we will publish the current file." (let ((style (car (muse-project-applicable-styles link (cddr (muse-project))))) path) (when (and style (setq path (muse-style-element :path style))) (expand-file-name link path)))) (defun muse-colors-resolve-image-file (link) "Determine if we can create images and see if the link is an image file." (save-match-data (and (or (fboundp 'create-image) (fboundp 'make-glyph)) (not (string-match "\\`[uU][rR][lL]:" link)) (string-match muse-image-regexp link)))) (defun muse-make-file-glyph (filename) "Given a file name, return a newly-created image glyph. This is a hack for supporting inline images in XEmacs." (let ((case-fold-search nil)) ;; Scan filename to determine image type (when (fboundp 'make-glyph) (save-match-data (cond ((string-match "jpe?g" filename) (make-glyph (vector 'jpeg :file filename) 'buffer)) ((string-match "gif" filename) (make-glyph (vector 'gif :file filename) 'buffer)) ((string-match "png" filename) (make-glyph (vector 'png :file filename) 'buffer))))))) (defun muse-colors-insert-image (link beg end invis-props) "Create an image using create-image or make-glyph and insert it in place of an image link defined by BEG and END." (setq link (expand-file-name link)) (let ((image-file (cond ((eq muse-colors-inline-image-method 'default-directory) link) ((functionp muse-colors-inline-image-method) (funcall muse-colors-inline-image-method link)))) glyph) (when (stringp image-file) (if (fboundp 'create-image) ;; use create-image and display property (let ((display-stuff (condition-case nil (create-image image-file) (error nil)))) (when display-stuff (add-text-properties beg end (list 'display display-stuff)))) ;; use make-glyph and invisible property (and (setq glyph (muse-make-file-glyph image-file)) (progn (add-text-properties beg end invis-props) (add-text-properties beg end (list 'end-glyph glyph 'help-echo link)))))))) (defun muse-colors-explicit-link () "Color explicit links." (when (and (eq ?\[ (char-after (match-beginning 0))) (not (get-text-property (match-beginning 0) 'muse-comment)) (not (get-text-property (match-beginning 0) 'muse-directive))) ;; remove flyspell overlays (when (fboundp 'flyspell-unhighlight-at) (let ((cur (match-beginning 0))) (while (> (match-end 0) cur) (flyspell-unhighlight-at cur) (setq cur (1+ cur))))) (let* ((unesc-link (muse-get-link)) (unesc-desc (muse-get-link-desc)) (link (muse-link-unescape unesc-link)) (desc (muse-link-unescape unesc-desc)) (props (muse-link-properties desc (muse-link-face link t))) (invis-props (append props (muse-link-properties desc)))) ;; see if we should try and inline an image (if (and muse-colors-inline-images (or (muse-colors-resolve-image-file link) (and desc (muse-colors-resolve-image-file desc) (setq link desc)))) ;; we found an image, so inline it (muse-colors-insert-image link (match-beginning 0) (match-end 0) invis-props) (if desc (progn ;; we put the normal face properties on the invisible ;; portion too, since emacs sometimes will position ;; the cursor on an intangible character (add-text-properties (match-beginning 0) (match-beginning 2) invis-props) (add-text-properties (match-beginning 2) (match-end 2) props) (add-text-properties (match-end 2) (match-end 0) invis-props) ;; in case specials were escaped, cause the unescaped ;; text to be displayed (unless (string= desc unesc-desc) (add-text-properties (match-beginning 2) (match-end 2) (list 'display desc)))) (add-text-properties (match-beginning 0) (match-beginning 1) invis-props) (add-text-properties (match-beginning 1) (match-end 0) props) (add-text-properties (match-end 1) (match-end 0) invis-props) (unless (string= link unesc-link) (add-text-properties (match-beginning 1) (match-end 1) (list 'display link)))) (goto-char (match-end 0)) (add-text-properties (match-beginning 0) (match-end 0) (muse-link-properties (muse-match-string-no-properties 0) (muse-link-face link t))))))) (defun muse-colors-implicit-link () "Color implicit links." (unless (or (eq (get-text-property (match-beginning 0) 'invisible) 'muse) (get-text-property (match-beginning 0) 'muse-comment) (get-text-property (match-beginning 0) 'muse-directive) (get-text-property (match-beginning 0) 'muse-no-implicit-link) (eq (char-before (match-beginning 0)) ?\") (eq (char-after (match-end 0)) ?\")) ;; remove flyspell overlays (when (fboundp 'flyspell-unhighlight-at) (let ((cur (match-beginning 0))) (while (> (match-end 0) cur) (flyspell-unhighlight-at cur) (setq cur (1+ cur))))) ;; colorize link (let ((link (muse-match-string-no-properties 0)) (face (muse-link-face (match-string 0)))) (when face (add-text-properties (match-beginning 0) (match-end 0) (muse-link-properties (muse-match-string-no-properties 0) face)))))) (defun muse-colors-title () "Color #title directives." (let ((beg (+ 7 (match-beginning 0)))) (add-text-properties beg (muse-line-end-position) '(muse-directive t)) ;; colorize tags in #title after other tags have had a ;; chance to run, so that we can have behavior that is consistent ;; with how the document is published (setq muse-colors-delayed-commands (cons (list 'muse-colors-title-lisp beg (muse-line-end-position)) muse-colors-delayed-commands)))) (defun muse-colors-title-lisp (beg end) "Called after other highlighting is done for a region in order to handle tags that exist in #title directives." (save-restriction (narrow-to-region beg end) (goto-char (point-min)) (let ((muse-colors-inhibit-tags-in-directives nil) (muse-colors-tags '(("lisp" t t nil muse-colors-lisp-tag)))) (while (re-search-forward muse-tag-regexp nil t) (muse-colors-custom-tags)))) (add-text-properties beg end '(face muse-header-1))) (defun muse-colors-comment () "Color comments." (add-text-properties (match-beginning 0) (muse-line-end-position) (list 'face 'font-lock-comment-face 'muse-comment t))) (provide 'muse-colors) ;;; muse-colors.el ends here muse-el-3.20+dfsg/lisp/muse-import-latex.el0000644000175000017500000001271511331353120020123 0ustar taffittaffit;;; muse-import-latex.el --- convert a LaTex file into a Muse file ;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 ;; Free Software Foundation, Inc. ;; This file is part of Emacs Muse. It is not part of GNU Emacs. ;; Emacs Muse 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 3, or (at your ;; option) any later version. ;; Emacs Muse 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 Emacs Muse; see the file COPYING. If not, write to the ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;; Helper commands for converting a LaTeX file into a Muse file. ;;; Contributors: ;;; Code: (require 'muse) (require 'muse-regexps) (defun muse-i-l-write-citation (note author citation pages) (save-excursion (goto-char (point-max)) (if (= note 1) (insert "\nFootnotes:\n\n")) (let ((beg (point))) (insert "\n[" (number-to-string note) "] " author) (if (and citation pages) (insert ", " citation ", " pages)) (insert "\n") (goto-char beg) (while (re-search-forward (concat "p.\\\\[" muse-regexp-blank "\n]+") nil t) (replace-match "p.")) (goto-char beg) (while (re-search-forward "--" nil t) (replace-match "-"))))) (defun muse-i-l-write-footnote (note text) (save-excursion (goto-char (point-max)) (if (= note 1) (insert "\nFootnotes:\n\n")) (insert "\n[" (number-to-string note) "] " text ?\n))) ;;;###autoload (defun muse-import-latex () (interactive) (goto-char (point-min)) (while (not (eobp)) (cond ((or (looking-at "^\\\\documentclass") (looking-at "^\\\\input") (looking-at "^\\\\begin{document}") (looking-at "^\\\\end{document}") (looking-at "^\\\\author") (looking-at "^\\\\\\(med\\|big\\|small\\)skip") (looking-at "^\\\\maketitle")) (delete-region (point) (muse-line-end-position))) ((looking-at "^\\\\title{\\(.+\\)}") (delete-region (match-end 1) (muse-line-end-position)) (delete-region (point) (match-beginning 1)) (insert "#title "))) (forward-line)) (goto-char (point-min)) (while (re-search-forward "\\\\\\(l\\)?dots{}" nil t) (replace-match (concat (and (string= (match-string 1) "l") ".") "..."))) (goto-char (point-min)) (while (re-search-forward "\\(``\\|''\\)" nil t) (replace-match "\"")) (goto-char (point-min)) (while (re-search-forward "---" nil t) (replace-match " -- ")) (goto-char (point-min)) (while (re-search-forward "\\\\tableofcontents" nil t) (replace-match "")) (goto-char (point-min)) (while (re-search-forward "\\\\\\\\" nil t) (replace-match "")) (goto-char (point-min)) (while (re-search-forward "\\\\\\(sub\\)?section{\\([^}]+\\)}" nil t) (replace-match (concat (if (string= (match-string 1) "sub") "**" "*") " " (match-string 2)))) (goto-char (point-min)) (while (re-search-forward "\\\\\\(begin\\|end\\){verse}" nil t) (replace-match (concat "<" (if (string= (match-string 1) "end") "/") "verse>"))) (goto-char (point-min)) (while (re-search-forward "\\\\\\(begin\\|end\\){quote}\n" nil t) (replace-match "")) (goto-char (point-min)) (while (re-search-forward "\\\\\\(emph\\|textbf\\){\\([^}]+?\\)\\(\\\\/\\)?}" nil t) (replace-match (if (string= (match-string 1) "emph") "*\\2*" "**\\2**"))) (let ((footnote-index 1)) (goto-char (point-min)) (while (re-search-forward (concat "\\\\\\(q\\)?\\(footnote\\|excerpt\\)\\(np\\)?" "\\({\\([^}]+\\)}\\)?" "\\({\\([^}]+\\)}{\\([^}]+\\)}\\)?{\\([^}]+\\)}") nil t) (let ((beg (match-beginning 0)) (end (match-end 0))) (unless (string= (match-string 2) "footnote") (if (null (match-string 1)) (insert " " (match-string 9)) (let ((b (point)) e) (insert "\"" (match-string 9) "\"") (setq e (point-marker)) (save-match-data (save-excursion (goto-char b) (while (< (point) e) (if (looking-at "\\s-+") (delete-region (match-beginning 0) (match-end 0))) (forward-line)))) (set-marker e nil)))) (insert "[" (number-to-string footnote-index) "]") (if (string= (match-string 2) "footnote") (muse-i-l-write-footnote footnote-index (match-string 9)) (muse-i-l-write-citation footnote-index (match-string 5) (match-string 7) (match-string 8))) (setq footnote-index (1+ footnote-index)) (delete-region beg end)))) (goto-char (point-min)) (while (looking-at "\n") (delete-char 1)) (goto-char (point-min)) (while (re-search-forward "\n\n+" nil t) (replace-match "\n\n"))) (provide 'muse-import-latex) ;;; muse-import-latex.el ends here muse-el-3.20+dfsg/lisp/muse-project.el0000644000175000017500000012246311331353120017146 0ustar taffittaffit;;; muse-project.el --- handle Muse projects ;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 ;; Free Software Foundation, Inc. ;; This file is part of Emacs Muse. It is not part of GNU Emacs. ;; Emacs Muse 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 3, or (at your ;; option) any later version. ;; Emacs Muse 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 Emacs Muse; see the file COPYING. If not, write to the ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;;; Contributors: ;;; Code: ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; Muse Project Maintainance ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (provide 'muse-project) (require 'muse) (require 'muse-publish) (require 'cus-edit) (defgroup muse-project nil "Options controlling the behavior of Muse project handling." :group 'muse) (defcustom muse-before-project-publish-hook nil "A hook run before a project is published. Each function is passed the project object, a cons with the format (PROJNAME . SETTINGS)" :type 'hook :group 'muse-project) (defcustom muse-after-project-publish-hook nil "A hook run after a project is published. Each function is passed the project object, a cons with the format (PROJNAME . SETTINGS)" :type 'hook :group 'muse-project) (defvar muse-project-alist-using-customize nil "Used internally by Muse to indicate whether `muse-project-alist' has been modified via the customize interface.") (make-variable-buffer-local 'muse-project-alist-using-customize) (defmacro with-muse-project (project &rest body) `(progn (unless (muse-project ,project) (error "Can't find project %s" ,project)) (with-temp-buffer (muse-mode) (setq muse-current-project (muse-project ,project)) (muse-project-set-variables) ,@body))) (put 'with-muse-project 'lisp-indent-function 0) (put 'with-muse-project 'edebug-form-spec '(sexp body)) (defun muse-project-alist-get (sym) "Turn `muse-project-alist' into something we can customize easily." (when (boundp sym) (setq muse-project-alist-using-customize t) (let* ((val (copy-alist (symbol-value sym))) (head val)) (while val (let ((head (car (cdar val))) res) ;; Turn settings of first part into cons cells, symbol->string (while head (cond ((stringp (car head)) (add-to-list 'res (car head) t) (setq head (cdr head))) ((symbolp (car head)) (add-to-list 'res (list (symbol-name (car head)) (cadr head)) t) (setq head (cddr head))) (t (setq head (cdr head))))) (setcdr (car val) (cons res (cdr (cdar val))))) (let ((styles (cdar val))) ;; Symbol->string in every style (while (cdr styles) (let ((head (cadr styles)) res) (while (consp head) (setq res (plist-put res (symbol-name (car head)) (cadr head))) (setq head (cddr head))) (setcdr styles (cons res (cddr styles)))) (setq styles (cdr styles)))) (setq val (cdr val))) head))) (defun muse-project-alist-set (sym val) "Turn customized version of `muse-project-alist' into something Muse can make use of." (set sym val) (when muse-project-alist-using-customize ;; Make sure the unescaped version is written to .emacs (put sym 'saved-value (list (custom-quote val))) ;; Perform unescaping (while val (let ((head (car (cdar val))) res) ;; Turn cons cells into flat list, string->symbol (while head (cond ((stringp (car head)) (add-to-list 'res (car head) t)) ((consp (car head)) (add-to-list 'res (intern (caar head)) t) (add-to-list 'res (car (cdar head)) t))) (setq head (cdr head))) (setcdr (car val) (cons res (cdr (cdar val))))) (let ((styles (cdar val))) ;; String->symbol in every style (while (cdr styles) (let ((head (cadr styles)) res) (while (consp head) (setq res (plist-put res (intern (car head)) (cadr head))) (setq head (cddr head))) (setcdr styles (cons res (cddr styles)))) (setq styles (cdr styles)))) (setq val (cdr val))))) (define-widget 'muse-project 'default "A widget that defines a Muse project." :format "\n%v" :value-create 'muse-widget-type-value-create :value-get 'muse-widget-child-value-get :value-delete 'ignore :match 'muse-widget-type-match :type '(cons :format " %v" (repeat :tag "Settings" :format "%{%t%}:\n%v%i\n\n" (choice (string :tag "Directory") (list :tag "Book function" (const :tag ":book-funcall" ":book-funcall") (choice (function) (sexp :tag "Unknown"))) (list :tag "Book part" (const :tag ":book-part" ":book-part") (string :tag "Name")) (list :tag "Book style" (const :tag ":book-style" ":book-style") (string :tag "Style")) (list :tag "Default file" (const :tag ":default" ":default") (string :tag "File")) (list :tag "End of book" (const :tag ":book-end" ":book-end") (const t)) (list :tag "Force publishing" (const :tag ":force-publish" ":force-publish") (repeat (string :tag "File"))) (list :tag "Major mode" (const :tag ":major-mode" ":major-mode") (choice (function :tag "Mode") (sexp :tag "Unknown"))) (list :tag "New chapter" (const :tag ":book-chapter" ":book-chapter") (string :tag "Name")) (list :tag "No chapters" (const :tag ":nochapters" ":nochapters") (const t)) (list :tag "Project-level publishing function" (const :tag ":publish-project" ":publish-project") (choice (function :tag "Function") (sexp :tag "Unknown"))) (list :tag "Set variables" (const :tag ":set" ":set") (repeat (list :inline t (symbol :tag "Variable") (sexp :tag "Setting")))) (list :tag "Visit links using" (const :tag ":visit-link" ":visit-link") (choice (function) (sexp :tag "Unknown"))))) (repeat :tag "Output styles" :format "%{%t%}:\n%v%i\n\n" (set :tag "Style" (list :inline t :tag "Publishing style" (const :tag ":base" ":base") (string :tag "Style")) (list :inline t :tag "Base URL" (const :tag ":base-url" ":base-url") (string :tag "URL")) (list :inline t :tag "Exclude matching" (const :tag ":exclude" ":exclude") (regexp)) (list :inline t :tag "Include matching" (const :tag ":include" ":include") (regexp)) (list :inline t :tag "Timestamps file" (const :tag ":timestamps" ":timestamps") (file)) (list :inline t :tag "Path" (const :tag ":path" ":path") (string :tag "Path")))))) (defcustom muse-project-alist nil "An alist of Muse projects. A project defines a fileset, and a list of custom attributes for use when publishing files in that project." :type '(choice (const :tag "No projects defined." nil) (repeat (cons :format "%{%t%}:\n\n%v" :tag "Project" :indent 4 (string :tag "Project name") muse-project)) (sexp :tag "Cannot parse expression")) :get 'muse-project-alist-get :set 'muse-project-alist-set :group 'muse-project) ;; Make it easier to specify a muse-project-alist entry (defcustom muse-project-ignore-regexp (concat "\\`\\(#.*#\\|.*,v\\|.*~\\|\\.\\.?\\|\\.#.*\\|,.*\\)\\'\\|" "/\\(CVS\\|RCS\\|\\.arch-ids\\|{arch}\\|,.*\\|\\.svn\\|" "\\.hg\\|\\.git\\|\\.bzr\\|_darcs\\)\\(/\\|\\'\\)") "A regexp matching files to be ignored in Muse directories. You should set `case-fold-search' to nil before using this regexp in code." :type 'regexp :group 'muse-regexp) (defcustom muse-project-publish-private-files t "If this is non-nil, files will be published even if their permissions are set so that no one else on the filesystem can read them. Set this to nil if you would like to indicate that some files should not be published by manually doing \"chmod o-rwx\" on them. This setting has no effect under Windows (that is, all files are published regardless of permissions) because Windows lacks the needed filesystem attributes." :type 'boolean :group 'muse-project) (defun muse-project-recurse-directory (base) "Recusively retrieve all of the directories underneath BASE. A list of these directories is returned. Directories starting with \".\" will be ignored, as well as those which match `muse-project-ignore-regexp'." (let ((case-fold-search nil) list dir) (when (and (file-directory-p base) (not (string-match muse-project-ignore-regexp base))) (dolist (file (directory-files base t "^[^.]")) (when (and (file-directory-p file) (not (string-match muse-project-ignore-regexp file))) (setq dir (file-name-nondirectory file)) (push dir list) (nconc list (mapcar #'(lambda (item) (concat dir "/" item)) (muse-project-recurse-directory file))))) list))) (defun muse-project-alist-styles (entry-dir output-dir style &rest other) "Return a list of styles to use in a `muse-project-alist' entry. ENTRY-DIR is the top-level directory of the project. OUTPUT-DIR is where Muse files are published, keeping directory structure. STYLE is the publishing style to use. OTHER contains other definitions to add to each style. It is optional. For an example of the use of this function, see `examples/mwolson/muse-init.el' from the Muse distribution." (let ((fnd (file-name-nondirectory entry-dir))) (when (string= fnd "") ;; deal with cases like "foo/" that have a trailing slash (setq fnd (file-name-nondirectory (substring entry-dir 0 -1)))) (cons `(:base ,style :path ,(if (muse-file-remote-p output-dir) output-dir (expand-file-name output-dir)) :include ,(concat "/" fnd "/[^/]+$") ,@other) (mapcar (lambda (dir) `(:base ,style :path ,(expand-file-name dir output-dir) :include ,(concat "/" dir "/[^/]+$") ,@other)) (muse-project-recurse-directory entry-dir))))) (defun muse-project-alist-dirs (entry-dir) "Return a list of directories to use in a `muse-project-alist' entry. ENTRY-DIR is the top-level directory of the project. For an example of the use of this function, see `examples/mwolson/muse-init.el' from the Muse distribution." (cons (expand-file-name entry-dir) (mapcar (lambda (dir) (expand-file-name dir entry-dir)) (muse-project-recurse-directory entry-dir)))) ;; Constructing the file-alist (defvar muse-project-file-alist nil "This variable is automagically constructed as needed.") (defvar muse-project-file-alist-hook nil "Functions that are to be exectuted immediately after updating `muse-project-file-alist'.") (defvar muse-current-project nil "Project we are currently visiting.") (make-variable-buffer-local 'muse-current-project) (defvar muse-current-project-global nil "Project we are currently visiting. This is used to propagate the value of `muse-current-project' into a new buffer during publishing.") (defvar muse-current-output-style nil "The output style that we are currently using for publishing files.") (defsubst muse-project (&optional project) "Resolve the given PROJECT into a full Muse project, if it is a string." (if (null project) (or muse-current-project (muse-project-of-file)) (if (stringp project) (assoc project muse-project-alist) (muse-assert (consp project)) project))) (defun muse-project-page-file (page project &optional no-check-p) "Return a filename if PAGE exists within the given Muse PROJECT." (setq project (muse-project project)) (if (null page) ;; if not given a page, return the first directory instead (let ((pats (cadr project))) (catch 'done (while pats (if (symbolp (car pats)) (setq pats (cddr pats)) (throw 'done (file-name-as-directory (car pats))))))) (let ((dir (file-name-directory page)) (expanded-path nil)) (when dir (setq expanded-path (concat (expand-file-name page (file-name-directory (muse-current-file))) (when muse-file-extension (concat "." muse-file-extension)))) (setq page (file-name-nondirectory page))) (let ((files (muse-collect-alist (muse-project-file-alist project no-check-p) page)) (matches nil)) (if dir (catch 'done (save-match-data (dolist (file files) (if (and expanded-path (string= expanded-path (cdr file))) (throw 'done (cdr file)) (let ((pos (string-match (concat (regexp-quote dir) "\\'") (file-name-directory (cdr file))))) (when pos (setq matches (cons (cons pos (cdr file)) matches))))))) ;; if we haven't found an exact match, pick a candidate (car (muse-sort-by-rating matches))) (dolist (file files) (setq matches (cons (cons (length (cdr file)) (cdr file)) matches))) (car (muse-sort-by-rating matches '<))))))) (defun muse-project-private-p (file) "Return non-nil if NAME is a private page with PROJECT." (unless (or muse-under-windows-p muse-project-publish-private-files) (setq file (file-truename file)) (if (file-attributes file) ; don't publish if no attributes exist (or (when (eq ?- (aref (nth 8 (file-attributes (file-name-directory file))) 7)) (message (concat "The " (file-name-directory file) " directory must be readable by others" " in order for its contents to be published."))) (eq ?- (aref (nth 8 (file-attributes file)) 7))) t))) (defun muse-project-file-entries (path) (let* ((names (list t)) (lnames names) (case-fold-search nil)) (cond ((file-directory-p path) (dolist (file (directory-files path t (when (and muse-file-extension (not (string= muse-file-extension ""))) (concat "." muse-file-extension "\\'")))) (unless (or (string-match muse-project-ignore-regexp file) (string-match muse-project-ignore-regexp (file-name-nondirectory file)) (file-directory-p file)) (setcdr lnames (cons (cons (muse-page-name file) file) nil)) (setq lnames (cdr lnames))))) ((file-readable-p path) (setcdr lnames (cons (cons (muse-page-name path) path) nil)) (setq lnames (cdr lnames))) (t ; regexp (muse-assert (file-name-directory path)) (dolist (file (directory-files (file-name-directory path) t (file-name-nondirectory path))) (unless (or (string-match muse-project-ignore-regexp file) (string-match muse-project-ignore-regexp (file-name-nondirectory file))) (setcdr lnames (cons (cons (muse-page-name file) file) nil)) (setq lnames (cdr lnames)))))) (cdr names))) (defvar muse-updating-file-alist-p nil "Make sure that recursive calls to `muse-project-file-alist' are bounded.") (defun muse-project-determine-last-mod (project &optional no-check-p) "Return the most recent last-modified timestamp of dirs in PROJECT." (let ((last-mod nil)) (unless (or muse-under-windows-p no-check-p) (let ((pats (cadr project))) (while pats (if (symbolp (car pats)) (setq pats (cddr pats)) (let* ((fnd (file-name-directory (car pats))) (dir (cond ((file-directory-p (car pats)) (car pats)) ((and (not (file-readable-p (car pats))) fnd (file-directory-p fnd)) fnd)))) (when dir (let ((mod-time (nth 5 (file-attributes dir)))) (when (or (null last-mod) (and mod-time (muse-time-less-p last-mod mod-time))) (setq last-mod mod-time))))) (setq pats (cdr pats)))))) last-mod)) (defun muse-project-file-alist (&optional project no-check-p) "Return member filenames for the given Muse PROJECT. Also, update the `muse-project-file-alist' variable. On UNIX, this alist is only updated if one of the directories' contents have changed. On Windows, it is always reread from disk. If NO-CHECK-P is non-nil, do not update the alist, just return the current one." (setq project (muse-project project)) (when (and project muse-project-alist) (let* ((file-alist (assoc (car project) muse-project-file-alist)) (last-mod (muse-project-determine-last-mod project no-check-p))) ;; Either return the currently known list, or read it again from ;; disk (if (or (and no-check-p (cadr file-alist)) muse-updating-file-alist-p (not (or muse-under-windows-p (null (cddr file-alist)) (null last-mod) (muse-time-less-p (cddr file-alist) last-mod)))) (cadr file-alist) (if file-alist (setcdr (cdr file-alist) last-mod) (setq file-alist (cons (car project) (cons nil last-mod)) muse-project-file-alist (cons file-alist muse-project-file-alist))) ;; Read in all of the file entries (let ((muse-updating-file-alist-p t)) (prog1 (save-match-data (setcar (cdr file-alist) (let* ((names (list t)) (pats (cadr project))) (while pats (if (symbolp (car pats)) (setq pats (cddr pats)) (nconc names (muse-project-file-entries (car pats))) (setq pats (cdr pats)))) (cdr names)))) (run-hooks 'muse-project-file-alist-hook))))))) (defun muse-project-add-to-alist (file &optional project) "Make sure FILE is added to `muse-project-file-alist'. It works by either calling the `muse-project-file-alist' function if a directory has been modified since we last checked, or manually forcing the file entry to exist in the alist. This works around an issue where if several files being saved at the same time, only the first one will make it into the alist. It is meant to be called by `muse-project-after-save-hook'. The project of the file is determined by either the PROJECT argument, or `muse-project-of-file' if PROJECT is not specified." (setq project (or (muse-project project) (muse-project-of-file file))) (when (and project muse-project-alist) (let* ((file-alist (assoc (car project) muse-project-file-alist)) (last-mod (muse-project-determine-last-mod project))) ;; Determine whether we need to call this (if (or (null (cddr file-alist)) (null last-mod) (muse-time-less-p (cddr file-alist) last-mod)) ;; The directory will show up as modified, so go ahead and ;; call `muse-project-file-alist' (muse-project-file-alist project) ;; It is not showing as modified, so forcefully add the ;; current file to the project file-alist (let ((muse-updating-file-alist-p t)) (prog1 (save-match-data (setcar (cdr file-alist) (nconc (muse-project-file-entries file) (cadr file-alist)))) (run-hooks 'muse-project-file-alist-hook))))))) (defun muse-project-of-file (&optional pathname) "Determine which project the given PATHNAME relates to. If PATHNAME is nil, the current buffer's filename is used." (if (and (null pathname) muse-current-project) muse-current-project (unless pathname (setq pathname (muse-current-file))) (save-match-data (when (and (stringp pathname) muse-project-alist (not (string= pathname "")) (not (let ((case-fold-search nil)) (or (string-match muse-project-ignore-regexp pathname) (string-match muse-project-ignore-regexp (file-name-nondirectory pathname)))))) (let* ((file (file-truename pathname)) (dir (file-name-directory file)) found rating matches) (catch 'found (dolist (project-entry muse-project-alist) (let ((pats (cadr project-entry))) (while pats (if (symbolp (car pats)) (setq pats (cddr pats)) (let ((tname (file-truename (car pats)))) (cond ((or (string= tname file) (string= (file-name-as-directory tname) dir)) (throw 'found project-entry)) ((string-match (concat "\\`" (regexp-quote tname)) file) (setq matches (cons (cons (match-end 0) project-entry) matches))))) (setq pats (cdr pats)))))) ;; if we haven't found an exact match, pick a candidate (car (muse-sort-by-rating matches)))))))) (defun muse-project-after-save-hook () "Update Muse's file-alist if we are saving a Muse file." (let ((project (muse-project-of-file))) (when project (muse-project-add-to-alist (buffer-file-name) project)))) (add-hook 'after-save-hook 'muse-project-after-save-hook) (defun muse-read-project (prompt &optional no-check-p no-assume) "Read a project name from the minibuffer, if it can't be figured out." (if (null muse-project-alist) (error "There are no Muse projects defined; see `muse-project-alist'") (or (unless no-check-p (muse-project-of-file)) (if (and (not no-assume) (= 1 (length muse-project-alist))) (car muse-project-alist) (assoc (funcall muse-completing-read-function prompt muse-project-alist) muse-project-alist))))) (defvar muse-project-page-history nil) (defun muse-read-project-file (project prompt &optional default) (let* ((file-list (muse-delete-dups (mapcar #'(lambda (a) (list (car a))) (muse-project-file-alist project)))) (name (funcall muse-completing-read-function prompt file-list nil nil nil 'muse-project-page-history default))) (cons name (muse-project-page-file name project)))) ;;;###autoload (defun muse-project-find-file (name project &optional command directory) "Open the Muse page given by NAME in PROJECT. If COMMAND is non-nil, it is the function used to visit the file. If DIRECTORY is non-nil, it is the directory in which the page will be created if it does not already exist. Otherwise, the first directory within the project's fileset is used." (interactive (let* ((project (muse-read-project "Find in project: " current-prefix-arg)) (default (muse-get-keyword :default (cadr project))) (entry (muse-read-project-file project (if default (format "Find page: (default: %s) " default) "Find page: ") default))) (list entry project))) (setq project (muse-project project)) (let ((project-name (car project))) (unless (interactive-p) (setq project (muse-project project) name (cons name (muse-project-page-file name project)))) ;; If we're given a relative or absolute filename, open it as-is (if (and (car name) (save-match-data (or (string-match "\\`\\.+/" (car name)) (string-match muse-file-regexp (car name)) (string-match muse-image-regexp (car name))))) (setcdr name (car name)) ;; At this point, name is (PAGE . FILE). (unless (cdr name) (let ((pats (cadr project))) (while (and pats (null directory)) (if (symbolp (car pats)) (setq pats (cddr pats)) (if (file-directory-p (car pats)) (setq directory (car pats) pats nil) (setq pats (cdr pats)))))) (when directory (let ((filename (expand-file-name (car name) directory))) (when (and muse-file-extension (not (string= muse-file-extension "")) (not (file-exists-p (car name)))) (setq filename (concat filename "." muse-file-extension))) (unless (file-exists-p directory) (make-directory directory t)) (setcdr name filename))))) ;; Open the file (if (cdr name) (funcall (or command 'find-file) (cdr name)) (error "There is no page %s in project %s" (car name) project-name)))) (defun muse-project-choose-style (closure test styles) "Run TEST on STYLES and return first style where TEST yields non-nil. TEST should take two arguments. The first is CLOSURE, which is passed verbatim. The second if the current style to consider. If no style passes TEST, return the first style." (or (catch 'winner (dolist (style styles) (when (funcall test closure style) (throw 'winner style)))) (car styles))) (defun muse-project-choose-style-by-link-suffix (given-suffix style) "If the given STYLE has a link-suffix that equals GIVEN-SUFFIX, return non-nil." (let ((link-suffix (or (muse-style-element :link-suffix style) (muse-style-element :suffix style)))) (and (stringp link-suffix) (string= given-suffix link-suffix)))) (defun muse-project-applicable-styles (file styles) "Given STYLES, return a list of the ones that are considered for FILE. The name of a project may be used for STYLES." (when (stringp styles) (setq styles (cddr (muse-project styles)))) (when (and file styles) (let ((used-styles nil)) (dolist (style styles) (let ((include-regexp (muse-style-element :include style)) (exclude-regexp (muse-style-element :exclude style)) (rating nil)) (when (and (or (and (null include-regexp) (null exclude-regexp)) (if include-regexp (setq rating (string-match include-regexp file)) (not (string-match exclude-regexp file)))) (file-exists-p file) (not (muse-project-private-p file))) (setq used-styles (cons (cons rating style) used-styles))))) (muse-sort-by-rating (nreverse used-styles))))) (defun muse-project-get-applicable-style (file styles) "Choose a style from the STYLES that FILE can publish to. The user is prompted if several styles are found." (muse-publish-get-style (mapcar (lambda (style) (cons (muse-get-keyword :base style) style)) (muse-project-applicable-styles file styles)))) (defun muse-project-resolve-directory (page local-style remote-style) "Figure out the directory part of the path that provides a link to PAGE. LOCAL-STYLE is the style of the current Muse file, and REMOTE-STYLE is the style associated with PAGE. If REMOTE-STYLE has a :base-url element, concatenate it and PAGE. Otherwise, return a relative link." (let ((prefix (muse-style-element :base-url remote-style))) (if prefix (concat prefix page) (file-relative-name (expand-file-name (file-name-nondirectory page) (muse-style-element :path remote-style)) (expand-file-name (muse-style-element :path local-style)))))) (defun muse-project-resolve-link (page local-style remote-styles) "Return a published link from the output path of one file to another file. The best match for PAGE is determined by comparing the link suffix of the given local style and that of the remote styles. The remote styles are usually populated by `muse-project-applicable-styles'. If no remote style is found, return PAGE verbatim If PAGE has a :base-url associated with it, return the concatenation of the :base-url value and PAGE. Otherwise, return a relative path from the directory of LOCAL-STYLE to the best directory among REMOTE-STYLES." (let ((link-suffix (or (muse-style-element :link-suffix local-style) (muse-style-element :suffix local-style))) remote-style) (if (not (stringp link-suffix)) (setq remote-style (car remote-styles)) (setq remote-style (muse-project-choose-style link-suffix #'muse-project-choose-style-by-link-suffix remote-styles))) (if (null remote-style) page (setq page (muse-project-resolve-directory page local-style remote-style)) (concat (file-name-directory page) (muse-publish-link-name page remote-style))))) (defun muse-project-current-output-style (&optional file project) (or muse-current-output-style (progn (unless file (setq file (muse-current-file))) (unless project (setq project (muse-project-of-file file))) (car (muse-project-applicable-styles file (cddr project)))))) (defun muse-project-link-page (page) (let ((project (muse-project-of-file))) (muse-project-resolve-link page (muse-project-current-output-style) (muse-project-applicable-styles (muse-project-page-file page project) (cddr project))))) (defun muse-project-publish-file-default (file style output-dir force) ;; ensure the publishing location is available (unless (file-exists-p output-dir) (message "Creating publishing directory %s" output-dir) (make-directory output-dir t)) ;; publish the member file! (muse-publish-file file style output-dir force)) (defun muse-project-publish-file (file styles &optional force) (setq styles (muse-project-applicable-styles file styles)) (let (published) (dolist (style styles) (if (or (not (listp style)) (not (cdr style))) (muse-display-warning (concat "Skipping malformed muse-project-alist style." "\nPlease double-check your configuration,")) (let ((output-dir (muse-style-element :path style)) (muse-current-output-style style) (fun (or (muse-style-element :publish style t) 'muse-project-publish-file-default))) (when (funcall fun file style output-dir force) (setq published t))))) published)) ;;;###autoload (defun muse-project-publish-this-file (&optional force style) "Publish the currently-visited file according to `muse-project-alist', prompting if more than one style applies. If FORCE is given, publish the file even if it is up-to-date. If STYLE is given, use that publishing style rather than prompting for one." (interactive (list current-prefix-arg)) (let ((muse-current-project (muse-project-of-file))) (if (not muse-current-project) ;; file is not part of a project, so fall back to muse-publish (if (interactive-p) (call-interactively 'muse-publish-this-file) (muse-publish-this-file style nil force)) (unless style (setq style (muse-project-get-applicable-style buffer-file-name (cddr muse-current-project)))) (let* ((output-dir (muse-style-element :path style)) (muse-current-project-global muse-current-project) (muse-current-output-style (list :base (car style) :path output-dir)) (fun (or (muse-style-element :publish style t) 'muse-project-publish-file-default))) (unless (funcall fun buffer-file-name style output-dir force) (message (concat "The published version is up-to-date; use" " C-u C-c C-t to force an update."))))))) (defun muse-project-save-buffers (&optional project) (setq project (muse-project project)) (when project (save-excursion (map-y-or-n-p (function (lambda (buffer) (and (buffer-modified-p buffer) (not (buffer-base-buffer buffer)) (or (buffer-file-name buffer) (progn (set-buffer buffer) (and buffer-offer-save (> (buffer-size) 0)))) (with-current-buffer buffer (let ((proj (muse-project-of-file))) (and proj (string= (car proj) (car project))))) (if (buffer-file-name buffer) (format "Save file %s? " (buffer-file-name buffer)) (format "Save buffer %s? " (buffer-name buffer)))))) (function (lambda (buffer) (set-buffer buffer) (save-buffer))) (buffer-list) '("buffer" "buffers" "save") (if (boundp 'save-some-buffers-action-alist) save-some-buffers-action-alist))))) (defun muse-project-publish-default (project styles &optional force) "Publish the pages of PROJECT that need publishing." (setq project (muse-project project)) (let ((published nil)) ;; publish all files in the project, for each style; the actual ;; publishing will only happen if the files are newer than the ;; last published output, or if the file is listed in ;; :force-publish. Files in :force-publish will not trigger the ;; "All pages need to be published" message. (let ((forced-files (muse-get-keyword :force-publish (cadr project))) (file-alist (muse-project-file-alist project))) (dolist (pair file-alist) (when (muse-project-publish-file (cdr pair) styles force) (setq forced-files (delete (car pair) forced-files)) (setq published t))) (dolist (file forced-files) (muse-project-publish-file (cdr (assoc file file-alist)) styles t))) ;; run hook after publishing ends (run-hook-with-args 'muse-after-project-publish-hook project) ;; notify the user that everything is now done (if published (message "All pages in %s have been published." (car project)) (message "No pages in %s need publishing at this time." (car project))))) ;;;###autoload (defun muse-project-publish (project &optional force) "Publish the pages of PROJECT that need publishing." (interactive (list (muse-read-project "Publish project: " nil t) current-prefix-arg)) (setq project (muse-project project)) (let ((styles (cddr project)) (muse-current-project project) (muse-current-project-global project)) ;; determine the style from the project, or else ask (unless styles (setq styles (list (muse-publish-get-style)))) (unless project (error "Cannot find a project to publish")) ;; prompt to save any buffers related to this project (muse-project-save-buffers project) ;; run hook before publishing begins (run-hook-with-args 'muse-before-project-publish-hook project) ;; run the project-level publisher (let ((fun (or (muse-get-keyword :publish-project (cadr project) t) 'muse-project-publish-default))) (funcall fun project styles force)))) (defun muse-project-batch-publish () "Publish Muse files in batch mode." (let ((muse-batch-publishing-p t) force) (if (string= "--force" (or (car command-line-args-left) "")) (setq force t command-line-args-left (cdr command-line-args-left))) (if command-line-args-left (dolist (project command-line-args-left) (message "Publishing project %s ..." project) (muse-project-publish project force)) (message "No projects specified.")))) (eval-when-compile (put 'make-local-hook 'byte-compile nil)) (defun muse-project-set-variables () "Load project-specific variables." (when (and muse-current-project-global (null muse-current-project)) (setq muse-current-project muse-current-project-global)) (let ((vars (muse-get-keyword :set (cadr muse-current-project))) sym custom-set var) (while vars (setq sym (car vars)) (setq custom-set (or (get sym 'custom-set) 'set)) (setq var (if (eq (get sym 'custom-type) 'hook) (make-local-hook sym) (make-local-variable sym))) (funcall custom-set var (car (cdr vars))) (setq vars (cdr (cdr vars)))))) (custom-add-option 'muse-before-publish-hook 'muse-project-set-variables) (add-to-list 'muse-before-publish-hook 'muse-project-set-variables) (defun muse-project-delete-output-files (project) (interactive (list (muse-read-project "Remove all output files for project: " nil t))) (setq project (muse-project project)) (let ((file-alist (muse-project-file-alist project)) (styles (cddr project)) output-file path) (dolist (entry file-alist) (dolist (style styles) (setq output-file (and (setq path (muse-style-element :path style)) (expand-file-name (concat (muse-style-element :prefix style) (car entry) (or (muse-style-element :osuffix style) (muse-style-element :suffix style))) path))) (if output-file (muse-delete-file-if-exists output-file)))))) ;;; muse-project.el ends here muse-el-3.20+dfsg/lisp/muse-import-docbook.el0000644000175000017500000001005311331353120020417 0ustar taffittaffit;;; muse-import-docbook.el --- convert Docbook XML into Muse format ;; Copyright (C) 2006, 2007, 2008, 2009, 2010 ;; Free Software Foundation, Inc. ;; Author: Elena Pomohaci ;; This file is part of Emacs Muse. It is not part of GNU Emacs. ;; Emacs Muse 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 3, or (at your ;; option) any later version. ;; Emacs Muse 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 Emacs Muse; see the file COPYING. If not, write to the ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;; It works only for article type docbook docs and recognize ;; followings elements: article, sect1, sect2, sect3, title, ;;; Contributors: ;;; Code: (require 'muse-import-xml) (defvar muse-import-docbook-prefix "muse-import-docbook-" "The name prefix for tag functions") (defvar muse-import-docbook-para-indent "\n\n" "Para elements indentation (0, less than 6 spaces, more than 6 spaces)") (defun muse-import-docbook-reset-para-indent () (setq muse-import-docbook-para-indent "\n\n")) ;;;###autoload (defun muse-import-docbook (src dest) "Convert the Docbook buffer SRC to Muse, writing output in the DEST buffer." (interactive "bDocbook buffer:\nBMuse buffer:") (setq muse-import-xml-prefix muse-import-docbook-prefix) (setq muse-import-xml-generic-function-name "muse-import-xml-node") (muse-import-xml src dest)) ;;;###autoload (defun muse-import-docbook-files (src dest) "Convert the Docbook file SRC to Muse, writing output to the DEST file." (interactive "fDocbook file:\nFMuse file:") (with-temp-file dest (muse-import-docbook (find-file-noselect src) (current-buffer)))) ;;; element specific functions (defun muse-import-docbook-get-title (node) (let ((tit (car (xml-get-children node 'title)))) (insert (car (cddr tit)) ?\n ?\n) (muse-import-xml-parse-tree (xml-node-children (remove tit node))))) (defun muse-import-docbook-article (node) "Article conversion function" (muse-import-xml-node node)) (defun muse-import-docbook-articleinfo (node) "Article conversion function" (insert "#title ") (muse-import-docbook-get-title node) (insert ?\n)) (defalias 'muse-import-docbook-appendix 'muse-import-docbook-article) (defalias 'muse-import-docbook-appendixinfo 'muse-import-docbook-articleinfo) (defun muse-import-docbook-sect1 (node) "Section 1 conversion function" (insert ?\n "* ") (muse-import-docbook-get-title node)) (defun muse-import-docbook-sect2 (node) "Section 2 conversion function" (insert ?\n "** ") (muse-import-docbook-get-title node)) (defun muse-import-docbook-sect3 (node) "Section 3 conversion function" (insert ?\n "*** ") (muse-import-docbook-get-title node)) (defun muse-import-docbook-graphic (node) "Graphic conversion function. Image format is forced to PNG" (let ((name (xml-get-attribute node 'fileref))) (insert "\n[[img/" name ".png][" name "]]"))) (defun muse-import-docbook-para (node) (insert muse-import-docbook-para-indent) (muse-import-xml-node node)) (defun muse-import-docbook-emphasis (node) (insert "*") (muse-import-xml-node node) (insert "*")) (defun muse-import-docbook-quote (node) (insert "\"") (muse-import-xml-node node) (insert "\"")) (defun muse-import-docbook-blockquote (node) (setq muse-import-docbook-para-indent "\n\n ") (muse-import-xml-node node) (muse-import-docbook-reset-para-indent)) (defun muse-import-docbook-member (node) (insert "\n> ") (muse-import-xml-node node)) (defun muse-import-docbook-bridgehead (node) (insert "\n* ") (muse-import-xml-node node)) (provide 'muse-import-docbook) ;;; muse-import-docbook.el ends here muse-el-3.20+dfsg/lisp/muse-wiki.el0000644000175000017500000004564511331353120016451 0ustar taffittaffit;;; muse-wiki.el --- wiki features for Muse ;; Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 ;; Free Software Foundation, Inc. ;; Author: Yann Hodique ;; Keywords: ;; This file is part of Emacs Muse. It is not part of GNU Emacs. ;; Emacs Muse 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 3, or (at your ;; option) any later version. ;; Emacs Muse 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 Emacs Muse; see the file COPYING. If not, write to the ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;;; Contributors: ;; Per B. Sederberg (per AT med DOT upenn DOT edu) made it so that all ;; files in a Muse project can become implicit links. ;;; Code: (require 'muse-regexps) (require 'muse-mode) (eval-when-compile (require 'muse-colors)) (defgroup muse-wiki nil "Options controlling the behavior of Emacs Muse Wiki features." :group 'muse-mode) (defcustom muse-wiki-use-wikiword t "Whether to use color and publish bare WikiNames." :type 'boolean :group 'muse-wiki) (defcustom muse-wiki-allow-nonexistent-wikiword nil "Whether to color bare WikiNames that don't have an existing file." :type 'boolean :group 'muse-wiki) (defcustom muse-wiki-match-all-project-files nil "If non-nil, Muse will color and publish implicit links to any file in your project, regardless of whether its name is a WikiWord." :type 'boolean :group 'muse-wiki) (defcustom muse-wiki-ignore-implicit-links-to-current-page nil "If non-nil, Muse will not recognize implicit links to the current page, both when formatting and publishing." :type 'boolean :group 'muse-wiki) (defvar muse-wiki-project-file-regexp nil "Regexp used to match the files in the current project. This is set by `muse-wiki-update-project-file-regexp' automatically when `muse-wiki-match-all-project-files' is non-nil.") (make-variable-buffer-local 'muse-wiki-project-file-regexp) (defun muse-wiki-update-project-file-regexp () "Update a local copy of `muse-wiki-project-file-regexp' to include all the files in the project." ;; see if the user wants to match project files (when muse-wiki-match-all-project-files (let ((files (mapcar #'car (muse-project-file-alist (muse-project))))) (setq muse-wiki-project-file-regexp (when files (concat "\\(" ;; include all files from the project (regexp-opt files 'words) "\\)")))) ;; update coloring setup (when (featurep 'muse-colors) (muse-colors-define-highlighting 'muse-mode muse-colors-markup)))) (add-hook 'muse-update-values-hook 'muse-wiki-update-project-file-regexp) (add-hook 'muse-project-file-alist-hook 'muse-wiki-update-project-file-regexp) (defcustom muse-wiki-wikiword-regexp (concat "\\<\\(\\(?:[" muse-regexp-upper "]+[" muse-regexp-lower "]+\\)\\(?:[" muse-regexp-upper "]+[" muse-regexp-lower "]+\\)+\\)") "Regexp used to match WikiWords." :set (function (lambda (sym value) (set sym value) (when (featurep 'muse-colors) (muse-colors-define-highlighting 'muse-mode muse-colors-markup)))) :type 'regexp :group 'muse-wiki) (defcustom muse-wiki-ignore-bare-project-names nil "Determine whether project names without a page specifer are links. If non-nil, project names without a page specifier will not be considered links. When nil, project names without a specifier are highlighted and they link to the default page of the project that they name." :type 'boolean :group 'muse-wiki) (defvar muse-wiki-interwiki-regexp nil "Regexp that matches all interwiki links. This is automatically generated by setting `muse-wiki-interwiki-alist'. It can also be set by calling `muse-wiki-update-interwiki-regexp'.") (defcustom muse-wiki-interwiki-delimiter "#\\|::" "Delimiter regexp used for InterWiki links. If you use groups, use only shy groups." :type 'regexp :group 'muse-wiki) (defcustom muse-wiki-interwiki-replacement ": " "Regexp used for replacing `muse-wiki-interwiki-delimiter' in InterWiki link descriptions. If you want this replacement to happen, you must add `muse-wiki-publish-pretty-interwiki' to `muse-publish-desc-transforms'." :type 'regexp :group 'muse-wiki) (eval-when-compile (defvar muse-wiki-interwiki-alist)) (defun muse-wiki-project-files-with-spaces (&optional project) "Return a list of files in PROJECT that have spaces." (setq project (muse-project project)) (let ((flist nil)) (save-match-data (dolist (entry (muse-project-file-alist project)) (when (string-match " " (car entry)) (setq flist (cons (car entry) flist))))) flist)) (defun muse-wiki-update-interwiki-regexp () "Update the value of `muse-wiki-interwiki-regexp' based on `muse-wiki-interwiki-alist' and `muse-project-alist'." (if (null muse-project-alist) (setq muse-wiki-interwiki-regexp nil) (let ((old-value muse-wiki-interwiki-regexp)) (setq muse-wiki-interwiki-regexp (concat "\\<\\(" (regexp-opt (mapcar #'car muse-project-alist)) (when muse-wiki-interwiki-alist (let ((interwiki-rules (mapcar #'car muse-wiki-interwiki-alist))) (when interwiki-rules (concat "\\|" (regexp-opt interwiki-rules))))) "\\)\\(?:\\(" muse-wiki-interwiki-delimiter "\\)\\(" (when muse-wiki-match-all-project-files ;; append the files from the project (let ((files nil)) (dolist (proj muse-project-alist) (setq files (nconc (muse-wiki-project-files-with-spaces (car proj)) files))) (when files (concat (regexp-opt files) "\\|")))) "\\sw+\\)\\(#\\S-+\\)?\\)?\\>")) (when (and (featurep 'muse-colors) (not (string= old-value muse-wiki-interwiki-regexp))) (muse-colors-define-highlighting 'muse-mode muse-colors-markup))))) (defcustom muse-wiki-interwiki-alist '(("EmacsWiki" . "http://www.emacswiki.org/cgi-bin/wiki/")) "A table of WikiNames that refer to external entities. The format of this table is an alist, or series of cons cells. Each cons cell must be of the form: (WIKINAME . STRING-OR-FUNCTION) The second part of the cons cell may either be a STRING, which in most cases should be a URL, or a FUNCTION. If a function, it will be called with one argument: the tag applied to the Interwiki name, or nil if no tag was used. If the cdr was a STRING and a tag is used, the tag is simply appended. Here are some examples: (\"JohnWiki\" . \"http://alice.dynodns.net/wiki?\") Referring to [[JohnWiki::EmacsModules]] then really means: http://alice.dynodns.net/wiki?EmacsModules If a function is used for the replacement text, you can get creative depending on what the tag is. Tags may contain any alphabetic character, any number, % or _. If you need other special characters, use % to specify the hex code, as in %2E. All browsers should support this." :type '(repeat (cons (string :tag "WikiName") (choice (string :tag "URL") function))) :set (function (lambda (sym value) (set sym value) (muse-wiki-update-interwiki-regexp))) :group 'muse-wiki) (add-hook 'muse-update-values-hook 'muse-wiki-update-interwiki-regexp) (defun muse-wiki-resolve-project-page (&optional project page) "Return the published path from the current page to PAGE of PROJECT. If PAGE is not specified, use the value of :default in PROJECT. If PROJECT is not specified, default to the current project. If no project is current, use the first project of `muse-projects-alist'. Note that PAGE can have several output directories. If this is the case, we will use the first one that matches our current style and has the same link suffix, ignoring the others. If no style has the same link suffix as the current publishing style, use the first style we find." (setq project (or (and project (muse-project project)) (muse-project) (car muse-project-alist)) page (or page (muse-get-keyword :default (cadr project)))) (let* ((page-path (and muse-project-alist (muse-project-page-file page project))) (remote-styles (and page-path (muse-project-applicable-styles page-path (cddr project)))) (local-style (muse-project-current-output-style))) (cond ((and remote-styles local-style muse-publishing-p) (muse-project-resolve-link page local-style remote-styles)) ((not muse-publishing-p) (if page-path page-path (when muse-wiki-allow-nonexistent-wikiword ;; make a path to a nonexistent file in project (setq page-path (expand-file-name page (car (cadr project)))) (if (and muse-file-extension (not (string= muse-file-extension ""))) (concat page-path "." muse-file-extension) page-path))))))) (defun muse-wiki-handle-implicit-interwiki (&optional string) "If STRING or point has an interwiki link, resolve it to a filename. Match string 0 is set to the link." (when (and muse-wiki-interwiki-regexp (if string (string-match muse-wiki-interwiki-regexp string) (looking-at muse-wiki-interwiki-regexp))) (let* ((project (match-string 1 string)) (subst (cdr (assoc project muse-wiki-interwiki-alist))) (word (match-string 3 string)) (anchor (if (match-beginning 4) (match-string 4 string) ""))) (if subst (if (functionp subst) (and (setq word (funcall subst word)) (concat word anchor)) (concat subst word anchor)) (and (assoc project muse-project-alist) (or word (not muse-wiki-ignore-bare-project-names)) (setq word (muse-wiki-resolve-project-page project word)) (concat word anchor)))))) (defun muse-wiki-handle-explicit-interwiki (&optional string) "If STRING or point has an interwiki link, resolve it to a filename." (let ((right-pos (if string (length string) (match-end 1)))) (when (and muse-wiki-interwiki-regexp (if string (string-match muse-wiki-interwiki-regexp string) (save-restriction (narrow-to-region (point) right-pos) (looking-at muse-wiki-interwiki-regexp)))) (let* ((project (match-string 1 string)) (subst (cdr (assoc project muse-wiki-interwiki-alist))) (anchor (and (match-beginning 4) (match-string 4 string))) (word (when (match-end 2) (cond (anchor (match-string 3 string)) (string (substring string (match-end 2))) (right-pos (buffer-substring (match-end 2) right-pos)) (t nil))))) (if (and (null word) right-pos (not (= right-pos (match-end 1)))) ;; if only a project name was found, it must take up the ;; entire string or link nil (unless anchor (if (or (null word) (not (string-match "#[^#]+\\'" word))) (setq anchor "") (setq anchor (match-string 0 word)) (setq word (substring word 0 (match-beginning 0))))) (if subst (if (functionp subst) (and (setq word (funcall subst word)) (concat word anchor)) (concat subst word anchor)) (and (assoc project muse-project-alist) (or word (not muse-wiki-ignore-bare-project-names)) (setq word (muse-wiki-resolve-project-page project word)) (concat word anchor)))))))) (defun muse-wiki-handle-wikiword (&optional string) "If STRING or point has a WikiWord, return it. Match 1 is set to the WikiWord." (when (and (or (and muse-wiki-match-all-project-files muse-wiki-project-file-regexp (if string (string-match muse-wiki-project-file-regexp string) (looking-at muse-wiki-project-file-regexp))) (and muse-wiki-use-wikiword (if string (string-match muse-wiki-wikiword-regexp string) (looking-at muse-wiki-wikiword-regexp)))) (cond (muse-wiki-allow-nonexistent-wikiword t) ((and muse-wiki-ignore-implicit-links-to-current-page (string= (match-string 1 string) (muse-page-name))) nil) ((and (muse-project-of-file) (muse-project-page-file (match-string 1 string) muse-current-project t)) t) ((file-exists-p (match-string 1 string)) t) (t nil))) (match-string 1 string))) ;;; Prettifications (defcustom muse-wiki-publish-small-title-words '("the" "and" "at" "on" "of" "for" "in" "an" "a") "Strings that should be downcased in a page title. This is used by `muse-wiki-publish-pretty-title', which must be called manually." :type '(repeat string) :group 'muse-wiki) (defcustom muse-wiki-hide-nop-tag t "If non-nil, hide tags when coloring a Muse buffer." :type 'boolean :group 'muse-wiki) (defun muse-wiki-publish-pretty-title (&optional title explicit) "Return a pretty version of the given TITLE. If EXPLICIT is non-nil, TITLE will be returned unmodified." (unless title (setq title (or (muse-publishing-directive "title") ""))) (if (or explicit (save-match-data (string-match muse-url-regexp title))) title (save-match-data (let ((case-fold-search nil)) (while (string-match (concat "\\([" muse-regexp-lower "]\\)\\([" muse-regexp-upper "0-9]\\)") title) (setq title (replace-match "\\1 \\2" t nil title))) (let* ((words (split-string title)) (w (cdr words))) (while w (if (member (downcase (car w)) muse-wiki-publish-small-title-words) (setcar w (downcase (car w)))) (setq w (cdr w))) (mapconcat 'identity words " ")))))) (defun muse-wiki-publish-pretty-interwiki (desc &optional explicit) "Replace instances of `muse-wiki-interwiki-delimiter' with `muse-wiki-interwiki-replacement'." (if (or explicit (save-match-data (string-match muse-url-regexp desc))) desc (muse-replace-regexp-in-string muse-wiki-interwiki-delimiter muse-wiki-interwiki-replacement desc))) ;;; Coloring setup (defun muse-wiki-colors-nop-tag (beg end) "Inhibit the colorization of inhibit links just after the tag. Example: WikiWord" (when muse-wiki-hide-nop-tag (add-text-properties beg (+ beg 5) '(invisible muse intangible t))) (unless (> (+ beg 6) (point-max)) (add-text-properties (+ beg 5) (+ beg 6) '(muse-no-implicit-link t)))) (defun muse-colors-wikiword-separate () (add-text-properties (match-beginning 0) (match-end 0) '(invisible muse intangible t))) (defun muse-wiki-insinuate-colors () (add-to-list 'muse-colors-tags '("nop" nil nil nil muse-wiki-colors-nop-tag) t) (add-to-list 'muse-colors-markup '(muse-wiki-interwiki-regexp t muse-colors-implicit-link) t) (add-to-list 'muse-colors-markup '(muse-wiki-wikiword-regexp t muse-colors-implicit-link) t) (add-to-list 'muse-colors-markup '(muse-wiki-project-file-regexp t muse-colors-implicit-link) t) (add-to-list 'muse-colors-markup '("''''" ?\' muse-colors-wikiword-separate) nil) (muse-colors-define-highlighting 'muse-mode muse-colors-markup)) (eval-after-load "muse-colors" '(muse-wiki-insinuate-colors)) ;;; Publishing setup (defun muse-wiki-publish-nop-tag (beg end) "Inhibit the colorization of inhibit links just after the tag. Example: WikiWord" (unless (= (point) (point-max)) (muse-publish-mark-read-only (point) (+ (point) 1)))) (defun muse-wiki-insinuate-publish () (add-to-list 'muse-publish-markup-tags '("nop" nil nil nil muse-wiki-publish-nop-tag) t) (add-to-list 'muse-publish-markup-regexps '(3100 muse-wiki-interwiki-regexp 0 link) t) (add-to-list 'muse-publish-markup-regexps '(3200 muse-wiki-wikiword-regexp 0 link) t) (add-to-list 'muse-publish-markup-regexps '(3250 muse-wiki-project-file-regexp 0 link) t) (add-to-list 'muse-publish-markup-regexps '(3300 "''''" 0 "") t) (custom-add-option 'muse-publish-desc-transforms 'muse-wiki-publish-pretty-interwiki) (custom-add-option 'muse-publish-desc-transforms 'muse-wiki-publish-pretty-title)) (eval-after-load "muse-publish" '(muse-wiki-insinuate-publish)) ;;; Insinuate link handling (custom-add-option 'muse-implicit-link-functions 'muse-wiki-handle-implicit-interwiki) (custom-add-option 'muse-implicit-link-functions 'muse-wiki-handle-wikiword) (custom-add-option 'muse-explicit-link-functions 'muse-wiki-handle-explicit-interwiki) (add-to-list 'muse-implicit-link-functions 'muse-wiki-handle-implicit-interwiki t) (add-to-list 'muse-implicit-link-functions 'muse-wiki-handle-wikiword t) (add-to-list 'muse-explicit-link-functions 'muse-wiki-handle-explicit-interwiki t) ;;; Obsolete functions (defun muse-wiki-update-custom-values () (muse-display-warning (concat "Please remove `muse-wiki-update-custom-values' from" " `muse-mode-hook'. Its use is now deprecated."))) (provide 'muse-wiki) ;;; muse-wiki.el ends here muse-el-3.20+dfsg/lisp/muse-poem.el0000644000175000017500000002001211331353120016423 0ustar taffittaffit;;; muse-poem.el --- publish a poem to LaTex or PDF ;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 ;; Free Software Foundation, Inc. ;; This file is part of Emacs Muse. It is not part of GNU Emacs. ;; Emacs Muse 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 3, or (at your ;; option) any later version. ;; Emacs Muse 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 Emacs Muse; 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 specifies a form for recording poetry. It is as follows. ;; ;; Title ;; ;; ;; Body of poem ;; ;; ;; Annotations, history, notes, etc. ;; ;; The `muse-poem' module makes it easy to attractively publish and ;; reference poems in this format, using the "memoir" module for LaTeX ;; publishing. It will also markup poems for every other output ;; style, though none are nearly as pretty. ;; ;; Once a poem is written in this format, just publish it to PDF using ;; the "poem-pdf" style. To make an inlined reference to a poem that ;; you've written -- for example, from a blog page -- there is a ;; "poem" tag defined by this module: ;; ;; ;; ;; Let's assume the template above was called "name.of.poem.page"; ;; then the above tag would result in this inclusion: ;; ;; ** Title ;; ;; > Body of poem ;; ;; I use this module for publishing all of the poems on my website, ;; which are at: http://www.newartisans.com/johnw/poems.html. ;;; Contributors: ;;; Code: ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; Muse Poem Publishing ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (require 'muse-latex) (require 'muse-project) (defgroup muse-poem nil "Rules for marking up a Muse file as a LaTeX article." :group 'muse-latex) (defcustom muse-poem-latex-header "\\documentclass[14pt,oneside]{memoir} \\usepackage[english]{babel} \\usepackage[latin1]{inputenc} \\usepackage[T1]{fontenc} \\setlength{\\beforepoemtitleskip}{-5.0ex} \\begin{document} \\pagestyle{empty} \\renewcommand{\\poemtoc}{section} \\settocdepth{section} \\mbox{} \\vfill \\poemtitle{(muse-publishing-directive \"title\")} \\settowidth{\\versewidth}{muse-poem-longest-line}\n\n" "Header used for publishing LaTeX poems. This may be text or a filename." :type 'string :group 'muse-poem) (defcustom muse-poem-latex-footer "\n\\vfill \\mbox{} \\end{document}" "Footer used for publishing LaTeX files. This may be text or a filename." :type 'string :group 'muse-poem) (defcustom muse-poem-markup-strings '((begin-verse . "\\begin{verse}[\\versewidth]\n") (verse-space . "\\vin ")) "Strings used for marking up poems. These cover the most basic kinds of markup, the handling of which differs little between the various styles." :type '(alist :key-type symbol :value-type string) :group 'muse-poem) (defcustom muse-chapbook-latex-header "\\documentclass{book} \\usepackage[english]{babel} \\usepackage[latin1]{inputenc} \\usepackage[T1]{fontenc} \\setlength{\\beforepoemtitleskip}{-5.0ex} \\begin{document} \\title{(muse-publishing-directive \"title\")} \\author{(muse-publishing-directive \"author\")} \\date{(muse-publishing-directive \"date\")} \\maketitle \\tableofcontents \\renewcommand{\\poemtoc}{section} \\settocdepth{section}\n" "Header used for publishing a book of poems in LaTeX form. This may be text or a filename." :type 'string :group 'muse-poem) (defcustom muse-chapbook-latex-footer "\n\\end{document}" "Footer used for publishing a book of poems in LaTeX form. This may be text or a filename." :type 'string :group 'muse-poem) (defvar muse-poem-longest-line "") (defcustom muse-poem-chapbook-strings '((begin-verse . "\\newpage \\mbox{} \\vfill \\poemtitle{(muse-publishing-directive \"title\")} \\settowidth{\\versewidth}{muse-poem-longest-line} \\begin{verse}[\\versewidth]\n") (end-verse . "\n\\end{verse}\n\\vfill\n\\mbox{}") (verse-space . "\\vin ")) "Strings used for marking up books of poems. These cover the most basic kinds of markup, the handling of which differs little between the various styles." :type '(alist :key-type symbol :value-type string) :group 'muse-poem) (defun muse-poem-prepare-buffer () (goto-char (point-min)) (insert "#title ") (forward-line 1) (delete-region (point) (1+ (muse-line-end-position))) (insert "\n") (let ((beg (point)) end line) (if (search-forward "\n\n\n" nil t) (progn (setq end (copy-marker (match-beginning 0) t)) (replace-match "\n\n") (delete-region (point) (point-max))) (goto-char (point-max)) (setq end (point)) (insert "\n")) (goto-char (1+ beg)) (set (make-local-variable 'muse-poem-longest-line) "") (while (< (point) end) (setq line (buffer-substring-no-properties (point) (muse-line-end-position))) (if (> (length line) (length muse-poem-longest-line)) (setq muse-poem-longest-line line)) (forward-line 1)) nil)) (defvar muse-poem-tag '("poem" nil t nil muse-poem-markup-tag)) (defun muse-poem-markup-tag (beg end attrs) "This markup tag allows a poem to be included from another project page. The form of usage is: " (let ((page (cdr (assoc (cdr (assoc "title" attrs)) (muse-project-file-alist)))) beg end) (if (null page) (insert " *Reference to\n unknown poem \"" (cdr (assoc "title" attrs)) "\".*\n") (setq beg (point)) (insert (muse-with-temp-buffer (muse-insert-file-contents page) (goto-char (point-min)) (if (assoc "nohead" attrs) (progn (forward-line 3) (delete-region (point-min) (point))) (insert "** ") (search-forward "\n\n\n") (replace-match "\n\n")) (if (search-forward "\n\n\n" nil t) (setq end (match-beginning 0)) (setq end (point-max))) (buffer-substring-no-properties (point-min) end))) (setq end (point-marker)) (goto-char beg) (unless (assoc "nohead" attrs) (forward-line 2)) (while (< (point) end) (insert "> ") (forward-line 1)) (set-marker end nil)))) (put 'muse-poem-markup-tag 'muse-dangerous-tag t) (add-to-list 'muse-publish-markup-tags muse-poem-tag) ;;; Register the Muse POEM Publishers (muse-derive-style "poem-latex" "latex" :before 'muse-poem-prepare-buffer :strings 'muse-poem-markup-strings :header 'muse-poem-latex-header :footer 'muse-poem-latex-footer) (muse-derive-style "poem-pdf" "pdf" :before 'muse-poem-prepare-buffer :strings 'muse-poem-markup-strings :header 'muse-poem-latex-header :footer 'muse-poem-latex-footer) (muse-derive-style "chapbook-latex" "latex" :before 'muse-poem-prepare-buffer :strings 'muse-poem-chapbook-strings :header 'muse-chapbook-latex-header :footer 'muse-chapbook-latex-footer) (muse-derive-style "chapbook-pdf" "pdf" :before 'muse-poem-prepare-buffer :strings 'muse-poem-chapbook-strings :header 'muse-chapbook-latex-header :footer 'muse-chapbook-latex-footer) (provide 'muse-poem) ;;; muse-poem.el ends here muse-el-3.20+dfsg/lisp/muse-mode.el0000644000175000017500000011345711331353120016427 0ustar taffittaffit;;; muse-mode.el --- mode for editing Muse files; has font-lock support ;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 ;; Free Software Foundation, Inc. ;; This file is part of Emacs Muse. It is not part of GNU Emacs. ;; Emacs Muse 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 3, or (at your ;; option) any later version. ;; Emacs Muse 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 Emacs Muse; see the file COPYING. If not, write to the ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;; The Emacs Muse major mode is basically a hyped-up text-mode which ;; knows a lot more about the apparent structure of the document. ;;; Contributors: ;; Andrea Riciputi (ariciputi AT pito DOT com) gave an initial ;; implementation for tag completion by means of the `muse-insert-tag' ;; function. ;; Per B. Sederberg (per AT med DOT upenn DOT edu) contributed the ;; insertion of relative links and list items, backlink searching, and ;; other things as well. ;; Stefan Schlee (stefan_schlee AT yahoo DOT com) fixed a bug in ;; muse-next-reference and muse-previous-reference involving links ;; that begin at point 1. ;; Gregory Collins (greg AT gregorycollins DOT net) fixed a bug with ;; paragraph separation and headings when filling. ;;; Code: ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; Emacs Muse Major Mode ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (provide 'muse-mode) (require 'muse) (require 'muse-regexps) (require 'muse-project) (autoload 'muse-use-font-lock "muse-colors") (autoload 'muse-publish-this-file "muse-publish") (autoload 'muse-publish-get-style "muse-publish") (autoload 'muse-publish-output-file "muse-publish") (require 'derived) (eval-when-compile (condition-case nil (require 'pcomplete) ; load if available (error nil))) ;;; Options: (defgroup muse-mode nil "Options controlling the behavior of the Muse editing Mode." :group 'muse) (defcustom muse-mode-highlight-p t "If non-nil, highlight the content of Muse buffers." :type 'boolean :require 'muse-colors :group 'muse-mode) (defcustom muse-mode-auto-p nil "If non-nil, automagically determine when Muse mode should be activated." :type 'boolean :set (function (lambda (sym value) (if value (add-hook 'find-file-hooks 'muse-mode-maybe) (remove-hook 'find-file-hooks 'muse-mode-maybe)) (set sym value))) :group 'muse-mode) (defun muse-mode-maybe-after-init () (when muse-mode-auto-p (add-hook 'find-file-hooks 'muse-mode-maybe))) ;; If the user sets this value in their init file, make sure that ;; it takes effect (add-hook 'after-init-hook 'muse-mode-maybe-after-init) (defcustom muse-mode-intangible-links nil "If non-nil, use the intangible property on links. This can cause problems with flyspell (and potentially fill-mode), so only enable this if you don't use either of these." :type 'boolean :group 'muse-mode) (defcustom muse-mode-hook nil "A hook that is run when Muse mode is entered." :type 'hook :options '(flyspell-mode footnote-mode turn-on-auto-fill highlight-changes-mode) :group 'muse-mode) (defcustom muse-grep-command "find %D -type f ! -name '*~' | xargs -I {} echo \\\"{}\\\" | xargs egrep -n -e \"%W\"" "The command to use when grepping for backlinks and other searches through the muse projects. The string %D is replaced by the directories from muse-project-alist, space-separated. The string %W is replaced with the name of the muse page or whatever else you are searching for. This command has been modified to handle spaces in filenames, which were giving egrep a problem. Note: We highly recommend using glimpse to search large projects. To use glimpse, install and edit a file called .glimpse_exclude in your home directory. Put a list of glob patterns in that file to exclude Emacs backup files, etc. Then, run the indexer using: glimpseindex -o Once that's completed, customize this variable to have the following value: glimpse -nyi \"%W\" Your searches will go much, much faster, especially for very large projects. Don't forget to add a user cronjob to update the index at intervals." :type 'string :group 'muse-mode) (defvar muse-insert-map (let ((map (make-sparse-keymap))) (define-key map "l" 'muse-insert-relative-link-to-file) (define-key map "t" 'muse-insert-tag) (define-key map "u" 'muse-insert-url) map)) ;;; Muse mode (defvar muse-mode-map (let ((map (make-sparse-keymap))) (define-key map [(control ?c) (control ?a)] 'muse-index) (define-key map [(control ?c) (control ?e)] 'muse-edit-link-at-point) (define-key map [(control ?c) (control ?l)] 'font-lock-mode) (define-key map [(control ?c) (control ?t)] 'muse-project-publish-this-file) (define-key map [(control ?c) (control ?T)] 'muse-publish-this-file) (define-key map [(control ?c) (meta control ?t)] 'muse-publish-this-file) (define-key map [(control ?c) (control ?v)] 'muse-browse-result) (define-key map [(control ?c) ?=] 'muse-what-changed) (define-key map [tab] 'muse-next-reference) (define-key map [(control ?i)] 'muse-next-reference) (if (featurep 'xemacs) (progn (define-key map [(button2)] 'muse-follow-name-at-mouse) (define-key map [(shift button2)] 'muse-follow-name-at-mouse-other-window)) (define-key map [(shift control ?m)] 'muse-follow-name-at-point-other-window) (define-key map [mouse-2] 'muse-follow-name-at-mouse) (define-key map [(shift mouse-2)] 'muse-follow-name-at-mouse-other-window)) (define-key map [(shift tab)] 'muse-previous-reference) (unless (featurep 'xemacs) (define-key map [(shift iso-lefttab)] 'muse-previous-reference) (define-key map [(shift control ?i)] 'muse-previous-reference)) (define-key map [(control ?c) (control ?f)] 'muse-project-find-file) (define-key map [(control ?c) (control ?p)] 'muse-project-publish) (define-key map [(control ?c) (control ?i)] 'muse-insert-thing) (define-key map [(control ?c) tab] 'muse-insert-thing) ;; Searching functions (define-key map [(control ?c) (control ?b)] 'muse-find-backlinks) (define-key map [(control ?c) (control ?s)] 'muse-search) ;; Enhanced list functions (define-key map [(meta return)] 'muse-insert-list-item) (define-key map [(control ?>)] 'muse-increase-list-item-indentation) (define-key map [(control ?<)] 'muse-decrease-list-item-indentation) (when (featurep 'pcomplete) (define-key map [(meta tab)] 'pcomplete) (define-key map [(meta control ?i)] 'pcomplete)) map) "Keymap used by Emacs Muse mode.") ;;;###autoload (define-derived-mode muse-mode text-mode "Muse" "Muse is an Emacs mode for authoring and publishing documents. \\{muse-mode-map}" ;; Since we're not inheriting from normal-mode, we need to ;; explicitly run file variables. (condition-case err (hack-local-variables) (error (message "File local-variables error: %s" (prin1-to-string err)))) ;; Avoid lock-up caused by use of the 'intangible' text property ;; with flyspell. (unless muse-mode-intangible-links (set (make-local-variable 'inhibit-point-motion-hooks) t)) (setq muse-current-project (muse-project-of-file)) (muse-project-set-variables) ;; Make fill not split up links (when (boundp 'fill-nobreak-predicate) (make-local-variable 'fill-nobreak-predicate) ;; Work around annoying inconsistency in fill handling between ;; Emacs 21 and 22. (if (< emacs-major-version 22) (setq fill-nobreak-predicate 'muse-mode-fill-nobreak-p) (add-to-list 'fill-nobreak-predicate 'muse-mode-fill-nobreak-p))) ;; Make fill work nicely with item lists (let ((regexp (concat "\\s-+\\(-\\|[0-9]+\\.\\)\\s-+" "\\|\\[[0-9]+\\]\\s-*" "\\|.*\\s-*::\\s-+" "\\|\\*+\\s-+"))) (set (make-local-variable 'adaptive-fill-regexp) (concat regexp "\\|\\s-*")) (set (make-local-variable 'paragraph-start) (concat paragraph-start "\\|" regexp)) (set (make-local-variable 'paragraph-separate) (concat paragraph-separate "\\|\\*+\\s-+"))) (set (make-local-variable 'fill-paragraph-function) 'muse-mode-fill-paragraph) ;; Comment syntax is `; comment' (set (make-local-variable 'comment-start) "; ") (set (make-local-variable 'comment-start-skip) "^;\\s-+") (set (make-local-variable 'indent-line-function) #'ignore) ;; If we're using Emacs21, this makes flyspell work like it should (when (boundp 'flyspell-generic-check-word-p) (set (make-local-variable 'flyspell-generic-check-word-p) 'muse-mode-flyspell-p)) ;; If pcomplete is available, set it up (when (featurep 'pcomplete) (set (make-local-variable 'pcomplete-default-completion-function) 'muse-mode-completions) (set (make-local-variable 'pcomplete-command-completion-function) 'muse-mode-completions) (set (make-local-variable 'pcomplete-parse-arguments-function) 'muse-mode-current-word)) ;; Initialize any auto-generated variables (run-hooks 'muse-update-values-hook) (when muse-mode-highlight-p (muse-use-font-lock))) (put 'muse-mode 'flyspell-mode-predicate 'muse-mode-flyspell-p) (defun muse-mode-fill-nobreak-p () "Return nil if we should allow a fill to occur at point. Otherwise return non-nil. This is used to keep long explicit links from being mangled by fill mode." (save-excursion (save-match-data (and (re-search-backward "\\[\\[\\|\\]\\]" (line-beginning-position) t) (string= (or (match-string 0) "") "[["))))) (defun muse-mode-fill-paragraph (arg) "If a definition list is at point, use special filling rules for it. Otherwise return nil to let the normal filling function take care of things. ARG is passed to `fill-paragraph'." (let ((count 2)) (and (not (muse-mode-fill-nobreak-p)) (save-excursion (beginning-of-line) (and (looking-at muse-dl-term-regexp) (prog1 t ;; Take initial whitespace into account (when (looking-at (concat "[" muse-regexp-blank "]+")) (setq count (+ count (length (match-string 0)))))))) (let ((fill-prefix (make-string count ?\ )) (fill-paragraph-function nil)) (prog1 t (fill-paragraph arg)))))) (defun muse-mode-flyspell-p () "Return non-nil if we should allow spell-checking to occur at point. Otherwise return nil. This is used to keep links from being improperly colorized by flyspell." (let ((pos (if (bobp) (point) (1- (point))))) (and (not (get-text-property pos 'muse-no-flyspell)) (not (get-text-property pos 'muse-link)) (save-match-data (null (muse-link-at-point)))))) ;;;###autoload (defun muse-mode-choose-mode () "Turn the proper Emacs Muse related mode on for this file." (let ((project (muse-project-of-file))) (funcall (or (and project (muse-get-keyword :major-mode (cadr project) t)) 'muse-mode)))) (defun muse-mode-maybe () "Maybe turn Emacs Muse mode on for this file." (let ((project (muse-project-of-file))) (and project (funcall (or (muse-get-keyword :major-mode (cadr project) t) 'muse-mode))))) ;;; Enhanced list editing (defun muse-on-blank-line () "See if point is on a blank line" (save-excursion (beginning-of-line) (looking-at (concat "[" muse-regexp-blank "]*$")))) (defun muse-get-paragraph-start () "Return the start of the current paragraph. This function will return nil if there are no prior paragraphs and the beginning of the line if point is on a blank line." (let ((para-start (concat "^[" muse-regexp-blank "]*$"))) ;; search back to start of paragraph (save-excursion (save-match-data (if (not (muse-on-blank-line)) (re-search-backward para-start nil t) (line-beginning-position)))))) (defun muse-insert-thing () "Prompt for something to insert into the current buffer." (interactive) (message "Insert:\nl link\nt Muse tag\nu URL") (let (key cmd) (let ((overriding-local-map muse-insert-map)) (setq key (read-key-sequence nil))) (if (commandp (setq cmd (lookup-key muse-insert-map key))) (progn (message "") (call-interactively cmd)) (message "Not inserting anything")))) ;;;###autoload (defun muse-insert-list-item () "Insert a list item at the current point, taking into account your current list type and indentation level." (interactive) (let ((newitem " - ") (itemno nil) (pstart (muse-get-paragraph-start)) (list-item (format muse-list-item-regexp (concat "[" muse-regexp-blank "]*")))) ;; search backwards for start of current item (save-excursion (when (re-search-backward list-item pstart t) ;; save the matching item (setq newitem (match-string 0)) ;; see what type it is (if (string-match "::" (match-string 0)) ;; is a definition, replace the term (setq newitem (concat " " (read-string "Term: ") " :: ")) ;; see if it's a numbered list (when (string-match "[0-9]+" newitem) ;; is numbered, so increment (setq itemno (1+ (string-to-number (match-string 0 newitem)))) (setq newitem (replace-match (number-to-string itemno) nil nil newitem)))))) ;; insert the new item (insert (concat "\n" newitem)))) (defun muse-alter-list-item-indentation (operation) "Alter the indentation of the current list item. Valid values of OPERATION are 'increase and 'decrease." (let ((pstart (muse-get-paragraph-start)) (list-item (format muse-list-item-regexp (concat "[" muse-regexp-blank "]*"))) beg move-func indent) ;; search backwards until start of paragraph to see if we are on a ;; current item (save-excursion (if (or (progn (goto-char (muse-line-beginning-position)) ;; we are on an item (looking-at list-item)) ;; not on item, so search backwards (re-search-backward list-item pstart t)) (let ((beg (point))) ;; we are on an item (setq indent (buffer-substring (match-beginning 0) (match-beginning 1))) (muse-forward-list-item (muse-list-item-type (match-string 1)) (concat "[" muse-regexp-blank "]*") t) (save-restriction (narrow-to-region beg (point)) (goto-char (point-min)) (let ((halt nil)) (while (< (point) (point-max)) ;; increase or decrease the indentation (unless halt (cond ((eq operation 'increase) (insert " ")) ((eq operation 'decrease) (if (looking-at " ") ;; we have enough space, so delete it (delete-region (match-beginning 0) (match-end 0)) (setq halt t))))) (forward-line 1))))) ;; we are not on an item, so warn (message "You are not on a list item."))))) ;;;###autoload (defun muse-increase-list-item-indentation () "Increase the indentation of the current list item." (interactive) (muse-alter-list-item-indentation 'increase)) ;;;###autoload (defun muse-decrease-list-item-indentation () "Decrease the indentation of the current list item." (interactive) (muse-alter-list-item-indentation 'decrease)) ;;; Support page name completion using pcomplete (defun muse-mode-completions () "Return a list of possible completions names for this buffer." (let ((project (muse-project-of-file))) (if project (while (pcomplete-here (mapcar 'car (muse-project-file-alist project))))))) (defun muse-mode-current-word () (let ((end (point))) (save-excursion (save-restriction (skip-chars-backward (concat "^\\[\n" muse-regexp-blank)) (narrow-to-region (point) end)) (pcomplete-parse-buffer-arguments)))) ;;; Navigate/visit links or URLs. Use TAB, S-TAB and RET (or mouse-2). (defun muse-link-at-point (&optional pos) "Return link text if a URL or link is at point." (let ((case-fold-search nil) (inhibit-point-motion-hooks t) (here (or pos (point)))) ;; if we are using muse-colors, we can just use link properties to ;; determine whether we are on a link (if (featurep 'muse-colors) (when (get-text-property here 'muse-link) (save-excursion (when (and (not (bobp)) (get-text-property (1- here) 'muse-link)) (goto-char (or (previous-single-property-change here 'muse-link) (point-min)))) (if (looking-at muse-explicit-link-regexp) (progn (goto-char (match-beginning 1)) (muse-handle-explicit-link)) (muse-handle-implicit-link)))) ;; use fallback method to find a link (when (or (null pos) (and (char-after pos) (not (eq (char-syntax (char-after pos)) ?\ )))) (save-excursion (goto-char here) ;; check for explicit link here or before point (if (or (looking-at muse-explicit-link-regexp) (and (re-search-backward "\\[\\[\\|\\]\\]" (muse-line-beginning-position) t) (string= (or (match-string 0) "") "[[") (looking-at muse-explicit-link-regexp))) (progn (goto-char (match-beginning 1)) (muse-handle-explicit-link)) (goto-char here) ;; check for bare URL or other link type (skip-chars-backward (concat "^'\"<>{}(\n" muse-regexp-blank)) (and (looking-at muse-implicit-link-regexp) (muse-handle-implicit-link)))))))) (defun muse-make-link (link &optional desc) "Return a link to LINK with DESC as the description." (when (string-match muse-explicit-link-regexp link) (unless desc (setq desc (muse-get-link-desc link))) (setq link (muse-get-link link))) (if (and desc link (not (string= desc "")) (not (string= link desc))) (concat "[[" (muse-link-escape link) "][" (muse-link-escape desc) "]]") (concat "[[" (or (muse-link-escape link) "") "]]"))) ;;;###autoload (defun muse-insert-relative-link-to-file () "Insert a relative link to a file, with optional description, at point." ;; Perhaps the relative location should be configurable, so that the ;; file search would start in the publishing directory and then ;; insert the link relative to the publishing directory (interactive) (insert (muse-make-link (file-relative-name (read-file-name "Link: ")) (read-string "Text: ")))) (defcustom muse-insert-url-initial-input "http://" "The string to insert before reading a URL interactively. This is used by the `muse-insert-url' command." :type 'string :group 'muse-mode) (defun muse-insert-url () "Insert a URL, with optional description, at point." (interactive) (insert (muse-make-link (read-string "URL: " muse-insert-url-initial-input) (read-string "Text: ")))) ;;;###autoload (defun muse-edit-link-at-point () "Edit the current link. Do not rename the page originally referred to." (interactive) (if (muse-link-at-point) (let ((link (muse-link-unescape (muse-get-link))) (desc (muse-link-unescape (muse-get-link-desc)))) (replace-match (save-match-data (muse-make-link (read-string "Link: " link) (read-string "Text: " desc))) t t)) (error "There is no valid link at point"))) (defun muse-visit-link-default (link &optional other-window) "Visit the URL or link named by LINK. If ANCHOR is specified, search for it after opening LINK. This is the default function to call when visiting links; it is used by `muse-visit-link' if you have not specified :visit-link in `muse-project-alist'." (if (string-match muse-url-regexp link) (muse-browse-url link) (let (anchor base-buffer) (when (string-match "#" link) (setq anchor (substring link (match-beginning 0)) link (if (= (match-beginning 0) 0) ;; If there is an anchor but no link, default ;; to the current page. nil (substring link 0 (match-beginning 0))))) (when link (setq base-buffer (get-buffer link)) (if (and base-buffer (not (buffer-file-name base-buffer))) ;; If file is temporary (no associated file), just switch to ;; the buffer (if other-window (switch-to-buffer-other-window base-buffer) (switch-to-buffer base-buffer)) (let ((project (muse-project-of-file))) (if project (muse-project-find-file link project (and other-window 'find-file-other-window)) (if other-window (find-file-other-window link) (find-file link)))))) (when anchor (let ((pos (point)) (regexp (concat "^\\W*" (regexp-quote anchor) "\\b")) last) (goto-char (point-min)) (while (and (setq last (re-search-forward regexp nil t)) (muse-link-at-point))) (unless last (goto-char pos) (message "Could not find anchor `%s'" anchor))))))) (defun muse-visit-link (link &optional other-window) "Visit the URL or link named by LINK." (let ((visit-link-function (muse-get-keyword :visit-link (cadr (muse-project-of-file)) t))) (if visit-link-function (funcall visit-link-function link other-window) (muse-visit-link-default link other-window)))) ;;;###autoload (defun muse-browse-result (style &optional other-window) "Visit the current page's published result." (interactive (list (muse-project-get-applicable-style buffer-file-name (cddr muse-current-project)) current-prefix-arg)) (setq style (muse-style style)) (muse-project-publish-this-file nil style) (let* ((output-dir (muse-style-element :path style)) (output-suffix (muse-style-element :osuffix style)) (output-path (muse-publish-output-file buffer-file-name output-dir style)) (target (if output-suffix (concat (muse-path-sans-extension output-path) output-suffix) output-path)) (muse-current-output-style (list :base (car style) :path output-dir))) (if (not (file-readable-p target)) (error "Cannot open output file '%s'" target) (if other-window (find-file-other-window target) (let ((func (muse-style-element :browser style t))) (if func (funcall func target) (message "The %s publishing style does not support browsing." style))))))) ;;;###autoload (defun muse-follow-name-at-point (&optional other-window) "Visit the link at point." (interactive "P") (let ((link (muse-link-at-point))) (if link (muse-visit-link link other-window) (error "There is no valid link at point")))) ;;;###autoload (defun muse-follow-name-at-point-other-window () "Visit the link at point in other window." (interactive) (muse-follow-name-at-point t)) (defun muse-follow-name-at-mouse (event &optional other-window) "Visit the link at point, or yank text if none is found." (interactive "eN") (unless (save-excursion (cond ((fboundp 'event-window) ; XEmacs (set-buffer (window-buffer (event-window event))) (and (funcall (symbol-function 'event-point) event) (goto-char (funcall (symbol-function 'event-point) event)))) ((fboundp 'posn-window) ; Emacs (set-buffer (window-buffer (posn-window (event-start event)))) (goto-char (posn-point (event-start event))))) (let ((link (muse-link-at-point))) (when link (muse-visit-link link other-window) t))) ;; Fall back to normal binding for this event (call-interactively (lookup-key (current-global-map) (this-command-keys))))) (defun muse-follow-name-at-mouse-other-window (event) "Visit the link at point" (interactive "e") ;; throw away the old window position, since other-window will ;; change it anyway (select-window (car (cadr event))) (muse-follow-name-at-mouse event t)) ;;;###autoload (defun muse-next-reference () "Move forward to next Muse link or URL, cycling if necessary." (interactive) (let ((pos)) (save-excursion (when (get-text-property (point) 'muse-link) (goto-char (or (next-single-property-change (point) 'muse-link) (point-max)))) (setq pos (next-single-property-change (point) 'muse-link)) (when (not pos) (if (get-text-property (point-min) 'muse-link) (setq pos (point-min)) (setq pos (next-single-property-change (point-min) 'muse-link))))) (when pos (goto-char pos)))) ;;;###autoload (defun muse-previous-reference () "Move backward to the next Muse link or URL, cycling if necessary. In case of Emacs x <= 21 and ignoring of intangible properties (see `muse-mode-intangible-links'). This function is not entirely accurate, but it's close enough." (interactive) (let ((pos)) (save-excursion ;; Hack: The user perceives the two cases of point ("|") ;; position (1) "|[[" and (2) "[[|" or "][|" as "point is at ;; start of link". But in the sense of the function ;; "previous-single-property-change" these two cases are ;; different. The following code aligns these two cases. Emacs ;; 21: If the intangible property is ignored case (2) is more ;; complicate and this hack only solves the problem partially. ;; (when (and (get-text-property (point) 'muse-link) (muse-looking-back "\\[\\|\\]")) (goto-char (or (previous-single-property-change (point) 'muse-link) (point-min)))) (when (eq (point) (point-min)) (goto-char (point-max))) (setq pos (previous-single-property-change (point) 'muse-link)) (when (not pos) (if (get-text-property (point-min) 'muse-link) (setq pos (point-min)) (setq pos (previous-single-property-change (point-max) 'muse-link))))) (when pos (if (get-text-property pos 'muse-link) (goto-char pos) (goto-char (or (previous-single-property-change pos 'muse-link) (point-min))))))) ;;;###autoload (defun muse-what-changed () "Show the unsaved changes that have been made to the current file." (interactive) (diff-backup buffer-file-name)) ;;; Find text in project pages, or pages referring to the current page (defvar muse-search-history nil) (defun muse-grep (string &optional grep-command-no-shadow) "Grep for STRING in the project directories. GREP-COMMAND if passed will supplant `muse-grep-command'." ;; careful - grep-command leaks into compile, so we call it ;; -no-shadow instead (require 'compile) (let* ((str (or grep-command-no-shadow muse-grep-command)) (muse-directories (mapcar (lambda (thing) (car (cadr thing))) muse-project-alist)) (dirs (mapconcat (lambda (dir) (shell-quote-argument (expand-file-name dir))) muse-directories " "))) (if (string= dirs "") (muse-display-warning "No directories were found in the current project; aborting search") (while (string-match "%W" str) (setq str (replace-match string t t str))) (while (string-match "%D" str) (setq str (replace-match dirs t t str))) (if (fboundp 'compilation-start) (compilation-start str nil (lambda (&rest args) "*search*") grep-regexp-alist) (and (fboundp 'compile-internal) (compile-internal str "No more search hits" "search" nil grep-regexp-alist)))))) ;;;###autoload (defun muse-search-with-command (text) "Search for the given TEXT string in the project directories using the specified command." (interactive (list (let ((str (concat muse-grep-command)) pos) (when (string-match "%W" str) (setq pos (match-beginning 0)) (unless (featurep 'xemacs) (setq pos (1+ pos))) (setq str (replace-match "" t t str))) (read-from-minibuffer "Search command: " (cons str pos) nil nil 'muse-search-history)))) (muse-grep nil text)) ;;;###autoload (defun muse-search () "Search for the given TEXT using the default grep command." (interactive) (muse-grep (read-string "Search: "))) ;;;###autoload (defun muse-find-backlinks () "Grep for the current pagename in all the project directories." (interactive) (muse-grep (muse-page-name))) ;;; Generate an index of all known Muse pages (defun muse-generate-index (&optional as-list exclude-private) "Generate an index of all Muse pages." (let ((index (muse-index-as-string as-list exclude-private))) (with-current-buffer (get-buffer-create "*Muse Index*") (erase-buffer) (insert index) (current-buffer)))) ;;;###autoload (defun muse-index () "Display an index of all known Muse pages." (interactive) (message "Generating Muse index...") (let ((project (muse-project))) (with-current-buffer (muse-generate-index) (goto-char (point-min)) (muse-mode) (setq muse-current-project project) (pop-to-buffer (current-buffer)))) (message "Generating Muse index...done")) (defun muse-index-as-string (&optional as-list exclude-private exclude-current) "Generate an index of all Muse pages. If AS-LIST is non-nil, insert a dash and spaces before each item. If EXCLUDE-PRIVATE is non-nil, exclude files that have private permissions. If EXCLUDE-CURRENT is non-nil, exclude the current file from the output." (let ((files (sort (copy-alist (muse-project-file-alist)) (function (lambda (l r) (string-lessp (car l) (car r))))))) (when (and exclude-current (muse-page-name)) (setq files (delete (assoc (muse-page-name) files) files))) (with-temp-buffer (while files (unless (and exclude-private (muse-project-private-p (cdar files))) (insert (if as-list " - " "") "[[" (caar files) "]]\n")) (setq files (cdr files))) (buffer-string)))) ;;; Insert tags interactively on C-c TAB t (defvar muse-tag-history nil "List of recently-entered tags; used by `muse-insert-tag'. If you want a tag to start as the default, you may manually set this variable to a list.") (defvar muse-custom-tags nil "Keep track of any new tags entered in `muse-insert-tag'. If there are (X)HTML tags that you use frequently with that function, you might want to set this manually.") ;;;###autoload (defun muse-insert-tag (tag) "Insert a tag interactively with a blank line after it." (interactive (list (funcall muse-completing-read-function (concat "Tag: " (when muse-tag-history (concat "(default: " (car muse-tag-history) ") "))) (progn (require 'muse-publish) (mapcar 'list (nconc (mapcar 'car muse-publish-markup-tags) muse-custom-tags))) nil nil nil 'muse-tag-history (car muse-tag-history)))) (when (equal tag "") (setq tag (car muse-tag-history))) (unless (interactive-p) (require 'muse-publish)) (let ((tag-entry (assoc tag muse-publish-markup-tags)) (options "")) ;; Add to custom list if no entry exists (unless tag-entry (add-to-list 'muse-custom-tags tag)) ;; Get option (when (nth 2 tag-entry) (setq options (read-string "Option: "))) (unless (equal options "") (setq options (concat " " options))) ;; Insert the tag, closing if necessary (when tag (insert (concat "<" tag options ">"))) (when (nth 1 tag-entry) (insert (concat "\n\n\n")) (forward-line -2)))) ;;; Muse list edit minor mode (defvar muse-list-edit-minor-mode-map (let ((map (make-sparse-keymap))) (define-key map [(meta return)] 'muse-l-e-m-m-insert-list-item) (define-key map [(control ?>)] 'muse-l-e-m-m-increase-list-item-indent) (define-key map [(control ?<)] 'muse-l-e-m-m-decrease-list-item-indent) map) "Keymap used by Muse list edit minor mode.") (defvar muse-l-e-m-m-list-item-regexp (concat "^%s\\(\\([^\n" muse-regexp-blank "].*?\\)?::" "\\(?:[" muse-regexp-blank "]+\\|$\\)" "\\|[" muse-regexp-blank "]?[-*+][" muse-regexp-blank "]*" "\\|[" muse-regexp-blank "][0-9]+\\.[" muse-regexp-blank "]*\\)") "Regexp used to match the beginning of a list item. This is used by `muse-list-edit-minor-mode'. The '%s' will be replaced with a whitespace regexp when publishing.") (defun muse-l-e-m-m-insert-list-item () "Insert a list item at the current point, taking into account your current list type and indentation level." (interactive) (let ((muse-list-item-regexp muse-l-e-m-m-list-item-regexp)) (call-interactively 'muse-insert-list-item))) (defun muse-l-e-m-m-increase-list-item-indent () "Increase the indentation of the current list item." (interactive) (let ((muse-list-item-regexp muse-l-e-m-m-list-item-regexp)) (call-interactively 'muse-increase-list-item-indentation))) (defun muse-l-e-m-m-decrease-list-item-indent () "Decrease the indentation of the current list item." (interactive) (let ((muse-list-item-regexp muse-l-e-m-m-list-item-regexp)) (call-interactively 'muse-decrease-list-item-indentation))) (defvar muse-l-e-m-m-data nil "A list of data that was changed by Muse list edit minor mode.") (make-variable-buffer-local 'muse-l-e-m-m-data) ;;;###autoload (define-minor-mode muse-list-edit-minor-mode "This is a global minor mode for editing files with lists. It is meant to be used with other major modes, and not with Muse mode. Interactively, with no prefix argument, toggle the mode. With universal prefix ARG turn mode on. With zero or negative ARG turn mode off. This minor mode provides the Muse keybindings for editing lists, and support for filling lists properly. It recognizes not only Muse-style lists, which use the \"-\" character or numbers, but also lists that use asterisks or plus signs. This should make the minor mode generally useful. Definition lists and footnotes are also recognized. Note that list items may omit leading spaces, for compatibility with modes that set `left-margin', such as `debian-changelog-mode'. \\{muse-list-edit-minor-mode-map}" :init-value nil :lighter "" :keymap muse-list-edit-minor-mode-map :global nil :group 'muse-mode (if (not muse-list-edit-minor-mode) ;; deactivate (when muse-l-e-m-m-data (setq adaptive-fill-regexp (cdr (assoc "a-f-r" muse-l-e-m-m-data)) paragraph-start (cdr (assoc "p-s" muse-l-e-m-m-data)) fill-prefix (cdr (assoc "f-p" muse-l-e-m-m-data))) (setq muse-l-e-m-m-data nil)) ;; activate (unless muse-l-e-m-m-data ;; save previous fill-related data so we can restore it later (setq muse-l-e-m-m-data (list (cons "a-f-r" adaptive-fill-regexp) (cons "p-s" paragraph-start) (cons "f-p" fill-prefix)))) ;; make fill work nicely with item lists (let ((regexp (concat "\\s-*\\([-*+]\\|[0-9]+\\.\\)\\s-+" "\\|\\[[0-9]+\\]\\s-*" "\\|.*\\s-*::\\s-+"))) (set (make-local-variable 'adaptive-fill-regexp) (concat regexp "\\|\\s-*")) (set (make-local-variable 'paragraph-start) (concat paragraph-start "\\|" regexp))) ;; force fill-prefix to be nil, because if it is a string that has ;; initial spaces, it messes up fill-paragraph's algorithm (set (make-local-variable 'fill-prefix) nil))) (defun turn-on-muse-list-edit-minor-mode () "Unconditionally turn on Muse list edit minor mode." (muse-list-edit-minor-mode 1)) (defun turn-off-muse-list-edit-minor-mode () "Unconditionally turn off Muse list edit minor mode." (muse-list-edit-minor-mode -1)) ;;; muse-mode.el ends here muse-el-3.20+dfsg/lisp/muse-http.el0000644000175000017500000002205711331353120016455 0ustar taffittaffit;;; muse-http.el --- publish HTML files over HTTP ;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 ;; Free Software Foundation, Inc. ;; This file is part of Emacs Muse. It is not part of GNU Emacs. ;; Emacs Muse 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 3, or (at your ;; option) any later version. ;; Emacs Muse 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 Emacs Muse; see the file COPYING. If not, write to the ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;;; Contributors: ;;; Code: ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; Publishing HTML over HTTP (using httpd.el) ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (require 'muse-html) (require 'muse-project) (require 'httpd) (require 'cgi) (defgroup muse-http nil "Options controlling the behavior of Emacs Muse over HTTP." :group 'press) (defcustom muse-http-maintainer (concat "webmaster@" (system-name)) "The maintainer address to use for the HTTP 'From' field." :type 'string :group 'muse-http) (defcustom muse-http-publishing-style "html" "The style to use when publishing projects over http." :type 'string :group 'muse-http) (defcustom muse-http-max-cache-size 64 "The number of pages to cache when serving over HTTP. This only applies if set while running the persisted invocation server. See main documentation for the `muse-http' customization group." :type 'integer :group 'muse-http) (defvar muse-buffer-mtime nil) (make-variable-buffer-local 'muse-buffer-mtime) (defun muse-sort-buffers (l r) (let ((l-mtime (with-current-buffer l muse-buffer-mtime)) (r-mtime (with-current-buffer r muse-buffer-mtime))) (cond ((and (null l-mtime) (null r-mtime)) l) ((null l-mtime) r) ((null r-mtime) l) (t (muse-time-less-p r-mtime l-mtime))))) (defun muse-winnow-list (entries &optional predicate) "Return only those ENTRIES for which PREDICATE returns non-nil." (let ((flist (list t))) (let ((entry entries)) (while entry (if (funcall predicate (car entry)) (nconc flist (list (car entry)))) (setq entry (cdr entry)))) (cdr flist))) (defun muse-http-prune-cache () "If the page cache has become too large, prune it." (let* ((buflist (sort (muse-winnow-list (buffer-list) (function (lambda (buf) (with-current-buffer buf muse-buffer-mtime)))) 'muse-sort-buffers)) (len (length buflist))) (while (> len muse-http-max-cache-size) (kill-buffer (car buflist)) (setq len (1- len))))) (defvar muse-http-serving-p nil) (defun muse-http-send-buffer (&optional modified code msg) "Markup and send the contents of the current buffer via HTTP." (httpd-send (or code 200) (or msg "OK") "Server: muse.el/" muse-version httpd-endl "Connection: close" httpd-endl "MIME-Version: 1.0" httpd-endl "Date: " (format-time-string "%a, %e %b %Y %T %Z") httpd-endl "From: " muse-http-maintainer httpd-endl) (when modified (httpd-send-data "Last-Modified: " (format-time-string "%a, %e %b %Y %T %Z" modified) httpd-endl)) (httpd-send-data "Content-Type: text/html; charset=iso-8859-1" httpd-endl "Content-Length: " (number-to-string (1- (point-max))) httpd-endl httpd-endl (buffer-string)) (httpd-send-eof)) (defun muse-http-reject (title msg &optional annotation) (muse-with-temp-buffer (insert msg ".\n") (if annotation (insert annotation "\n")) (muse-publish-markup-buffer title muse-http-publishing-style) (muse-http-send-buffer nil 404 msg))) (defun muse-http-prepare-url (target explicit) (save-match-data (unless (or (not explicit) (string-match muse-url-regexp target) (string-match muse-image-regexp target) (string-match muse-file-regexp target)) (setq target (concat "page?" target "&project=" muse-http-serving-p)))) (muse-publish-read-only target)) (defun muse-http-render-page (name) "Render the Muse page identified by NAME. When serving from a dedicated Emacs process (see the httpd-serve script), a maximum of `muse-http-max-cache-size' pages will be cached in memory to speed up serving time." (let ((file (muse-project-page-file name muse-http-serving-p)) (muse-publish-url-transforms (cons 'muse-http-prepare-url muse-publish-url-transforms)) (inhibit-read-only t)) (when file (with-current-buffer (get-buffer-create file) (let ((modified-time (nth 5 (file-attributes file))) (muse-publishing-current-file file) muse-publishing-current-style) (when (or (null muse-buffer-mtime) (muse-time-less-p muse-buffer-mtime modified-time)) (erase-buffer) (setq muse-buffer-mtime modified-time)) (goto-char (point-max)) (when (bobp) (muse-insert-file-contents file t) (let ((styles (cddr (muse-project muse-http-serving-p))) style) (while (and styles (null style)) (let ((include-regexp (muse-style-element :include (car styles))) (exclude-regexp (muse-style-element :exclude (car styles)))) (when (and (or (and (null include-regexp) (null exclude-regexp)) (if include-regexp (string-match include-regexp file) (not (string-match exclude-regexp file)))) (not (muse-project-private-p file))) (setq style (car styles)) (while (muse-style-element :base style) (setq style (muse-style (muse-style-element :base style)))) (if (string= (car style) muse-http-publishing-style) (setq style (car styles)) (setq style nil)))) (setq styles (cdr styles))) (muse-publish-markup-buffer name (or style muse-http-publishing-style)))) (set-buffer-modified-p nil) (muse-http-prune-cache) (current-buffer)))))) (defun muse-http-transmit-page (name) "Render the Muse page identified by NAME. When serving from a dedicated Emacs process (see the httpd-serve script), a maximum of `muse-http-max-cache-size' pages will be cached in memory to speed up serving time." (let ((inhibit-read-only t) (buffer (muse-http-render-page name))) (if buffer (with-current-buffer buffer (muse-http-send-buffer muse-buffer-mtime))))) (defvar httpd-vars nil) (defsubst httpd-var (var) "Return value of VAR as a URL variable. If VAR doesn't exist, nil." (cdr (assoc var httpd-vars))) (defsubst httpd-var-p (var) "Return non-nil if VAR was passed as a URL variable." (not (null (assoc var httpd-vars)))) (defun muse-http-serve (page &optional content) "Serve the given PAGE from this press server." ;; index.html is really a reference to the project home page (if (and muse-project-alist (string-match "\\`index.html?\\'" page)) (setq page (concat "page?" (muse-get-keyword :default (cadr (car muse-project-alist)))))) ;; handle the actual request (let ((vc-follow-symlinks t) (muse-publish-report-threshhold nil) muse-http-serving-p httpd-vars) (save-excursion ;; process any CGI variables, if cgi.el is available (if (string-match "\\`\\([^&]+\\)&" page) (setq httpd-vars (cgi-decode (substring page (match-end 0))) page (match-string 1 page))) (unless (setq muse-http-serving-p (httpd-var "project")) (let ((project (car muse-project-alist))) (setq muse-http-serving-p (car project)) (setq httpd-vars (cons (cons "project" (car project)) httpd-vars)))) (if (and muse-http-serving-p (string-match "\\`page\\?\\(.+\\)" page)) (muse-http-transmit-page (match-string 1 page)))))) (if (featurep 'httpd) (httpd-add-handler "\\`\\(index\\.html?\\|page\\(\\?\\|\\'\\)\\)" 'muse-http-serve)) (provide 'muse-http) ;;; muse-http.el ends here muse-el-3.20+dfsg/lisp/muse-xml-common.el0000644000175000017500000002011011331353120017550 0ustar taffittaffit;;; muse-xml-common.el --- common routines for XML-like publishing styles ;; Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 ;; Free Software Foundation, Inc. ;; This file is part of Emacs Muse. It is not part of GNU Emacs. ;; Emacs Muse 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 3, or (at your ;; option) any later version. ;; Emacs Muse 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 Emacs Muse; see the file COPYING. If not, write to the ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;;; Contributors: ;;; Code: ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; Muse XML Publishing - Common Elements ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (require 'muse-publish) (require 'muse-regexps) (defcustom muse-xml-encoding-map '((iso-8859-1 . "iso-8859-1") (iso-2022-jp . "iso-2022-jp") (utf-8 . "utf-8") (japanese-iso-8bit . "euc-jp") (chinese-big5 . "big5") (mule-utf-8 . "utf-8") (chinese-iso-8bit . "gb2312") (chinese-gbk . "gbk")) "An alist mapping Emacs coding systems to appropriate XML charsets. Use the base name of the coding system (i.e. without the -unix)." :type '(alist :key-type coding-system :value-type string) :group 'muse-xml) (defun muse-xml-transform-content-type (content-type default) "Using `muse-xml-encoding-map', try and resolve an Emacs coding system to an associated XML coding system. If no match is found, the DEFAULT charset is used instead." (let ((match (and (fboundp 'coding-system-base) (assoc (coding-system-base content-type) muse-xml-encoding-map)))) (if match (cdr match) default))) (defcustom muse-xml-markup-specials '((?\" . """) (?\< . "<") (?\> . ">") (?\& . "&")) "A table of characters which must be represented specially." :type '(alist :key-type character :value-type string) :group 'muse-xml) (defcustom muse-xml-markup-specials-url-extra '((?\" . """) (?\< . "<") (?\> . ">") (?\& . "&") (?\ . "%20") (?\n . "%0D%0A")) "A table of characters which must be represented specially. These are extra characters that are escaped within URLs." :type '(alist :key-type character :value-type string) :group 'muse-xml) (defun muse-xml-decide-specials (context) "Determine the specials to escape, depending on CONTEXT." (cond ((memq context '(email url image)) 'muse-xml-escape-url) ((eq context 'url-extra) muse-xml-markup-specials-url-extra) (t muse-xml-markup-specials))) (defun muse-xml-escape-url (str) "Convert to character entities any non-alphanumeric characters outside a few punctuation symbols, that risk being misinterpreted if not escaped." (when str (setq str (muse-publish-escape-specials-in-string str 'url-extra)) (let (pos code len ch) (save-match-data (while (setq pos (string-match (concat "[^-" muse-regexp-alnum "/:._=@\\?~#%\"\\+<>()&;]") str pos)) (setq ch (aref str pos) code (concat "&#" (int-to-string (cond ((fboundp 'char-to-ucs) (char-to-ucs ch)) ((fboundp 'char-to-int) (char-to-int ch)) (t ch))) ";") len (length code) str (concat (substring str 0 pos) code (when (< pos (length str)) (substring str (1+ pos) nil))) pos (+ len pos))) str)))) (defun muse-xml-markup-anchor () (unless (get-text-property (match-end 1) 'muse-link) (let ((text (muse-markup-text 'anchor (match-string 2)))) (save-match-data (skip-chars-forward (concat muse-regexp-blank "\n")) (when (looking-at (concat "<\\([^" muse-regexp-blank "/>\n]+\\)>")) (goto-char (match-end 0))) (muse-insert-markup text))) (match-string 1))) (defun muse-xml-sort-table (table) "Sort the given table structure so that it validates properly." ;; Note that the decision matrix must have a nil diagonal, or else ;; elements with the same type will be reversed with respect to each ;; other. (let ((decisions '((nil nil nil) ; body < header, body < footer (t nil t) ; header stays where it is (t nil nil)))) ; footer < header (sort table #'(lambda (l r) (and (integerp (car l)) (integerp (car r)) (nth (1- (car r)) (nth (1- (car l)) decisions))))))) (defun muse-xml-markup-table (&optional attributes) "Publish the matched region into a table. If a string ATTRIBUTES is given, pass it to the markup string begin-table." (let* ((table-info (muse-publish-table-fields (match-beginning 0) (match-end 0))) (row-len (car table-info)) (supports-group (not (string= (muse-markup-text 'begin-table-group row-len) ""))) (field-list (muse-xml-sort-table (cdr table-info))) last-part) (when table-info (let ((beg (point))) (muse-publish-ensure-block beg)) (muse-insert-markup (muse-markup-text 'begin-table (or attributes ""))) (muse-insert-markup (muse-markup-text 'begin-table-group row-len)) (dolist (fields field-list) (let* ((type (car fields)) (part (cond ((eq type 'hline) nil) ((= type 1) "tbody") ((= type 2) "thead") ((= type 3) "tfoot"))) (col (cond ((eq type 'hline) nil) ((= type 1) "td") ((= type 2) "th") ((= type 3) "td")))) (setq fields (cdr fields)) (unless (and part last-part (string= part last-part)) (when last-part (muse-insert-markup " \n") (when (eq type 'hline) ;; horizontal separators are represented by closing ;; the current table group and opening a new one (muse-insert-markup (muse-markup-text 'end-table-group)) (muse-insert-markup (muse-markup-text 'begin-table-group row-len)))) (when part (muse-insert-markup " <" part ">\n")) (setq last-part part)) (unless (eq type 'hline) (muse-insert-markup (muse-markup-text 'begin-table-row)) (dolist (field fields) (muse-insert-markup (muse-markup-text 'begin-table-entry col)) (insert field) (muse-insert-markup (muse-markup-text 'end-table-entry col))) (muse-insert-markup (muse-markup-text 'end-table-row))))) (when last-part (muse-insert-markup " \n")) (muse-insert-markup (muse-markup-text 'end-table-group)) (muse-insert-markup (muse-markup-text 'end-table)) (insert ?\n)))) (defun muse-xml-prepare-buffer () (set (make-local-variable 'muse-publish-url-transforms) (cons 'muse-xml-escape-string muse-publish-url-transforms))) (provide 'muse-xml-common) ;;; muse-xml-common.el ends here muse-el-3.20+dfsg/lisp/muse-blosxom.el0000644000175000017500000002642311331353120017162 0ustar taffittaffit;;; muse-blosxom.el --- publish a document tree for serving by (py)Blosxom ;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 ;; Free Software Foundation, Inc. ;; Author: Michael Olson ;; Date: Wed, 23 March 2005 ;; This file is part of Emacs Muse. It is not part of GNU Emacs. ;; Emacs Muse 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 3, or (at your ;; option) any later version. ;; Emacs Muse 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 Emacs Muse; see the file COPYING. If not, write to the ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;; The Blosxom publishing style publishes a tree of categorised files ;; to a mirrored tree of stories to be served by blosxom.cgi or ;; pyblosxom.cgi. ;; ;; Serving entries with (py)blosxom ;; -------------------------------- ;; ;; Each Blosxom file must include `#date yyyy-mm-dd', or optionally ;; the longer `#date yyyy-mm-dd-hh-mm', a title (using the `#title' ;; directive) plus whatever normal content is desired. ;; ;; The date directive is not used directly by (py)blosxom or this ;; program. You need to find two additional items to make use of this ;; feature. ;; ;; 1. A script to gather date directives from the entire blog tree ;; into a single file. The file must associate a blog entry with ;; a date. ;; ;; 2. A plugin for (py)blosxom that reads this file. ;; ;; These 2 things are provided for pyblosxom in the contrib/pyblosxom ;; subdirectory. `getstamps.py' provides the 1st service, while ;; `hardcodedates.py' provides the second service. Eventually it is ;; hoped that a blosxom plugin and script will be found/written. ;; ;; Alternately, the pyblosxom metadate plugin may be used. On the ;; plus side, there is no need to run a script to gather the date. On ;; the downside, each entry is read twice rather than once when the ;; page is rendered. Set the value of muse-blosxom-use-metadate to ;; non-nil to enable adding a #postdate directive to all published ;; files. You can do this by: ;; ;; M-x customize-variable RET muse-blosxom-use-metadate RET ;; ;; With the metadate plugin installed in pyblosxom, the date set in ;; this directive will be used instead of the file's modification ;; time. The plugin is included with Muse at ;; contrib/pyblosxom/metadate.py. ;; ;; Generating a Muse project entry ;; ------------------------------- ;; ;; Muse-blosxom has some helper functions to make specifying ;; muse-blosxom projects a lot easier. An example follows. ;; ;; (setq muse-project-alist ;; `(("blog" ;; (,@(muse-project-alist-dirs "~/path/to/blog-entries") ;; :default "index") ;; ,@(muse-project-alist-styles "~/path/to/blog-entries" ;; "~/public_html/blog" ;; "blosxom-xhtml") ;; ))) ;; ;; Note that we need a backtick instead of a single quote on the ;; second line of this example. ;; ;; Creating new blog entries ;; ------------------------- ;; ;; There is a function called `muse-blosxom-new-entry' that will ;; automate the process of making a new blog entry. To make use of ;; it, do the following. ;; ;; - Customize `muse-blosxom-base-directory' to the location that ;; your blog entries are stored. ;; ;; - Assign the `muse-blosxom-new-entry' function to a key sequence. ;; I use the following code to assign this function to `C-c p l'. ;; ;; (global-set-key "\C-cpl" 'muse-blosxom-new-entry) ;; ;; - You should create your directory structure ahead of time under ;; your base directory. These directories, which correspond with ;; category names, may be nested. ;; ;; - When you enter this key sequence, you will be prompted for the ;; category of your entry and its title. Upon entering this ;; information, a new file will be created that corresponds with ;; the title, but in lowercase letters and having special ;; characters converted to underscores. The title and date ;; directives will be inserted automatically. ;; ;; Using tags ;; ---------- ;; ;; If you wish to keep all of your blog entries in one directory and ;; use tags to classify your entries, set `muse-blosxom-use-tags' to ;; non-nil. ;; ;; For this to work, you will need to be using the PyBlosxom plugin at ;; http://pyblosxom.sourceforge.net/blog/registry/meta/Tags. ;;; Contributors: ;; Gary Vaughan (gary AT gnu DOT org) is the original author of ;; `emacs-wiki-blosxom.el', which is the ancestor of this file. ;; Brad Collins (brad AT chenla DOT org) ported this file to Muse. ;; Björn Lindström (bkhl AT elektrubadur DOT se) made many valuable ;; suggestions. ;; Sasha Kovar (sasha AT arcocene DOT org) fixed ;; muse-blosxom-new-entry when using tags and also implemented support ;; for the #postdate directive. ;;; Code: ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; Muse Blosxom Publishing ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (require 'muse-project) (require 'muse-publish) (require 'muse-html) (defgroup muse-blosxom nil "Options controlling the behavior of Muse Blosxom publishing. See `muse-blosxom' for more information." :group 'muse-publish) (defcustom muse-blosxom-extension ".txt" "Default file extension for publishing Blosxom files." :type 'string :group 'muse-blosxom) (defcustom muse-blosxom-header "(concat (muse-publishing-directive \"title\") \"\\n\" (when muse-blosxom-use-metadate (let ((date (muse-publishing-directive \"date\"))) (when date (concat \"#postdate \" (muse-blosxom-format-date date) \"\\n\")))) (when muse-blosxom-use-tags (let ((tags (muse-publishing-directive \"tags\"))) (when tags (concat \"#tags \" tags \"\\n\")))))" "Header used for publishing Blosxom files. This may be text or a filename." :type 'string :group 'muse-blosxom) (defcustom muse-blosxom-footer "" "Footer used for publishing Blosxom files. This may be text or a filename." :type 'string :group 'muse-blosxom) (defcustom muse-blosxom-base-directory "~/Blog" "Base directory of blog entries. This is the top-level directory where your Muse blog entries may be found." :type 'directory :group 'muse-blosxom) (defcustom muse-blosxom-use-tags nil "Determine whether or not to enable use of the #tags directive. If you wish to keep all of your blog entries in one directory and use tags to classify your entries, set `muse-blosxom-use-tags' to non-nil. For this to work, you will need to be using the PyBlosxom plugin at http://pyblosxom.sourceforge.net/blog/registry/meta/Tags." :type 'boolean :group 'muse-blosxom) (defcustom muse-blosxom-use-metadate nil "Determine whether or not to use the #postdate directive. If non-nil, published entries include the original date (as specified in the muse #date line) which can be read by the metadate PyBlosxom plugin. For this to work, you will need to be using the PyBlosxom plugin at http://pyblosxom.sourceforge.net/blog/registry/date/metadate." :type 'boolean :group 'muse-blosxom) ;; Maintain (published-file . date) alist, which will later be written ;; to a timestamps file; not implemented yet. (defvar muse-blosxom-page-date-alist nil) (defun muse-blosxom-update-page-date-alist () "Add a date entry to `muse-blosxom-page-date-alist' for this page." (when muse-publishing-current-file ;; Make current file be relative to base directory (let ((rel-file (concat (file-name-as-directory (or (muse-publishing-directive "category") (file-relative-name (file-name-directory (expand-file-name muse-publishing-current-file)) (file-truename muse-blosxom-base-directory)))) (file-name-nondirectory muse-publishing-current-file)))) ;; Strip the file extension (when muse-ignored-extensions-regexp (setq rel-file (save-match-data (and (string-match muse-ignored-extensions-regexp rel-file) (replace-match "" t t rel-file))))) ;; Add to page-date alist (add-to-list 'muse-blosxom-page-date-alist `(,rel-file . ,(muse-publishing-directive "date")))))) ;; Enter a new blog entry (defun muse-blosxom-title-to-file (title) "Derive a file name from the given TITLE. Feel free to overwrite this if you have a different concept of what should be allowed in a filename." (muse-replace-regexp-in-string (concat "[^-." muse-regexp-alnum "]") "_" (downcase title))) (defun muse-blosxom-format-date (date) "Convert a date string to PyBlosxom metadate plugin format." (apply #'format "%s-%s-%s %s:%s" (split-string date "-"))) ;;;###autoload (defun muse-blosxom-new-entry (category title) "Start a new blog entry with given CATEGORY. The filename of the blog entry is derived from TITLE. The page will be initialized with the current date and TITLE." (interactive (list (if muse-blosxom-use-tags (let ((tag "foo") (tags nil)) (while (progn (setq tag (read-string "Tag (RET to continue): ")) (not (string= tag ""))) (add-to-list 'tags tag t)) tags) (funcall muse-completing-read-function "Category: " (mapcar 'list (muse-project-recurse-directory muse-blosxom-base-directory)))) (read-string "Title: "))) (let ((file (muse-blosxom-title-to-file title))) (muse-project-find-file file "blosxom" nil (if muse-blosxom-use-tags (directory-file-name muse-blosxom-base-directory) (concat (directory-file-name muse-blosxom-base-directory) "/" category)))) (goto-char (point-min)) (insert "#date " (format-time-string "%Y-%m-%d-%H-%M") "\n#title " title) (if muse-blosxom-use-tags (if (> (length category) 0) (insert (concat "\n#tags " (mapconcat #'identity category ",")))) (unless (string= category "") (insert (concat "\n#category " category)))) (insert "\n\n") (forward-line 2)) ;;; Register the Muse Blosxom Publisher (muse-derive-style "blosxom-html" "html" :suffix 'muse-blosxom-extension :link-suffix 'muse-html-extension :header 'muse-blosxom-header :footer 'muse-blosxom-footer :after 'muse-blosxom-update-page-date-alist :browser 'find-file) (muse-derive-style "blosxom-xhtml" "xhtml" :suffix 'muse-blosxom-extension :link-suffix 'muse-xhtml-extension :header 'muse-blosxom-header :footer 'muse-blosxom-footer :after 'muse-blosxom-update-page-date-alist :browser 'find-file) (provide 'muse-blosxom) ;;; muse-blosxom.el ends here muse-el-3.20+dfsg/lisp/muse-protocols.el0000644000175000017500000002131511331353120017516 0ustar taffittaffit;;; muse-protocols.el --- URL protocols that Muse recognizes ;; Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 ;; Free Software Foundation, Inc. ;; Author: Brad Collins (brad AT chenla DOT org) ;; This file is part of Emacs Muse. It is not part of GNU Emacs. ;; Emacs Muse 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 3, or (at your ;; option) any later version. ;; Emacs Muse 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 Emacs Muse; see the file COPYING. If not, write to the ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;; Here's an example for adding a protocol for the site yubnub, a Web ;; Command line service. ;; ;; (add-to-list 'muse-url-protocols '("yubnub://" muse-browse-url-yubnub ;; muse-resolve-url-yubnub)) ;; ;; (defun muse-resolve-url-yubnub (url) ;; "Resolve a yubnub URL." ;; ;; Remove the yubnub:// ;; (when (string-match "\\`yubnub://\\(.+\\)" url) ;; (match-string 1))) ;; ;; (defun muse-browse-url-yubnub (url) ;; "If this is a yubnub URL-command, jump to it." ;; (setq url (muse-resolve-url-yubnub url)) ;; (browse-url (concat "http://yubnub.org/parser/parse?command=" ;; url))) ;;; Contributors: ;; Phillip Lord (Phillip.Lord AT newcastle DOT ac DOT uk) provided a ;; handler for DOI URLs. ;; Stefan Schlee fixed a bug with handling of colons at the end of ;; URLs. ;; Valery V. Vorotyntsev contribued the woman:// protocol handler and ;; simplified `muse-browse-url-man'. ;;; Code: ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; Muse URL Protocols ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (require 'info) (require 'muse-regexps) (defvar muse-url-regexp nil "A regexp used to match URLs within a Muse page. This is autogenerated from `muse-url-protocols'.") (defun muse-update-url-regexp (sym value) (setq muse-url-regexp (concat "\\<\\(" (mapconcat 'car value "\\|") "\\)" "[^][" muse-regexp-blank "\"'()<>^`{}\n]*" "[^][" muse-regexp-blank "\"'()<>^`{}.,;:\n]+")) (set sym value)) (defcustom muse-url-protocols '(("[uU][rR][lL]:" muse-browse-url-url identity) ("info://" muse-browse-url-info nil) ("man://" muse-browse-url-man nil) ("woman://" muse-browse-url-woman nil) ("google://" muse-browse-url-google muse-resolve-url-google) ("http:/?/?" browse-url identity) ("https:/?/?" browse-url identity) ("ftp:/?/?" browse-url identity) ("gopher://" browse-url identity) ("telnet://" browse-url identity) ("wais://" browse-url identity) ("file://?" browse-url identity) ("dict:" muse-browse-url-dict muse-resolve-url-dict) ("doi:" muse-browse-url-doi muse-resolve-url-doi) ("news:" browse-url identity) ("snews:" browse-url identity) ("mailto:" browse-url identity)) "A list of (PROTOCOL BROWSE-FUN RESOLVE-FUN) used to match URL protocols. PROTOCOL describes the first part of the URL, including the \"://\" part. This may be a regexp. BROWSE-FUN should accept URL as an argument and open the URL in the current window. RESOLVE-FUN should accept URL as an argument and return the final URL, or nil if no URL should be included." :type '(repeat (list :tag "Protocol" (string :tag "Regexp") (function :tag "Browse") (choice (function :tag "Resolve") (const :tag "Don't resolve" nil)))) :set 'muse-update-url-regexp :group 'muse) (add-hook 'muse-update-values-hook (lambda () (muse-update-url-regexp 'muse-url-protocols muse-url-protocols))) (defcustom muse-wikipedia-country "en" "Indicate the 2-digit country code that we use for Wikipedia queries." :type 'string :options '("de" "en" "es" "fr" "it" "pl" "pt" "ja" "nl" "sv") :group 'muse) (defun muse-protocol-find (proto list) "Return the first element of LIST whose car matches the regexp PROTO." (catch 'found (dolist (item list) (when (string-match (concat "\\`" (car item)) proto) (throw 'found item))))) ;;;###autoload (defun muse-browse-url (url &optional other-window) "Handle URL with the function specified in `muse-url-protocols'. If OTHER-WINDOW is non-nil, open in a different window." (interactive (list (read-string "URL: ") current-prefix-arg)) ;; Strip text properties (when (fboundp 'set-text-properties) (set-text-properties 0 (length url) nil url)) (when other-window (switch-to-buffer-other-window (current-buffer))) (when (string-match muse-url-regexp url) (let* ((proto (match-string 1 url)) (entry (muse-protocol-find proto muse-url-protocols))) (when entry (funcall (cadr entry) url))))) (defun muse-resolve-url (url &rest ignored) "Resolve URL with the function specified in `muse-url-protocols'." (when (string-match muse-url-regexp url) (let* ((proto (match-string 1 url)) (entry (muse-protocol-find proto muse-url-protocols))) (when entry (let ((func (car (cddr entry)))) (if func (setq url (funcall func url)) (setq url nil)))))) url) (defun muse-protocol-add (protocol browse-function resolve-function) "Add PROTOCOL to `muse-url-protocols'. PROTOCOL may be a regexp. BROWSE-FUNCTION should be a function that visits a URL in the current buffer. RESOLVE-FUNCTION should be a function that transforms a URL for publishing or returns nil if not linked." (add-to-list 'muse-url-protocols (list protocol browse-function resolve-function)) (muse-update-url-regexp 'muse-url-protocols muse-url-protocols)) (defun muse-browse-url-url (url) "Call `muse-protocol-browse-url' to browse URL. This is used when we are given something like \"URL:http://example.org/\". If you're looking for a good example for how to make a custom URL handler, look at `muse-browse-url-dict' instead." (when (string-match "\\`[uU][rR][lL]:\\(.+\\)" url) (muse-browse-url (match-string 1 url)))) (defun muse-resolve-url-dict (url) "Return the Wikipedia link corresponding with the given URL." (when (string-match "\\`dict:\\(.+\\)" url) (concat "http://" muse-wikipedia-country ".wikipedia.org/" "wiki/Special:Search?search=" (match-string 1 url)))) (defun muse-browse-url-dict (url) "If this is a Wikipedia URL, browse it." (let ((dict-url (muse-resolve-url-dict url))) (when dict-url (browse-url dict-url)))) (defun muse-resolve-url-doi (url) "Return the URL through DOI proxy server." (when (string-match "\\`doi:\\(.+\\)" url) (concat "http://dx.doi.org/" (match-string 1 url)))) (defun muse-browse-url-doi (url) "If this is a DOI URL, browse it. DOI's (digitial object identifiers) are a standard identifier used in the publishing industry." (let ((doi-url (muse-resolve-url-doi url))) (when doi-url (browse-url doi-url)))) (defun muse-resolve-url-google (url) "Return the correct Google search string." (when (string-match "\\`google:/?/?\\(.+\\)" url) (concat "http://www.google.com/search?q=" (match-string 1 url)))) (defun muse-browse-url-google (url) "If this is a Google URL, jump to it." (let ((google-url (muse-resolve-url-google url))) (when google-url (browse-url google-url)))) (defun muse-browse-url-info (url) "If this in an Info URL, jump to it." (require 'info) (cond ((string-match "\\`info://\\([^#\n]+\\)#\\(.+\\)" url) (Info-find-node (match-string 1 url) (match-string 2 url))) ((string-match "\\`info://\\([^#\n]+\\)" url) (Info-find-node (match-string 1 url) "Top")) ((string-match "\\`info://(\\([^)\n]+\\))\\(.+\\)" url) (Info-find-node (match-string 1 url) (match-string 2 url))) ((string-match "\\`info://\\(.+\\)" url) (Info-find-node (match-string 1 url) "Top")))) (defun muse-browse-url-man (url) "If this in a manpage URL, jump to it." (require 'man) (when (string-match "\\`man://\\([^(]+\\(([^)]+)\\)?\\)" url) (man (match-string 1 url)))) (defun muse-browse-url-woman (url) "If this is a WoMan URL, jump to it." (require 'woman) (when (string-match "\\`woman://\\(.+\\)" url) (woman (match-string 1 url)))) (provide 'muse-protocols) ;;; muse-protocols.el ends here muse-el-3.20+dfsg/lisp/muse-context.el0000644000175000017500000004032011331353120017153 0ustar taffittaffit;;; muse-context.el --- publish entries in ConTeXt or PDF format ;; Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc. ;; Author: Jean Magnan de Bornier (jean@bornier.net) ;; Created: 16-Apr-2007 ;; Emacs Muse 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 3, or (at your ;; option) any later version. ;; This file when loaded allows you to publish .muse files as ConTeXt ;; files or as pdf files, using respectively the "context" and ;; "context-pdf" styles. It is far from being perfect, so any feedback ;; will be welcome and any mistake hopefully fixed. ;;; Author: ;; Jean Magnan de Bornier, who based this file on muse-latex.el and ;; made the context, context-pdf, context-slides, and ;; context-slides-pdf Muse publishing styles. ;; 16 Avril 2007 ;;; Code: ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; Muse ConTeXt Publishing ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (require 'muse-publish) (defgroup muse-context nil "Rules for marking up a Muse file as a ConTeXt article." :group 'muse-publish) (defcustom muse-context-extension ".tex" "Default file extension for publishing ConTeXt files." :type 'string :group 'muse-context) (defcustom muse-context-pdf-extension ".pdf" "Default file extension for publishing ConTeXt files to PDF." :type 'string :group 'muse-context) (defcustom muse-context-pdf-program "texexec --pdf" "The program that is called to generate PDF content from ConTeXt content." :type 'string :group 'muse-context) (defcustom muse-context-pdf-cruft '(".pgf" ".tmp" ".tui" ".tuo" ".toc" ".log") "Extensions of files to remove after generating PDF output successfully." :type 'string :group 'muse-context) (defcustom muse-context-header "\\setupinteraction [state=start] \\usemodule[tikz] \\usemodule[bib]\n (muse-context-setup-bibliography) \\setuppublications[]\n \\setuppublicationlist[]\n\\setupcite[]\n \\starttext \\startalignment[center] \\blank[2*big] {\\tfd (muse-publishing-directive \"title\")} \\blank[3*medium] {\\tfa (muse-publishing-directive \"author\")} \\blank[2*medium] {\\tfa (muse-publishing-directive \"date\")} \\blank[3*medium] \\stopalignment (and muse-publish-generate-contents (not muse-context-permit-contents-tag) \"\\\\placecontent\n\\\\page[yes]\")\n\n" "Header used for publishing ConTeXt files. This may be text or a filename." :type 'string :group 'muse-context) (defcustom muse-context-footer "(muse-context-bibliography) \\stoptext\n" "Footer used for publishing ConTeXt files. This may be text or a filename." :type 'string :group 'muse-context) (defcustom muse-context-markup-regexps `(;; numeric ranges (10000 "\\([0-9]+\\)-\\([0-9]+\\)" 0 "\\1--\\2") ;; be careful of closing quote pairs (10100 "\"'" 0 "\"\\\\-'")) "List of markup regexps for identifying regions in a Muse page. For more on the structure of this list, see `muse-publish-markup-regexps'." :type '(repeat (choice (list :tag "Markup rule" integer (choice regexp symbol) integer (choice string function symbol)) function)) :group 'muse-context) (defcustom muse-context-markup-functions '((table . muse-context-markup-table)) "An alist of style types to custom functions for that kind of text. For more on the structure of this list, see `muse-publish-markup-functions'." :type '(alist :key-type symbol :value-type function) :group 'muse-context) (defcustom muse-context-markup-strings '((image-with-desc . "\\placefigure[][]{%3%}{\\externalfigure[%1%.%2%]}") (image . "\\placefigure[][]{}{\\externalfigure[%s.%s]}") (image-link . "\\useURL[aa][%s][][%1%] \\from[aa]") (anchor-ref . "\\goto{%2%}{}[%1%]") (url . "\\useURL[aa][%s][][%s] \\from[aa]") (url-and-desc . "\\useURL[bb][%s][][%s]\\from[bb]\\footnote{%1%}") (link . "\\goto{%2%}[program(%1%)]\\footnote{%1%}") (link-and-anchor . "\\useexternaldocument[%4%][%4%][] \\at{%3%, page}{}[%4%::%2%]\\footnote{%1%}") (email-addr . "\\useURL[mail][mailto:%s][][%s]\\from[mail]") (anchor . "\\reference[%s] ") (emdash . "---") (comment-begin . "\\doifmode{comment}{") (comment-end . "}") (rule . "\\blank[medium]\\hrule\\blank[medium]") (no-break-space . "~") (enddots . "\\ldots ") (dots . "\\dots ") (part . "\\part{") (part-end . "}") (chapter . "\\chapter{") (chapter-end . "}") (section . "\\section{") (section-end . "}") (subsection . "\\subsection{") (subsection-end . "}") (subsubsection . "\\subsubsection{") (subsubsection-end . "}") (section-other . "\\subsubsubject{") (section-other-end . "}") (footnote . "\\footnote{") (footnote-end . "}") (footnotetext . "\\footnotetext[%d]{") (begin-underline . "\\underbar{") (end-underline . "}") (begin-literal . "\\type{") (end-literal . "}") (begin-emph . "{\\em ") (end-emph . "}") (begin-more-emph . "{\\bf ") (end-more-emph . "}") (begin-most-emph . "{\\bf {\\em ") (end-most-emph . "}}") (begin-example . "\\starttyping") (end-example . "\\stoptyping") (begin-center . "\\startalignment[center]\n") (end-center . "\n\\stopalignment") (begin-quote . "\\startquotation\n") (end-quote . "\n\\stopquotation") (begin-cite . "\\cite[authoryear][") (begin-cite-author . "\\cite[author][") (begin-cite-year . "\\cite[year][") (end-cite . "]") (begin-uli . "\\startitemize\n") (end-uli . "\n\\stopitemize") (begin-uli-item . "\\item ") (begin-oli . "\\startitemize[n]\n") (end-oli . "\n\\stopitemize") (begin-oli-item . "\\item ") (begin-dl . "\\startitemize\n") (end-dl . "\n\\stopitemize") (begin-ddt . "\\head ") (end-ddt . "\n") (begin-verse . "\\blank[big]") (end-verse-line . "\\par") (verse-space . "\\fixedspaces ~~") (end-verse . "\\blank[big]")) "Strings used for marking up text. These cover the most basic kinds of markup, the handling of which differs little between the various styles." :type '(alist :key-type symbol :value-type string) :group 'muse-context) (defcustom muse-context-slides-header "\\usemodule[(if (string-equal (muse-publishing-directive \"module\") nil) \"pre-01\" (muse-publishing-directive \"module\"))] \\usemodule[tikz] \\usemodule[newmat] \\setupinteraction [state=start] \\starttext \\TitlePage { (muse-publishing-directive \"title\") \\blank[3*medium] \\tfa (muse-publishing-directive \"author\") \\blank[2*medium] \\tfa (muse-publishing-directive \"date\")}" "Header for publishing a presentation (slides) using ConTeXt. Any of the predefined modules, which are available in the tex/context/base directory, can be used by writing a \"module\" directive at the top of the muse file; if no such directive is provided, module pre-01 is used. Alternatively, you can use your own style (\"mystyle\", in this example) by replacing \"\\usemodule[]\" with \"\\input mystyle\". This may be text or a filename." :type 'string :group 'muse-context) (defcustom muse-context-slides-markup-strings '((section . "\\Topic {") (subsection . "\\page \n{\\bf ") (subsubsection . "{\\em ")) "Strings used for marking up text in ConTeXt slides." :type '(alist :key-type symbol :value-type string) :group 'muse-context) (defcustom muse-context-markup-specials-document '((?\\ . "\\textbackslash{}") (?\_ . "\\textunderscore{}") (?\< . "\\switchtobodyfont[small]") (?\> . "\\switchtobodyfont[big]") (?^ . "\\^") (?\~ . "\\~") (?\@ . "\\@") (?\$ . "\\$") (?\% . "\\%") (?\{ . "\\{") (?\} . "\\}") (?\& . "\\&") (?\# . "\\#")) "A table of characters which must be represented specially. These are applied to the entire document, sans already-escaped regions." :type '(alist :key-type character :value-type string) :group 'muse-context) (defcustom muse-context-markup-specials-example '() "A table of characters which must be represented specially. These are applied to regions. With the default interpretation of regions, no specials need to be escaped." :type '(alist :key-type character :value-type string) :group 'muse-context) (defcustom muse-context-markup-specials-literal '() "A table of characters which must be represented specially. This applies to =monospaced text= and regions." :type '(alist :key-type character :value-type string) :group 'muse-context) (defcustom muse-context-markup-specials-url '((?\\ . "\\textbackslash") (?\_ . "\\_") (?\< . "\\<") (?\> . "\\>") (?\$ . "\\$") (?\% . "\\%") (?\{ . "\\{") (?\} . "\\}") (?\& . "\\&") (?\# . "\\#")) "A table of characters which must be represented specially. These are applied to URLs." :type '(alist :key-type character :value-type string) :group 'muse-context) (defcustom muse-context-markup-specials-image '((?\\ . "\\textbackslash") ; cannot find suitable replacement (?\< . "\\<") (?\> . "\\>") (?\$ . "\\$") (?\% . "\\%") (?\{ . "\\{") (?\} . "\\}") (?\& . "\\&") (?\# . "\\#") ; cannot find suitable replacement ) "A table of characters which must be represented specially. These are applied to image filenames." :type '(alist :key-type character :value-type string) :group 'muse-context) (defun muse-context-decide-specials (context) "Determine the specials to escape, depending on the CONTEXT argument." (cond ((memq context '(underline emphasis document url-desc verbatim footnote)) muse-context-markup-specials-document) ((eq context 'image) muse-context-markup-specials-image) ((memq context '(email url)) muse-context-markup-specials-url) ((eq context 'literal) muse-context-markup-specials-literal) ((eq context 'example) muse-context-markup-specials-example) (t (error "Invalid context argument '%s' in muse-context" context)))) (defun muse-context-markup-table () (let* ((table-info (muse-publish-table-fields (match-beginning 0) (match-end 0))) (row-len (car table-info)) (field-list (cdr table-info))) (when table-info (muse-insert-markup "\\starttable[|" (mapconcat 'symbol-name (make-vector row-len 'l) "|") "|]\n \\HL\n \\VL ") (dolist (fields field-list) (let ((type (car fields))) (setq fields (cdr fields)) (when (= type 3) (muse-insert-markup "")) (insert (car fields)) (setq fields (cdr fields)) (dolist (field fields) (muse-insert-markup " \\VL ") (insert field)) (muse-insert-markup "\\VL\\NR\n \\HL\n \\VL ") (when (= type 2) (muse-insert-markup " ")))) (muse-insert-markup "\\stoptable\n") (while (search-backward "VL \\stoptable" nil t) (replace-match "stoptable" nil t))))) (defun muse-context-fixup-dquotes () "Fixup double quotes." (goto-char (point-min)) (let ((open t)) (while (search-forward "\"" nil t) (unless (get-text-property (match-beginning 0) 'read-only) (when (or (bobp) (eq (char-before) ?\n)) (setq open t)) (if open (progn (replace-match "``") (setq open nil)) (replace-match "''") (setq open t)))))) (defcustom muse-context-permit-contents-tag nil "If nil, ignore tags. Otherwise, insert table of contents. Most of the time, it is best to have a table of contents on the first page, with a new page immediately following. To make this work with documents published in both HTML and ConTeXt, we need to ignore the tag. If you don't agree with this, then set this option to non-nil, and it will do what you expect." :type 'boolean :group 'muse-context) (defun muse-context-fixup-citations () "Replace semicolons in multi-head citations with colons." (goto-char (point-min)) (while (re-search-forward "\\\\cite.?\\[" nil t) (let ((start (point)) (end (re-search-forward "]"))) (save-restriction (narrow-to-region start end) (goto-char (point-min)) (while (re-search-forward ";" nil t) (replace-match ",")))))) (defun muse-context-munge-buffer () (muse-context-fixup-dquotes) (muse-context-fixup-citations) (when (and muse-context-permit-contents-tag muse-publish-generate-contents) (goto-char (car muse-publish-generate-contents)) (muse-insert-markup "\\placecontent"))) (defun muse-context-bibliography () (save-excursion (goto-char (point-min)) (if (re-search-forward "\\\\cite.?\\[" nil t) "\\completepublications[criterium=all]" ""))) (defun muse-context-setup-bibliography () (save-excursion (goto-char (point-min)) (if (re-search-forward "\\\\cite.?\\[" nil t) (concat "\\usemodule[bibltx]\n\\setupbibtex [database=" (muse-publishing-directive "bibsource") "]") ""))) (defun muse-context-pdf-browse-file (file) (shell-command (concat "open " file))) (defun muse-context-pdf-generate (file output-path final-target) (apply #'muse-publish-transform-output file output-path final-target "PDF" (function (lambda (file output-path) (let* ((fnd (file-name-directory output-path)) (command (format "%s \"%s\"" muse-context-pdf-program (file-relative-name file fnd))) (times 0) (default-directory fnd) result) ;; XEmacs can sometimes return a non-number result. We'll err ;; on the side of caution by continuing to attempt to generate ;; the PDF if this happens and treat the final result as ;; successful. (while (and (< times 2) (or (not (numberp result)) (not (eq result 0)) ;; table of contents takes 2 passes ;; (file-readable-p ;; (muse-replace-regexp-in-string ;; "\\.tex\\'" ".toc" file t t)) )) (setq result (shell-command command) times (1+ times))) (if (or (not (numberp result)) (eq result 0)) t nil)))) muse-context-pdf-cruft)) (muse-define-style "context" :suffix 'muse-context-extension :regexps 'muse-context-markup-regexps :functions 'muse-context-markup-functions :strings 'muse-context-markup-strings :specials 'muse-context-decide-specials :after 'muse-context-munge-buffer :header 'muse-context-header :footer 'muse-context-footer :browser 'find-file) (muse-derive-style "context-pdf" "context" :final 'muse-context-pdf-generate :browser 'muse-context-pdf-browse-file :link-suffix 'muse-context-pdf-extension :osuffix 'muse-context-pdf-extension) (muse-derive-style "context-slides" "context" :header 'muse-context-slides-header :strings 'muse-context-slides-markup-strings) (muse-derive-style "context-slides-pdf" "context-pdf" :header 'muse-context-slides-header :strings 'muse-context-slides-markup-strings) (provide 'muse-context) ;;; muse-context.el ends here muse-el-3.20+dfsg/lisp/muse-backlink.el0000644000175000017500000003004211331353120017245 0ustar taffittaffit;;; muse-backlink.el --- backlinks for Muse ;; Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 ;; Free Software Foundation, Inc. ;; Author: Jim Ottaway ;; Keywords: ;; This file is part of Emacs Muse. It is not part of GNU Emacs. ;; Emacs Muse 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 3, or (at your ;; option) any later version. ;; Emacs Muse 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 Emacs Muse; see the file COPYING. If not, write to the ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;; Hierarchical backlink insertion into new muse pages. ;; ;; To add: ;; ;; (require 'muse-backlink) ;; (muse-backlink-install) ;; ;; To control what gets backlinked, modify ;; `muse-backlink-exclude-backlink-regexp' and ;; `muse-backlink-exclude-backlink-parent-regexp'. ;; ;; To stop backlinking temporarily: ;; (setq muse-backlink-create-backlinks nil) ;; ;; To remove the backlink functionality completely: ;; ;; (muse-backlink-remove) ;;; Contributors: ;;; Code: (require 'muse) (require 'muse-project) (eval-when-compile (require 'muse-mode)) (eval-and-compile (if (< emacs-major-version 22) (progn ;; Swiped from Emacs 22.0.50.4 (defvar muse-backlink-split-string-default-separators "[ \f\t\n\r\v]+" "The default value of separators for `split-string'. A regexp matching strings of whitespace. May be locale-dependent \(as yet unimplemented). Should not match non-breaking spaces. Warning: binding this to a different value and using it as default is likely to have undesired semantics.") (defun muse-backlink-split-string (string &optional separators omit-nulls) "Split STRING into substrings bounded by matches for SEPARATORS. The beginning and end of STRING, and each match for SEPARATORS, are splitting points. The substrings matching SEPARATORS are removed, and the substrings between the splitting points are collected as a list, which is returned. If SEPARATORS is non-nil, it should be a regular expression matching text which separates, but is not part of, the substrings. If nil it defaults to `split-string-default-separators', normally \"[ \\f\\t\\n\\r\\v]+\", and OMIT-NULLS is forced to t. If OMIT-NULLS is t, zero-length substrings are omitted from the list \(so that for the default value of SEPARATORS leading and trailing whitespace are effectively trimmed). If nil, all zero-length substrings are retained, which correctly parses CSV format, for example. Note that the effect of `(split-string STRING)' is the same as `(split-string STRING split-string-default-separators t)'). In the rare case that you wish to retain zero-length substrings when splitting on whitespace, use `(split-string STRING split-string-default-separators)'. Modifies the match data; use `save-match-data' if necessary." (let ((keep-nulls (not (if separators omit-nulls t))) (rexp (or separators muse-backlink-split-string-default-separators)) (start 0) notfirst (list nil)) (while (and (string-match rexp string (if (and notfirst (= start (match-beginning 0)) (< start (length string))) (1+ start) start)) (< start (length string))) (setq notfirst t) (if (or keep-nulls (< start (match-beginning 0))) (setq list (cons (substring string start (match-beginning 0)) list))) (setq start (match-end 0))) (if (or keep-nulls (< start (length string))) (setq list (cons (substring string start) list))) (nreverse list)))) (defalias 'muse-backlink-split-string 'split-string))) (defgroup muse-backlink nil "Hierarchical backlinking for Muse." :group 'muse) (defcustom muse-backlink-create-backlinks t "When non-nil, create hierarchical backlinks in new Muse pages. For control over which pages will receive backlinks, see `muse-backlink-exclude-backlink-parent-regexp' and `muse-backlink-exclude-backlink-regexp'." :type 'boolean :group 'muse-backlink) (defcustom muse-backlink-avoid-bad-links t "When non-nil, avoid bad links when backlinking." :type 'boolean :group 'muse-backlink) ;; The default for exclusion stops backlinks from being added to and ;; from planner day pages. (defcustom muse-backlink-exclude-backlink-parent-regexp "^[0-9][0-9][0-9][0-9]\\.[0-9][0-9]\\.[0-9][0-9]$" "Regular expression matching pages whose children should not have backlinks." :type 'regexp :group 'muse-backlink) (defcustom muse-backlink-exclude-backlink-regexp "^[0-9][0-9][0-9][0-9]\\.[0-9][0-9]\\.[0-9][0-9]$" "Regular expression matching pages that should not have backlinks." :type 'regexp :group 'muse-backlink) (defcustom muse-backlink-separator "/" "String that separates backlinks. Should be something that will not appear as a substring in an explicit link that has no description." :type 'string :group 'muse-backlink) (defcustom muse-backlink-before-string "backlinks: " "String to come before the backlink list." :type 'string :group 'muse-backlink) (defcustom muse-backlink-after-string "" "String to come after the backlink list." :type 'string :group 'muse-backlink) (defcustom muse-backlink-separator "/" "String that separates backlinks. Should be something that will not appear as a substring in an explicit link that has no description." :type 'string :group 'muse-backlink) (defcustom muse-backlink-regexp (concat "^" (regexp-quote muse-backlink-before-string) "\\(" (regexp-quote muse-backlink-separator) ".+\\)" (regexp-quote muse-backlink-after-string)) ;; Really, I want something like this, but I can't make it work: ;; (concat "^\\(" ;; (regexp-quote muse-backlink-separator) ;; "\\(?:" ;; muse-explicit-link-regexp ;; "\\)\\)+") "Regular expression to match backlinks in a buffer. Match 1 is the list of backlinks without `muse-backlink-before-string' and `muse-backlink-after-string'." :type 'regexp :group 'muse-backlink) (defun muse-backlink-goto-insertion-point () "Find the right place to add backlinks." (goto-char (point-min)) (when (looking-at "\\(?:^#.+[ \t]*\n\\)+") (goto-char (match-end 0)))) (defun muse-backlink-get-current () "Return a list of backlinks in the current buffer." (save-excursion (goto-char (point-min)) (when (re-search-forward muse-backlink-regexp nil t) (muse-backlink-split-string (match-string 1) (regexp-quote muse-backlink-separator) t)))) (defun muse-backlink-format-link-list (links) "Format the list of LINKS as backlinks." (concat muse-backlink-separator (mapconcat #'identity links muse-backlink-separator))) (defun muse-backlink-insert-links (links) "Insert backlinks to LINKS into the current page. LINKS is a list of links ordered by ancestry, with the parent as the last element." (muse-backlink-goto-insertion-point) (insert muse-backlink-before-string (muse-backlink-format-link-list links) muse-backlink-after-string ;; Could have this in the after string, but they might get ;; deleted. "\n\n")) (defun muse-backlink-unsaved-page-p (page project) "Return non-nil if PAGE is in PROJECT but has not been saved." (member page (mapcar #'(lambda (b) (with-current-buffer b (and (derived-mode-p 'muse-mode) (equal muse-current-project project) (not (muse-project-page-file (muse-page-name) muse-current-project)) (muse-page-name)))) (buffer-list)))) (defvar muse-backlink-links nil "Internal variable. The links to insert in the forthcomingly visited muse page.") (defvar muse-backlink-pending nil "Internal variable.") (defvar muse-backlink-parent-buffer nil "Internal variable. The parent buffer of the forthcomingly visited muse page.") ;;; Attach hook to the derived mode hook, to avoid problems such as ;;; planner-prepare-file thinking that the buffer needs no template. (defun muse-backlink-get-mode-hook () (derived-mode-hook-name major-mode)) (defun muse-backlink-insert-hook-func () "Insert backlinks into the current buffer and clean up." (when (and muse-backlink-links muse-backlink-pending (string= (car muse-backlink-links) (muse-page-name))) (muse-backlink-insert-links (cdr muse-backlink-links)) (when muse-backlink-avoid-bad-links (save-buffer) (when muse-backlink-parent-buffer (with-current-buffer muse-backlink-parent-buffer (font-lock-fontify-buffer)))) (setq muse-backlink-links nil muse-backlink-parent-buffer nil muse-backlink-pending nil) (remove-hook (muse-backlink-get-mode-hook) #'muse-backlink-insert-hook-func))) (defun muse-backlink-handle-link (link) "When appropriate, arrange for backlinks on visiting LINK." (when (and muse-backlink-create-backlinks (not muse-backlink-pending) (memq this-command '(muse-follow-name-at-point muse-follow-name-at-mouse)) (not muse-publishing-p) (not (and (boundp 'muse-colors-fontifying-p) muse-colors-fontifying-p))) (require 'muse-mode) (setq muse-backlink-links (save-match-data (let* ((orig-link (or link (match-string 1))) (link (if (string-match "#" orig-link) (substring orig-link 0 (match-beginning 0)) orig-link))) (unless (or (not muse-current-project) (string-match muse-url-regexp orig-link) (string-match muse-image-regexp orig-link) (and (boundp 'muse-wiki-interwiki-regexp) (string-match muse-wiki-interwiki-regexp orig-link)) ;; Don't add a backlink if the page already ;; exists, whether it has been saved or not. (or (muse-project-page-file link muse-current-project) (muse-backlink-unsaved-page-p link muse-current-project)) (string-match muse-backlink-exclude-backlink-parent-regexp (muse-page-name)) (string-match muse-backlink-exclude-backlink-regexp link)) ;; todo: Hmm. This will only work if the child page is the ;; same mode as the parent page. (add-hook (muse-backlink-get-mode-hook) #'muse-backlink-insert-hook-func) (setq muse-backlink-pending t) (when muse-backlink-avoid-bad-links (setq muse-backlink-parent-buffer (current-buffer)) (unless (muse-project-page-file (muse-page-name) muse-current-project) ;; It must be modified... (save-buffer))) (cons link (append (muse-backlink-get-current) (list (muse-make-link (muse-page-name)))))))))) ;; Make sure we always return nil nil) (defun muse-backlink-install () "Add backlinking functionality to muse-mode." (add-to-list 'muse-explicit-link-functions #'muse-backlink-handle-link)) (defun muse-backlink-remove () "Remove backlinking functionality from muse-mode." (setq muse-explicit-link-functions (delq #'muse-backlink-handle-link muse-explicit-link-functions))) (provide 'muse-backlink) ;;; muse-backlink.el ends here muse-el-3.20+dfsg/lisp/muse-ikiwiki.el0000644000175000017500000002052511331353120017134 0ustar taffittaffit;;; muse-ikiwiki.el --- integrate with Ikiwiki ;; Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. ;; This file is part of Emacs Muse. It is not part of GNU Emacs. ;; Emacs Muse 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 3, or (at your ;; option) any later version. ;; Emacs Muse 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 Emacs Muse; see the file COPYING. If not, write to the ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;;; Contributors: ;;; Code: ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; Muse Ikiwiki Integration ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (require 'muse) (require 'muse-html) (require 'muse-ipc) (require 'muse-publish) (eval-when-compile (require 'muse-colors)) (defgroup muse-ikiwiki nil "Options controlling the behavior of Muse integration with Ikiwiki." :group 'muse-publish) (defcustom muse-ikiwiki-header "" "Header used for publishing Ikiwiki output files. This may be text or a filename." :type 'string :group 'muse-ikiwiki) (defcustom muse-ikiwiki-footer "" "Footer used for publishing Ikiwiki output files. This may be text or a filename." :type 'string :group 'muse-ikiwiki) (defcustom muse-ikiwiki-markup-regexps `(;; Ikiwiki directives (1350 ,(concat "\\(\\\\?\\)\\[\\[!""\\(?:-\\|\\w\\)+" "\\([" muse-regexp-blank "\n]+" "\\(?:\\(?:\\(?:-\\|\\w\\)+=\\)?" "\\(?:\"\"\".*?\"\"\"\\|\"[^\"]+\"" "\\|[^]" muse-regexp-blank "\n]+\\)" "[" muse-regexp-blank "\n]*\\)*\\)?\\]\\]") 0 muse-ikiwiki-markup-directive)) "List of markup rules for publishing Ikiwiki markup on Muse pages. For more on the structure of this list, see `muse-publish-markup-regexps'." :type '(repeat (choice (list :tag "Markup rule" integer (choice regexp symbol) integer (choice string function symbol)) function)) :group 'muse-ikiwiki) ;;; Publishing (defun muse-ikiwiki-markup-directive () "Handle publishing of an Ikiwiki directive." (unless (get-text-property (match-beginning 0) 'read-only) (add-text-properties (match-beginning 0) (match-end 0) '(muse-no-paragraph t)) (muse-publish-mark-read-only (match-beginning 0) (match-end 0)))) (defun muse-ikiwiki-publish-buffer (name title &optional style) "Publish a buffer for Ikiwki. The name of the corresponding file is NAME. The name of the style is given by STYLE. It defaults to \"ikiwiki\"." (unless style (setq style "ikiwiki")) (unless title (setq title (muse-page-name name))) (let ((muse-batch-publishing-p t) (muse-publishing-current-file name) (muse-publishing-current-output-path name) (muse-publishing-current-style style) (font-lock-verbose nil) (vc-handled-backends nil)) ; don't activate VC when publishing files (run-hooks 'muse-before-publish-hook) (let ((muse-inhibit-before-publish-hook t)) (muse-publish-markup-buffer title style)))) (defun muse-ikiwiki-publish-file (file name &optional style) "Publish a single file for Ikiwiki. The name of the real file is NAME, and the name of the temporary file containing the content is FILE. The name of the style is given by STYLE. It defaults to \"ikiwiki\"." (if (not (stringp file)) (message "Error: No file given to publish") (unless style (setq style "ikiwiki")) (let ((output-path file) (target file) (vc-handled-backends nil) ; don't activate VC when publishing files auto-mode-alist muse-current-output-style) (setq auto-mode-alist (delete (cons (concat "\\." muse-file-extension "\\'") 'muse-mode-choose-mode) auto-mode-alist)) (setq muse-current-output-style (list :base style :path file)) (muse-with-temp-buffer (muse-insert-file-contents file) (muse-ikiwiki-publish-buffer name nil style) (when (muse-write-file output-path t) (muse-style-run-hooks :final style file output-path target)))))) (defun muse-ikiwiki-start-server (port) "Start Muse IPC server, initializing with the client on PORT." (muse-ipc-start "foo" #'muse-ikiwiki-publish-buffer port)) ;;; Colors (defface muse-ikiwiki-directive '((((class color) (background light)) (:foreground "dark green")) (((class color) (background dark)) (:foreground "green"))) "Face for Ikiwiki directives." :group 'muse-ikiwiki) (defun muse-colors-ikiwiki-directive () "Color ikiwiki directives." (let ((start (match-beginning 0))) (unless (or (eq (get-text-property start 'invisible) 'muse) (get-text-property start 'muse-comment) (get-text-property start 'muse-directive)) ;; beginning of line or space or symbol (save-excursion (and (catch 'valid (while t (skip-chars-forward "^\"]" muse-colors-region-end) (cond ((eq (point) (point-max)) (throw 'valid nil)) ((> (point) muse-colors-region-end) (throw 'valid nil)) ((eq (char-after) ?\") (if (and (< (1+ (point)) muse-colors-region-end) (eq (char-after (1+ (point))) ?\")) (if (and (< (+ 2 (point)) muse-colors-region-end) (eq (char-after (+ 2 (point))) ?\")) ;; triple-quote (progn (forward-char 3) (or (and (looking-at "\"\"\"") (goto-char (match-end 0))) (re-search-forward "\"\"\"" muse-colors-region-end t) (throw 'valid nil))) ;; empty quotes (""), which are invalid (throw 'valid nil)) ;; quote with content (forward-char 1) (skip-chars-forward "^\"" muse-colors-region-end) (when (eq (char-after) ?\") (forward-char 1)))) ((eq (char-after) ?\]) (forward-char 1) (when (and (< (point) muse-colors-region-end) (eq (char-after (point)) ?\])) (forward-char 1) (throw 'valid t))) (t (throw 'valid nil))))) ;; found a valid directive (let ((end (point))) ;; remove flyspell overlays (when (fboundp 'flyspell-unhighlight-at) (let ((cur start)) (while (> end cur) (flyspell-unhighlight-at cur) (setq cur (1+ cur))))) (add-text-properties start end '(face muse-ikiwiki-directive muse-directive t muse-no-flyspell t)) (when (progn (goto-char start) (skip-chars-forward "^\n" end) (and (eq (char-after) ?\n) (not (= (point) end)))) (add-text-properties start end '(font-lock-multiline t))))))))) (defun muse-ikiwiki-insinuate-colors () (add-to-list 'muse-colors-markup '("\\[\\[!" ?\[ muse-colors-ikiwiki-directive) nil)) (eval-after-load "muse-colors" '(muse-ikiwiki-insinuate-colors)) ;; Styles (muse-derive-style "ikiwiki" "xhtml" :header 'muse-ikiwiki-header :footer 'muse-ikiwiki-footer :regexps 'muse-ikiwiki-markup-regexps) (provide 'muse-ikiwiki) ;;; muse-ikiwiki.el ends here