diff options
| author | Paul Eggert | 2016-05-09 10:59:29 -0700 |
|---|---|---|
| committer | Paul Eggert | 2016-05-09 10:59:29 -0700 |
| commit | c8b7a6abd90aab76185202def7049a0ea981d335 (patch) | |
| tree | abd2edd93ad2fdd4e31e25a0e0ce1c24adde62ff /doc | |
| parent | 9418ab39bf970dd82b5d6f2e7b40a5d8cd134a43 (diff) | |
| parent | 3b478989df59cc33886d260137c433da5cfe4863 (diff) | |
| download | emacs-c8b7a6abd90aab76185202def7049a0ea981d335.tar.gz emacs-c8b7a6abd90aab76185202def7049a0ea981d335.zip | |
Merge from origin/emacs-25
3b47898 Fix doc string in `insert'
b479dea * doc/misc/emacs-mime.texi (time-date): Document now-builtins...
cd27f73 Say 'All results processed' at the end
4ffec91 Document automatic adjustment of process' logical window dime...
dc66271 ; Fix typos and stylistic glitches in NEWS
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/lispref/processes.texi | 52 | ||||
| -rw-r--r-- | doc/misc/emacs-mime.texi | 8 |
2 files changed, 56 insertions, 4 deletions
diff --git a/doc/lispref/processes.texi b/doc/lispref/processes.texi index e8a9ad05c22..e3346aa3a5b 100644 --- a/doc/lispref/processes.texi +++ b/doc/lispref/processes.texi | |||
| @@ -1381,6 +1381,58 @@ Killing the process's buffer deletes the process, which kills the | |||
| 1381 | subprocess with a @code{SIGHUP} signal (@pxref{Signals to Processes}). | 1381 | subprocess with a @code{SIGHUP} signal (@pxref{Signals to Processes}). |
| 1382 | @end defun | 1382 | @end defun |
| 1383 | 1383 | ||
| 1384 | If the process's buffer is displayed in a window, your Lisp program | ||
| 1385 | may wish telling the process the dimensions of that window, so that | ||
| 1386 | the process could adapt its output to those dimensions, much as it | ||
| 1387 | adapts to the screen dimensions. The following functions allow to | ||
| 1388 | communicate this kind of information to processes; however, not all | ||
| 1389 | systems support the underlying functionality, so it is best to provide | ||
| 1390 | fallbacks, e.g., via command-line arguments or environment variables. | ||
| 1391 | |||
| 1392 | @defun set-process-window-size process height width | ||
| 1393 | Tell @var{process} that its logical window size has dimensions | ||
| 1394 | @var{width} by @var{height}, in character units. If this function | ||
| 1395 | succeeds in communicating this information to the process, it returns | ||
| 1396 | @code{t}; otherwise it returns @code{nil}. | ||
| 1397 | @end defun | ||
| 1398 | |||
| 1399 | When windows that display buffers associated with process change their | ||
| 1400 | dimensions, the affected processes should be told about these changes. | ||
| 1401 | By default, when the window configuration changes, Emacs will | ||
| 1402 | automatically call @code{set-process-window-size} on behalf of every | ||
| 1403 | process whose buffer is displayed in a window, passing it the smallest | ||
| 1404 | dimensions of all the windows displaying the process's buffer. This | ||
| 1405 | works via @code{window-configuration-change-hook} (@pxref{Window | ||
| 1406 | Hooks}), which is told to invoke the function that is the value of | ||
| 1407 | the variable @code{window-adjust-process-window-size-function} for | ||
| 1408 | each process whose buffer is displayed in at least one window. You | ||
| 1409 | can customize this behavior by setting the value of that variable. | ||
| 1410 | |||
| 1411 | @defopt window-adjust-process-window-size-function | ||
| 1412 | The value of this variable should be a function of two arguments: a | ||
| 1413 | process and the list of windows displaying the process's buffer. When | ||
| 1414 | the function is called, the process's buffer is the current buffer. | ||
| 1415 | The function should return a cons cell @w{@code{(@var{width} | ||
| 1416 | . @var{height})}} that describes the dimensions of the logical process | ||
| 1417 | window to be passed via a call to @code{set-process-window-size}. The | ||
| 1418 | function can also return @code{nil}, in which case Emacs will not call | ||
| 1419 | @code{set-process-window-size} for this process. | ||
| 1420 | |||
| 1421 | Emacs supplies two predefined values for this variable: | ||
| 1422 | @code{window-adjust-process-window-size-smallest}, which returns the | ||
| 1423 | smallest of all the dimensions of the windows that display a process's | ||
| 1424 | buffer; and @code{window-adjust-process-window-size-largest}, which | ||
| 1425 | returns the largest dimensions. For more complex strategies, write | ||
| 1426 | your own function. | ||
| 1427 | |||
| 1428 | This variable can be buffer-local. | ||
| 1429 | @end defopt | ||
| 1430 | |||
| 1431 | If the process has the @code{adjust-window-size-function} property | ||
| 1432 | (@pxref{Process Information}), its value overrides the global and | ||
| 1433 | buffer-local values of | ||
| 1434 | @code{window-adjust-process-window-size-function}. | ||
| 1435 | |||
| 1384 | @node Filter Functions | 1436 | @node Filter Functions |
| 1385 | @subsection Process Filter Functions | 1437 | @subsection Process Filter Functions |
| 1386 | @cindex filter function | 1438 | @cindex filter function |
diff --git a/doc/misc/emacs-mime.texi b/doc/misc/emacs-mime.texi index 2b3bba39ad9..2b935870dae 100644 --- a/doc/misc/emacs-mime.texi +++ b/doc/misc/emacs-mime.texi | |||
| @@ -1554,7 +1554,7 @@ Here's a bunch of time/date/second/day examples: | |||
| 1554 | (time-less-p '(13818 19266) '(13818 19145)) | 1554 | (time-less-p '(13818 19266) '(13818 19145)) |
| 1555 | @result{} nil | 1555 | @result{} nil |
| 1556 | 1556 | ||
| 1557 | (subtract-time '(13818 19266) '(13818 19145)) | 1557 | (time-subtract '(13818 19266) '(13818 19145)) |
| 1558 | @result{} (0 121) | 1558 | @result{} (0 121) |
| 1559 | 1559 | ||
| 1560 | (days-between "Sat Sep 12 12:21:54 1998 +0200" | 1560 | (days-between "Sat Sep 12 12:21:54 1998 +0200" |
| @@ -1632,14 +1632,14 @@ return a ``zero'' time. | |||
| 1632 | 1632 | ||
| 1633 | @item time-less-p | 1633 | @item time-less-p |
| 1634 | Take two times and say whether the first time is less (i.e., earlier) | 1634 | Take two times and say whether the first time is less (i.e., earlier) |
| 1635 | than the second time. | 1635 | than the second time. (This is a built-in function.) |
| 1636 | 1636 | ||
| 1637 | @item time-since | 1637 | @item time-since |
| 1638 | Take a time and return a time saying how long it was since that time. | 1638 | Take a time and return a time saying how long it was since that time. |
| 1639 | 1639 | ||
| 1640 | @item subtract-time | 1640 | @item time-subtract |
| 1641 | Take two times and subtract the second from the first. I.e., return | 1641 | Take two times and subtract the second from the first. I.e., return |
| 1642 | the time between the two times. | 1642 | the time between the two times. (This is a built-in function.) |
| 1643 | 1643 | ||
| 1644 | @item days-between | 1644 | @item days-between |
| 1645 | Take two days and return the number of days between those two days. | 1645 | Take two days and return the number of days between those two days. |