FreeBSD Bugzilla – Attachment 172626 Details for
Bug 211184
Update Emacs Section of Editor Configuration Chapter in FDP Primer
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
svn diff for editor-config chapter in the FDP primer
doc-emacs-config.diff (text/plain), 4.28 KB, created by
Joseph Mingrone
on 2016-07-18 02:33:03 UTC
(
hide
)
Description:
svn diff for editor-config chapter in the FDP primer
Filename:
MIME Type:
Creator:
Joseph Mingrone
Created:
2016-07-18 02:33:03 UTC
Size:
4.28 KB
patch
obsolete
>Index: chapter.xml >=================================================================== >--- chapter.xml (revision 49127) >+++ chapter.xml (working copy) >@@ -48,7 +48,8 @@ > <sect2 xml:id="editor-config-vim-use"> > <title>Use</title> > >- <para>Press <keycap>P</keycap> to reformat paragraphs or text that has been selected in Visual mode. Press >+ <para>Press <keycap>P</keycap> to reformat paragraphs or text >+ that has been selected in Visual mode. Press > <keycap>T</keycap> to replace groups of eight spaces with a > tab.</para> > </sect2> >@@ -103,14 +104,88 @@ > <sect1 xml:id="editor-config-emacs"> > <title><application>Emacs</application></title> > >- <para>Install from >- <package>editors/emacs</package> >- or <package>editors/xemacs</package>.</para> >+ <para>Install from <package>editors/emacs</package> or >+ <package>editors/emacs-devel</package>.</para> > >- <para>Edit <filename>~/.emacs</filename>, adding this >- line:</para> >+ <sect2 xml:id="editor-config-emacs-validation"> >+ <title>Validation</title> > >- <programlisting>(add-hook 'nxml-mode-hook 'turn-on-auto-fill)</programlisting> >+ <para>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 >+ <filename>~/.emacs.d/schema/schemas.xml</filename> and these >+ lines to the file:</para> >+ >+ <programlisting><tag class="starttag">locatingRules xmlns="http://thaiopensource.com/ns/locating-rules/1.0"</tag> >+ <tag class="starttag">documentElement localName="section" typeId="DocBook"</tag> >+ <tag class="starttag">documentElement localName="chapter" typeId="DocBook"</tag> >+ <tag class="starttag">documentElement localName="article" typeId="DocBook"</tag> >+ <tag class="starttag">documentElement localName="book" typeId="DocBook"</tag> >+ <tag class="starttag">typeId id="DocBook" uri="/usr/local/share/xml/docbook/5.0/rng/docbook.rnc"</tag> >+<tag class="endtag">locatingRules</tag></programlisting> >+ >+ </sect2> >+ >+ <sect2 xml:id="editor-config-emacs-igor"> >+ <title>Automated Proofreading with Flycheck and Igor</title> >+ >+ <para>The Flycheck package is available from Milkypostman's >+ Emacs Lisp Package Archive (<acronym>MELPA</acronym>). If >+ <acronym>MELPA</acronym> is not already in Emacs's >+ packages-archives, it can be added by evaluating</para> >+ >+ <programlisting>(add-to-list 'package-archives '("melpa" . "http://stable.melpa.org/packages/") t)</programlisting> >+ >+ <para>Add the line to Emacs's initialization file (one of >+ <filename>~/.emacs</filename>, >+ <filename>~/.emacs.el</filename>, or >+ <filename>~.emacs.d/init.el</filename>) to make this change >+ permanent.</para> >+ >+ <para>To install Flycheck, evaluate</para> >+ >+ <programlisting>(package-install 'flycheck)</programlisting> >+ >+ <para>Create a Flycheck checker for >+ <package>textproc/igor</package> by evaluating</para> >+ >+ <programlisting>(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)</programlisting> >+ >+ <para>Again, add these lines to Emacs's initialization file to >+ make the changes permanent.</para> >+ </sect2> >+ >+ <sect2 xml:id="editor-config-emacs-specifc"> >+ <title>FreeBSD Documentation Specific Settings</title> >+ >+ <para>To apply settings specific to the FreeBSD documentation >+ project, create <filename>.dir-locals.el</filename> in the >+ root directory of the documentation repository and add these >+ lines to the file:</para> >+ >+ <programlisting>;;; 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"))))</programlisting> >+ </sect2> > </sect1> > > <sect1 xml:id="editor-config-nano">
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 211184
: 172626