emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r108646: * minibuffer.el (read-file-n


From: Michael Albinus
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r108646: * minibuffer.el (read-file-name-default): Bind `non-essential' to `t'.
Date: Sun, 17 Jun 2012 20:54:39 +0200
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 108646
committer: Michael Albinus <address@hidden>
branch nick: trunk
timestamp: Sun 2012-06-17 20:54:39 +0200
message:
  * minibuffer.el (read-file-name-default): Bind `non-essential' to `t'.
  
  * net/tramp.el (tramp-file-name-handler): Catch 'non-essential.
  
  * net/ange-ftp.el (ange-ftp-gwp-start, ange-ftp-start-process):
  * net/tramp-sh.el (tramp-maybe-open-connection):
  Throw if `non-essential' is non-nil.
modified:
  lisp/ChangeLog
  lisp/minibuffer.el
  lisp/net/ange-ftp.el
  lisp/net/tramp-sh.el
  lisp/net/tramp.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2012-06-17 18:52:31 +0000
+++ b/lisp/ChangeLog    2012-06-17 18:54:39 +0000
@@ -1,3 +1,13 @@
+2012-06-17  Michael Albinus  <address@hidden>
+
+       * minibuffer.el (read-file-name-default): Bind `non-essential' to `t'.
+
+       * net/tramp.el (tramp-file-name-handler): Catch 'non-essential.
+
+       * net/ange-ftp.el (ange-ftp-gwp-start, ange-ftp-start-process):
+       * net/tramp-sh.el (tramp-maybe-open-connection):
+       Throw if `non-essential' is non-nil.
+
 2012-06-17  Martin Rudalics  <address@hidden>
 
        * window.el (special-display-p): Signal an error if BUFFER-NAME

=== modified file 'lisp/minibuffer.el'
--- a/lisp/minibuffer.el        2012-05-16 01:57:20 +0000
+++ b/lisp/minibuffer.el        2012-06-17 18:54:39 +0000
@@ -2335,7 +2335,8 @@
            (if (consp default-filename)
                (mapcar 'abbreviate-file-name default-filename)
              (abbreviate-file-name default-filename))))
-  (let ((insdef (cond
+  (let ((non-essential t)
+       (insdef (cond
                  ((and insert-default-directory (stringp dir))
                   (if initial
                       (cons (minibuffer--double-dollars (concat dir initial))

=== modified file 'lisp/net/ange-ftp.el'
--- a/lisp/net/ange-ftp.el      2012-04-22 13:58:00 +0000
+++ b/lisp/net/ange-ftp.el      2012-06-17 18:54:39 +0000
@@ -1774,6 +1774,10 @@
 
 (defun ange-ftp-gwp-start (host user name args)
   "Login to the gateway machine and fire up an FTP process."
+  ;; If `non-essential' is non-nil, don't reopen a new connection.  It
+  ;; will be catched in Tramp.
+  (when non-essential
+    (throw 'non-essential 'non-essential))
   (let (;; It would be nice to make process-connection-type nil,
        ;; but that doesn't work: ftp never responds.
        ;; Can anyone find a fix for that?
@@ -1905,6 +1909,10 @@
   "Spawn a new FTP process ready to connect to machine HOST and give it NAME.
 If HOST is only FTP-able through a gateway machine then spawn a shell
 on the gateway machine to do the FTP instead."
+  ;; If `non-essential' is non-nil, don't reopen a new connection.  It
+  ;; will be catched in Tramp.
+  (when non-essential
+    (throw 'non-essential 'non-essential))
   (let* ((use-gateway (ange-ftp-use-gateway-p host))
         (use-smart-ftp (and (not ange-ftp-gateway-host)
                             (ange-ftp-use-smart-gateway-p host)))

=== modified file 'lisp/net/tramp-sh.el'
--- a/lisp/net/tramp-sh.el      2012-06-11 10:30:07 +0000
+++ b/lisp/net/tramp-sh.el      2012-06-17 18:54:39 +0000
@@ -4292,6 +4292,11 @@
            ;; We call `tramp-get-buffer' in order to get a debug
            ;; buffer for messages from the beginning.
            (tramp-get-buffer vec)
+
+           ;; If `non-essential' is non-nil, don't reopen a new connection.
+           (when non-essential
+             (throw 'non-essential 'non-essential))
+
            (tramp-with-progress-reporter
                vec 3
                (if (zerop (length (tramp-file-name-user vec)))

=== modified file 'lisp/net/tramp.el'
--- a/lisp/net/tramp.el 2012-06-17 08:53:31 +0000
+++ b/lisp/net/tramp.el 2012-06-17 18:54:39 +0000
@@ -1928,22 +1928,32 @@
                        (let ((default-directory
                                (tramp-compat-temporary-file-directory)))
                          (load (cadr sf) 'noerror 'nomessage)))
+                     ;; If `non-essential' is non-nil, Tramp shall
+                     ;; not open a new connection.
                      ;; If Tramp detects that it shouldn't continue
-                     ;; to work, it throws the `suppress' event.  We
-                     ;; try the default handler then.
+                     ;; to work, it throws the `suppress' event.
                      ;; This could happen for example, when Tramp
                      ;; tries to open the same connection twice in a
                      ;; short time frame.
+                     ;; In both cases, we try the default handler then.
                      (setq result
-                           (catch 'suppress (apply foreign operation args)))
-                     (if (eq result 'suppress)
-                         (let (tramp-message-show-message)
-                           (tramp-message
-                            v 1 "Suppress received in operation %s"
-                            (append (list operation) args))
-                           (tramp-cleanup v)
-                           (tramp-run-real-handler operation args))
-                       result))
+                           (catch 'non-essential
+                             (catch 'suppress
+                               (apply foreign operation args))))
+                     (cond
+                      ((eq result 'non-essential)
+                       (tramp-message
+                        v 5 "Non-essential received in operation %s"
+                        (append (list operation) args))
+                       (tramp-run-real-handler operation args))
+                      ((eq result 'suppress)
+                       (let (tramp-message-show-message)
+                         (tramp-message
+                          v 1 "Suppress received in operation %s"
+                          (append (list operation) args))
+                         (tramp-cleanup v)
+                         (tramp-run-real-handler operation args)))
+                      (t result)))
 
                  ;; Trace that somebody has interrupted the operation.
                  ((debug quit)


reply via email to

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