Remove ambiguities and convert to specifics
This commit is contained in:
parent
531957d735
commit
28b053198f
2 changed files with 12 additions and 12 deletions
13
README.org
13
README.org
|
@ -3,7 +3,7 @@
|
|||
|
||||
[[https://melpa.org/#/smog][file:https://melpa.org/packages/smog-badge.svg]]
|
||||
|
||||
A simple way to analyse the writing style, word use and readability of prose in Emacs.
|
||||
A simple way to analyse the writing style, word use and readability of prose in Emacs.
|
||||
|
||||
It can be used by calling =smog-check-buffer= or =smog-check-region= on the selected region.
|
||||
|
||||
|
@ -23,15 +23,17 @@ To install on macOS
|
|||
brew install style
|
||||
#+END_SRC
|
||||
|
||||
To install from source, download from http://ftp.gnu.org/gnu/diction/
|
||||
|
||||
** Configure
|
||||
|
||||
The package can be installed from [[https://melpa.org/][MELPA]] or manually via [[https://github.com/zzkt/smog][github]].
|
||||
The emacs package can be installed from [[https://melpa.org/][MELPA]] or manually via [[https://github.com/zzkt/smog][github]].
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package smog)
|
||||
#+END_SRC
|
||||
|
||||
To configure language or output options, =setq= or customize the =smog-command= variable.
|
||||
To configure language or output options, =setq= or customize the =smog-command= variable.
|
||||
|
||||
The default language is set to =en= (English) and can be changed to =de= for German or =nl= for Dutch. Details for the various output options can be found via =style -h= or =man style= in your shell of choice.
|
||||
|
||||
|
@ -49,10 +51,9 @@ e.g. to analyse a text in German and show sentences longer than 23 words…
|
|||
|
||||
** Analyse surface detail
|
||||
|
||||
=M-x smog-check-buffer= and/or =M-x smog-check-region=
|
||||
=M-x smog-check=
|
||||
|
||||
** Further
|
||||
** Further
|
||||
- [[https://wiki.christophchamp.com/index.php?title=Style_and_Diction][style]] is written by Michael Haardt with contributions from Jason Petrone, Uschi Stegemeier and Hans Lodder
|
||||
- [[https://files.eric.ed.gov/fulltext/ED506404.pdf][The Classic Readability Studies]]. William H.DuBay, Editor
|
||||
- [[https://en.wikipedia.org/wiki/Asemic_writing][Asemic writing]]
|
||||
|
||||
|
|
11
smog.el
11
smog.el
|
@ -36,7 +36,7 @@
|
|||
;; Measure Of Gobbledygook“). It also summarises word usage and provides
|
||||
;; information about sentence and paragraph structure.
|
||||
;;
|
||||
;; M-x smog-check-buffer
|
||||
;; M-x smog-check
|
||||
|
||||
|
||||
;;; Code:
|
||||
|
@ -93,7 +93,7 @@ The <<<Lix>>> formula developed by Bjornsson from Sweden is very simple and empl
|
|||
|
||||
** SMOG-Grading
|
||||
|
||||
The <<<SMOG-Grading>>> for English texts has been developed by McLaughlin in 1969. Its result is aschool grade.
|
||||
The <<<SMOG-Grading>>> for English texts has been developed by McLaughlin in 1969. Its result is a school grade.
|
||||
|
||||
*SMOG-Grading* = square root of (((wds >= 3 syll)/sent)*30) + 3
|
||||
|
||||
|
@ -132,12 +132,11 @@ Further details can be found in the =style(1)= man page.\n"
|
|||
"Is the style command installed?"
|
||||
(let ((program "style"))
|
||||
(unless (executable-find program)
|
||||
(message "The program 'style' isn't installed or can't be found."))
|
||||
(message "The program 'style' isn't installed or can't be found.\nTry installing the 'diction' package for your OS or download the source from http://ftp.gnu.org/gnu/diction/"))
|
||||
(eq 0 (condition-case nil
|
||||
(call-process program)
|
||||
(error (message "The program 'style' test run exit abnormally."))))))
|
||||
|
||||
;;;###autoload
|
||||
(defun smog-check-buffer ()
|
||||
"Analyse the surface characteristics of a buffer."
|
||||
(interactive)
|
||||
|
@ -166,8 +165,8 @@ Further details can be found in the =style(1)= man page.\n"
|
|||
(org-update-radio-target-regexp))))))
|
||||
|
||||
;;;###autoload
|
||||
(defun smog-check-region ()
|
||||
"Analyse the surface characteristics of a selected region."
|
||||
(defun smog-check ()
|
||||
"Analyse the readability and word use of a selected region or buffer."
|
||||
(interactive)
|
||||
(when (smog--style-installed-p)
|
||||
(let* ((smog-buffer (current-buffer))
|
||||
|
|
Loading…
Reference in a new issue