From owner-svn-doc-head@freebsd.org Fri Aug 5 20:23:27 2016 Return-Path: Delivered-To: svn-doc-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2BF53BAF413; Fri, 5 Aug 2016 20:23:27 +0000 (UTC) (envelope-from wblock@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F0C9C1747; Fri, 5 Aug 2016 20:23:26 +0000 (UTC) (envelope-from wblock@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u75KNQOm031761; Fri, 5 Aug 2016 20:23:26 GMT (envelope-from wblock@FreeBSD.org) Received: (from wblock@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u75KNQqZ031760; Fri, 5 Aug 2016 20:23:26 GMT (envelope-from wblock@FreeBSD.org) Message-Id: <201608052023.u75KNQqZ031760@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wblock set sender to wblock@FreeBSD.org using -f From: Warren Block Date: Fri, 5 Aug 2016 20:23:26 +0000 (UTC) To: doc-committers@freebsd.org, svn-doc-all@freebsd.org, svn-doc-head@freebsd.org Subject: svn commit: r49219 - head/en_US.ISO8859-1/books/fdp-primer/editor-config X-SVN-Group: doc-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-doc-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the doc tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Aug 2016 20:23:27 -0000 Author: wblock Date: Fri Aug 5 20:23:25 2016 New Revision: 49219 URL: https://svnweb.freebsd.org/changeset/doc/49219 Log: Update Emacs section of editor configuration chapter in FDP Primer. PR: 211184 Submitted by: Joseph Mingrone Modified: head/en_US.ISO8859-1/books/fdp-primer/editor-config/chapter.xml Modified: head/en_US.ISO8859-1/books/fdp-primer/editor-config/chapter.xml ============================================================================== --- head/en_US.ISO8859-1/books/fdp-primer/editor-config/chapter.xml Fri Aug 5 18:51:24 2016 (r49218) +++ head/en_US.ISO8859-1/books/fdp-primer/editor-config/chapter.xml Fri Aug 5 20:23:25 2016 (r49219) @@ -105,12 +105,87 @@ endfunction " Set_SGML()Install from editors/emacs - or editors/xemacs. + or editors/emacs-devel. - Edit ~/.emacs, adding this - line: + + Validation - (add-hook 'nxml-mode-hook 'turn-on-auto-fill) + Emacs's nxml-mode uses compact relax NG schemas for + validating XML. A compact relax NG schema for FreeBSD's + extension to DocBook 5.0 is included in the documentation + repository. To configure nxml-mode to validate using this + schema, create + ~/.emacs.d/schema/schemas.xml and add + these lines to the file: + + locatingRules xmlns="http://thaiopensource.com/ns/locating-rules/1.0" + documentElement localName="section" typeId="DocBook" + documentElement localName="chapter" typeId="DocBook" + documentElement localName="article" typeId="DocBook" + documentElement localName="book" typeId="DocBook" + typeId id="DocBook" uri="/usr/local/share/xml/docbook/5.0/rng/docbook.rnc" +locatingRules + + + + + Automated Proofreading with Flycheck and Igor + + The Flycheck package is available from Milkypostman's + Emacs Lisp Package Archive (MELPA). If + MELPA is not already in Emacs's + packages-archives, it can be added by evaluating + + (add-to-list 'package-archives '("melpa" . "http://stable.melpa.org/packages/") t) + + Add the line to Emacs's initialization file (one of + ~/.emacs, + ~/.emacs.el, or + ~.emacs.d/init.el) to make this change + permanent. + + To install Flycheck, evaluate + + (package-install 'flycheck) + + Create a Flycheck checker for + textproc/igor by evaluating + + (flycheck-define-checker igor + "FreeBSD Documentation Project sanity checker. + +See URLs http://www.freebsd.org/docproj/ and +http://www.freshports.org/textproc/igor/." + :command ("igor" "-X" source-inplace) + :error-parser flycheck-parse-checkstyle + :modes (nxml-mode) + :standard-input t) + + (add-to-list 'flycheck-checkers 'igor 'append) + + Again, add these lines to Emacs's initialization file to + make the changes permanent. + + + + FreeBSD Documentation Specific Settings + + To apply settings specific to the FreeBSD documentation + project, create .dir-locals.el in the + root directory of the documentation repository and add these + lines to the file: + + ;;; Directory Local Variables +;;; For more information see (info "(emacs) Directory Variables") + +((nxml-mode + (eval . (turn-on-auto-fill)) + (fill-column . 70) + (eval . (require 'flycheck)) + (eval . (flycheck-mode 1)) + (flycheck-checker . igor) + (eval . (add-to-list 'rng-schema-locating-files "~/.emacs.d/schema/schemas.xml")))) +