From ec89acba5f5652b661f364c5f4e9c43b85a2f433 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mattias=20Engdeg=C3=A5rd?= Date: Tue, 4 Jul 2023 10:49:48 +0200 Subject: [PATCH 01/11] ; * test/lisp/progmodes/cperl-mode-tests.el: add missing backslashes --- test/lisp/progmodes/cperl-mode-tests.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/lisp/progmodes/cperl-mode-tests.el b/test/lisp/progmodes/cperl-mode-tests.el index 0ca985ae86e..211587cabac 100644 --- a/test/lisp/progmodes/cperl-mode-tests.el +++ b/test/lisp/progmodes/cperl-mode-tests.el @@ -233,7 +233,7 @@ attributes, prototypes and signatures." 'font-lock-constant-face))) ;; The signature (goto-char (point-min)) - (search-forward-regexp "\\(\$top\\),\\(\$down\\)") + (search-forward-regexp "\\(\\$top\\),\\(\\$down\\)") (should (equal (get-text-property (match-beginning 1) 'face) 'font-lock-variable-name-face)) (should (equal (get-text-property (match-beginning 1) 'face) From 793a416653af0e4be5b6adec9323a1dafd1545eb Mon Sep 17 00:00:00 2001 From: Alan Mackenzie Date: Tue, 4 Jul 2023 12:43:31 +0000 Subject: [PATCH 02/11] objc-mode: Fix exceptions in fontification. These exceptions ("Invalid search bound (wrong side of point)") were observed in test suite file class-24.m when moving point up and down a line at a time. * lisp/progmodes/cc-engine.el (c-forward-declarator): In the c-syntactic-re-search-forward ~30 lines from the end of the function amend the regexp for objc-mode such that "@end" terminates the search, but "<" doesn't. * lisp/progmodes/cc-fonts.el (c-make-font-lock-search-function): supply a non-nil CHECK-POINT argument to c-make-font-lock-search-form. --- lisp/progmodes/cc-engine.el | 6 +++++- lisp/progmodes/cc-fonts.el | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index 721daf9d53f..abcc20fcb82 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el @@ -10219,7 +10219,11 @@ point unchanged and return nil." (prog1 (setq found (c-syntactic-re-search-forward - "[;:,]\\|\\(=\\|\\s(\\)" + ;; Consider making the next regexp a + ;; c-lang-defvar (2023-07-04). + (if (c-major-mode-is 'objc-mode) + "\\(?:@end\\)\\|[;:,]\\|\\(=\\|[[(]\\)" + "[;:,]\\|\\(=\\|\\s(\\)") limit 'limit t)) (setq got-init (and found (match-beginning 1)))) diff --git a/lisp/progmodes/cc-fonts.el b/lisp/progmodes/cc-fonts.el index afbf841bcb1..5d5ada4c99d 100644 --- a/lisp/progmodes/cc-fonts.el +++ b/lisp/progmodes/cc-fonts.el @@ -387,7 +387,7 @@ (parse-sexp-lookup-properties (cc-eval-when-compile (boundp 'parse-sexp-lookup-properties)))) - ,(c-make-font-lock-search-form regexp highlights)) + ,(c-make-font-lock-search-form regexp highlights t)) nil))) (defun c-make-font-lock-BO-decl-search-function (regexp &rest highlights) From b34f9a44393a331c866268d93b16ad69567a3cd4 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Tue, 4 Jul 2023 15:27:03 +0200 Subject: [PATCH 03/11] Apply remote-file-name-access-timeout in desktop.el and recentf.el * doc/emacs/files.texi (File Conveniences): * doc/emacs/misc.texi (Saving Emacs Sessions): Mention remote-file-name-access-timeout. * doc/misc/tramp.texi (Frequently Asked Questions): Add note. * etc/NEWS: Explain use of 'remote-file-name-access-timeout' in desktop.el and recentf.el. * lisp/desktop.el (desktop-access-file): New defun. (desktop-restore-file-buffer): Use it. * lisp/recentf.el (recentf-access-file): New defun. (recentf-keep-default-predicate): Use it. * lisp/net/tramp.el (tramp-handle-access-file): Improve error handling. --- doc/emacs/files.texi | 6 ++++++ doc/emacs/misc.texi | 6 +++++- doc/misc/tramp.texi | 5 +++++ etc/NEWS | 18 ++++++++++++++++++ lisp/desktop.el | 9 +++++++-- lisp/net/tramp.el | 7 ++++++- lisp/recentf.el | 6 +++++- 7 files changed, 52 insertions(+), 5 deletions(-) diff --git a/doc/emacs/files.texi b/doc/emacs/files.texi index 74315a05bbd..43140f5da0f 100644 --- a/doc/emacs/files.texi +++ b/doc/emacs/files.texi @@ -2255,6 +2255,12 @@ to visit one of these files. @kbd{M-x recentf-save-list} saves the current @code{recentf-list} to a file, and @kbd{M-x recentf-edit-list} edits it. +@vindex remote-file-name-access-timeout + If you use remote files, you might also consider to customize +@code{remote-file-name-access-timeout} to a proper value (number of +seconds), after which time a check whether a remote file shall be used +in Recentf is stopped. This prevents Emacs to be blocked. + @c FIXME partial-completion-mode (complete.el) is obsolete. The @kbd{M-x ffap} command generalizes @code{find-file} with more powerful heuristic defaults (@pxref{FFAP}), often based on the text at diff --git a/doc/emacs/misc.texi b/doc/emacs/misc.texi index 37da6b5956d..042829002db 100644 --- a/doc/emacs/misc.texi +++ b/doc/emacs/misc.texi @@ -2812,9 +2812,13 @@ frame parameters you don't want to be restored; they will then be set according to your customizations in the init file. @vindex desktop-files-not-to-save +@vindex remote-file-name-access-timeout Information about buffers visiting remote files is not saved by default. Customize the variable @code{desktop-files-not-to-save} to -change this. +change this. In this case, you might also consider to customize +@code{remote-file-name-access-timeout} to a proper value (number of +seconds), after which time a buffer restoration of a remote file is +stopped. This prevents Emacs to be blocked. @vindex desktop-restore-eager By default, all the buffers in the desktop are restored in one go. diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi index a965dd89e71..890d4c0c07a 100644 --- a/doc/misc/tramp.texi +++ b/doc/misc/tramp.texi @@ -5181,6 +5181,11 @@ If the connection to the remote host isn't established yet, and if this requires an interactive password, the timeout check doesn't work properly. +@c Since Emacs 30. +@strong{Note}: In recent versions of Emacs, both packages apply +already this check. You just need to customize +@code{remote-file-name-access-timeout}. + @item Does @value{tramp} support @acronym{SSH} security keys? diff --git a/etc/NEWS b/etc/NEWS index ad9ce9114c8..be2327c5a8d 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -454,6 +454,24 @@ which makes them visually distinct from subroutine prototypes. CPerl mode supports the new keywords for exception handling and the object oriented syntax which were added in Perl 5.36 and 5.38. +** Emacs Sessions (Desktop) + ++++ +*** Restoring buffers with remote files should not block. +When a buffer is restored which uses a remote file, the user option +'remote-file-name-access-timeout' could be set to a positive number. +This value will be used as timeout (in seconds) for checking, whether +the remote file is accessible. + +** Recentf + ++++ +*** Checking recent remote files should not block. +When a a remote file is checked in 'recentf-list', the user option +'remote-file-name-access-timeout' could be set to a positive number. +This value will be used as timeout (in seconds) for checking, whether +the remote file is accessible. + * New Modes and Packages in Emacs 30.1 diff --git a/lisp/desktop.el b/lisp/desktop.el index 6aacb85c12c..cb5cbbd1ef2 100644 --- a/lisp/desktop.el +++ b/lisp/desktop.el @@ -1499,6 +1499,11 @@ This function is called from `window-configuration-change-hook'." (desktop-clear) (desktop-read desktop-dirname)) +;; ---------------------------------------------------------------------------- +(defun desktop-access-file (filename) + "Check whether FILENAME is accessible." + (ignore-errors (not (access-file filename "Restoring desktop buffer")))) + (defvar desktop-buffer-major-mode) (defvar desktop-buffer-locals) (defvar auto-insert) ; from autoinsert.el @@ -1508,8 +1513,8 @@ This function is called from `window-configuration-change-hook'." _buffer-misc) "Restore a file buffer." (when buffer-filename - (if (or (file-exists-p buffer-filename) - (let ((msg (format "Desktop: File \"%s\" no longer exists." + (if (or (desktop-access-file buffer-filename) + (let ((msg (format "Desktop: File \"%s\" no longer accessible." buffer-filename))) (if desktop-missing-file-warning (y-or-n-p (concat msg " Re-create buffer? ")) diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 39e70e99fa7..b8345dcff49 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -3993,9 +3993,14 @@ Let-bind it when necessary.") (with-parsed-tramp-file-name filename v (with-tramp-timeout (timeout + (unless (when-let ((p (tramp-get-connection-process v))) + (and (process-live-p p) + (tramp-get-connection-property p "connected"))) + (tramp-cleanup-connection v 'keep-debug 'keep-password)) (tramp-error v 'file-error - (format "%s: Timeout %s second(s) accessing %s" string timeout filename))) + (format + "%s: Timeout %s second(s) accessing %s" string timeout filename))) (setq filename (file-truename filename)) (if (file-exists-p filename) (unless diff --git a/lisp/recentf.el b/lisp/recentf.el index 7816c005358..94ae871763b 100644 --- a/lisp/recentf.el +++ b/lisp/recentf.el @@ -112,11 +112,15 @@ must return non-nil to exclude it." :group 'recentf :type '(repeat (choice regexp function))) +(defun recentf-access-file (filename) + "Check whether FILENAME is accessible." + (ignore-errors (not (access-file filename "Checking recentf file")))) + (defun recentf-keep-default-predicate (file) "Return non-nil if FILE should be kept in the recent list. It handles the case of remote files as well." (cond - ((file-remote-p file nil t) (file-readable-p file)) + ((file-remote-p file nil t) (recentf-access-file file)) ((file-remote-p file)) ((file-readable-p file)))) From 753aaeb99c7eaa87e40c058235e31ef773babc8a Mon Sep 17 00:00:00 2001 From: Alan Mackenzie Date: Tue, 4 Jul 2023 15:29:53 +0000 Subject: [PATCH 04/11] objc-mode: Handle (de)propertization of < and >. * lisp/progmodes/cc-langs.el (c-get-state-before-change-functions) (c-before-font-lock-functions): Separate the C and objc versions, and add (to the first) c-unmark-<>-around-region and c-before-change-check-<>-operators, (to the second) c-unmark-<>-around-region and c-restore-<>-properties into the objc versions of these lang variables. --- lisp/progmodes/cc-langs.el | 46 ++++++++++++++++++++++++++------------ 1 file changed, 32 insertions(+), 14 deletions(-) diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el index 2422cf3deb0..4e2ae5d85a6 100644 --- a/lisp/progmodes/cc-langs.el +++ b/lisp/progmodes/cc-langs.el @@ -462,12 +462,20 @@ so that all identifiers are recognized as words.") c-before-change-check-unbalanced-strings c-parse-quotes-before-change c-before-change-fix-comment-escapes) - (c objc) '(c-extend-region-for-CPP - c-depropertize-CPP - c-truncate-bs-cache - c-before-change-check-unbalanced-strings - c-parse-quotes-before-change - c-before-change-fix-comment-escapes) + c '(c-extend-region-for-CPP + c-depropertize-CPP + c-truncate-bs-cache + c-before-change-check-unbalanced-strings + c-parse-quotes-before-change + c-before-change-fix-comment-escapes) + objc '(c-extend-region-for-CPP + c-depropertize-CPP + c-truncate-bs-cache + c-before-change-check-unbalanced-strings + c-unmark-<>-around-region + c-before-change-check-<>-operators + c-parse-quotes-before-change + c-before-change-fix-comment-escapes) java '(c-parse-quotes-before-change c-unmark-<>-around-region c-before-change-check-unbalanced-strings @@ -504,14 +512,24 @@ parameters \(point-min) and \(point-max).") c-after-change-escape-NL-in-string c-after-change-mark-abnormal-strings c-change-expand-fl-region) - (c objc) '(c-depropertize-new-text - c-after-change-fix-comment-escapes - c-after-change-escape-NL-in-string - c-parse-quotes-after-change - c-after-change-mark-abnormal-strings - c-extend-font-lock-region-for-macros - c-neutralize-syntax-in-CPP - c-change-expand-fl-region) + c '(c-depropertize-new-text + c-after-change-fix-comment-escapes + c-after-change-escape-NL-in-string + c-parse-quotes-after-change + c-after-change-mark-abnormal-strings + c-extend-font-lock-region-for-macros + c-neutralize-syntax-in-CPP + c-change-expand-fl-region) + objc '(c-depropertize-new-text + c-after-change-fix-comment-escapes + c-after-change-escape-NL-in-string + c-parse-quotes-after-change + c-after-change-mark-abnormal-strings + c-unmark-<>-around-region + c-extend-font-lock-region-for-macros + c-neutralize-syntax-in-CPP + c-restore-<>-properties + c-change-expand-fl-region) c++ '(c-depropertize-new-text c-after-change-fix-comment-escapes c-after-change-escape-NL-in-string From 0e6ac3ffd403d811244760f7ba6dd1997dd18bcb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Harald=20J=C3=B6rg?= Date: Tue, 4 Jul 2023 17:42:05 +0200 Subject: [PATCH 05/11] ; cperl-mode: Avoid excessive regexp backtracking (Bug#8077) * lisp/progmodes/cperl-mode.el (defconst): Add a word-start assertion to cperl--single-attribute-rx (cperl-after-sub-regexp): Dito (cperl-init-faces): shorten matches of incomplete sub declarations --- lisp/progmodes/cperl-mode.el | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el index 54547c4668a..809a7274a25 100644 --- a/lisp/progmodes/cperl-mode.el +++ b/lisp/progmodes/cperl-mode.el @@ -1305,7 +1305,8 @@ or \"${ foo }\" will not.") "A sequence for recommended version number schemes in Perl.") (defconst cperl--single-attribute-rx - `(sequence ,cperl--basic-identifier-rx + `(sequence word-start + ,cperl--basic-identifier-rx (optional (sequence "(" (0+ (not (in ")"))) ")"))) @@ -1552,7 +1553,7 @@ the last)." (if attr (concat "\\(" cperl-maybe-white-and-comment-rex ; whitespace-comments - "\\(\\sw\\|_\\)+" ; attr-name + "\\(\\<\\sw\\|_\\)+" ; attr-name ;; attr-arg (1 level of internal parens allowed!) "\\((\\(\\\\.\\|[^\\()]\\|([^\\()]*)\\)*)\\)?" "\\(" ; optional : (XXX allows trailing???) @@ -6003,7 +6004,11 @@ default function." ;; ... or the start of a "sloppy" signature (sequence (eval cperl--sloppy-signature-rx) ;; arbtrarily continue "a few lines" - (repeat 0 200 (not (in "{")))))))) + (repeat 0 200 (not (in "{")))) + ;; make sure we have a reasonably + ;; short match for an incomplete sub + (not (in ";{(")) + buffer-end)))) '(1 (if (match-beginning 3) 'font-lock-variable-name-face 'font-lock-function-name-face) From 6d1e6f7f111ee2442e9a20c9a0585120198b706f Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Tue, 4 Jul 2023 19:28:09 +0300 Subject: [PATCH 06/11] Improve documentation of 'remote-file-name-access-timeout' * lisp/desktop.el (desktop-files-not-to-save): Mention 'remote-file-name-access-timeout' in the doc string. (Bug#64401) --- lisp/desktop.el | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lisp/desktop.el b/lisp/desktop.el index cb5cbbd1ef2..59298699914 100644 --- a/lisp/desktop.el +++ b/lisp/desktop.el @@ -397,7 +397,12 @@ or `desktop-modes-not-to-save'." (defcustom desktop-files-not-to-save "\\(\\`/[^/:]*:\\|(ftp)\\'\\)" "Regexp identifying files whose buffers are to be excluded from saving. -The default value excludes buffers visiting remote files." +The default value excludes buffers visiting remote files. + +If you modify this such that buffers visiting remote files are not excluded, +you may wish customizing `remote-file-name-access-timeout' to a non-nil +value, to avoid hanging the desktop restoration because some remote +host is off-line." :type '(choice (const :tag "None" nil) regexp) :group 'desktop) From 85ac3b84af3f6623fa04cc7cf483522db17f69a4 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Tue, 4 Jul 2023 19:35:28 +0300 Subject: [PATCH 07/11] ; * etc/NEWS: Fix recently added entry. --- etc/NEWS | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index be2327c5a8d..510aa8104bb 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -457,11 +457,13 @@ object oriented syntax which were added in Perl 5.36 and 5.38. ** Emacs Sessions (Desktop) +++ -*** Restoring buffers with remote files should not block. -When a buffer is restored which uses a remote file, the user option -'remote-file-name-access-timeout' could be set to a positive number. -This value will be used as timeout (in seconds) for checking, whether -the remote file is accessible. +*** Restoring buffers visiting remote files should not block. +When a buffer is restored which visits a remote file, the restoration +of the session could hang if the remote host is off-line or slow to +respond. Setting the user option 'remote-file-name-access-timeout' to +a positive number will abandon the attempt to restore such buffers +after a timeout of that many seconds, thus allowing the rest of +desktop restoration to continue. ** Recentf From a2db9b426bcca6207dafa5672417165996072d76 Mon Sep 17 00:00:00 2001 From: Robert Pluim Date: Tue, 4 Jul 2023 18:56:15 +0200 Subject: [PATCH 08/11] Improve remote-file-name-access-timeout NEWS entries * etc/NEWS: Improve recentf and desktop mode entries. --- etc/NEWS | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index 510aa8104bb..5318add7a82 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -457,7 +457,7 @@ object oriented syntax which were added in Perl 5.36 and 5.38. ** Emacs Sessions (Desktop) +++ -*** Restoring buffers visiting remote files should not block. +*** Restoring buffers visiting remote files can now time out. When a buffer is restored which visits a remote file, the restoration of the session could hang if the remote host is off-line or slow to respond. Setting the user option 'remote-file-name-access-timeout' to @@ -468,11 +468,10 @@ desktop restoration to continue. ** Recentf +++ -*** Checking recent remote files should not block. -When a a remote file is checked in 'recentf-list', the user option -'remote-file-name-access-timeout' could be set to a positive number. -This value will be used as timeout (in seconds) for checking, whether -the remote file is accessible. +*** Checking recent remote files can now time out. +Similarly to buffer restoration by "desktop", 'recentf-mode' checking +of the accessibility of remote files can now time out if +`remote-file-name-access-timeout' is set to a positive number. * New Modes and Packages in Emacs 30.1 From f2f1fef072a4e42593cc4cb5a4775893078248e7 Mon Sep 17 00:00:00 2001 From: Robert Pluim Date: Tue, 4 Jul 2023 18:58:22 +0200 Subject: [PATCH 09/11] ; Minor grammar fixes to tramp manual * doc/misc/tramp.texi (Frequently Asked Questions): Grammar fixes. --- doc/misc/tramp.texi | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi index 890d4c0c07a..4973ab2c9b1 100644 --- a/doc/misc/tramp.texi +++ b/doc/misc/tramp.texi @@ -5158,10 +5158,10 @@ In order to disable those optimizations, set user option @vindex remote-file-name-access-timeout Some packages, like @file{desktop.el} or @file{recentf.el}, access -remote files when loaded. If the respective file is not accessible, +remote files when loaded. If the requested file is not accessible, @value{tramp} could block. In order to check whether this could happen, add a test via @code{access-file} with a proper timeout prior -loading these packages: +to loading these packages: @lisp @group @@ -5182,9 +5182,10 @@ this requires an interactive password, the timeout check doesn't work properly. @c Since Emacs 30. -@strong{Note}: In recent versions of Emacs, both packages apply -already this check. You just need to customize -@code{remote-file-name-access-timeout}. +@strong{Note}: In recent versions of Emacs, both packages already +apply this check. You just need to customize +@code{remote-file-name-access-timeout} to the desired timeout (in +seconds). @item From 393958ea63a945c3be0e81d96822eed5e0208874 Mon Sep 17 00:00:00 2001 From: Robert Pluim Date: Tue, 4 Jul 2023 19:01:59 +0200 Subject: [PATCH 10/11] Grammar fixes in 'remote-file-name-access-timeout' descriptions * doc/emacs/files.texi (File Conveniences): Grammar fix. * doc/emacs/misc.texi (Saving Emacs Sessions): Grammar fix. --- doc/emacs/files.texi | 8 ++++---- doc/emacs/misc.texi | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/doc/emacs/files.texi b/doc/emacs/files.texi index 43140f5da0f..9734223b95e 100644 --- a/doc/emacs/files.texi +++ b/doc/emacs/files.texi @@ -2256,10 +2256,10 @@ current @code{recentf-list} to a file, and @kbd{M-x recentf-edit-list} edits it. @vindex remote-file-name-access-timeout - If you use remote files, you might also consider to customize -@code{remote-file-name-access-timeout} to a proper value (number of -seconds), after which time a check whether a remote file shall be used -in Recentf is stopped. This prevents Emacs to be blocked. + If you use remote files, you might also consider customizing +@code{remote-file-name-access-timeout}, which is the number of +seconds after which the check whether a remote file shall be used +in Recentf is stopped. This prevents Emacs being blocked. @c FIXME partial-completion-mode (complete.el) is obsolete. The @kbd{M-x ffap} command generalizes @code{find-file} with more diff --git a/doc/emacs/misc.texi b/doc/emacs/misc.texi index 042829002db..7a88b7ef5e0 100644 --- a/doc/emacs/misc.texi +++ b/doc/emacs/misc.texi @@ -2815,10 +2815,10 @@ according to your customizations in the init file. @vindex remote-file-name-access-timeout Information about buffers visiting remote files is not saved by default. Customize the variable @code{desktop-files-not-to-save} to -change this. In this case, you might also consider to customize -@code{remote-file-name-access-timeout} to a proper value (number of -seconds), after which time a buffer restoration of a remote file is -stopped. This prevents Emacs to be blocked. +change this. In this case, you might also consider customizing +@code{remote-file-name-access-timeout}, which is the number of +seconds after which buffer restoration of a remote file is +stopped. This prevents Emacs being blocked. @vindex desktop-restore-eager By default, all the buffers in the desktop are restored in one go. From cb674ab40ce8bffe566c6851cf2ac5261152f004 Mon Sep 17 00:00:00 2001 From: Eliza Velasquez Date: Fri, 30 Jun 2023 17:35:44 -0700 Subject: [PATCH 11/11] Fix `async-shell-command-display-buffer' display * lisp/simple.el (shell-command): If `async-shell-command-display-buffer' was nil, it did not respect `display-buffer-alist' entries with `display-buffer-no-window'. This behavior has been fixed (bug#64394). --- lisp/simple.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/simple.el b/lisp/simple.el index 321734a5026..7da2bf0fae2 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -4734,7 +4734,7 @@ impose the use of a shell (with its need to quote arguments)." (when (buffer-live-p buf) (remove-function (process-filter proc) nonce) - (display-buffer buf)))) + (display-buffer buf '(nil (allow-no-window . t)))))) `((name . ,nonce))))))) ;; Otherwise, command is executed synchronously. (shell-command-on-region (point) (point) command