emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/with-editor 99d3278 058/140: shell-command: enable with-ed


From: Jonas Bernoulli
Subject: [nongnu] elpa/with-editor 99d3278 058/140: shell-command: enable with-editor-mode when appropriate
Date: Fri, 6 Aug 2021 12:51:19 -0400 (EDT)

branch: elpa/with-editor
commit 99d3278b1c79718de16dd4f57dcc8c4aa31a4051
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>

    shell-command: enable with-editor-mode when appropriate
    
    Because `emacsclient' only passed the environment along when
    its `--create-frame' argument is used, we cannot tell whether
    `with-editor' is involved, and therefore  should not enable
    `with-editor-mode'.
    
    If we use the sleeping editor, then we know that `with-editor'
    is involved, so always use that in our advice to `shell-command'.
    
    Fixes #23.
---
 with-editor.el | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/with-editor.el b/with-editor.el
index 6008c32..43a6a7a 100644
--- a/with-editor.el
+++ b/with-editor.el
@@ -688,9 +688,8 @@ else like the former."
     (cond ((or (not (or with-editor--envvar shell-command-with-editor-mode))
                (not (string-match-p "&\\'" command)))
            (funcall fn command output-buffer error-buffer))
-          ((and with-editor-emacsclient-executable
-                (not (file-remote-p default-directory)))
-           (with-editor (funcall fn command output-buffer error-buffer)))
+          ;; Do not use the `emacsclient', because it currently is not
+          ;; possible to know whether `with-editor' was involved.  #23
           (t
            (apply fn (format "%s=%s %s"
                              (or with-editor--envvar "EDITOR")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]