Solved Emacs configuration for FreeBSD Documentation Project

Hello :) I'm trying to edit FDP xml files with Emacs.

I followed the instruction of FDP Primer(http://www.freebsd.org/doc/en_US.ISO8859-1/books/fdp-primer/editor-config-emacs.html),
added several lines to my .emacs file.
However, it seems not working correctly. When I open FDP file in Emacs, sgml-mode is not automatically detected.

I manually enabled this mode via M-x sgml-mode.
In this mode, `tab stops set to 2' and `8 leading spaces->single tab' worked fine,
while `word wrap set to 70 chars' seems not working(this means when I exceeded the limit, there isn't any highlight I can recognize).

So the problems are:

1. Not entering sgml-mode automatically
2. Word wrap set to 70 chars doesn't working

I'm using Vim right now, but I prefer Emacs for my text editing.
What should I do to edit files appropriately(make documents conform to FDP guidelines) with Emacs?

Thanks.

p.s. I posted about this on freebsd-doc mailing list, but my problem is not solved--so I'm asking here.
 
I updated the configuration example a few days ago: https://www.freebsd.org/doc/en_US.ISO8859-1/books/fdp-primer/editor-config-emacs.html. It appears that emacs is not used much by FreeBSD documentation submitters. Or maybe they use it, just not for documentation.

In any case, it would be nice to improve this. Examples of setting nxml-mode or other settings that make emacs better for use with FreeBSD documentation would be greatly appreciated.
 
The person who answered my question (and sent updated example to the freebsd-doc mailing list) said this is an outdated method('p'sgml-mode). So I'm searching for nxml-mode, but I have difficulty because I'm not an Emacs expert. Anyone who knows Emacs well, please reply to this thread. Thanks.
 
What version of Emacs are you using? I just started with emacs -Q (default configuration) and opened an xml file and the major-mode was set to nxml-mode and fill-column was set to 70. This was with vesion 24.5.1.
 
What version of Emacs are you using? I just started with emacs -Q (default configuration) and opened an xml file and the major-mode was set to nxml-mode and fill-column was set to 70. This was with vesion 24.5.1.

I'm using 24.5.1, too. Could you explain about fill-column in detail?
 
Are you looking for a display effect or are you attempting to insert newlines? For the former, you probably want visual-line-mode. For the latter, you probably want auto-fill-mode. An alternative to auto-fill-mode is to hit M-q on paragraphs to manually fill them.

Note that the variable fill-column is just used by auto-fill-mode to determine where the newlines are added.
 
Back
Top