From dfee1b9c7402d16d6f9f950ac176d68268d9bc81 Mon Sep 17 00:00:00 2001 From: Michael Olson Date: Fri, 6 Jan 2006 20:44:29 +0000 Subject: [PATCH] Merged from mwolson@gnu.org--2005 (patch 333, 337, 345-346, 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. * mwolson@gnu.org--2005/muse--main--1.0--patch-333 muse-publish: Prevent error when return value is not a string. * mwolson@gnu.org--2005/muse--main--1.0--patch-337 muse-wiki: Allow interwiki links to use different base URLs. * mwolson@gnu.org--2005/muse--main--1.0--patch-345 Fix backtrace on project names. * mwolson@gnu.org--2005/muse--main--1.0--patch-346 Fix #4973: muse-project-ignore-regexp too aggressive git-archimport-id: mwolson@gnu.org--2005/muse--rel--3.02--patch-50 --- ChangeLog | 38 ++++++++++++++++++++++++ ChangeLog.main | 84 ++++++++++++++++++++++++++++++++++++++++++++++++++++ lisp/muse-project.el | 18 +++++++---- lisp/muse-publish.el | 2 +- lisp/muse-wiki.el | 19 +++++++----- muse.texi | 25 +++++++++++++++- 6 files changed, 171 insertions(+), 15 deletions(-) diff --git a/ChangeLog b/ChangeLog index c2d1952..2605b31 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,44 @@ # arch-tag: automatic-ChangeLog--mwolson@gnu.org--2005/muse--rel--3.02 # +2006-01-06 20:44:29 GMT Michael Olson patch-50 + + Summary: + Merged from mwolson@gnu.org--2005 (patch 333, 337, 345-346, 349) + Revision: + muse--rel--3.02--patch-50 + + 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. + + * mwolson@gnu.org--2005/muse--main--1.0--patch-333 + muse-publish: Prevent error when return value is not a string. + + * mwolson@gnu.org--2005/muse--main--1.0--patch-337 + muse-wiki: Allow interwiki links to use different base URLs. + + * mwolson@gnu.org--2005/muse--main--1.0--patch-345 + Fix backtrace on project names. + + * mwolson@gnu.org--2005/muse--main--1.0--patch-346 + Fix #4973: muse-project-ignore-regexp too aggressive + + modified files: + ChangeLog ChangeLog.main lisp/muse-project.el + lisp/muse-publish.el lisp/muse-wiki.el muse.texi + + new patches: + john@wjsullivan.net--2006/muse--johnsu01--0--base-0 + john@wjsullivan.net--2006/muse--johnsu01--0--patch-1 + mwolson@gnu.org--2005/muse--main--1.0--patch-333 + mwolson@gnu.org--2005/muse--main--1.0--patch-337 + mwolson@gnu.org--2005/muse--main--1.0--patch-345 + mwolson@gnu.org--2005/muse--main--1.0--patch-346 + mwolson@gnu.org--2005/muse--main--1.0--patch-349 + + 2006-01-06 20:39:49 GMT Michael Olson patch-49 Summary: diff --git a/ChangeLog.main b/ChangeLog.main index bc85266..bc5afcc 100644 --- a/ChangeLog.main +++ b/ChangeLog.main @@ -33,6 +33,60 @@ jeho@jeho.org--2005/muse--jeho--1.0--patch-21 +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 + + new patches: + john@wjsullivan.net--2006/muse--johnsu01--0--base-0 + john@wjsullivan.net--2006/muse--johnsu01--0--patch-1 + + +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-03 04:58:18 GMT Michael Olson patch-341 Summary: @@ -97,6 +151,21 @@ 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: @@ -110,6 +179,21 @@ ChangeLog lisp/muse-xml-common.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 01:42:30 GMT Michael Olson patch-331 Summary: diff --git a/lisp/muse-project.el b/lisp/muse-project.el index 1784a9f..b9895d8 100644 --- a/lisp/muse-project.el +++ b/lisp/muse-project.el @@ -233,7 +233,10 @@ when publishing files in that project." (defcustom muse-project-ignore-regexp (concat "\\`\\(.*\\.?#.*\\|.*,v\\|.*~\\|\\.\\.?\\|,.*\\)\\'\\|" "/\\(CVS\\|RCS\\|\\.arch-ids\\|{arch}\\|,.*\\)\\(/\\|\\'\\)") - "A regexp matching files to be ignored in Wiki directories." + "A regexp matching files to be ignored in Wiki directories. + +You should set case-fold-search to nil before using this regexp +in code." :type 'regexp :group 'muse-regexp) @@ -242,9 +245,10 @@ when publishing files in that project." A list of these directories is returned. Directories starting with \".\" will be ignored, as well as those which match `muse-project-ignore-regexp'." - (when (and (file-directory-p base) - (not (string-match muse-project-ignore-regexp base))) - (let (list dir) + (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))) @@ -322,7 +326,8 @@ For an example of the use of this function, see (defun muse-project-file-entries (path) (let* ((names (list t)) - (lnames names)) + (lnames names) + (case-fold-search nil)) (cond ((file-directory-p path) (dolist (file (directory-files @@ -412,7 +417,8 @@ If PATHNAME is nil, the current buffer's filename is used." (unless pathname (setq pathname (muse-current-file))) (save-match-data (when (and pathname - (not (string-match muse-project-ignore-regexp pathname))) + (not (let ((case-fold-search nil)) + (string-match muse-project-ignore-regexp pathname)))) (let* ((file (file-truename pathname)) (dir (file-name-directory file)) (project-entry muse-project-alist) diff --git a/lisp/muse-publish.el b/lisp/muse-publish.el index 086710f..fa31ed1 100644 --- a/lisp/muse-publish.el +++ b/lisp/muse-publish.el @@ -456,7 +456,7 @@ If STYLE is not specified, use current style." ((symbolp repl) (symbol-value repl)) (t repl)))) - (if text + (if (stringp text) (replace-match text t)))) (if (and muse-publishing-last-position (= pos muse-publishing-last-position)) diff --git a/lisp/muse-wiki.el b/lisp/muse-wiki.el index 5fd2c35..83f7176 100644 --- a/lisp/muse-wiki.el +++ b/lisp/muse-wiki.el @@ -163,12 +163,16 @@ style and ignore the others." (muse-current-file) (cddr (muse-project-of-file)))))) (cond ((and remote-style local-style muse-publishing-p) - (muse-publish-link-file - (file-relative-name (expand-file-name - page (muse-style-element :path remote-style)) - (expand-file-name - (muse-style-element :path local-style))) - nil remote-style)) + (let ((prefix (muse-style-element :base-url remote-style))) + (muse-publish-link-file + (if prefix + (concat prefix page) + (file-relative-name (expand-file-name + page + (muse-style-element :path remote-style)) + (expand-file-name + (muse-style-element :path local-style)))) + nil remote-style))) ((not muse-publishing-p) (if page-path page-path @@ -191,7 +195,8 @@ Match 2 is set to the description." (let* ((project (match-string 1 string)) (subst (cdr (assoc project muse-wiki-interwiki-alist))) (word (if string - (substring string (match-beginning 2)) + (and (match-beginning 2) + (substring string (match-beginning 2))) (match-string 2 string)))) (if subst (if (functionp subst) diff --git a/muse.texi b/muse.texi index 646904a..3bea362 100644 --- a/muse.texi +++ b/muse.texi @@ -14,7 +14,7 @@ @copying This manual is for the Emacs Muse version 3.02.5. -Copyright (C) 2004, 2005 Free Software Foundation, Inc. +Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc. @quotation Permission is granted to copy, distribute and/or modify this document @@ -383,6 +383,29 @@ output as HTML to the directory @file{~/public_html}, and as PDF to the directory @file{~/public_html/pdf}. Within any project page, you may create a link to other pages using the syntax @samp{[[pagename]]}. +By default, Muse expects all project files to have the file extension +@file{.muse}. Files without this extension will not be associated with +Muse mode and will not be considered part of any project, even if they +are within a project directory. + +If you don't want to use @file{.muse}, you can customize the extension +by setting the value of @code{muse-file-extension}. + +If you don't want to use any extension at all, and want Muse to +autodetect project files based on their location, then use: + +@lisp +(setq muse-file-extension nil + muse-mode-auto-p t) +@end lisp + +If you set these options directly in your @file{.emacs} outside of the +Customize interface, then you will also need to add: + +@lisp +(add-hook 'find-file-hooks 'muse-mode-maybe) +@end lisp + @c PRE3_03: Give more examples @c PRE3_03: Describe :set and other options fully -- 2.11.4.GIT