changeset 108427:6c9fc5ebcc4a

Merge from mainline.
author Katsumi Yamaoka <yamaoka@jpl.org>
date Sun, 28 Feb 2010 13:26:25 +0000
parents fb6d984c76bf (current diff) 122dff72a8ee (diff)
children 9257c5632940
files
diffstat 5 files changed, 34 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/doc/misc/ChangeLog	Sun Feb 28 03:49:58 2010 +0000
+++ b/doc/misc/ChangeLog	Sun Feb 28 13:26:25 2010 +0000
@@ -1,3 +1,8 @@
+2010-02-28  Michael Albinus  <michael.albinus@gmx.de>
+
+	* dbus.texi (Errors and Events): D-Bus messages are retrieved only,
+	when Emacs runs in interactive mode.  (Bug#5645)
+
 2010-02-16  Glenn Morris  <rgm@gnu.org>
 
 	* nxml-mode.texi (Commands for locating a schema): Fix keybinding.
--- a/doc/misc/dbus.texi	Sun Feb 28 03:49:58 2010 +0000
+++ b/doc/misc/dbus.texi	Sun Feb 28 13:26:25 2010 +0000
@@ -1591,8 +1591,9 @@
 @code{t}.
 @end defspec
 
-Incoming D-Bus messages are handled as Emacs events (see @pxref{Misc
-Events, , , elisp}).  The generated event has this form:
+Incoming D-Bus messages are handled as Emacs events, see @pxref{Misc
+Events, , , elisp}.  They are retrieved only, when Emacs runs in
+interactive mode.  The generated event has this form:
 
 @lisp
 (dbus-event @var{bus} @var{type} @var{serial} @var{service} @var{path} @var{interface} @var{member} @var{handler}
--- a/lisp/ChangeLog	Sun Feb 28 03:49:58 2010 +0000
+++ b/lisp/ChangeLog	Sun Feb 28 13:26:25 2010 +0000
@@ -1,3 +1,15 @@
+2010-02-28  Michael Albinus  <michael.albinus@gmx.de>
+
+	* net/tramp.el (tramp-handle-write-region): START can be a string.
+	Take care in the checks.  Reported by Dan Davison
+	<davison@stats.ox.ac.uk>.
+
+2010-02-28  Michael Albinus  <michael.albinus@gmx.de>
+
+	* net/dbus.el (dbus-introspect, dbus-get-property)
+	(dbus-set-property, dbus-get-all-properties): Use
+	`dbus-call-method' when noninteractive.  (Bug#5645)
+
 2010-02-28  Chong Yidong  <cyd@stupidchicken.com>
 
 	* textmodes/reftex-toc.el (reftex-toc-promote-prepare):
--- a/lisp/net/dbus.el	Sun Feb 28 03:49:58 2010 +0000
+++ b/lisp/net/dbus.el	Sun Feb 28 13:26:25 2010 +0000
@@ -573,7 +573,8 @@
   ;; is used, because the handler can be registered in our Emacs
   ;; instance; caller an callee would block each other.
   (dbus-ignore-errors
-    (dbus-call-method-non-blocking
+    (funcall
+     (if noninteractive 'dbus-call-method 'dbus-call-method-non-blocking)
      bus service path dbus-interface-introspectable "Introspect")))
 
 (defun dbus-introspect-xml (bus service path)
@@ -831,7 +832,8 @@
   (dbus-ignore-errors
     ;; "Get" returns a variant, so we must use the `car'.
     (car
-     (dbus-call-method-non-blocking
+     (funcall
+      (if noninteractive 'dbus-call-method 'dbus-call-method-non-blocking)
       bus service path dbus-interface-properties
       "Get" :timeout 500 interface property))))
 
@@ -842,7 +844,8 @@
 returned."
   (dbus-ignore-errors
     ;; "Set" requires a variant.
-    (dbus-call-method-non-blocking
+    (funcall
+     (if noninteractive 'dbus-call-method 'dbus-call-method-non-blocking)
      bus service path dbus-interface-properties
      "Set" :timeout 500 interface property (list :variant value))
     ;; Return VALUE.
@@ -857,7 +860,10 @@
     ;; "GetAll" returns "a{sv}".
     (let (result)
       (dolist (dict
-	       (dbus-call-method-non-blocking
+	       (funcall
+		(if noninteractive
+		    'dbus-call-method
+		  'dbus-call-method-non-blocking)
 		bus service path dbus-interface-properties
 		"GetAll" :timeout 500 interface)
 	       result)
--- a/lisp/net/tramp.el	Sun Feb 28 03:49:58 2010 +0000
+++ b/lisp/net/tramp.el	Sun Feb 28 13:26:25 2010 +0000
@@ -5045,11 +5045,12 @@
 	  ;; encoding function, then that is used for encoding the
 	  ;; contents of the tmp file.
 	  (cond
-	   ;; `rename-file' handles direct copy and out-of-band methods.
+	   ;; `copy-file' handles direct copy and out-of-band methods.
 	   ((or (tramp-local-host-p v)
 		(tramp-method-out-of-band-p
-		 v (- (or end (point-max)) (or start (point-min)))))
-	    (if (and (= (or end (point-max)) (point-max))
+		 v (nth 7 (file-attributes tmpfile))))
+	    (if (and (not (stringp start))
+		     (= (or end (point-max)) (point-max))
 		     (= (or start (point-min)) (point-min))
 		     (tramp-get-method-parameter
 		      method 'tramp-copy-keep-tmpfile))