This question about Using an extension: Answered

Format-mode macros limited to topics in which they are defined?

I have installed & enabled EasyMacroPlugin.

I defined a view format-mode macros in my topic. You can see them in raw mode, right at the end of the topic.

But when I try to use them in another web & topic (e.g. it seems they aren't active.

Are format-mode macros only valid in the topic in which they are defined?

I did not use the EASYMACROS preference variable because my reading of the doc is that EASYMACROS only applies to topic-mode macros.

Please advise! I really, really could use EasyMacroPlugin.

-- FilSalustri - 06 Dec 2009

If I don't use the EASYMACROS definition in WebPreferences, my format macros don't work either (or only in the topic they are defined in). To get them working in other topics, I have to set EASYMACROS to the topic where the macro is defined. In this case I get a warning (ERROR: can't redefine MYEASYMACRO) which can be turned of by using warn="off" in the REGISTERMACRO definition (didn't see any ill-effects).

-- MartinKaufmann - 22 Dec 2009

My understanding of the doc is that EASYMACROS is only for topic-mode macros. I did not try setting EASYMACROS to a topic that contains format-mode macros. Indeed, since the topic attribute and the format attribute cannot be used together, I reasoned that unless topic is set, EASYMACROS wouldn't be able to register them properly.

Is that right?

-- FilSalustri - 24 Dec 2009

I don't know anything about how the plugin works internally. I just tried using it and came across the same problem you mentioned originally. By setting EASYMACROS I got it working in the end.

-- MartinKaufmann - 05 Jan 2010

Well, you learn something new every day. Martin, I did as you suggested and it worked fine!

I would suggest that the doc for EasyMacroPlugin be tweaked to be more clear that topics to which EASYMACROS refers can contain various format mode macros.

-- FilSalustri - 15 Jan 2010

QuestionForm edit

Subject Using an extension
Extension EasyMacroPlugin
Version Foswiki 1.0.7
Status Answered
Topic revision: r5 - 15 Jan 2010, FilSalustri - This page was cached on 17 Jan 2018 - 03:22.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License