From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Manuel Uberti Newsgroups: gmane.emacs.devel Subject: Re: ELPA: add flymake-proselint Date: Tue, 10 Aug 2021 07:40:16 +0200 Message-ID: <644dcddc-b0a1-f938-dff1-72923ae3de61@inventati.org> References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------972E4EEF0866651AE5A385F7" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20075"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 Cc: emacs-devel To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Aug 10 07:44:19 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mDKYk-00050U-Ma for ged-emacs-devel@m.gmane-mx.org; Tue, 10 Aug 2021 07:44:18 +0200 Original-Received: from localhost ([::1]:54052 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mDKYi-0008QK-Qe for ged-emacs-devel@m.gmane-mx.org; Tue, 10 Aug 2021 01:44:17 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35462) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mDKV8-0006DI-Tn for emacs-devel@gnu.org; Tue, 10 Aug 2021 01:40:35 -0400 Original-Received: from latitanza.investici.org ([2001:888:2000:56::19]:39375) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mDKV5-0005Xs-Lh for emacs-devel@gnu.org; Tue, 10 Aug 2021 01:40:34 -0400 Original-Received: from mx3.investici.org (unknown [127.0.0.1]) by latitanza.investici.org (Postfix) with ESMTP id 4GkMH73KPjzGp3x; Tue, 10 Aug 2021 05:40:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inventati.org; s=stigmate; t=1628574019; bh=tXlr3P2kuY+G8u8LLtY7+RZelxrZC9/OybiJ7IiMxs8=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=YSngaYF8N//8auyM5F4lozYtQFCDcp6hMg804EJz27e7iV/pkz/l7vJGc1oZYCvSC lv3pRH/duOQ+YN9ReoJN7gAJ7r663gq3kwA+/x/UUhfJaIC+yclkOws/pNGtSOcFBs sQwhahT0SIB6XOoGZarwkFgH+T3ldiowYksgy3Uw= Original-Received: from [82.94.249.234] (mx3.investici.org [82.94.249.234]) (Authenticated sender: manuel.uberti@inventati.org) by localhost (Postfix) with ESMTPSA id 4GkMH72JYWzGp3m; Tue, 10 Aug 2021 05:40:19 +0000 (UTC) In-Reply-To: Content-Language: en-GB Received-SPF: pass client-ip=2001:888:2000:56::19; envelope-from=manuel.uberti@inventati.org; helo=latitanza.investici.org X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, NICE_REPLY_A=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:272253 Archived-At: This is a multi-part message in MIME format. --------------972E4EEF0866651AE5A385F7 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit On 09/08/21 20:48, Stefan Monnier wrote: > Before I can add it to GNU ELPA, can you please fix the copyright line > to refer to the FSF rather than to you (which reflects the fact that > you consider this package as covered by your copyright assignment)? Sure thing, you can find the updated file attached. Thank you -- Manuel Uberti www.manueluberti.eu --------------972E4EEF0866651AE5A385F7 Content-Type: text/x-emacs-lisp; charset=UTF-8; name="flymake-proselint.el" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="flymake-proselint.el" ;;; flymake-proselint.el --- Flymake backend for proselint -*- lexical-binding: t; -*- ;; Copyright (C) 2021 Free Software Foundation, Inc. ;; ;; Author: Manuel Uberti ;; Version: 0.2.0 ;; Keywords: convenience ;; Package-Requires: ((emacs "26.1")) ;; URL: https://github.com/manuel-uberti/flymake-proselint ;; flymake-proselint is free software; you can redistribute it and/or modify it ;; under the terms of the GNU General Public License as published by the Free ;; Software Foundation; either version 3, or (at your option) any later version. ;; ;; flymake-proselint is distributed in the hope that it will be useful, but ;; WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ;; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more ;; details. ;; ;; You should have received a copy of the GNU General Public License ;; along with flymake-proselint. If not, see http://www.gnu.org/licenses. ;;; Commentary: ;; This package adds support for proselint (http://proselint.com/) in Flymake. ;; Once installed, the backend can be enabled with: ;; (add-hook 'markdown-mode-hook #'flymake-proselint-setup) ;;; Code: (require 'flymake) (defvar-local flymake-proselint--flymake-proc nil) (defun flymake-proselint-backend (report-fn &rest _args) (unless (executable-find "proselint") (user-error "Executable proselint not found on PATH")) (when (process-live-p flymake-proselint--flymake-proc) (kill-process flymake-proselint--flymake-proc)) (let ((source (current-buffer))) (save-restriction (widen) (setq flymake-proselint--flymake-proc (make-process :name "proselint-flymake" :noquery t :connection-type 'pipe :buffer (generate-new-buffer " *proselint-flymake*") :command '("proselint" "-") :sentinel (lambda (proc _event) (when (eq 'exit (process-status proc)) (unwind-protect (if (with-current-buffer source (eq proc flymake-proselint--flymake-proc)) (with-current-buffer (process-buffer proc) (goto-char (point-min)) (cl-loop while (search-forward-regexp "^.+:\\([[:digit:]]+\\):\\([[:digit:]]+\\): \\(.+\\)$" nil t) for msg = (match-string 3) for (beg . end) = (flymake-diag-region source (string-to-number (match-string 1)) (string-to-number (match-string 2))) collect (flymake-make-diagnostic source beg end :warning msg) into diags finally (funcall report-fn diags))) (flymake-log :warning "Canceling obsolete check %s" proc)) (kill-buffer (process-buffer proc))))))) (process-send-region flymake-proselint--flymake-proc (point-min) (point-max)) (process-send-eof flymake-proselint--flymake-proc)))) ;;;###autoload (defun flymake-proselint-setup () "Enable Flymake backend proselint." (add-hook 'flymake-diagnostic-functions #'flymake-proselint-backend nil t)) (provide 'flymake-proselint) ;;; flymake-proselint.el ends here --------------972E4EEF0866651AE5A385F7--