Next: , Previous: Loading Muse, Up: Getting Started


5.2 How to Edit Files in Muse

Muse Mode should automatically be activated when you visit a file with a “.muse” extension. One such file is QuickStart.muse, which is available in the examples directory of the Muse distribution. You can tell that Muse Mode has been activated by checking for the text “Muse” in your mode line. If Muse Mode has not been activated, you may activate it by type M-x muse-mode RET.

You will notice that Muse files are highlighted very simply. Links are colored blue, headings are large and bold text, and <example> tags are colored in grey.

There are several different ways to edit things like links, which hide the underlying Muse markup. One way is to toggle font-locking off by hitting C-c C-l, which is also M-x font-lock-mode, make changes, and then hit C-c C-l again to toggle font-locking back on. Another way is just to move into the text and edit it. Markup can also be removed by normal deletion methods, though some side effects might require a second deletion.

For the particular case of editing links, it is easiest to move to the link and do C-c C-e, which is also M-x muse-edit-link-at-point. This prompts you for the link and its description, using the previous contents of the link as initial values. A link to another Muse file may be created by hitting C-c TAB l. A link to a URL may be created by hitting C-c TAB u. Links may be followed by hitting RET on them.

If you want to add a new list item, this may by accomplished by hitting M-RET. This will put a dash and some spaces on the screen. The dash is the Muse markup that indicates a list item. It is also possible to created “nested” lists with this command, by adjusting the number of spaces in front of the dashes. If you have lists with long lines, you can move to a list item and hit M-q to wrap it onto multiple lines.