all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* TextLint: Check your scientific writing from Emacs
@ 2011-09-08 10:48 Damien Cassou
  2011-09-08 12:08 ` Antoine Levitt
  2011-09-09 11:22 ` Seweryn Kokot
  0 siblings, 2 replies; 9+ messages in thread
From: Damien Cassou @ 2011-09-08 10:48 UTC (permalink / raw)
  To: emacs-devel

TextLint is a tool to check your scientific writing for common style
errors from Emacs:

http://www.youtube.com/watch?v=CsG2DKgHanE

For additional information, please see
http://www.emacswiki.org/emacs-en/TextLint

Feedback is highly appreciated

-- 
Damien Cassou
http://damiencassou.seasidehosting.st

"Lambdas are relegated to relative obscurity until Java makes them
popular by not having them." James Iry



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: TextLint: Check your scientific writing from Emacs
  2011-09-08 10:48 TextLint: Check your scientific writing from Emacs Damien Cassou
@ 2011-09-08 12:08 ` Antoine Levitt
  2011-09-08 16:03   ` Lennart Borgman
  2011-09-09  6:09   ` Damien Cassou
  2011-09-09 11:22 ` Seweryn Kokot
  1 sibling, 2 replies; 9+ messages in thread
From: Antoine Levitt @ 2011-09-08 12:08 UTC (permalink / raw)
  To: emacs-devel

08/09/11 12:48, Damien Cassou
> TextLint is a tool to check your scientific writing for common style
> errors from Emacs:
>
> http://www.youtube.com/watch?v=CsG2DKgHanE
>
> For additional information, please see
> http://www.emacswiki.org/emacs-en/TextLint
>
> Feedback is highly appreciated

Bonjour Damien,

Do you know about style-check.rb?
http://www.cs.umd.edu/~nspring/software/style-check-readme.html

It's faster, and easier to setup than your tool.  I tried both your tool
and style-check on a manuscript, and generally the errors in style-check
were more pertinent, with less false positives. TextLint did find a few
things style-check didn't, so I'm keeping it around, thanks for writing
it :-)

I like your web interface, and how you group the warnings in it.

Also, a few fixable false positives :

- inline math isn't recognized properly. For instance, "$A$ and"
  complains that it should be an.

- "After "a" only words beginning without a vowel are allowed." triggers
  on "a uniform"

Also, for completeness, I think you want shell-quote-argument instead of

(format "\"%s\" \"%s\" \"%s\" \"%s\"" ...)




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: TextLint: Check your scientific writing from Emacs
  2011-09-08 12:08 ` Antoine Levitt
@ 2011-09-08 16:03   ` Lennart Borgman
  2011-09-08 16:35     ` Damien Cassou
  2011-09-09  6:09   ` Damien Cassou
  1 sibling, 1 reply; 9+ messages in thread
From: Lennart Borgman @ 2011-09-08 16:03 UTC (permalink / raw)
  To: emacs-devel

On Thu, Sep 8, 2011 at 14:08, Antoine Levitt <antoine.levitt@gmail.com> wrote:
> 08/09/11 12:48, Damien Cassou
>> TextLint is a tool to check your scientific writing for common style
>> errors from Emacs:
>>
>> http://www.youtube.com/watch?v=CsG2DKgHanE
>>
>> For additional information, please see
>> http://www.emacswiki.org/emacs-en/TextLint
>>
>> Feedback is highly appreciated
>
> Bonjour Damien,
>
> Do you know about style-check.rb?
> http://www.cs.umd.edu/~nspring/software/style-check-readme.html

That page says style-check.rb is only for latex-formatted text. Is that true?



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: TextLint: Check your scientific writing from Emacs
  2011-09-08 16:03   ` Lennart Borgman
@ 2011-09-08 16:35     ` Damien Cassou
  2011-09-08 17:22       ` Bastien
  0 siblings, 1 reply; 9+ messages in thread
From: Damien Cassou @ 2011-09-08 16:35 UTC (permalink / raw)
  To: Lennart Borgman; +Cc: emacs-devel

On Thu, Sep 8, 2011 at 6:03 PM, Lennart Borgman
<lennart.borgman@gmail.com> wrote:
> That page says style-check.rb is only for latex-formatted text. Is that true?

I don't know about style-check, but TextLint can deal with plain text,
LaTeX, and HTML code.

-- 
Damien Cassou
http://damiencassou.seasidehosting.st

"Lambdas are relegated to relative obscurity until Java makes them
popular by not having them." James Iry



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: TextLint: Check your scientific writing from Emacs
  2011-09-08 16:35     ` Damien Cassou
@ 2011-09-08 17:22       ` Bastien
  2011-09-08 18:16         ` Lluís
  0 siblings, 1 reply; 9+ messages in thread
From: Bastien @ 2011-09-08 17:22 UTC (permalink / raw)
  To: Damien Cassou; +Cc: Lennart Borgman, emacs-devel

Damien Cassou <damien.cassou@gmail.com> writes:

> I don't know about style-check, but TextLint can deal with plain text,
> LaTeX, and HTML code.

Would be nice to add org-mode support!

-- 
 Bastien



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: TextLint: Check your scientific writing from Emacs
  2011-09-08 17:22       ` Bastien
@ 2011-09-08 18:16         ` Lluís
  2011-09-08 19:57           ` Juri Linkov
  0 siblings, 1 reply; 9+ messages in thread
From: Lluís @ 2011-09-08 18:16 UTC (permalink / raw)
  To: Bastien; +Cc: Lennart Borgman, Damien Cassou, emacs-devel

Bastien  writes:

> Damien Cassou <damien.cassou@gmail.com> writes:
>> I don't know about style-check, but TextLint can deal with plain text,
>> LaTeX, and HTML code.

> Would be nice to add org-mode support!

That's exaclty what I thought just after seeing the link XD


Lluis

-- 
 "And it's much the same thing with knowledge, for whenever you learn
 something new, the whole world becomes that much richer."
 -- The Princess of Pure Reason, as told by Norton Juster in The Phantom
 Tollbooth



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: TextLint: Check your scientific writing from Emacs
  2011-09-08 18:16         ` Lluís
@ 2011-09-08 19:57           ` Juri Linkov
  0 siblings, 0 replies; 9+ messages in thread
From: Juri Linkov @ 2011-09-08 19:57 UTC (permalink / raw)
  To: Lluís; +Cc: Bastien, Lennart Borgman, Damien Cassou, emacs-devel

>> Would be nice to add org-mode support!
>
> That's exaclty what I thought just after seeing the link XD
         =======

And would be nice for message-mode as well ;-)



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: TextLint: Check your scientific writing from Emacs
  2011-09-08 12:08 ` Antoine Levitt
  2011-09-08 16:03   ` Lennart Borgman
@ 2011-09-09  6:09   ` Damien Cassou
  1 sibling, 0 replies; 9+ messages in thread
From: Damien Cassou @ 2011-09-09  6:09 UTC (permalink / raw)
  To: emacs-devel

Bonjour Antoine,

On Thu, Sep 8, 2011 at 2:08 PM, Antoine Levitt <antoine.levitt@gmail.com> wrote:
> Do you know about style-check.rb?
> http://www.cs.umd.edu/~nspring/software/style-check-readme.html

I didn't know, thanks for the link, I will have a look. Thank you also
for the feedback, I will add issues in the bug tracker.

-- 
Damien Cassou
http://damiencassou.seasidehosting.st

"Lambdas are relegated to relative obscurity until Java makes them
popular by not having them." James Iry



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: TextLint: Check your scientific writing from Emacs
  2011-09-08 10:48 TextLint: Check your scientific writing from Emacs Damien Cassou
  2011-09-08 12:08 ` Antoine Levitt
@ 2011-09-09 11:22 ` Seweryn Kokot
  1 sibling, 0 replies; 9+ messages in thread
From: Seweryn Kokot @ 2011-09-09 11:22 UTC (permalink / raw)
  To: emacs-devel

Damien Cassou <damien.cassou <at> gmail.com> writes:

> 
> TextLint is a tool to check your scientific writing for common style
> errors from Emacs:
> 
> http://www.youtube.com/watch?v=CsG2DKgHanE
> 
> For additional information, please see
> http://www.emacswiki.org/emacs-en/TextLint
> 
> Feedback is highly appreciated
> 

I created a proof of concept for a subset of features found in TextLint using 
just emacs lisp. This way you don't need any external tools. It is based on 
searching predefined words or group of words in the current buffer with M-x my-
check-my-writing. This command gives another buffer *WritingCheck* where you 
can navigate through the issues using RET, TAB and SPC.

You need to populate my-writing-words-check variable to your wishes.

Regards,
Seweryn

----- in .emacs -----
(require 'my-writing-check-mode nil t)
(define-key my-writing-check-mode-map (kbd "RET") 'my-writing-check-goto-line)
(define-key my-writing-check-mode-map (kbd "TAB") 'my-writing-check-goto-line)
(define-key my-writing-check-mode-map (kbd "SPC") 'my-writing-check-see-
context)

(setq my-writing-words-check
      '(
;; add here more entries ("words to look for" "explanation what is wrong")
		("in the absence of" "without?")
		("exhibit" "show")
        ))


-------- my-writing-check-mode.el --------
(define-derived-mode my-writing-check-mode fundamental-mode "Writing Check"
"My writing grammar and style check mode")

(defvar my-writing-words-check nil 
"List of words, phrases to search and explanation of what is wrong.") 
(defvar my-writing-check-orig-buffer nil "Original buffer with text to check")
(defvar my-writing-check-check-buffer "*WritingCheck*" "Writing check buffer 
name")

(defun my-check-my-writing ()
  "Check my written text and suggest improvements or corrections"
  (interactive)
  (save-excursion
	(let (line-num)
	  (setq my-writing-check-orig-buffer (window-buffer))
	  (set-buffer (get-buffer-create my-writing-check-check-buffer))
	  (erase-buffer)
	  (set-buffer my-writing-check-orig-buffer)
	  (goto-char (point-min))
	  (loop for (my-words comment) in my-writing-words-check do
			(save-excursion 
			  (while (word-search-forward my-words nil t)
			  ;; (message "line:%s, used: \"%s\", better: \"%s\"" 
			  ;; (message "line:%s, \"%s\" --> \"%s\"" 
			  (setq line-num (line-number-at-pos))
			  (save-excursion 
				(set-buffer my-writing-check-check-buffer)
				(insert (format "%5s: \"%s\" --> \"%s\"\n" 
								line-num my-
words comment)))
			(set-buffer (get-buffer my-writing-check-orig-buffer))
			)))
	(pop-to-buffer my-writing-check-check-buffer)
	(goto-char (point-min))
	(my-writing-check-mode)
	)))

(defalias 'my-writing-check 'my-check-my-writing)

(defun my-writing-check-goto-line ()
  (interactive)
  (save-excursion
	(let (lbp linnum string1)
	  (setq lbp (line-beginning-position))
	  (message "%s %s %s" my-writing-check-orig-buffer my-writing-check-
check-buffer lbp)
	  (goto-char lbp)
	  (re-search-forward "[ ]*\\([0-9]+\\): \"\\(.*\\)\" -->" nil t)
	  (setq linnum (match-string 1))
	  (setq string1 (match-string 2))
	  (pop-to-buffer my-writing-check-orig-buffer)
	  (goto-line (string-to-number linnum))
	  )))

(defun my-writing-check-see-context ()
  (interactive)
  (save-excursion
	(let (lbp linnum string1)
	  (setq lbp (line-beginning-position))
	  (message "%s %s %s" my-writing-check-orig-buffer my-writing-check-
check-buffer lbp)
	  (goto-char lbp)
	  (re-search-forward "[ ]*\\([0-9]+\\): \"\\(.*\\)\" -->" nil t)
	  (setq linnum (match-string 1))
	  (setq string1 (match-string 2))
	  (pop-to-buffer my-writing-check-orig-buffer)
	  (goto-line (string-to-number linnum))
	  (pop-to-buffer my-writing-check-check-buffer)
	  )))

(provide 'my-writing-check-mode)
----------------------------------------------------------------------------





^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2011-09-09 11:22 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-08 10:48 TextLint: Check your scientific writing from Emacs Damien Cassou
2011-09-08 12:08 ` Antoine Levitt
2011-09-08 16:03   ` Lennart Borgman
2011-09-08 16:35     ` Damien Cassou
2011-09-08 17:22       ` Bastien
2011-09-08 18:16         ` Lluís
2011-09-08 19:57           ` Juri Linkov
2011-09-09  6:09   ` Damien Cassou
2011-09-09 11:22 ` Seweryn Kokot

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.