]> git.eshelyaron.com Git - emacs.git/commitdiff
Rename shell-command-width to async-shell-command-width (bug#35055)
authorJuri Linkov <juri@linkov.net>
Sun, 5 May 2019 19:27:33 +0000 (22:27 +0300)
committerJuri Linkov <juri@linkov.net>
Sun, 5 May 2019 19:27:33 +0000 (22:27 +0300)
* lisp/simple.el (async-shell-command-width):
* lisp/net/tramp.el (tramp-handle-shell-command):
* test/lisp/net/tramp-tests.el (tramp-test32-shell-command):
* doc/misc/tramp.texi (Remote processes): Rename this variable.

* doc/emacs/misc.texi (Single Shell): Add async-shell-command-width.

doc/emacs/misc.texi
doc/misc/tramp.texi
etc/NEWS
lisp/net/tramp.el
lisp/simple.el
test/lisp/net/tramp-tests.el

index 7d7065a441afe526bb21884542ec9b93688f209b..5f743927367544a585a061525d6266cbae72ebc2 100644 (file)
@@ -775,6 +775,13 @@ documentation for more possibilities.
 displayed only when the command generates output, set
 @code{async-shell-command-display-buffer} to @code{nil}.
 
+@vindex async-shell-command-width
+  The option @code{async-shell-command-width} defines the number of display
+columns available for output of asynchronous shell commands.
+A positive integer tells the shell to use that number of columns for
+command output.  The default value is @code{nil} that means to use
+the same number of columns as provided by the shell.
+
 @kindex M-|
 @findex shell-command-on-region
   @kbd{M-|} (@code{shell-command-on-region}) is like @kbd{M-!}, but
index 0c51f15fbb982e484970369cf709277fc0d9b59a..2eb5b45eb2a1b680a6cc8734cabed9c41cea5eb2 100644 (file)
@@ -3093,9 +3093,9 @@ uses @file{/system/bin/sh}).  Like the variables in the previous
 section, these variables can be changed via connection-local
 variables.
 
-@vindex shell-command-width
+@vindex async-shell-command-width
 @vindex COLUMNS@r{, environment variable}
-If Emacs supports the variable @code{shell-command-width} (since Emacs
+If Emacs supports the variable @code{async-shell-command-width} (since Emacs
 27.1), @value{tramp} cares about its value for asynchronous shell
 commands.  It specifies the number of display columns for command
 output.  For synchronous shell commands, a similar effect can be
index 6fcf5187e9a02e32033777ff15c2d3bf56235ab6..baec8e7163c1d7cdfe3f0705603e48d1d2bfc999 100644 (file)
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1119,8 +1119,8 @@ variable for remote shells.  It still defaults to "/bin/sh".
 ** Single shell commands
 
 ---
-*** 'shell-command-width' defines the number of display columns
-available for output of asynchronous or remote shell commands.
+*** 'async-shell-command-width' defines the number of display columns
+available for output of asynchronous shell commands.
 
 ** Pcomplete
 
index 911fa912727e58af41aa39f1f59a3e05e553b5b4..1f83756c322e85435d842a26bd3db23feb5586ec 100644 (file)
@@ -3640,10 +3640,10 @@ support symbolic links."
 
     (if (and (not current-buffer-p) (integerp asynchronous))
        (let ((tramp-remote-process-environment
-              ;; `shell-command-width' has been introduced with Emacs 27.1.
-              (if (natnump (bound-and-true-p shell-command-width))
+              ;; `async-shell-command-width' has been introduced with Emacs 27.1.
+              (if (natnump (bound-and-true-p async-shell-command-width))
                   (cons (format "COLUMNS=%d"
-                                (bound-and-true-p shell-command-width))
+                                (bound-and-true-p async-shell-command-width))
                         tramp-remote-process-environment)
                 tramp-remote-process-environment)))
          (prog1
index acea1f9ddc104d9413998bc30633aecad9eea35c..4454791ad205cc8f3dfd4d975b76ea9a8207d7c7 100644 (file)
@@ -3353,7 +3353,7 @@ is output."
   :group 'shell
   :version "26.1")
 
-(defcustom shell-command-width nil
+(defcustom async-shell-command-width nil
   "Number of display columns available for asynchronous shell command output.
 If nil, use the shell default number (usually 80 columns).
 If a positive integer, tell the shell to use that number of columns for
@@ -3627,8 +3627,8 @@ impose the use of a shell (with its need to quote arguments)."
                   (shell-command--save-pos-or-erase)
                  (setq default-directory directory)
                  (let ((process-environment
-                        (if (natnump shell-command-width)
-                            (cons (format "COLUMNS=%d" shell-command-width)
+                        (if (natnump async-shell-command-width)
+                            (cons (format "COLUMNS=%d" async-shell-command-width)
                                   process-environment)
                           process-environment)))
                    (setq proc
index cba697da18c1f744e8b338802cbe892dca425c1d..7d3c43408d48afb72eeb52b8d85f03912c382e67 100644 (file)
@@ -4192,18 +4192,17 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
        ;; Cleanup.
        (ignore-errors (delete-file tmp-name)))
 
-      ;; Test `shell-command-width' of `async-shell-command'.
-      ;; Since Emacs 27.1.
-      (when (and (boundp 'shell-command-width)
+      ;; Test `async-shell-command-width'.  Since Emacs 27.1.
+      (when (and (boundp 'async-shell-command-width)
                 (zerop (call-process "tput" nil nil nil "cols"))
                  (zerop (process-file "tput" nil nil nil "cols")))
-       (let (shell-command-width)
+       (let (async-shell-command-width)
          (should
           (string-equal
            (format "%s\n" (car (process-lines "tput" "cols")))
            (tramp--test-shell-command-to-string-asynchronously
             "tput cols")))
-         (setq shell-command-width 1024)
+         (setq async-shell-command-width 1024)
          (should
           (string-equal
            "1024\n"