emacs-wiki-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [emacs-wiki-discuss] Bug: Customization of muse-wiki-wikiword-regexp


From: Allen Halsey
Subject: Re: [emacs-wiki-discuss] Bug: Customization of muse-wiki-wikiword-regexp to disable CamelCase
Date: Tue, 05 Jul 2005 17:07:17 -1000
User-agent: Mozilla Thunderbird 1.0.2-6 (X11/20050513)

Yann Hodique wrote:
Hi Allen,

Thanks for your report.
Could you please tell me if
address@hidden/muse--yh--1.0--patch-19 and
address@hidden/muse--yh--1.0--patch-20 provide the behavior you
wish? It should be now possible to activate/deactivate/redefine
WikiWords with customize without restriction.

Archive         address@hidden
Location        http://www.lifl.fr/~hodique/archives/2005/
Branch  muse--yh--1.0

Regards,
Yann



Thank you Yann,

I'm still new to handling patch files and arch (and even emacs). So I might not have applied your patch correctly. I think I did though. I did:

$ tla register-archive -f http://www.lifl.fr/~hodique/archives/2005/
$ cd ~/elisp/muse
$ tla star-merge --three-way  address@hidden/muse--yh--1.0
address@hidden/muse--yh--1.0* build reference tree for address@hidden/muse--yh--1.0--patch-20
* from pristine cache: address@hidden/muse--yh--1.0--patch-11
* patching for revision: address@hidden/muse--yh--1.0--patch-12
* patching for revision: address@hidden/muse--yh--1.0--patch-13
* patching for revision: address@hidden/muse--yh--1.0--patch-14
* patching for revision: address@hidden/muse--yh--1.0--patch-15
* patching for revision: address@hidden/muse--yh--1.0--patch-16
* patching for revision: address@hidden/muse--yh--1.0--patch-17
* patching for revision: address@hidden/muse--yh--1.0--patch-18
* patching for revision: address@hidden/muse--yh--1.0--patch-19
* patching for revision: address@hidden/muse--yh--1.0--patch-20
* star-merge by delta(address@hidden/muse--main--1.0--patch-82,address@hidden/muse--yh--1.0--patch-20)[/home/allen/elisp/muse]
* applying changeset
A {arch}/muse/muse--yh/muse--yh--1.0/address@hidden/patch-log/patch-12 A {arch}/muse/muse--yh/muse--yh--1.0/address@hidden/patch-log/patch-13 A {arch}/muse/muse--yh/muse--yh--1.0/address@hidden/patch-log/patch-14 A {arch}/muse/muse--yh/muse--yh--1.0/address@hidden/patch-log/patch-15 A {arch}/muse/muse--yh/muse--yh--1.0/address@hidden/patch-log/patch-16 A {arch}/muse/muse--yh/muse--yh--1.0/address@hidden/patch-log/patch-17 A {arch}/muse/muse--yh/muse--yh--1.0/address@hidden/patch-log/patch-18 A {arch}/muse/muse--yh/muse--yh--1.0/address@hidden/patch-log/patch-19 A {arch}/muse/muse--yh/muse--yh--1.0/address@hidden/patch-log/patch-20
M   lisp/muse-latex.el
M   lisp/muse-mode.el
M   lisp/muse-wiki.el
M   lisp/muse.el

Using another editor, I edited my .emacs file to remove my call to
(setq muse-wiki-wikiword-regexp "!!!!!"), and I also removed a couple of other muse customizations I had done, in order to have a baseline testing environment for muse.

When I started emacs, I received this error:

Debugger entered--Lisp error: (void-variable muse-wiki-wikiword-regexp)
  symbol-value(muse-wiki-wikiword-regexp)
  (if (symbolp (car rule)) (symbol-value (car rule)) (car rule))
(lambda (rule) (if (symbolp ...) (symbol-value ...) (car rule)))((muse-wiki-wikiword-regexp t muse-wiki-colors-wikiword)) mapconcat((lambda (rule) (if (symbolp ...) (symbol-value ...) (car rule))) (("\\b=[^[:space:]=>]" 61 muse-colors-verbatim) ("\\*\\{1,4\\}" 42 muse-colors-emphasized) ("_[^[:blank:]_]" 95 muse-colors-underlined) ("^#title" 35 muse-colors-title) (muse-link-regexp 91 muse-colors-link) (muse-tag-regexp 60 muse-colors-custom-tags) (muse-wiki-wikiword-regexp t muse-wiki-colors-wikiword)) "\\|")
  (concat "\\(" (mapconcat (function ...) val "\\|") "\\)")
(setq muse-colors-regexp (concat "\\(" (mapconcat ... val "\\|") "\\)") muse-colors-vector (make-vector 128 nil)) muse-configure-highlighting(muse-colors-markup (("\\b=[^[:space:]=>]" 61 muse-colors-verbatim) ("\\*\\{1,4\\}" 42 muse-colors-emphasized) ("_[^[:blank:]_]" 95 muse-colors-underlined) ("^#title" 35 muse-colors-title) (muse-link-regexp 91 muse-colors-link) (muse-tag-regexp 60 muse-colors-custom-tags) (muse-wiki-wikiword-regexp t muse-wiki-colors-wikiword)))
  muse-wiki-update-use-wikiword-colors(t)
  (progn (muse-wiki-update-use-wikiword-colors val))
(if (featurep (quote muse-colors)) (progn (muse-wiki-update-use-wikiword-colors val))) (when (featurep (quote muse-colors)) (muse-wiki-update-use-wikiword-colors val))
  muse-wiki-update-use-wikiword(muse-wiki-use-wikiword t)
  custom-initialize-reset(muse-wiki-use-wikiword t)
custom-declare-variable(muse-wiki-use-wikiword t "Wether to use WikiWord syntax or not" :type boolean :group muse-wiki :set muse-wiki-update-use-wikiword) (defcustom muse-wiki-use-wikiword t "Wether to use WikiWord syntax or not" :type (quote boolean) :group (quote muse-wiki) :set (quote muse-wiki-update-use-wikiword))
  eval-buffer(#<buffer  *load*<4>> nil "muse-wiki" nil t)
  ;;; Reading at buffer position 3532
load-with-code-conversion("/home/allen/elisp/muse/lisp/muse-wiki.el" "muse-wiki" nil t)
  require(muse-wiki)
  eval-buffer(#<buffer  *load*<3>> nil "muse-config" nil t)
  ;;; Reading at buffer position 311
load-with-code-conversion("/home/allen/elisp/muse-config.el" "muse-config" nil nil)
  load("muse-config")
  load-library("muse-config")
mapcar(load-library ("emacs-wiki-config" "erc-config" "muse-config" "planner-muse-config"))
  eval-buffer(#<buffer  *load*<2>> nil "~/elisp/dotemacs" nil t)
  ;;; Reading at buffer position 1233
load-with-code-conversion("/home/allen/elisp/dotemacs.el" "~/elisp/dotemacs" nil nil)
  load("~/elisp/dotemacs")
  eval-buffer(#<buffer  *load*> nil "~/.emacs" nil t)
  ;;; Reading at buffer position 26
  load-with-code-conversion("/home/allen/.emacs" "~/.emacs" t t)
  load("~/.emacs" t t)

As an experiment, I added back my call to:

  (setq muse-wiki-wikiword-regexp "!!!!!")

prior to (require 'muse-mode) and restarted emacs. This time I received the following error:

Debugger entered--Lisp error: (void-function muse-wiki-update-use-wikiword-markup)
  (muse-wiki-update-use-wikiword-markup muse-wiki-use-wikiword)
(progn (add-to-list (quote muse-publish-markup-regexps) (quote ...) t) (muse-wiki-update-use-wikiword-markup muse-wiki-use-wikiword) (add-to-list (quote muse-publish-url-transforms) (quote muse-wiki-interwiki-expand))) eval((progn (add-to-list (quote muse-publish-markup-regexps) (quote ...) t) (muse-wiki-update-use-wikiword-markup muse-wiki-use-wikiword) (add-to-list (quote muse-publish-url-transforms) (quote muse-wiki-interwiki-expand)))) eval-after-load(muse-publish (progn (add-to-list (quote muse-publish-markup-regexps) (quote ...) t) (muse-wiki-update-use-wikiword-markup muse-wiki-use-wikiword) (add-to-list (quote muse-publish-url-transforms) (quote muse-wiki-interwiki-expand))))
  eval-buffer(#<buffer  *load*<4>> nil "muse-wiki" nil t)
  ;;; Reading at buffer position 6966
load-with-code-conversion("/home/allen/elisp/muse/lisp/muse-wiki.el" "muse-wiki" nil t)
  require(muse-wiki)
  eval-buffer(#<buffer  *load*<3>> nil "muse-config" nil t)
  ;;; Reading at buffer position 310
load-with-code-conversion("/home/allen/elisp/muse-config.el" "muse-config" nil nil)
  load("muse-config")
  load-library("muse-config")
mapcar(load-library ("emacs-wiki-config" "erc-config" "muse-config" "planner-muse-config"))
  eval-buffer(#<buffer  *load*<2>> nil "~/elisp/dotemacs" nil t)
  ;;; Reading at buffer position 1233
load-with-code-conversion("/home/allen/elisp/dotemacs.el" "~/elisp/dotemacs" nil nil)
  load("~/elisp/dotemacs")
  eval-buffer(#<buffer  *load*> nil "~/.emacs" nil t)
  ;;; Reading at buffer position 26
  load-with-code-conversion("/home/allen/.emacs" "~/.emacs" t t)
  load("~/.emacs" t t)

I then changed line 182 in muse-wiki.el from:

  (muse-wiki-update-use-wikiword-markup muse-wiki-use-wikiword)

to:

  (muse-wiki-update-use-wikiword-markup-regexp muse-wiki-use-wikiword)

and then restarted emacs without error.

I then went to the customization group for muse-wiki and toggled "Muse Wiki Use Wikiword" from on to off. I saved it for future sessions and
then closed and restarted emacs.

Happily, I observed that setting "Muse Wiki Use Wikiword" to off had the intended effect of disabling CamelCase WikiWords.

BTW, the reason I don't want CamelCase words recognized as WikiWords is that, more often than not, that is not my intent and then I need to type <nop> to disable the recognition. I find typing [[wiki page name]] a sufficient syntax.

And I am very happy that disabling CamelCase WikiWords is a simple toggle customization.

As it stand now,

- please take a look at that line 182 in muse-wiki.el I pointed
  out above. Was that a typo?

- there is a problem (pointed out by the 2nd debug trace above) that
  requires me to be sure to set muse-wiki-wikiword-regexp before my
  (require 'muse-mode) line. What I set it to doesn't matter, because
  I have "Muse Wiki Use Wikiword" to off. I set it to "banana" and
  banana isn't intepreted as a wiki word. But I must set it to
  _something_, otherwise I get the error and debug trace pointed
  out above.

Thank you for looking into this,

Allen
















reply via email to

[Prev in Thread] Current Thread [Next in Thread]