all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lele Gaifax <lele@metapensiero.it>
To: emacs-devel@gnu.org
Subject: Re: New Flymake rewrite in emacs-26
Date: Thu, 05 Oct 2017 13:42:35 +0200	[thread overview]
Message-ID: <87mv553jo4.fsf@metapensiero.it> (raw)
In-Reply-To: 87wp4a1gho.fsf@gmail.com

[-- Attachment #1: Type: text/plain, Size: 1351 bytes --]

joaotavora@gmail.com (João Távora) writes:

> Lele Gaifax <lele@metapensiero.it> writes:
>
>> Speaking of which, while reading the -proc source I found recipes for Perl and
>> PHP, is there any interest in out-of-the-box Python equivalents?
>
> Very much so, but please not based on flymake-proc.el, rather the new
> API.
>
> If your Python interpreter/compiler provides a syntax check tool that
> can read from stdin, such a thing can be done in little code.
>
> For an example, see my reply to Simen Heggestøyl in a parallel thread
> where I provide a simple but effective Ruby backend.

Thank you, I posted the solution I'm currently testing in that thread: let me
know if/how can I contribute it (removing my "esk/" prefix, of course).

I'm attaching the copy-edits diff: it includes your suggested rephrase.

I found the docstrings for flymake-goto-{next,previous}-error somewhat
confusing:

  (defun flymake-goto-next-error (&optional n filter interactive)
    "Go to Nth next Flymake error in buffer matching FILTER.
  Interactively, always move to the next error.  Interactively, and
  with a prefix arg, skip any diagnostics with a severity less than
  ‘:warning’.
  ...

with that double reference to "interactively", but I didn't touch those, as it
may very well be my inability to get the right sense...

Thanks again,
ciao, lele.


[-- Attachment #2: flymake.diff --]
[-- Type: text/x-diff, Size: 9527 bytes --]

diff --git a/doc/misc/flymake.texi b/doc/misc/flymake.texi
index 5dd72f81e2..5ff5537d04 100644
--- a/doc/misc/flymake.texi
+++ b/doc/misc/flymake.texi
@@ -182,7 +182,7 @@ Syntax check statuses
 @cindex Syntax check statuses
 
 After syntax check is finished, its status is displayed in the mode line.
-The following statuses are defined.
+The following statuses are defined:
 
 @multitable @columnfractions 0.25 0.75
 @item @code{Wait}
@@ -356,7 +356,7 @@ Adding support for a new syntax check tool
 @code{init-function} is required to initialize the syntax check,
 usually by creating a temporary copy of the buffer contents.  The
 function must return @code{(list cmd-name arg-list)}.  If
-@code{init-function} returns null, syntax check is aborted, by
+@code{init-function} returns null, syntax check is aborted, but
 @code{flymake-mode} is not switched off.
 
 @item cleanup-function
@@ -375,7 +375,7 @@ Adding support for a new syntax check tool
 @end table
 
 To add support for a new syntax check tool, write corresponding
-@code{init-function}, and, optionally @code{cleanup-function} and
+@code{init-function} and, optionally, @code{cleanup-function} and
 @code{getfname-function}.  If the format of error messages reported by
 the new tool is not yet supported by Flymake, add a new entry to
 the @code{flymake-proc-err-line-patterns} list.
@@ -493,7 +493,7 @@ Implementation overview
 
 @code{flymake-proc-legacy-backend} saves a copy of the buffer in a
 temporary file in the buffer's directory (or in the system temp
-directory, for java files), creates a syntax check command and
+directory, for Java files), creates a syntax check command and
 launches a process with this command.  The output is parsed using a
 list of error message patterns, and error information (file name, line
 number, type and text) is saved.  After the process has finished,
@@ -631,7 +631,7 @@ Locating the buildfile
 using some build tool, like Make or Ant.
 
 All Make configuration data is usually stored in a file called
-@code{Makefile}.  To allow for future extensions, flymake uses a notion of
+@code{Makefile}.  To allow for future extensions, Flymake uses a notion of
 buildfile to reference the 'project configuration' file.
 
 Special function, @code{flymake-proc-find-buildfile} is provided for locating buildfiles.
diff --git a/lisp/progmodes/flymake-proc.el b/lisp/progmodes/flymake-proc.el
index d08819713a..4d9dac363f 100644
--- a/lisp/progmodes/flymake-proc.el
+++ b/lisp/progmodes/flymake-proc.el
@@ -113,7 +113,7 @@ flymake-proc--current-process
   "Currently active Flymake process for a buffer, if any.")
 
 (defvar flymake-proc--report-fn nil
-  "If bound, function used to report back to flymake's UI.")
+  "If bound, function used to report back to Flymake's UI.")
 
 (defun flymake-proc-reformat-err-line-patterns-from-compile-el (original-list)
   "Grab error line patterns from ORIGINAL-LIST in compile.el format.
@@ -265,7 +265,6 @@ flymake-proc--included-file-name
 
 (defun flymake-proc--find-possible-master-files (file-name master-file-dirs masks)
   "Find (by name and location) all possible master files.
-
 Name is specified by FILE-NAME and location is specified by
 MASTER-FILE-DIRS.  Master files include .cpp and .c for .h.
 Files are searched for starting from the .h directory and max
@@ -626,7 +625,7 @@ flymake-proc--process-sentinel
 (defun flymake-proc--panic (problem explanation)
   "Tell Flymake UI about a fatal PROBLEM with this backend.
 May only be called in a dynamic environment where
-`flymake-proc--dynamic-report-fn' is bound"
+`flymake-proc--dynamic-report-fn' is bound."
   (flymake-log 0 "%s: %s" problem explanation)
   (if (and (boundp 'flymake-proc--report-fn)
            flymake-proc--report-fn)
@@ -718,7 +717,7 @@ flymake-proc--safe-delete-directory
 (defun flymake-proc-legacy-flymake (report-fn &rest args)
   "Flymake backend based on the original Flymake implementation.
 This function is suitable for inclusion in
-`flymake-diagnostic-types-alist'. For backward compatibility, it
+`flymake-diagnostic-functions'. For backward compatibility, it
 can also be executed interactively independently of
 `flymake-mode'."
   ;; Interactively, behave as if flymake had invoked us through its
diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el
index acc0637ec3..82877eea57 100644
--- a/lisp/progmodes/flymake.el
+++ b/lisp/progmodes/flymake.el
@@ -203,7 +203,7 @@ flymake-log
     `(flymake--log-1 ,level ',sublog ,msg ,@args)))
 
 (defun flymake-error (text &rest args)
-  "Format TEXT with ARGS and signal an error for flymake."
+  "Format TEXT with ARGS and signal an error for Flymake."
   (let ((msg (apply #'format-message text args)))
     (flymake-log :error msg)
     (error (concat "[Flymake] " msg))))
@@ -342,7 +342,7 @@ flymake-diagnostic-functions
 * the remaining arguments are keyword-value pairs in the
   form (:KEY VALUE :KEY2 VALUE2...).  Currently, Flymake provides
   no such arguments, but backend functions must be prepared to
-  accept to accept and possibly ignore any number of them.
+  accept and possibly ignore any number of them.
 
 Backend functions are expected to initiate the buffer check, but
 aren't required to complete it check before exiting: if the
@@ -385,8 +385,8 @@ flymake-diagnostic-functions
 * ‘:explanation’: value should give user-readable details of
   the situation encountered, if any.
 
-* ‘:force’: value should be a boolean suggesting that the Flymake
-  considers the report even if was somehow unexpected.")
+* ‘:force’: value should be a boolean suggesting that Flymake
+  considers the report even if it was somehow unexpected.")
 
 (defvar flymake-diagnostic-types-alist
   `((:error
@@ -403,7 +403,7 @@ flymake-diagnostic-types-alist
 
 * Every property pertaining to overlays, except `category' and
   `evaporate' (see Info Node `(elisp)Overlay Properties'), used
-  affect the appearance of Flymake annotations.
+  to affect the appearance of Flymake annotations.
 
 * `bitmap', an image displayed in the fringe according to
   `flymake-fringe-indicator-position'.  The value actually
@@ -522,23 +522,22 @@ flymake--backend-state
   "Buffer-local hash table of a Flymake backend's state.
 The keys to this hash table are functions as found in
 `flymake-diagnostic-functions'. The values are structures
-of the type `flymake--backend-state', with these slots
+of the type `flymake--backend-state', with these slots:
 
 `running', a symbol to keep track of a backend's replies via its
 REPORT-FN argument. A backend is running if this key is
-present. If the key is absent if the backend isn't expecting any
-replies from the backend.
+present. If nil, Flymake isn't expecting any replies from the
+backend.
 
-`diags', a (possibly empty) list of diagnostic objects created
-with `flymake-make-diagnostic'. This key is absent if the
-backend hasn't reported anything yet.
+`diags', a (possibly empty) list of recent diagnostic objects
+created by the backend with `flymake-make-diagnostic'.
 
 `reported-p', a boolean indicating if the backend has replied
 since it last was contacted.
 
 `disabled', a string with the explanation for a previous
-exceptional situation reported by the backend. If this key is
-present the backend is disabled.")
+exceptional situation reported by the backend, nil if the
+backend is operating normally.")
 
 (cl-defstruct (flymake--backend-state
                (:constructor flymake--make-backend-state))
@@ -563,7 +562,6 @@ flymake-is-running
                                           &key explanation force
                                           &allow-other-keys)
   "Handle reports from BACKEND identified by TOKEN.
-
 BACKEND, REPORT-ACTION and EXPLANATION, and FORCE conform to the calling
 convention described in `flymake-diagnostic-functions' (which
 see). Optional FORCE says to handle a report even if TOKEN was
@@ -650,7 +648,7 @@ flymake-reporting-backends
 
 (defun flymake--disable-backend (backend &optional explanation)
   "Disable BACKEND because EXPLANATION.
-If is is running also stop it."
+If it is running also stop it."
   (flymake-log :warning "Disabling backend %s because %s" backend explanation)
   (flymake--with-backend-state backend state
     (setf (flymake--backend-state-running state) nil
@@ -666,7 +664,7 @@ flymake--run-backend
             (flymake--backend-state-disabled state) nil
             (flymake--backend-state-diags state) nil
             (flymake--backend-state-reported-p state) nil))
-    ;; FIXME: Should use `condition-case-unless-debug' here, for don't
+    ;; FIXME: Should use `condition-case-unless-debug' here, it doesn't
     ;; for two reasons: (1) that won't let me catch errors from inside
     ;; `ert-deftest' where `debug-on-error' appears to be always
     ;; t. (2) In cases where the user is debugging elisp somewhere
@@ -806,7 +804,6 @@ flymake-find-file-hook
 
 (defun flymake-goto-next-error (&optional n filter interactive)
   "Go to Nth next Flymake error in buffer matching FILTER.
-
 Interactively, always move to the next error.  Interactively, and
 with a prefix arg, skip any diagnostics with a severity less than
 ‘:warning’.
@@ -862,7 +859,6 @@ flymake-goto-next-error
 
 (defun flymake-goto-prev-error (&optional n filter interactive)
   "Go to Nth previous Flymake error in buffer matching FILTER.
-
 Interactively, always move to the previous error.  Interactively,
 and with a prefix arg, skip any diagnostics with a severity less
 than ‘:warning’.

[-- Attachment #3: Type: text/plain, Size: 206 bytes --]


-- 
nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia.
lele@metapensiero.it  |                 -- Fortunato Depero, 1929.

  reply	other threads:[~2017-10-05 11:42 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-03 14:05 New Flymake rewrite in emacs-26 João Távora
2017-10-03 15:00 ` Eli Zaretskii
2017-10-04 11:58   ` Lele Gaifax
2017-10-04 13:41     ` Lele Gaifax
2017-10-04 16:08       ` João Távora
2017-10-04 16:42         ` Lele Gaifax
2017-10-04 18:11           ` Lele Gaifax
2017-10-05  2:21             ` João Távora
2017-10-05 11:42               ` Lele Gaifax [this message]
2017-10-05 23:32                 ` Noam Postavsky
2017-10-06 13:16                   ` João Távora
2017-10-06 13:24                     ` Noam Postavsky
2017-10-06 15:48                       ` João Távora
2017-10-07  7:37                 ` Lele Gaifax
2017-10-07 16:08                   ` João Távora
2017-10-10 12:25   ` João Távora
2017-10-10 14:18     ` Eli Zaretskii
2017-10-10 15:09       ` João Távora
2017-10-10 15:53         ` Eli Zaretskii
2017-10-10 16:25           ` João Távora
2017-10-10 16:40             ` Eli Zaretskii
2017-10-10 17:03               ` João Távora
2017-10-10 17:20                 ` Noam Postavsky
2017-10-11  0:07                   ` João Távora
2017-10-11  0:59                     ` Noam Postavsky
2017-10-11 10:39                       ` Eli Zaretskii
2017-10-11 12:16                         ` Noam Postavsky
2017-10-11 12:25                           ` João Távora
2017-10-11 10:24                     ` Eli Zaretskii
2017-10-11 12:01                       ` João Távora
2017-10-11 12:13                         ` Eli Zaretskii
2017-10-11 13:41                         ` João Távora
2017-10-11 17:49                           ` Romanos Skiadas
2017-10-11 18:39                             ` guillaume papin
2017-10-12 13:17                               ` João Távora
2017-10-11 20:25                           ` Stefan Monnier
2017-10-12 13:10                             ` João Távora
2017-10-12 13:43                               ` Stefan Monnier
2017-10-12 13:56                                 ` João Távora
2017-10-11 13:11                     ` Mark Oteiza
2017-10-10 17:23                 ` Eli Zaretskii
2017-10-11 11:11             ` Lele Gaifax

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mv553jo4.fsf@metapensiero.it \
    --to=lele@metapensiero.it \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.