Using saved parent location: http://bzr.savannah.gnu.org/r/emacs/trunk/ Now on revision 99998. ------------------------------------------------------------ revno: 99998 committer: Glenn Morris branch nick: trunk timestamp: Thu 2010-04-22 22:43:48 -0700 message: * etc/NEWS: More SELinux details and some minor fixes. diff: === modified file 'etc/NEWS' --- etc/NEWS 2010-04-21 16:25:15 +0000 +++ etc/NEWS 2010-04-23 05:43:48 +0000 @@ -69,7 +69,7 @@ Use `set-scroll-bar-mode' to change this. ** GTK tool bars can have just text, just images or images and text. -Customize `tool-bar-style´ to choose style. On a Gnome desktop, the default +Customize `tool-bar-style' to choose style. On a Gnome desktop, the default is taken from the desktop settings. ** Lucid menus and dialogs can display antialiased fonts if Emacs is built @@ -78,7 +78,10 @@ ** Basic SELinux support has been added. This requires Emacs to be linked with libselinux at build time. -*** Emacs preserves the SELinux file context when backing up or copying files. +*** Emacs preserves the SELinux file context when backing up, and +optionally when copying files. To this end, copy-file has an extra +optional argument, and backup-buffer and friends include the SELinux +context in their return values. *** The new functions file-selinux-context and set-file-selinux-context get and set the SELinux context of a file. @@ -138,8 +141,7 @@ ** Directory local variables can apply to file-less buffers. For example, adding "(diff-mode . ((mode . whitespace)))" to your -.dir-locals.el file, will turn on `whitespace-mode' for *vc-diff* -buffers. +.dir-locals.el file, will turn on `whitespace-mode' for *vc-diff* buffers. ** s-region.el is now declared obsolete, superceded by shift-select-mode enabled by default in 23.1. ------------------------------------------------------------ revno: 99997 committer: Glenn Morris branch nick: trunk timestamp: Thu 2010-04-22 22:40:33 -0700 message: ChangeLog fixes. diff: === modified file 'ChangeLog' --- ChangeLog 2010-04-22 16:37:58 +0000 +++ ChangeLog 2010-04-23 05:40:33 +0000 @@ -2,10 +2,10 @@ * configure.in (REAL_CFLAGS, CFLAGS): Restore -g for gcc. -2010-04-22 Miles Bader > +2010-04-22 Miles Bader * configure.in: Get rid of "unix" pre-defined macro when - preprocessing Makefile. + preprocessing Makefile. (Bug#5857) 2010-04-21 Andreas Schwab === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-04-23 02:46:53 +0000 +++ lisp/ChangeLog 2010-04-23 05:40:33 +0000 @@ -1433,7 +1433,7 @@ * image-mode.el (image-toggle-display-image): Replace `create-image' with `create-animated-image'. -2010-03-09 Miles Bader > +2010-03-09 Miles Bader * vc-git.el (vc-git-print-log): Use "tformat:" for shortlog, instead of "format:"; this ensures that the output is ------------------------------------------------------------ revno: 99996 committer: Michael Albinus branch nick: trunk timestamp: Fri 2010-04-23 04:46:53 +0200 message: Restore 0644 file permissions, which were changed accidently. diff: === modified file 'lisp/ChangeLog' (properties changed: +x to -x) === modified file 'lisp/net/tramp.el' (properties changed: +x to -x) ------------------------------------------------------------ revno: 99995 committer: Dan Nicolaescu branch nick: trunk timestamp: Thu 2010-04-22 13:32:43 -0700 message: Regenerate configure. diff: === modified file 'configure' --- configure 2010-04-22 00:10:43 +0000 +++ configure 2010-04-22 20:32:43 +0000 @@ -5477,7 +5477,7 @@ /* Get the CFLAGS for tests in configure. */ #ifdef __GNUC__ -configure___ CFLAGS=C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}' +configure___ CFLAGS=-g C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}' #else configure___ CFLAGS='${SPECIFIED_CFLAGS}' #endif @@ -5486,7 +5486,7 @@ /* Get the CFLAGS for real compilation. */ #ifdef __GNUC__ -configure___ REAL_CFLAGS=C_OPTIMIZE_SWITCH C_WARNINGS_SWITCH ${PROFILING_CFLAGS} '${SPECIFIED_CFLAGS}' +configure___ REAL_CFLAGS=-g C_OPTIMIZE_SWITCH C_WARNINGS_SWITCH ${PROFILING_CFLAGS} '${SPECIFIED_CFLAGS}' #else configure___ REAL_CFLAGS='${SPECIFIED_CFLAGS}' #endif @@ -7510,7 +7510,6 @@ main () { char *data, *data2, *data3; - const char *cdata2; int i, pagesize; int fd, fd2; @@ -7535,10 +7534,10 @@ fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600); if (fd2 < 0) return 4; - cdata2 = ""; - if (write (fd2, cdata2, 1) != 1) + data2 = ""; + if (write (fd2, data2, 1) != 1) return 5; - data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L); + data2 = mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L); if (data2 == MAP_FAILED) return 6; for (i = 0; i < pagesize; ++i) ------------------------------------------------------------ revno: 99994 committer: Jan D. branch nick: trunk timestamp: Thu 2010-04-22 19:23:18 +0200 message: Fix Bug#6001. * xsettings.c (read_and_apply_settings): Check if current_font is NULL before strcmp (Bug#6001). diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2010-04-21 19:32:54 +0000 +++ src/ChangeLog 2010-04-22 17:23:18 +0000 @@ -1,3 +1,8 @@ +2010-04-22 Jan Djärv + + * xsettings.c (read_and_apply_settings): Check if current_font is + NULL before strcmp (Bug#6001). + 2010-04-21 Dan Nicolaescu Clean up HP-UX files. === modified file 'src/xsettings.c' --- src/xsettings.c 2010-04-21 18:25:13 +0000 +++ src/xsettings.c 2010-04-22 17:23:18 +0000 @@ -578,7 +578,7 @@ if (settings.seen & SEEN_FONT) { - if (strcmp (current_font, settings.font) != 0) + if (!current_font || strcmp (current_font, settings.font) != 0) { free (current_font); current_font = settings.font; ------------------------------------------------------------ revno: 99993 committer: Dan Nicolaescu branch nick: trunk timestamp: Thu 2010-04-22 09:37:58 -0700 message: * configure.in (REAL_CFLAGS, CFLAGS): Restore -g for gcc. diff: === modified file 'ChangeLog' --- ChangeLog 2010-04-22 00:15:20 +0000 +++ ChangeLog 2010-04-22 16:37:58 +0000 @@ -1,3 +1,7 @@ +2010-04-22 Dan Nicolaescu + + * configure.in (REAL_CFLAGS, CFLAGS): Restore -g for gcc. + 2010-04-22 Miles Bader > * configure.in: Get rid of "unix" pre-defined macro when === modified file 'configure.in' --- configure.in 2010-04-22 00:10:30 +0000 +++ configure.in 2010-04-22 16:37:58 +0000 @@ -917,7 +917,7 @@ /* Get the CFLAGS for tests in configure. */ #ifdef __GNUC__ -configure___ CFLAGS=C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}' +configure___ CFLAGS=-g C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}' #else configure___ CFLAGS='${SPECIFIED_CFLAGS}' #endif @@ -926,7 +926,7 @@ /* Get the CFLAGS for real compilation. */ #ifdef __GNUC__ -configure___ REAL_CFLAGS=C_OPTIMIZE_SWITCH C_WARNINGS_SWITCH ${PROFILING_CFLAGS} '${SPECIFIED_CFLAGS}' +configure___ REAL_CFLAGS=-g C_OPTIMIZE_SWITCH C_WARNINGS_SWITCH ${PROFILING_CFLAGS} '${SPECIFIED_CFLAGS}' #else configure___ REAL_CFLAGS='${SPECIFIED_CFLAGS}' #endif ------------------------------------------------------------ revno: 99992 committer: Michael Albinus branch nick: trunk timestamp: Thu 2010-04-22 14:07:37 +0200 message: Synchronize with Tramp repository. * net/tramp.el (with-connection-property, tramp-completion-mode-p) (tramp-action-process-alive, tramp-action-out-of-band) (tramp-check-for-regexp, tramp-file-name-p, tramp-equal-remote) (tramp-exists-file-name-handler): Fix docstring. (with-progress-reporter): New defmacro. (tramp-do-copy-or-rename-file, tramp-handle-dired-compress-file) (tramp-maybe-open-connection): Use it. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-04-22 11:21:39 +0000 +++ lisp/ChangeLog 2010-04-22 12:07:37 +0000 @@ -1,3 +1,15 @@ +2010-04-22 Michael Albinus + + Synchronize with Tramp repository. + + * net/tramp.el (with-connection-property, tramp-completion-mode-p) + (tramp-action-process-alive, tramp-action-out-of-band) + (tramp-check-for-regexp, tramp-file-name-p, tramp-equal-remote) + (tramp-exists-file-name-handler): Fix docstring. + (with-progress-reporter): New defmacro. + (tramp-do-copy-or-rename-file, tramp-handle-dired-compress-file) + (tramp-maybe-open-connection): Use it. + 2010-04-22 Noah Lavine (tiny change) Detect ssh 'ControlMaster' argument automatically in some cases. === modified file 'lisp/net/tramp.el' --- lisp/net/tramp.el 2010-04-22 11:21:39 +0000 +++ lisp/net/tramp.el 2010-04-22 12:07:37 +0000 @@ -2240,7 +2240,7 @@ (font-lock-add-keywords 'emacs-lisp-mode '("\\")) (defmacro with-connection-property (key property &rest body) - "Checks in Tramp for property PROPERTY, otherwise executes BODY and set." + "Check in Tramp for property PROPERTY, otherwise executes BODY and set." `(let ((value (tramp-get-connection-property ,key ,property 'undef))) (when (eq value 'undef) ;; We cannot pass ,@body as parameter to @@ -2254,7 +2254,29 @@ (put 'with-connection-property 'edebug-form-spec t) (font-lock-add-keywords 'emacs-lisp-mode '("\\")) -(eval-and-compile ; silence compiler +(defmacro with-progress-reporter (vec level message &rest body) + "Executes BODY, spinning a progress reporter with MESSAGE." + `(let (pr tm) + (tramp-message ,vec ,level "%s..." ,message) + ;; We start a pulsing progress reporter after 3 seconds. Feature + ;; introduced in Emacs 24.1. + (when (<= ,level tramp-verbose) + (condition-case nil + (setq pr (funcall 'make-progress-reporter ,message) + tm (run-at-time 3 0.1 'progress-reporter-update pr)) + (error nil))) + (unwind-protect + ;; Execute the body. + (progn ,@body) + ;; Stop progress reporter. + (if tm (cancel-timer tm)) + (tramp-message ,vec ,level "%s...done" ,message)))) + +(put 'with-progress-reporter 'lisp-indent-function 3) +(put 'with-progress-reporter 'edebug-form-spec t) +(font-lock-add-keywords 'emacs-lisp-mode '("\\")) + +(eval-and-compile ;; Silence compiler. (if (memq system-type '(cygwin windows-nt)) (defun tramp-drop-volume-letter (name) "Cut off unnecessary drive letter from file NAME. @@ -3547,91 +3569,76 @@ v 'file-already-exists "File %s already exists" newname))) (with-parsed-tramp-file-name (if t1 filename newname) nil - (tramp-message v 0 "Transferring %s to %s..." filename newname)) - - ;; We start a pulsing progress reporter. Introduced in Emacs 24.1. - (when (> (nth 7 (file-attributes filename)) tramp-copy-size-limit) - (condition-case nil - (setq pr (funcall - 'make-progress-reporter - (format "Transferring %s to %s..." filename newname)) - tm (run-at-time 0 0.1 'progress-reporter-update pr)) - (error nil))) - - (unwind-protect - (cond - ;; Both are Tramp files. - ((and t1 t2) - (with-parsed-tramp-file-name filename v1 - (with-parsed-tramp-file-name newname v2 - (cond - ;; Shortcut: if method, host, user are the same for both - ;; files, we invoke `cp' or `mv' on the remote host - ;; directly. - ((tramp-equal-remote filename newname) - (tramp-do-copy-or-rename-file-directly - op filename newname - ok-if-already-exists keep-date preserve-uid-gid)) - - ;; Try out-of-band operation. - ((tramp-method-out-of-band-p - v1 (nth 7 (file-attributes filename))) - (tramp-do-copy-or-rename-file-out-of-band - op filename newname keep-date)) - - ;; No shortcut was possible. So we copy the - ;; file first. If the operation was `rename', we go - ;; back and delete the original file (if the copy was - ;; successful). The approach is simple-minded: we - ;; create a new buffer, insert the contents of the - ;; source file into it, then write out the buffer to - ;; the target file. The advantage is that it doesn't - ;; matter which filename handlers are used for the - ;; source and target file. - (t - (tramp-do-copy-or-rename-file-via-buffer - op filename newname keep-date)))))) - - ;; One file is a Tramp file, the other one is local. - ((or t1 t2) - (with-parsed-tramp-file-name (if t1 filename newname) nil - (cond - ;; Fast track on local machine. - ((tramp-local-host-p v) - (tramp-do-copy-or-rename-file-directly - op filename newname - ok-if-already-exists keep-date preserve-uid-gid)) - - ;; If the Tramp file has an out-of-band method, the corresponding - ;; copy-program can be invoked. - ((tramp-method-out-of-band-p v (nth 7 (file-attributes filename))) - (tramp-do-copy-or-rename-file-out-of-band - op filename newname keep-date)) - - ;; Use the inline method via a Tramp buffer. - (t (tramp-do-copy-or-rename-file-via-buffer - op filename newname keep-date))))) - - (t - ;; One of them must be a Tramp file. - (error "Tramp implementation says this cannot happen"))) - - ;; In case of `rename', we must flush the cache of the source file. - (when (and t1 (eq op 'rename)) - (with-parsed-tramp-file-name filename nil - (tramp-flush-file-property v (file-name-directory localname)) - (tramp-flush-file-property v localname))) - - ;; When newname did exist, we have wrong cached values. - (when t2 - (with-parsed-tramp-file-name newname nil - (tramp-flush-file-property v (file-name-directory localname)) - (tramp-flush-file-property v localname))) - - ;; Stop progress reporter. - (if tm (cancel-timer tm)) - (with-parsed-tramp-file-name (if t1 filename newname) nil - (tramp-message v 0 "Transferring %s to %s...done" filename newname))))) + (with-progress-reporter + v 0 (format "Transferring %s to %s" filename newname) + + (cond + ;; Both are Tramp files. + ((and t1 t2) + (with-parsed-tramp-file-name filename v1 + (with-parsed-tramp-file-name newname v2 + (cond + ;; Shortcut: if method, host, user are the same for both + ;; files, we invoke `cp' or `mv' on the remote host + ;; directly. + ((tramp-equal-remote filename newname) + (tramp-do-copy-or-rename-file-directly + op filename newname + ok-if-already-exists keep-date preserve-uid-gid)) + + ;; Try out-of-band operation. + ((tramp-method-out-of-band-p + v1 (nth 7 (file-attributes filename))) + (tramp-do-copy-or-rename-file-out-of-band + op filename newname keep-date)) + + ;; No shortcut was possible. So we copy the + ;; file first. If the operation was `rename', we go + ;; back and delete the original file (if the copy was + ;; successful). The approach is simple-minded: we + ;; create a new buffer, insert the contents of the + ;; source file into it, then write out the buffer to + ;; the target file. The advantage is that it doesn't + ;; matter which filename handlers are used for the + ;; source and target file. + (t + (tramp-do-copy-or-rename-file-via-buffer + op filename newname keep-date)))))) + + ;; One file is a Tramp file, the other one is local. + ((or t1 t2) + (cond + ;; Fast track on local machine. + ((tramp-local-host-p v) + (tramp-do-copy-or-rename-file-directly + op filename newname + ok-if-already-exists keep-date preserve-uid-gid)) + + ;; If the Tramp file has an out-of-band method, the corresponding + ;; copy-program can be invoked. + ((tramp-method-out-of-band-p v (nth 7 (file-attributes filename))) + (tramp-do-copy-or-rename-file-out-of-band + op filename newname keep-date)) + + ;; Use the inline method via a Tramp buffer. + (t (tramp-do-copy-or-rename-file-via-buffer + op filename newname keep-date)))) + + (t + ;; One of them must be a Tramp file. + (error "Tramp implementation says this cannot happen"))) + + ;; In case of `rename', we must flush the cache of the source file. + (when (and t1 (eq op 'rename)) + (with-parsed-tramp-file-name filename v1 + (tramp-flush-file-property v1 (file-name-directory localname)) + (tramp-flush-file-property v1 localname))) + + ;; When newname did exist, we have wrong cached values. + (when t2 + (with-parsed-tramp-file-name newname v2 + (tramp-flush-file-property v2 (file-name-directory localname)) + (tramp-flush-file-property v2 localname))))))) (defun tramp-do-copy-or-rename-file-via-buffer (op filename newname keep-date) "Use an Emacs buffer to copy or rename a file. @@ -4069,30 +4076,30 @@ nil) ((and suffix (nth 2 suffix)) ;; We found an uncompression rule. - (tramp-message v 0 "Uncompressing %s..." file) - (when (zerop (tramp-send-command-and-check - v (concat (nth 2 suffix) " " - (tramp-shell-quote-argument localname)))) - (tramp-message v 0 "Uncompressing %s...done" file) - ;; `dired-remove-file' is not defined in XEmacs - (funcall (symbol-function 'dired-remove-file) file) - (string-match (car suffix) file) - (concat (substring file 0 (match-beginning 0))))) + (with-progress-reporter v 0 (format "Uncompressing %s..." file) + (when (zerop + (tramp-send-command-and-check + v (concat (nth 2 suffix) " " + (tramp-shell-quote-argument localname)))) + ;; `dired-remove-file' is not defined in XEmacs + (funcall (symbol-function 'dired-remove-file) file) + (string-match (car suffix) file) + (concat (substring file 0 (match-beginning 0)))))) (t ;; We don't recognize the file as compressed, so compress it. ;; Try gzip. - (tramp-message v 0 "Compressing %s..." file) - (when (zerop (tramp-send-command-and-check - v (concat "gzip -f " - (tramp-shell-quote-argument localname)))) - (tramp-message v 0 "Compressing %s...done" file) - ;; `dired-remove-file' is not defined in XEmacs - (funcall (symbol-function 'dired-remove-file) file) - (cond ((file-exists-p (concat file ".gz")) - (concat file ".gz")) - ((file-exists-p (concat file ".z")) - (concat file ".z")) - (t nil))))))))) + (with-progress-reporter v 0 (format "Compressing %s..." file) + (when (zerop + (tramp-send-command-and-check + v (concat "gzip -f " + (tramp-shell-quote-argument localname)))) + ;; `dired-remove-file' is not defined in XEmacs + (funcall (symbol-function 'dired-remove-file) file) + (cond ((file-exists-p (concat file ".gz")) + (concat file ".gz")) + ((file-exists-p (concat file ".z")) + (concat file ".z")) + (t nil)))))))))) (defun tramp-handle-dired-uncache (dir &optional dir-p) "Like `dired-uncache' for Tramp files." @@ -5552,9 +5559,9 @@ ;; disable this part of the completion, unless the user implicitly ;; indicated his interest in using a fancier completion system. (or (eq tramp-syntax 'sep) - (featurep 'tramp) ;; If it's loaded, we may as well use - ;; it. `partial-completion-mode' does not exist in - ;; XEmacs. It is obsoleted with Emacs 24.1. + (featurep 'tramp) ;; If it's loaded, we may as well use it. + ;; `partial-completion-mode' does not exist in XEmacs. + ;; It is obsoleted with Emacs 24.1. (and (boundp 'partial-completion-mode) partial-completion-mode) ;; FIXME: These may have been loaded even if the user never ;; intended to use them. @@ -5628,7 +5635,7 @@ ;; overwriting this check in such cases. Or we change Tramp file name ;; syntax in order to avoid ambiguities, like in XEmacs ... (defun tramp-completion-mode-p () - "Checks whether method / user name / host name completion is active." + "Check, whether method / user name / host name completion is active." (or ;; Signal from outside. `non-essential' has been introduced in Emacs 24. (and (boundp 'non-essential) (symbol-value 'non-essential)) @@ -6587,12 +6594,12 @@ (tramp-send-string vec tramp-terminal-type)) (defun tramp-action-process-alive (proc vec) - "Check whether a process has finished." + "Check, whether a process has finished." (unless (memq (process-status proc) '(run open)) (throw 'tramp-action 'process-died))) (defun tramp-action-out-of-band (proc vec) - "Check whether an out-of-band copy has finished." + "Check, whether an out-of-band copy has finished." (cond ((and (memq (process-status proc) '(stop exit)) (zerop (process-exit-status proc))) (tramp-message vec 3 "Process has finished.") @@ -6674,7 +6681,7 @@ (tramp-message proc 10 "\n%s" (buffer-string)))) (defun tramp-check-for-regexp (proc regexp) - "Check whether REGEXP is contained in process buffer of PROC. + "Check, whether REGEXP is contained in process buffer of PROC. Erase echoed commands if exists." (with-current-buffer (process-buffer proc) (goto-char (point-min)) @@ -7315,9 +7322,9 @@ ;; Check whether process is alive. (tramp-set-process-query-on-exit-flag p nil) - (tramp-message vec 3 "Waiting 60s for local shell to come up...") - (tramp-barf-if-no-shell-prompt - p 60 "Couldn't find local shell prompt %s" tramp-encoding-shell) + (with-progress-reporter vec 3 "Waiting 60s for local shell to come up" + (tramp-barf-if-no-shell-prompt + p 60 "Couldn't find local shell prompt %s" tramp-encoding-shell)) ;; Now do all the connections as specified. (while target-alist @@ -7810,7 +7817,7 @@ ;; data structure. (defun tramp-file-name-p (vec) - "Check whether VEC is a Tramp object." + "Check, whether VEC is a Tramp object." (and (vectorp vec) (= 4 (length vec)))) (defun tramp-file-name-method (vec) @@ -7941,7 +7948,7 @@ localname)))))) (defun tramp-equal-remote (file1 file2) - "Checks, whether the remote parts of FILE1 and FILE2 are identical. + "Check, whether the remote parts of FILE1 and FILE2 are identical. The check depends on method, user and host name of the files. If one of the components is missing, the default values are used. The local file name parts of FILE1 and FILE2 are not taken into @@ -8319,7 +8326,7 @@ ;; Auto saving to a special directory. (defun tramp-exists-file-name-handler (operation &rest args) - "Checks whether OPERATION runs a file name handler." + "Check, whether OPERATION runs a file name handler." ;; The file name handler is determined on base of either an ;; argument, `buffer-file-name', or `default-directory'. (condition-case nil ------------------------------------------------------------ revno: 99991 committer: Michael Albinus branch nick: trunk timestamp: Thu 2010-04-22 13:21:39 +0200 message: Detect ssh 'ControlMaster' argument automatically in some cases. * net/tramp.el (tramp-detect-ssh-controlmaster): New defun. (tramp-default-method): Use it. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-04-22 09:15:27 +0000 +++ lisp/ChangeLog 2010-04-22 11:21:39 +0000 @@ -1,9 +1,18 @@ +2010-04-22 Noah Lavine (tiny change) + + Detect ssh 'ControlMaster' argument automatically in some cases. + + * net/tramp.el (tramp-detect-ssh-controlmaster): New defun. + (tramp-default-method): Use it. + 2010-04-22 Michael Albinus * net/tramp.el (tramp-handle-copy-file): Add new optional parameter `preserve-selinux-context'. (tramp-file-name-for-operation): Add `set-file-selinux-context'. +2010-04-22 Michael Albinus + * net/tramp.el (tramp-completion-handle-file-name-all-completions): Ensure, that non remote files are still checked. Oops. === modified file 'lisp/net/tramp.el' --- lisp/net/tramp.el 2010-04-22 09:15:27 +0000 +++ lisp/net/tramp.el 2010-04-22 11:21:39 +0000 @@ -723,6 +723,16 @@ `localhost' or the name of the local host. Another host name is useful only in combination with `tramp-default-proxies-alist'.") +(defun tramp-detect-ssh-controlmaster () + "Call ssh to detect whether it supports the ControlMaster argument. +This function may return nil when the argument is supported, but +shouldn't return t when it isn't." + (ignore-errors + (with-temp-buffer + (call-process "ssh" nil t nil "-o" "ControlMaster") + (goto-char (point-min)) + (search-forward-regexp "Missing ControlMaster argument" nil t)))) + (defcustom tramp-default-method ;; An external copy method seems to be preferred, because it is much ;; more performant for large files, and it hasn't too serious delays @@ -730,9 +740,8 @@ ;; permanent password queries. Either a password agent like ;; "ssh-agent" or "Pageant" shall run, or the optional ;; password-cache.el or auth-sources.el packages shall be active for - ;; password caching. "scpc" would be another good choice because of - ;; the "ControlMaster" option, but this is a more modern alternative - ;; in OpenSSH 4, which cannot be taken as default. + ;; password caching. "scpc" is chosen if we detect that the user is + ;; running OpenSSH 4.0 or newer. (cond ;; PuTTY is installed. ((executable-find "pscp") @@ -744,13 +753,15 @@ "plink")) ;; There is an ssh installation. ((executable-find "scp") - (if (or (fboundp 'password-read) - (fboundp 'auth-source-user-or-password) - ;; ssh-agent is running. - (getenv "SSH_AUTH_SOCK") - (getenv "SSH_AGENT_PID")) - "scp" - "ssh")) + (cond + ((tramp-detect-ssh-controlmaster) "scpc") + ((or (fboundp 'password-read) + (fboundp 'auth-source-user-or-password) + ;; ssh-agent is running. + (getenv "SSH_AUTH_SOCK") + (getenv "SSH_AGENT_PID")) + "scp") + (t "ssh"))) ;; Fallback. (t "ftp")) "*Default method to use for transferring files. ------------------------------------------------------------ revno: 99990 committer: Michael Albinus branch nick: trunk timestamp: Thu 2010-04-22 11:15:27 +0200 message: * net/tramp.el (tramp-handle-copy-file): Add new optional parameter `preserve-selinux-context'. (tramp-file-name-for-operation): Add `set-file-selinux-context'. diff: === modified file 'lisp/ChangeLog' (properties changed: -x to +x) --- lisp/ChangeLog 2010-04-22 04:30:16 +0000 +++ lisp/ChangeLog 2010-04-22 09:15:27 +0000 @@ -1,5 +1,9 @@ 2010-04-22 Michael Albinus + * net/tramp.el (tramp-handle-copy-file): Add new optional + parameter `preserve-selinux-context'. + (tramp-file-name-for-operation): Add `set-file-selinux-context'. + * net/tramp.el (tramp-completion-handle-file-name-all-completions): Ensure, that non remote files are still checked. Oops. === modified file 'lisp/net/tramp.el' (properties changed: -x to +x) --- lisp/net/tramp.el 2010-04-22 04:27:55 +0000 +++ lisp/net/tramp.el 2010-04-22 09:15:27 +0000 @@ -3437,7 +3437,8 @@ (buffer-name)))))) (defun tramp-handle-copy-file - (filename newname &optional ok-if-already-exists keep-date preserve-uid-gid) + (filename newname &optional ok-if-already-exists keep-date + preserve-uid-gid preserve-selinux-context) "Like `copy-file' for Tramp files." ;; Check if both files are local -- invoke normal copy-file. ;; Otherwise, use Tramp from local system. @@ -5326,7 +5327,7 @@ 'dired-compress-file 'dired-uncache 'file-accessible-directory-p 'file-attributes 'file-directory-p 'file-executable-p 'file-exists-p - 'file-local-copy 'file-remote-p 'file-modes 'file-selinux-context + 'file-local-copy 'file-remote-p 'file-modes 'file-name-as-directory 'file-name-directory 'file-name-nondirectory 'file-name-sans-versions 'file-ownership-preserved-p 'file-readable-p @@ -5338,6 +5339,8 @@ 'unhandled-file-name-directory 'vc-registered ;; Emacs 22+ only. 'set-file-times + ;; Emacs 24+ only. + 'file-selinux-context 'set-file-selinux-context ;; XEmacs only. 'abbreviate-file-name 'create-file-buffer 'dired-file-modtime 'dired-make-compressed-filename @@ -8678,6 +8681,7 @@ ;; on remote hosts. ;; * Use secrets.el for password handling. ;; * Load ~/.emacs_SHELLNAME on the remote host for `shell'. +;; * Implement selinux-context. ;; Functions for file-name-handler-alist: ;; diff-latest-backup-file -- in diff.el ------------------------------------------------------------ revno: 99989 [merge] committer: Katsumi Yamaoka branch nick: trunk timestamp: Thu 2010-04-22 08:25:46 +0000 message: Synch with Gnus trunk: (message-generate-headers): Record insertion of optional headers as well. Otherwise the check to prevent repeated insertion of optional headers is a no-op. By Andreas Seltenreich . diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2010-04-19 15:07:52 +0000 +++ lisp/gnus/ChangeLog 2010-04-22 08:24:25 +0000 @@ -1,3 +1,9 @@ +2010-04-22 Andreas Seltenreich + + * message.el (message-generate-headers): Record insertion of optional + headers as well. Otherwise the check to prevent repeated insertion of + optional headers is a no-op. + 2010-04-17 Teodor Zlatanov * smime.el: Don't mention CVS. === modified file 'lisp/gnus/message.el' --- lisp/gnus/message.el 2010-03-31 02:37:57 +0000 +++ lisp/gnus/message.el 2010-04-22 08:24:25 +0000 @@ -5905,6 +5905,7 @@ (if formatter (funcall formatter header value) (insert header-string ": " value)) + (push header-string message-inserted-headers) (goto-char (message-fill-field)) ;; We check whether the value was ended by a ;; newline. If not, we insert one. ------------------------------------------------------------ revno: 99988 committer: Michael Albinus branch nick: trunk timestamp: Thu 2010-04-22 06:30:16 +0200 message: *** empty log message *** diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-04-22 04:27:55 +0000 +++ lisp/ChangeLog 2010-04-22 04:30:16 +0000 @@ -1,6 +1,6 @@ 2010-04-22 Michael Albinus - * net/tramp.el(tramp-completion-handle-file-name-all-completions): + * net/tramp.el (tramp-completion-handle-file-name-all-completions): Ensure, that non remote files are still checked. Oops. 2010-04-21 Michael Albinus ------------------------------------------------------------ Use --include-merges or -n0 to see merged revisions.