diff options
| author | Stefan Monnier | 2017-10-06 09:50:54 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2017-10-06 09:50:54 -0400 |
| commit | 11f9cb522fed9aa6552f6315340ca7352661a1e8 (patch) | |
| tree | 39facc48471c67b321c045e47d70ef030adbea44 /doc/misc | |
| parent | 92045f4546b9708dc9f69954799d211c1f56ff1e (diff) | |
| parent | 9655937da4a339300c624addd97674c038a01bc9 (diff) | |
| download | emacs-11f9cb522fed9aa6552f6315340ca7352661a1e8.tar.gz emacs-11f9cb522fed9aa6552f6315340ca7352661a1e8.zip | |
Merge emacs-26
Diffstat (limited to 'doc/misc')
| -rw-r--r-- | doc/misc/flymake.texi | 550 | ||||
| -rw-r--r-- | doc/misc/org.texi | 19 |
2 files changed, 252 insertions, 317 deletions
diff --git a/doc/misc/flymake.texi b/doc/misc/flymake.texi index 1bc416fd02e..5ff5537d048 100644 --- a/doc/misc/flymake.texi +++ b/doc/misc/flymake.texi | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | @set VERSION 0.3 | 4 | @set VERSION 0.3 |
| 5 | @set UPDATED April 2004 | 5 | @set UPDATED April 2004 |
| 6 | @settitle GNU Flymake @value{VERSION} | 6 | @settitle GNU Flymake @value{VERSION} |
| 7 | @include docstyle.texi | 7 | @include ../emacs/docstyle.texi |
| 8 | @syncodeindex pg cp | 8 | @syncodeindex pg cp |
| 9 | @comment %**end of header | 9 | @comment %**end of header |
| 10 | 10 | ||
| @@ -35,7 +35,7 @@ modify this GNU manual.'' | |||
| 35 | @titlepage | 35 | @titlepage |
| 36 | @title GNU Flymake | 36 | @title GNU Flymake |
| 37 | @subtitle for version @value{VERSION}, @value{UPDATED} | 37 | @subtitle for version @value{VERSION}, @value{UPDATED} |
| 38 | @author Pavel Kobiakov(@email{pk_at_work@@yahoo.com}) | 38 | @author Pavel Kobiakov(@email{pk_at_work@@yahoo.com}) and João Távora. |
| 39 | @page | 39 | @page |
| 40 | @vskip 0pt plus 1filll | 40 | @vskip 0pt plus 1filll |
| 41 | @insertcopying | 41 | @insertcopying |
| @@ -53,8 +53,8 @@ modify this GNU manual.'' | |||
| 53 | * Overview of Flymake:: | 53 | * Overview of Flymake:: |
| 54 | * Installing Flymake:: | 54 | * Installing Flymake:: |
| 55 | * Using Flymake:: | 55 | * Using Flymake:: |
| 56 | * Configuring Flymake:: | 56 | * Extending Flymake:: |
| 57 | * Flymake Implementation:: | 57 | * The legacy Proc backend:: |
| 58 | * GNU Free Documentation License:: | 58 | * GNU Free Documentation License:: |
| 59 | * Index:: | 59 | * Index:: |
| 60 | @end menu | 60 | @end menu |
| @@ -63,67 +63,56 @@ modify this GNU manual.'' | |||
| 63 | @chapter Overview | 63 | @chapter Overview |
| 64 | @cindex Overview of Flymake | 64 | @cindex Overview of Flymake |
| 65 | 65 | ||
| 66 | Flymake is a universal on-the-fly syntax checker implemented as an | 66 | Flymake is a universal on-the-fly buffer checker implemented as an |
| 67 | Emacs minor mode. Flymake runs the pre-configured syntax check tool | 67 | Emacs minor mode. When enabled, Flymake visually annotates the buffer |
| 68 | (compiler for C++ files, @code{perl} for perl files, etc.)@: in the | 68 | with diagnostic information coming from one or more different sources, |
| 69 | background, passing it a temporary copy of the current buffer, and | 69 | or @emph{backends}. |
| 70 | parses the output for known error/warning message patterns. Flymake | 70 | |
| 71 | then highlights erroneous lines (i.e., lines for which at least one | 71 | Historically, Flymake used to accept diagnostics from a single, albeit |
| 72 | error or warning has been reported by the syntax check tool), and | 72 | reasonably flexible, backend. |
| 73 | displays an overall buffer status in the mode line. Status information | 73 | |
| 74 | displayed by Flymake contains total number of errors and warnings | 74 | This backend isn't (yet) obsolete and so is still available as a |
| 75 | reported for the buffer during the last syntax check. | 75 | fallback and active by default(@pxref{The legacy Proc backend}). It works by |
| 76 | 76 | selecting a syntax check tool from a preconfigured list (compiler for | |
| 77 | @code{flymake-goto-next-error} and @code{flymake-goto-prev-error} | 77 | C++ files, @code{perl} for perl files, etc.), and executing it in the |
| 78 | functions allow for easy navigation to the next/previous erroneous | 78 | background, passing it a temporary file which is a copy of the current |
| 79 | line, respectively. | 79 | buffer, and parsing the output for known error/warning message |
| 80 | 80 | patterns. | |
| 81 | Calling @code{flymake-display-err-menu-for-current-line} will popup a | 81 | |
| 82 | menu containing error messages reported by the syntax check tool for | 82 | Flymake annotates the buffer by highlighting problematic buffer |
| 83 | the current line. Errors/warnings belonging to another file, such as a | 83 | regions with a special space. It also displays an overall buffer |
| 84 | @code{.h} header file included by a @code{.c} file, are shown in the | 84 | status in the mode line. Status information displayed by Flymake |
| 85 | current buffer as belonging to the first line. Menu items for such | 85 | contains totals for different types of diagnostics. |
| 86 | messages also contain a filename and a line number. Selecting such a | 86 | |
| 87 | menu item will automatically open the file and jump to the line with | 87 | @code{flymake-goto-next-error} and @code{flymake-goto-prev-error} are |
| 88 | error. | 88 | commands that allow easy navigation to the next/previous erroneous |
| 89 | line, respectively. If might be a good idea to map them to @kbd{M-n} | ||
| 90 | and @kbd{M-p} in @code{flymake-mode}, by adding to your init file: | ||
| 91 | |||
| 92 | @lisp | ||
| 93 | (define-key flymake-mode-map (kbd "M-n") 'flymake-goto-next-error) | ||
| 94 | (define-key flymake-mode-map (kbd "M-p") 'flymake-goto-prev-error) | ||
| 95 | @end lisp | ||
| 89 | 96 | ||
| 90 | Syntax check is done ``on-the-fly''. It is started whenever | 97 | Syntax check is done ``on-the-fly''. It is started whenever |
| 91 | 98 | ||
| 92 | @itemize @bullet | 99 | @itemize @bullet |
| 93 | @item buffer is loaded | 100 | @item @code{flymake-mode} is started; |
| 94 | @item a newline character is added to the buffer | 101 | @item a newline character is added to the buffer; |
| 95 | @item some changes were made to the buffer more than @code{0.5} seconds ago (the | 102 | @item some changes were made to the buffer more than @code{0.5} seconds ago (the |
| 96 | delay is configurable). | 103 | delay is configurable). |
| 97 | @end itemize | 104 | @end itemize |
| 98 | 105 | ||
| 99 | Flymake is a universal syntax checker in the sense that it's easily | 106 | Flymake is a universal syntax checker in the sense that it's easily |
| 100 | extended to support new syntax check tools and error message | 107 | extended to support new backends. @xref{Customizable variables}. |
| 101 | patterns. @xref{Configuring Flymake}. | ||
| 102 | 108 | ||
| 103 | @node Installing Flymake | 109 | @node Installing Flymake |
| 104 | @chapter Installing | 110 | @chapter Installing |
| 105 | @cindex Installing Flymake | 111 | @cindex Installing Flymake |
| 106 | 112 | ||
| 107 | 113 | Flymake is included with Emacs and its main commands, like | |
| 108 | Flymake is packaged in a single file, @code{flymake.el}. | 114 | @code{flymake-mode}, are autoloaded. This means there is usually |
| 109 | 115 | nothing to do by way of installation. | |
| 110 | To install/update Flymake, place @code{flymake.el} to a directory | ||
| 111 | somewhere on Emacs load path. You might also want to byte-compile | ||
| 112 | @code{flymake.el} to improve performance. | ||
| 113 | |||
| 114 | Also, place the following line in the @code{.emacs} file. | ||
| 115 | |||
| 116 | @lisp | ||
| 117 | (require 'flymake) | ||
| 118 | @end lisp | ||
| 119 | |||
| 120 | You might also map the most frequently used Flymake functions, such as | ||
| 121 | @code{flymake-goto-next-error}, to some keyboard shortcuts: | ||
| 122 | |||
| 123 | @lisp | ||
| 124 | (global-set-key [f3] 'flymake-display-err-menu-for-current-line) | ||
| 125 | (global-set-key [f4] 'flymake-goto-next-error) | ||
| 126 | @end lisp | ||
| 127 | 116 | ||
| 128 | @node Using Flymake | 117 | @node Using Flymake |
| 129 | @chapter Using Flymake | 118 | @chapter Using Flymake |
| @@ -132,10 +121,10 @@ You might also map the most frequently used Flymake functions, such as | |||
| 132 | @menu | 121 | @menu |
| 133 | * Flymake mode:: | 122 | * Flymake mode:: |
| 134 | * Running the syntax check:: | 123 | * Running the syntax check:: |
| 135 | * Navigating to error lines:: | 124 | * Navigating to error lines:: @c * Viewing error messages:: |
| 136 | * Viewing error messages:: | ||
| 137 | * Syntax check statuses:: | 125 | * Syntax check statuses:: |
| 138 | * Troubleshooting:: | 126 | * Troubleshooting:: |
| 127 | * Customizable variables:: | ||
| 139 | @end menu | 128 | @end menu |
| 140 | 129 | ||
| 141 | @node Flymake mode | 130 | @node Flymake mode |
| @@ -161,10 +150,8 @@ line in @code{.emacs}: | |||
| 161 | 150 | ||
| 162 | When @code{flymake-mode} is active, syntax check is started | 151 | When @code{flymake-mode} is active, syntax check is started |
| 163 | automatically on any of the three conditions mentioned above. Syntax | 152 | automatically on any of the three conditions mentioned above. Syntax |
| 164 | check can also be started manually by using the | 153 | check can also be started manually by using the @code{flymake-start} |
| 165 | @code{flymake-start-syntax-check-for-current-buffer} function. This | 154 | function. |
| 166 | can be used, for example, when changes were made to some other buffer | ||
| 167 | affecting the current buffer. | ||
| 168 | 155 | ||
| 169 | @node Navigating to error lines | 156 | @node Navigating to error lines |
| 170 | @section Navigating to error lines | 157 | @section Navigating to error lines |
| @@ -185,69 +172,37 @@ navigate the highlighted lines. | |||
| 185 | 172 | ||
| 186 | @end multitable | 173 | @end multitable |
| 187 | 174 | ||
| 188 | These functions treat erroneous lines as a linked list. Therefore, | 175 | If the user option @code{flymake-wrap-around} is active |
| 189 | @code{flymake-goto-next-error} will go to the first erroneous line | 176 | (@pxref{Customizable variables}), these functions treat diagnostics |
| 190 | when invoked in the end of the buffer. | 177 | as a linked list. Therefore, @code{flymake-goto-next-error} will go |
| 191 | 178 | to the first diagnostic when invoked in the end of the buffer. | |
| 192 | @node Viewing error messages | ||
| 193 | @section Viewing error messages | ||
| 194 | @cindex Viewing error messages | ||
| 195 | |||
| 196 | To view error messages belonging to the current line, use the | ||
| 197 | @code{flymake-display-err-menu-for-current-line} function. If there's | ||
| 198 | at least one error or warning reported for the current line, this | ||
| 199 | function will display a popup menu with error/warning texts. | ||
| 200 | Selecting the menu item whose error belongs to another file brings | ||
| 201 | forward that file with the help of the | ||
| 202 | @code{flymake-goto-file-and-line} function. | ||
| 203 | 179 | ||
| 204 | @node Syntax check statuses | 180 | @node Syntax check statuses |
| 205 | @section Syntax check statuses | 181 | @section Syntax check statuses |
| 206 | @cindex Syntax check statuses | 182 | @cindex Syntax check statuses |
| 207 | 183 | ||
| 208 | After syntax check is finished, its status is displayed in the mode line. | 184 | After syntax check is finished, its status is displayed in the mode line. |
| 209 | The following statuses are defined. | 185 | The following statuses are defined: |
| 210 | |||
| 211 | @multitable @columnfractions 0.25 0.75 | ||
| 212 | @item Flymake* or Flymake:E/W* | ||
| 213 | @tab Flymake is currently running. For the second case, E/W contains the | ||
| 214 | error and warning count for the previous run. | ||
| 215 | |||
| 216 | @item Flymake | ||
| 217 | @tab Syntax check is not running. Usually this means syntax check was | ||
| 218 | successfully passed (no errors, no warnings). Other possibilities are: | ||
| 219 | syntax check was killed as a result of executing | ||
| 220 | @code{flymake-compile}, or syntax check cannot start as compilation | ||
| 221 | is currently in progress. | ||
| 222 | |||
| 223 | @item Flymake:E/W | ||
| 224 | @tab Number of errors/warnings found by the syntax check process. | ||
| 225 | |||
| 226 | @item Flymake:! | ||
| 227 | @tab Flymake was unable to find master file for the current buffer. | ||
| 228 | @end multitable | ||
| 229 | |||
| 230 | The following errors cause a warning message and switch flymake mode | ||
| 231 | OFF for the buffer. | ||
| 232 | 186 | ||
| 233 | @multitable @columnfractions 0.25 0.75 | 187 | @multitable @columnfractions 0.25 0.75 |
| 234 | @item CFGERR | 188 | @item @code{Wait} |
| 235 | @tab Syntax check process returned nonzero exit code, but no | 189 | @tab Some flymake backends haven't reported since the last time they |
| 236 | errors/warnings were reported. This indicates a possible configuration | 190 | where questioned. |
| 237 | error (for example, no suitable error message patterns for the | 191 | |
| 238 | syntax check tool). | 192 | @item @code{!} |
| 239 | 193 | @tab All the configured Flymake backends have disabled themselves. | |
| 240 | @item NOMASTER | 194 | Left-clicking the ``Flymake'' mode line indicator beings the user |
| 241 | @tab Flymake was unable to find master file for the current buffer. | 195 | @code{*Flymake log*} buffer where these situations may be investigated |
| 242 | 196 | ||
| 243 | @item NOMK | 197 | @item @code{?} |
| 244 | @tab Flymake was unable to find a suitable buildfile for the current buffer. | 198 | @tab There are no configured Flymake backends in |
| 245 | 199 | @code{flymake-diagnostic-functions}. | |
| 246 | @item PROCERR | 200 | |
| 247 | @tab Flymake was unable to launch a syntax check process. | 201 | @item @emph{[nerrors nwarnings]} |
| 202 | @tab Normal operation, number of errors/warnings found by the syntax | ||
| 203 | check process. | ||
| 248 | @end multitable | 204 | @end multitable |
| 249 | 205 | ||
| 250 | |||
| 251 | @node Troubleshooting | 206 | @node Troubleshooting |
| 252 | @section Troubleshooting | 207 | @section Troubleshooting |
| 253 | @cindex Logging | 208 | @cindex Logging |
| @@ -255,70 +210,20 @@ syntax check tool). | |||
| 255 | 210 | ||
| 256 | Flymake uses a simple logging facility for indicating important points | 211 | Flymake uses a simple logging facility for indicating important points |
| 257 | in the control flow. The logging facility sends logging messages to | 212 | in the control flow. The logging facility sends logging messages to |
| 258 | the @file{*Messages*} buffer. The information logged can be used for | 213 | the @file{*Flymake log*} buffer. The information logged can be used for |
| 259 | resolving various problems related to Flymake. | 214 | resolving various problems related to Flymake. |
| 260 | 215 | ||
| 261 | Logging output is controlled by the @code{flymake-log-level} | 216 | Logging output is controlled by the Emacs @code{warning-minimum-log-level} |
| 262 | variable. @code{3} is the most verbose level, and @code{-1} switches | 217 | and @code{warning-minimum-level} variables. |
| 263 | logging off. | ||
| 264 | |||
| 265 | @node Configuring Flymake | ||
| 266 | @chapter Configuring and Extending Flymake | ||
| 267 | @cindex Configuring and Extending Flymake | ||
| 268 | |||
| 269 | @menu | ||
| 270 | * Customizable variables:: | ||
| 271 | * Adding support for a new syntax check tool:: | ||
| 272 | @end menu | ||
| 273 | |||
| 274 | Flymake was designed to be easily extended for supporting new syntax | ||
| 275 | check tools and error message patterns. | ||
| 276 | 218 | ||
| 277 | @node Customizable variables | 219 | @node Customizable variables |
| 278 | @section Customizable variables | 220 | @section Customizable variables |
| 279 | @cindex Customizable variables | 221 | @cindex Customizable variables |
| 280 | 222 | ||
| 281 | This section summarizes variables used for Flymake | 223 | This section summarizes variables used for the configuration of the |
| 282 | configuration. | 224 | Flymake user interface. |
| 283 | 225 | ||
| 284 | @table @code | 226 | @table @code |
| 285 | @item flymake-log-level | ||
| 286 | Controls logging output, see @ref{Troubleshooting}. | ||
| 287 | |||
| 288 | @item flymake-allowed-file-name-masks | ||
| 289 | A list of @code{(filename-regexp, init-function, cleanup-function | ||
| 290 | getfname-function)} for configuring syntax check tools. @xref{Adding | ||
| 291 | support for a new syntax check tool}. | ||
| 292 | |||
| 293 | @ignore | ||
| 294 | @item flymake-buildfile-dirs | ||
| 295 | A list of directories (relative paths) for searching a | ||
| 296 | buildfile. @xref{Locating the buildfile}. | ||
| 297 | @end ignore | ||
| 298 | |||
| 299 | @item flymake-master-file-dirs | ||
| 300 | A list of directories for searching a master file. @xref{Locating a | ||
| 301 | master file}. | ||
| 302 | |||
| 303 | @item flymake-get-project-include-dirs-function | ||
| 304 | A function used for obtaining a list of project include dirs (C/C++ | ||
| 305 | specific). @xref{Getting the include directories}. | ||
| 306 | |||
| 307 | @item flymake-master-file-count-limit | ||
| 308 | @itemx flymake-check-file-limit | ||
| 309 | Used when looking for a master file. @xref{Locating a master file}. | ||
| 310 | |||
| 311 | @item flymake-err-line-patterns | ||
| 312 | Patterns for error/warning messages in the form @code{(regexp file-idx | ||
| 313 | line-idx col-idx err-text-idx)}. @xref{Parsing the output}. | ||
| 314 | |||
| 315 | @item flymake-warning-predicate | ||
| 316 | Predicate to classify error text as warning. @xref{Parsing the output}. | ||
| 317 | |||
| 318 | @item flymake-compilation-prevents-syntax-check | ||
| 319 | A flag indicating whether compilation and syntax check of the same | ||
| 320 | file cannot be run simultaneously. | ||
| 321 | |||
| 322 | @item flymake-no-changes-timeout | 227 | @item flymake-no-changes-timeout |
| 323 | If any changes are made to the buffer, syntax check is automatically | 228 | If any changes are made to the buffer, syntax check is automatically |
| 324 | started after @code{flymake-no-changes-timeout} seconds. | 229 | started after @code{flymake-no-changes-timeout} seconds. |
| @@ -327,13 +232,17 @@ started after @code{flymake-no-changes-timeout} seconds. | |||
| 327 | A boolean flag indicating whether to start syntax check after a | 232 | A boolean flag indicating whether to start syntax check after a |
| 328 | newline character is added to the buffer. | 233 | newline character is added to the buffer. |
| 329 | 234 | ||
| 330 | @item flymake-errline | 235 | @item flymake-error |
| 331 | A custom face for highlighting lines for which at least one error has | 236 | A custom face for highlighting regions for which an error has been |
| 332 | been reported. | 237 | reported. |
| 238 | |||
| 239 | @item flymake-warning | ||
| 240 | A custom face for highlighting regions for which a warning has been | ||
| 241 | reported. | ||
| 333 | 242 | ||
| 334 | @item flymake-warnline | 243 | @item flymake-note |
| 335 | A custom face for highlighting lines for which at least one warning | 244 | A custom face for highlighting regions for which a note has been |
| 336 | and no errors have been reported. | 245 | reported. |
| 337 | 246 | ||
| 338 | @item flymake-error-bitmap | 247 | @item flymake-error-bitmap |
| 339 | A bitmap used in the fringe to mark lines for which an error has | 248 | A bitmap used in the fringe to mark lines for which an error has |
| @@ -346,6 +255,76 @@ been reported. | |||
| 346 | @item flymake-fringe-indicator-position | 255 | @item flymake-fringe-indicator-position |
| 347 | Which fringe (if any) should show the warning/error bitmaps. | 256 | Which fringe (if any) should show the warning/error bitmaps. |
| 348 | 257 | ||
| 258 | @item flymake-wrap-around | ||
| 259 | If non-nil, moving to errors with @code{flymake-goto-next-error} and | ||
| 260 | @code{flymake-goto-prev-error} wraps around buffer boundaries. | ||
| 261 | |||
| 262 | @end table | ||
| 263 | |||
| 264 | @node Extending Flymake | ||
| 265 | @chapter Extending Flymake | ||
| 266 | @cindex Extending Flymake | ||
| 267 | |||
| 268 | @node The legacy Proc backend | ||
| 269 | @chapter The legacy ``Proc'' backend | ||
| 270 | @cindex The legacy Proc backend | ||
| 271 | |||
| 272 | @menu | ||
| 273 | * Proc customization variables:: | ||
| 274 | * Adding support for a new syntax check tool:: | ||
| 275 | * Implementation overview:: | ||
| 276 | * Making a temporary copy:: | ||
| 277 | * Locating a master file:: | ||
| 278 | * Getting the include directories:: | ||
| 279 | * Locating the buildfile:: | ||
| 280 | * Starting the syntax check process:: | ||
| 281 | * Parsing the output:: | ||
| 282 | * Interaction with other modes:: | ||
| 283 | @end menu | ||
| 284 | |||
| 285 | The backend @code{flymake-proc-legacy-backend} was originally designed | ||
| 286 | to be extended for supporting new syntax check tools and error message | ||
| 287 | patterns. It is also controlled by its own set of customization variables | ||
| 288 | |||
| 289 | @node Proc customization variables | ||
| 290 | @section Customization variables for the Proc backend | ||
| 291 | @cindex Proc customization variables | ||
| 292 | |||
| 293 | @table @code | ||
| 294 | @item flymake-proc-allowed-file-name-masks | ||
| 295 | A list of @code{(filename-regexp, init-function, cleanup-function | ||
| 296 | getfname-function)} for configuring syntax check tools. @xref{Adding | ||
| 297 | support for a new syntax check tool}. | ||
| 298 | |||
| 299 | @item flymake-proc-master-file-dirs | ||
| 300 | A list of directories for searching a master file. @xref{Locating a | ||
| 301 | master file}. | ||
| 302 | |||
| 303 | @item flymake-proc-get-project-include-dirs-function | ||
| 304 | A function used for obtaining a list of project include dirs (C/C++ | ||
| 305 | specific). @xref{Getting the include directories}. | ||
| 306 | |||
| 307 | @item flymake-proc-master-file-count-limit | ||
| 308 | @itemx flymake-proc-check-file-limit | ||
| 309 | Used when looking for a master file. @xref{Locating a master file}. | ||
| 310 | |||
| 311 | @item flymake-proc-err-line-patterns | ||
| 312 | Patterns for error/warning messages in the form @code{(regexp file-idx | ||
| 313 | line-idx col-idx err-text-idx)}. @xref{Parsing the output}. | ||
| 314 | |||
| 315 | @item flymake-proc-diagnostic-type-pred | ||
| 316 | A function to classify a diagnostic text as particular type of | ||
| 317 | error. Should be a function taking an error text and returning one of | ||
| 318 | the symbols indexing @code{flymake-diagnostic-types-alist}. If non-nil | ||
| 319 | is returned but there is no such symbol in that table, a warning is | ||
| 320 | assumed. If nil is returned, an error is assumed. Can also be a | ||
| 321 | regular expression that should match only warnings. This variable | ||
| 322 | replaces the old @code{flymake-warning-re} and | ||
| 323 | @code{flymake-warning-predicate}. | ||
| 324 | |||
| 325 | @item flymake-proc-compilation-prevents-syntax-check | ||
| 326 | A flag indicating whether compilation and syntax check of the same | ||
| 327 | file cannot be run simultaneously. | ||
| 349 | @end table | 328 | @end table |
| 350 | 329 | ||
| 351 | @node Adding support for a new syntax check tool | 330 | @node Adding support for a new syntax check tool |
| @@ -358,7 +337,7 @@ Which fringe (if any) should show the warning/error bitmaps. | |||
| 358 | @end menu | 337 | @end menu |
| 359 | 338 | ||
| 360 | Syntax check tools are configured using the | 339 | Syntax check tools are configured using the |
| 361 | @code{flymake-allowed-file-name-masks} list. Each item of this list | 340 | @code{flymake-proc-allowed-file-name-masks} list. Each item of this list |
| 362 | has the following format: | 341 | has the following format: |
| 363 | 342 | ||
| 364 | @lisp | 343 | @lisp |
| @@ -369,15 +348,15 @@ has the following format: | |||
| 369 | @item filename-regexp | 348 | @item filename-regexp |
| 370 | This field is used as a key for locating init/cleanup/getfname | 349 | This field is used as a key for locating init/cleanup/getfname |
| 371 | functions for the buffer. Items in | 350 | functions for the buffer. Items in |
| 372 | @code{flymake-allowed-file-name-masks} are searched sequentially. The | 351 | @code{flymake-proc-allowed-file-name-masks} are searched sequentially. |
| 373 | first item with @code{filename-regexp} matching buffer filename is | 352 | The first item with @code{filename-regexp} matching buffer filename is |
| 374 | selected. If no match is found, @code{flymake-mode} is switched off. | 353 | selected. If no match is found, @code{flymake-mode} is switched off. |
| 375 | 354 | ||
| 376 | @item init-function | 355 | @item init-function |
| 377 | @code{init-function} is required to initialize the syntax check, | 356 | @code{init-function} is required to initialize the syntax check, |
| 378 | usually by creating a temporary copy of the buffer contents. The | 357 | usually by creating a temporary copy of the buffer contents. The |
| 379 | function must return @code{(list cmd-name arg-list)}. If | 358 | function must return @code{(list cmd-name arg-list)}. If |
| 380 | @code{init-function} returns null, syntax check is aborted, by | 359 | @code{init-function} returns null, syntax check is aborted, but |
| 381 | @code{flymake-mode} is not switched off. | 360 | @code{flymake-mode} is not switched off. |
| 382 | 361 | ||
| 383 | @item cleanup-function | 362 | @item cleanup-function |
| @@ -390,16 +369,16 @@ This function is used for translating filenames reported by the syntax | |||
| 390 | check tool into ``real'' filenames. Filenames reported by the tool | 369 | check tool into ``real'' filenames. Filenames reported by the tool |
| 391 | will be different from the real ones, as actually the tool works with | 370 | will be different from the real ones, as actually the tool works with |
| 392 | the temporary copy. In most cases, the default implementation | 371 | the temporary copy. In most cases, the default implementation |
| 393 | provided by Flymake, @code{flymake-get-real-file-name}, can be used as | 372 | provided by Flymake, @code{flymake-proc-get-real-file-name}, can be |
| 394 | @code{getfname-function}. | 373 | used as @code{getfname-function}. |
| 395 | 374 | ||
| 396 | @end table | 375 | @end table |
| 397 | 376 | ||
| 398 | To add support for a new syntax check tool, write corresponding | 377 | To add support for a new syntax check tool, write corresponding |
| 399 | @code{init-function}, and, optionally @code{cleanup-function} and | 378 | @code{init-function} and, optionally, @code{cleanup-function} and |
| 400 | @code{getfname-function}. If the format of error messages reported by | 379 | @code{getfname-function}. If the format of error messages reported by |
| 401 | the new tool is not yet supported by Flymake, add a new entry to | 380 | the new tool is not yet supported by Flymake, add a new entry to |
| 402 | the @code{flymake-err-line-patterns} list. | 381 | the @code{flymake-proc-err-line-patterns} list. |
| 403 | 382 | ||
| 404 | The following sections contain some examples of configuring Flymake | 383 | The following sections contain some examples of configuring Flymake |
| 405 | support for various syntax check tools. | 384 | support for various syntax check tools. |
| @@ -415,42 +394,42 @@ checking. | |||
| 415 | First, we write the @code{init-function}: | 394 | First, we write the @code{init-function}: |
| 416 | 395 | ||
| 417 | @lisp | 396 | @lisp |
| 418 | (defun flymake-perl-init () | 397 | (defun flymake-proc-perl-init () |
| 419 | (let* ((temp-file (flymake-init-create-temp-buffer-copy | 398 | (let* ((temp-file (flymake-proc-init-create-temp-buffer-copy |
| 420 | 'flymake-create-temp-inplace)) | 399 | 'flymake-proc-create-temp-inplace)) |
| 421 | (local-file (file-relative-name | 400 | (local-file (file-relative-name |
| 422 | temp-file | 401 | temp-file |
| 423 | (file-name-directory buffer-file-name)))) | 402 | (file-name-directory buffer-file-name)))) |
| 424 | (list "perl" (list "-wc " local-file)))) | 403 | (list "perl" (list "-wc " local-file)))) |
| 425 | @end lisp | 404 | @end lisp |
| 426 | 405 | ||
| 427 | @code{flymake-perl-init} creates a temporary copy of the buffer | 406 | @code{flymake-proc-perl-init} creates a temporary copy of the buffer |
| 428 | contents with the help of | 407 | contents with the help of |
| 429 | @code{flymake-init-create-temp-buffer-copy}, and builds an appropriate | 408 | @code{flymake-proc-init-create-temp-buffer-copy}, and builds an appropriate |
| 430 | command line. | 409 | command line. |
| 431 | 410 | ||
| 432 | Next, we add a new entry to the | 411 | Next, we add a new entry to the |
| 433 | @code{flymake-allowed-file-name-masks}: | 412 | @code{flymake-proc-allowed-file-name-masks}: |
| 434 | 413 | ||
| 435 | @lisp | 414 | @lisp |
| 436 | (setq flymake-allowed-file-name-masks | 415 | (setq flymake-proc-allowed-file-name-masks |
| 437 | (cons '(".+\\.pl$" | 416 | (cons '(".+\\.pl$" |
| 438 | flymake-perl-init | 417 | flymake-proc-perl-init |
| 439 | flymake-simple-cleanup | 418 | flymake-proc-simple-cleanup |
| 440 | flymake-get-real-file-name) | 419 | flymake-proc-get-real-file-name) |
| 441 | flymake-allowed-file-name-masks)) | 420 | flymake-proc-allowed-file-name-masks)) |
| 442 | @end lisp | 421 | @end lisp |
| 443 | 422 | ||
| 444 | Note that we use standard @code{cleanup-function} and | 423 | Note that we use standard @code{cleanup-function} and |
| 445 | @code{getfname-function}. | 424 | @code{getfname-function}. |
| 446 | 425 | ||
| 447 | Finally, we add an entry to @code{flymake-err-line-patterns}: | 426 | Finally, we add an entry to @code{flymake-proc-err-line-patterns}: |
| 448 | 427 | ||
| 449 | @lisp | 428 | @lisp |
| 450 | (setq flymake-err-line-patterns | 429 | (setq flymake-proc-err-line-patterns |
| 451 | (cons '("\\(.*\\) at \\([^ \n]+\\) line \\([0-9]+\\)[,.\n]" | 430 | (cons '("\\(.*\\) at \\([^ \n]+\\) line \\([0-9]+\\)[,.\n]" |
| 452 | 2 3 nil 1) | 431 | 2 3 nil 1) |
| 453 | flymake-err-line-patterns)) | 432 | flymake-proc-err-line-patterns)) |
| 454 | @end lisp | 433 | @end lisp |
| 455 | 434 | ||
| 456 | @node Example---Configuring a tool called via make | 435 | @node Example---Configuring a tool called via make |
| @@ -462,18 +441,18 @@ In this example we will add support for C files syntax checked by | |||
| 462 | 441 | ||
| 463 | We're not required to write any new functions, as Flymake already has | 442 | We're not required to write any new functions, as Flymake already has |
| 464 | functions for @command{make}. We just add a new entry to the | 443 | functions for @command{make}. We just add a new entry to the |
| 465 | @code{flymake-allowed-file-name-masks}: | 444 | @code{flymake-proc-allowed-file-name-masks}: |
| 466 | 445 | ||
| 467 | @lisp | 446 | @lisp |
| 468 | (setq flymake-allowed-file-name-masks | 447 | (setq flymake-proc-allowed-file-name-masks |
| 469 | (cons '(".+\\.c$" | 448 | (cons '(".+\\.c$" |
| 470 | flymake-simple-make-init | 449 | flymake-proc-simple-make-init |
| 471 | flymake-simple-cleanup | 450 | flymake-proc-simple-cleanup |
| 472 | flymake-get-real-file-name) | 451 | flymake-proc-get-real-file-name) |
| 473 | flymake-allowed-file-name-masks)) | 452 | flymake-proc-allowed-file-name-masks)) |
| 474 | @end lisp | 453 | @end lisp |
| 475 | 454 | ||
| 476 | @code{flymake-simple-make-init} builds the following @command{make} | 455 | @code{flymake-proc-simple-make-init} builds the following @command{make} |
| 477 | command line: | 456 | command line: |
| 478 | 457 | ||
| 479 | @lisp | 458 | @lisp |
| @@ -492,7 +471,7 @@ our case this target might look like this: | |||
| 492 | 471 | ||
| 493 | @verbatim | 472 | @verbatim |
| 494 | check-syntax: | 473 | check-syntax: |
| 495 | gcc -o /dev/null -S ${CHK_SOURCES} | 474 | gcc -o /dev/null -S ${CHK_SOURCES} || true |
| 496 | @end verbatim | 475 | @end verbatim |
| 497 | 476 | ||
| 498 | @noindent | 477 | @noindent |
| @@ -504,42 +483,25 @@ Automake variable @code{COMPILE}: | |||
| 504 | 483 | ||
| 505 | @verbatim | 484 | @verbatim |
| 506 | check-syntax: | 485 | check-syntax: |
| 507 | $(COMPILE) -o /dev/null -S ${CHK_SOURCES} | 486 | $(COMPILE) -o /dev/null -S ${CHK_SOURCES} || true |
| 508 | @end verbatim | 487 | @end verbatim |
| 509 | 488 | ||
| 510 | @node Flymake Implementation | 489 | @node Implementation overview |
| 511 | @chapter Flymake Implementation | 490 | @section Implementation overview |
| 512 | @cindex Implementation details | ||
| 513 | |||
| 514 | @menu | ||
| 515 | * Determining whether syntax check is possible:: | ||
| 516 | * Making a temporary copy:: | ||
| 517 | * Locating a master file:: | ||
| 518 | * Getting the include directories:: | ||
| 519 | * Locating the buildfile:: | ||
| 520 | * Starting the syntax check process:: | ||
| 521 | * Parsing the output:: | ||
| 522 | * Highlighting erroneous lines:: | ||
| 523 | * Interaction with other modes:: | ||
| 524 | @end menu | ||
| 525 | |||
| 526 | Syntax check is started by calling @code{flymake-start-syntax-check-for-current-buffer}. | ||
| 527 | Flymake first determines whether it is able to do syntax | ||
| 528 | check. It then saves a copy of the buffer in a temporary file in the | ||
| 529 | buffer's directory (or in the system temp directory, for java | ||
| 530 | files), creates a syntax check command and launches a process with | ||
| 531 | this command. The output is parsed using a list of error message patterns, | ||
| 532 | and error information (file name, line number, type and text) is | ||
| 533 | saved. After the process has finished, Flymake highlights erroneous | ||
| 534 | lines in the buffer using the accumulated error information. | ||
| 535 | |||
| 536 | @node Determining whether syntax check is possible | ||
| 537 | @section Determining whether syntax check is possible | ||
| 538 | @cindex Syntax check models | 491 | @cindex Syntax check models |
| 539 | @cindex Master file | 492 | @cindex Master file |
| 540 | 493 | ||
| 494 | @code{flymake-proc-legacy-backend} saves a copy of the buffer in a | ||
| 495 | temporary file in the buffer's directory (or in the system temp | ||
| 496 | directory, for Java files), creates a syntax check command and | ||
| 497 | launches a process with this command. The output is parsed using a | ||
| 498 | list of error message patterns, and error information (file name, line | ||
| 499 | number, type and text) is saved. After the process has finished, | ||
| 500 | Flymake highlights erroneous lines in the buffer using the accumulated | ||
| 501 | error information. | ||
| 502 | |||
| 541 | Syntax check is considered possible if there's an entry in | 503 | Syntax check is considered possible if there's an entry in |
| 542 | @code{flymake-allowed-file-name-masks} matching buffer's filename and | 504 | @code{flymake-proc-allowed-file-name-masks} matching buffer's filename and |
| 543 | its @code{init-function} returns non-@code{nil} value. | 505 | its @code{init-function} returns non-@code{nil} value. |
| 544 | 506 | ||
| 545 | Two syntax check modes are distinguished: | 507 | Two syntax check modes are distinguished: |
| @@ -564,10 +526,10 @@ will also check syntax in the current file. Examples are C/C++ (.h, | |||
| 564 | These modes are handled inside init/cleanup/getfname functions, see | 526 | These modes are handled inside init/cleanup/getfname functions, see |
| 565 | @ref{Adding support for a new syntax check tool}. | 527 | @ref{Adding support for a new syntax check tool}. |
| 566 | 528 | ||
| 567 | Flymake contains implementations of all functionality required to | 529 | The Proc backend contains implementations of all functionality |
| 568 | support different syntax check modes described above (making temporary | 530 | required to support different syntax check modes described above |
| 569 | copies, finding master files, etc.), as well as some tool-specific | 531 | (making temporary copies, finding master files, etc.), as well as some |
| 570 | (routines for Make, Ant, etc.)@: code. | 532 | tool-specific (routines for Make, Ant, etc.)@: code. |
| 571 | 533 | ||
| 572 | 534 | ||
| 573 | @node Making a temporary copy | 535 | @node Making a temporary copy |
| @@ -609,15 +571,16 @@ Master file is located in two steps. | |||
| 609 | 571 | ||
| 610 | First, a list of possible master files is built. A simple name | 572 | First, a list of possible master files is built. A simple name |
| 611 | matching is used to find the files. For a C++ header @code{file.h}, | 573 | matching is used to find the files. For a C++ header @code{file.h}, |
| 612 | Flymake searches for all @code{.cpp} files in the directories whose relative paths are | 574 | the Proc backend searches for all @code{.cpp} files in the directories |
| 613 | stored in a customizable variable @code{flymake-master-file-dirs}, which | 575 | whose relative paths are stored in a customizable variable |
| 614 | usually contains something like @code{("." "./src")}. No more than | 576 | @code{flymake-proc-master-file-dirs}, which usually contains something |
| 615 | @code{flymake-master-file-count-limit} entries is added to the master file | 577 | like @code{("." "./src")}. No more than |
| 616 | list. The list is then sorted to move files with names @code{file.cpp} to | 578 | @code{flymake-proc-master-file-count-limit} entries is added to the |
| 617 | the top. | 579 | master file list. The list is then sorted to move files with names |
| 580 | @code{file.cpp} to the top. | ||
| 618 | 581 | ||
| 619 | Next, each master file in a list is checked to contain the appropriate | 582 | Next, each master file in a list is checked to contain the appropriate |
| 620 | include directives. No more than @code{flymake-check-file-limit} of each | 583 | include directives. No more than @code{flymake-proc-check-file-limit} of each |
| 621 | file are parsed. | 584 | file are parsed. |
| 622 | 585 | ||
| 623 | For @code{file.h}, the include directives to look for are | 586 | For @code{file.h}, the include directives to look for are |
| @@ -639,10 +602,10 @@ and project include directories. The former is just the contents of the | |||
| 639 | @code{INCLUDE} environment variable. The latter is not so easy to obtain, | 602 | @code{INCLUDE} environment variable. The latter is not so easy to obtain, |
| 640 | and the way it can be obtained can vary greatly for different projects. | 603 | and the way it can be obtained can vary greatly for different projects. |
| 641 | Therefore, a customizable variable | 604 | Therefore, a customizable variable |
| 642 | @code{flymake-get-project-include-dirs-function} is used to provide the | 605 | @code{flymake-proc-get-project-include-dirs-function} is used to provide the |
| 643 | way to implement the desired behavior. | 606 | way to implement the desired behavior. |
| 644 | 607 | ||
| 645 | The default implementation, @code{flymake-get-project-include-dirs-imp}, | 608 | The default implementation, @code{flymake-proc-get-project-include-dirs-imp}, |
| 646 | uses a @command{make} call. This requires a correct base directory, that is, a | 609 | uses a @command{make} call. This requires a correct base directory, that is, a |
| 647 | directory containing a correct @file{Makefile}, to be determined. | 610 | directory containing a correct @file{Makefile}, to be determined. |
| 648 | 611 | ||
| @@ -656,27 +619,27 @@ of every syntax check attempt. | |||
| 656 | @cindex buildfile, locating | 619 | @cindex buildfile, locating |
| 657 | @cindex Makefile, locating | 620 | @cindex Makefile, locating |
| 658 | 621 | ||
| 659 | Flymake can be configured to use different tools for performing syntax | 622 | The Proc backend can be configured to use different tools for |
| 660 | checks. For example, it can use direct compiler call to syntax check a perl | 623 | performing syntax checks. For example, it can use direct compiler |
| 661 | script or a call to @command{make} for a more complicated case of a | 624 | call to syntax check a perl script or a call to @command{make} for a |
| 662 | @code{C/C++} source. The general idea is that simple files, like perl | 625 | more complicated case of a @code{C/C++} source. The general idea is |
| 663 | scripts and html pages, can be checked by directly invoking a | 626 | that simple files, like perl scripts and html pages, can be checked by |
| 664 | corresponding tool. Files that are usually more complex and generally | 627 | directly invoking a corresponding tool. Files that are usually more |
| 665 | used as part of larger projects, might require non-trivial options to | 628 | complex and generally used as part of larger projects, might require |
| 666 | be passed to the syntax check tool, like include directories for | 629 | non-trivial options to be passed to the syntax check tool, like |
| 667 | C++. The latter files are syntax checked using some build tool, like | 630 | include directories for C++. The latter files are syntax checked |
| 668 | Make or Ant. | 631 | using some build tool, like Make or Ant. |
| 669 | 632 | ||
| 670 | All Make configuration data is usually stored in a file called | 633 | All Make configuration data is usually stored in a file called |
| 671 | @code{Makefile}. To allow for future extensions, flymake uses a notion of | 634 | @code{Makefile}. To allow for future extensions, Flymake uses a notion of |
| 672 | buildfile to reference the 'project configuration' file. | 635 | buildfile to reference the 'project configuration' file. |
| 673 | 636 | ||
| 674 | Special function, @code{flymake-find-buildfile} is provided for locating buildfiles. | 637 | Special function, @code{flymake-proc-find-buildfile} is provided for locating buildfiles. |
| 675 | Searching for a buildfile is done in a manner similar to that of searching | 638 | Searching for a buildfile is done in a manner similar to that of searching |
| 676 | for possible master files. | 639 | for possible master files. |
| 677 | @ignore | 640 | @ignore |
| 678 | A customizable variable | 641 | A customizable variable |
| 679 | @code{flymake-buildfile-dirs} holds a list of relative paths to the | 642 | @code{flymake-proc-buildfile-dirs} holds a list of relative paths to the |
| 680 | buildfile. They are checked sequentially until a buildfile is found. | 643 | buildfile. They are checked sequentially until a buildfile is found. |
| 681 | @end ignore | 644 | @end ignore |
| 682 | In case there's no build file, syntax check is aborted. | 645 | In case there's no build file, syntax check is aborted. |
| @@ -687,12 +650,12 @@ Buildfile values are also cached. | |||
| 687 | @section Starting the syntax check process | 650 | @section Starting the syntax check process |
| 688 | @cindex Syntax check process | 651 | @cindex Syntax check process |
| 689 | 652 | ||
| 690 | The command line (command name and the list of arguments) for launching a process is returned by the | 653 | The command line (command name and the list of arguments) for |
| 691 | initialization function. Flymake then just calls @code{start-process} | 654 | launching a process is returned by the initialization function. The |
| 692 | to start an asynchronous process and configures a process filter and | 655 | Proc backend then just starts an asynchronous process and configures a |
| 693 | sentinel, which are used for processing the output of the syntax check | 656 | process filter and sentinel, which are used for processing the output |
| 694 | tool. When exiting Emacs, running Flymake processes will be killed | 657 | of the syntax check tool. When exiting Emacs, running processes will |
| 695 | without prompting the user. | 658 | be killed without prompting the user. |
| 696 | 659 | ||
| 697 | @node Parsing the output | 660 | @node Parsing the output |
| 698 | @section Parsing the output | 661 | @section Parsing the output |
| @@ -700,7 +663,7 @@ without prompting the user. | |||
| 700 | 663 | ||
| 701 | The output generated by the syntax check tool is parsed in the process | 664 | The output generated by the syntax check tool is parsed in the process |
| 702 | filter/sentinel using the error message patterns stored in the | 665 | filter/sentinel using the error message patterns stored in the |
| 703 | @code{flymake-err-line-patterns} variable. This variable contains a | 666 | @code{flymake-proc-err-line-patterns} variable. This variable contains a |
| 704 | list of items of the form @code{(regexp file-idx line-idx | 667 | list of items of the form @code{(regexp file-idx line-idx |
| 705 | err-text-idx)}, used to determine whether a particular line is an | 668 | err-text-idx)}, used to determine whether a particular line is an |
| 706 | error message and extract file name, line number and error text, | 669 | error message and extract file name, line number and error text, |
| @@ -709,66 +672,39 @@ error text with the '@code{^[wW]arning}' pattern. Anything that was not | |||
| 709 | classified as a warning is considered an error. Type is then used to | 672 | classified as a warning is considered an error. Type is then used to |
| 710 | sort error menu items, which shows error messages first. | 673 | sort error menu items, which shows error messages first. |
| 711 | 674 | ||
| 712 | Flymake is also able to interpret error message patterns missing err-text-idx | 675 | The Proc backend is also able to interpret error message patterns |
| 713 | information. This is done by merely taking the rest of the matched line | 676 | missing err-text-idx information. This is done by merely taking the |
| 714 | (@code{(substring line (match-end 0))}) as error text. This trick allows | 677 | rest of the matched line (@code{(substring line (match-end 0))}) as |
| 715 | making use of a huge collection of error message line patterns from | 678 | error text. This trick allows making use of a huge collection of |
| 716 | @code{compile.el}. All these error patterns are appended to | 679 | error message line patterns from @code{compile.el}. All these error |
| 717 | the end of @code{flymake-err-line-patterns}. | 680 | patterns are appended to the end of |
| 681 | @code{flymake-proc-err-line-patterns}. | ||
| 718 | 682 | ||
| 719 | The error information obtained is saved in a buffer local | 683 | The error information obtained is saved in a buffer local |
| 720 | variable. The buffer for which the process output belongs is | 684 | variable. The buffer for which the process output belongs is |
| 721 | determined from the process-id@w{}->@w{}buffer mapping updated | 685 | determined from the process-id@w{}->@w{}buffer mapping updated |
| 722 | after every process launch/exit. | 686 | after every process launch/exit. |
| 723 | 687 | ||
| 724 | @node Highlighting erroneous lines | ||
| 725 | @section Highlighting erroneous lines | ||
| 726 | @cindex Erroneous lines, faces | ||
| 727 | |||
| 728 | Highlighting is implemented with overlays and happens in the process | ||
| 729 | sentinel, after calling the cleanup function. Two customizable faces | ||
| 730 | are used: @code{flymake-errline} and | ||
| 731 | @code{flymake-warnline}. Errors belonging outside the current | ||
| 732 | buffer are considered to belong to line 1 of the current buffer. | ||
| 733 | |||
| 734 | @c This manual does not use vindex. | ||
| 735 | @c @vindex flymake-fringe-indicator-position | ||
| 736 | @c @vindex flymake-error-bitmap | ||
| 737 | @c @vindex flymake-warning-bitmap | ||
| 738 | If the option @code{flymake-fringe-indicator-position} is non-@code{nil}, | ||
| 739 | errors and warnings are also highlighted in the left or right fringe, | ||
| 740 | using the bitmaps specified by @code{flymake-error-bitmap} | ||
| 741 | and @code{flymake-warning-bitmap}. | ||
| 742 | |||
| 743 | @node Interaction with other modes | 688 | @node Interaction with other modes |
| 744 | @section Interaction with other modes | 689 | @section Interaction with other modes |
| 745 | @cindex Interaction with other modes | 690 | @cindex Interaction with other modes |
| 746 | @cindex Interaction with compile mode | 691 | @cindex Interaction with compile mode |
| 747 | 692 | ||
| 748 | The only mode flymake currently knows about is @code{compile}. | 693 | The only mode the Proc backend currently knows about is |
| 694 | @code{compile}. | ||
| 749 | 695 | ||
| 750 | Flymake can be configured to not start syntax check if it thinks the | 696 | The Proc backend can be configured to not start syntax check if it |
| 751 | compilation is in progress. The check is made by the | 697 | thinks the compilation is in progress, by testing the |
| 752 | @code{flymake-compilation-is-running}, which tests the | ||
| 753 | @code{compilation-in-progress} variable. The reason why this might be | 698 | @code{compilation-in-progress} variable. The reason why this might be |
| 754 | useful is saving CPU time in case both syntax check and compilation | 699 | useful is saving CPU time in case both syntax check and compilation |
| 755 | are very CPU intensive. The original reason for adding this feature, | 700 | are very CPU intensive. The original reason for adding this feature, |
| 756 | though, was working around a locking problem with MS Visual C++ | 701 | though, was working around a locking problem with MS Visual C++ |
| 757 | compiler. | 702 | compiler. The variable in question is |
| 703 | @code{flymake-proc-compilation-prevents-syntax-check}. | ||
| 758 | 704 | ||
| 759 | Flymake also provides an alternative command for starting compilation, | 705 | The Proc backend also provides an alternative command for starting |
| 760 | @code{flymake-compile}: | 706 | compilation, @code{flymake-proc-compile}. It just kills all the active |
| 761 | 707 | syntax check processes before calling @code{compile}. | |
| 762 | @lisp | ||
| 763 | (defun flymake-compile () | ||
| 764 | "Kill all flymake syntax checks then start compilation." | ||
| 765 | (interactive) | ||
| 766 | (flymake-stop-all-syntax-checks) | ||
| 767 | (call-interactively 'compile)) | ||
| 768 | @end lisp | ||
| 769 | |||
| 770 | It just kills all the active syntax check processes before calling | ||
| 771 | @code{compile}. | ||
| 772 | 708 | ||
| 773 | @node GNU Free Documentation License | 709 | @node GNU Free Documentation License |
| 774 | @appendix GNU Free Documentation License | 710 | @appendix GNU Free Documentation License |
diff --git a/doc/misc/org.texi b/doc/misc/org.texi index b6a4fa23557..72fbbade59e 100644 --- a/doc/misc/org.texi +++ b/doc/misc/org.texi | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | @settitle The Org Manual | 4 | @settitle The Org Manual |
| 5 | @include docstyle.texi | 5 | @include docstyle.texi |
| 6 | 6 | ||
| 7 | @set VERSION 9.1.1 | 7 | @set VERSION 9.1.2 |
| 8 | @set DATE 2017-09-17 | 8 | @set DATE 2017-09-17 |
| 9 | 9 | ||
| 10 | @c Version and Contact Info | 10 | @c Version and Contact Info |
| @@ -1257,13 +1257,8 @@ Org uses just two commands, bound to @key{TAB} and | |||
| 1257 | @end example | 1257 | @end example |
| 1258 | 1258 | ||
| 1259 | @vindex org-cycle-emulate-tab | 1259 | @vindex org-cycle-emulate-tab |
| 1260 | @vindex org-cycle-global-at-bob | ||
| 1261 | The cursor must be on a headline for this to work@footnote{see, however, | 1260 | The cursor must be on a headline for this to work@footnote{see, however, |
| 1262 | the option @code{org-cycle-emulate-tab}.}. When the cursor is at the | 1261 | the option @code{org-cycle-emulate-tab}.}. |
| 1263 | beginning of the buffer and the first line is not a headline, then | ||
| 1264 | @key{TAB} actually runs global cycling (see below)@footnote{see the | ||
| 1265 | option @code{org-cycle-global-at-bob}.}. Also when called with a prefix | ||
| 1266 | argument (@kbd{C-u @key{TAB}}), global cycling is invoked. | ||
| 1267 | 1262 | ||
| 1268 | @cindex global visibility states | 1263 | @cindex global visibility states |
| 1269 | @cindex global cycling | 1264 | @cindex global cycling |
| @@ -1283,6 +1278,11 @@ When @kbd{S-@key{TAB}} is called with a numeric prefix argument N, the | |||
| 1283 | CONTENTS view up to headlines of level N will be shown. Note that inside | 1278 | CONTENTS view up to headlines of level N will be shown. Note that inside |
| 1284 | tables, @kbd{S-@key{TAB}} jumps to the previous field. | 1279 | tables, @kbd{S-@key{TAB}} jumps to the previous field. |
| 1285 | 1280 | ||
| 1281 | @vindex org-cycle-global-at-bob | ||
| 1282 | You can run global cycling using @key{TAB} only if point is at the very | ||
| 1283 | beginning of the buffer, but not on a headline, and | ||
| 1284 | @code{org-cycle-global-at-bob} is set to a non-@code{nil} value. | ||
| 1285 | |||
| 1286 | @cindex set startup visibility, command | 1286 | @cindex set startup visibility, command |
| 1287 | @orgcmd{C-u C-u @key{TAB},org-set-startup-visibility} | 1287 | @orgcmd{C-u C-u @key{TAB},org-set-startup-visibility} |
| 1288 | Switch back to the startup visibility of the buffer (@pxref{Initial visibility}). | 1288 | Switch back to the startup visibility of the buffer (@pxref{Initial visibility}). |
| @@ -1659,11 +1659,9 @@ line. In particular, if an ordered list reaches number @samp{10.}, then the | |||
| 1659 | list. An item ends before the next line that is less or equally indented | 1659 | list. An item ends before the next line that is less or equally indented |
| 1660 | than its bullet/number. | 1660 | than its bullet/number. |
| 1661 | 1661 | ||
| 1662 | @vindex org-list-empty-line-terminates-plain-lists | ||
| 1663 | A list ends whenever every item has ended, which means before any line less | 1662 | A list ends whenever every item has ended, which means before any line less |
| 1664 | or equally indented than items at top level. It also ends before two blank | 1663 | or equally indented than items at top level. It also ends before two blank |
| 1665 | lines@footnote{See also @code{org-list-empty-line-terminates-plain-lists}.}. | 1664 | lines. In that case, all items are closed. Here is an example: |
| 1666 | In that case, all items are closed. Here is an example: | ||
| 1667 | 1665 | ||
| 1668 | @example | 1666 | @example |
| 1669 | @group | 1667 | @group |
| @@ -14991,6 +14989,7 @@ directory on the local machine. | |||
| 14991 | '(("org" | 14989 | '(("org" |
| 14992 | :base-directory "~/org/" | 14990 | :base-directory "~/org/" |
| 14993 | :publishing-directory "~/public_html" | 14991 | :publishing-directory "~/public_html" |
| 14992 | :publishing-function org-html-publish-to-html | ||
| 14994 | :section-numbers nil | 14993 | :section-numbers nil |
| 14995 | :with-toc nil | 14994 | :with-toc nil |
| 14996 | :html-head "<link rel=\"stylesheet\" | 14995 | :html-head "<link rel=\"stylesheet\" |