• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10.1/emacs-93/emacs/lisp/net/

Lines Matching +defs:process +defs:send +defs:string

191   "*Whether to send all commands and responses to a debug buffer."
230 (string :tag "Backup Dir")
243 string))
271 (if (string-match "cmd\\.exe" tramp-encoding-shell)
277 :type 'string)
595 This specifies the string to use for terminating the line after
633 (cons string
636 (choice (const nil) string))
638 (choice (const nil) string))
640 (choice (const nil) string))
641 (list (const tramp-login-args) (repeat string))
642 (list (const tramp-copy-args) (repeat string))
644 (choice (const nil) string))
646 (choice (const nil) string))
648 (choice (const nil) string))
654 (choice (const nil) string))))))
661 :type '(repeat string))
686 :type '(repeat (list string function string)))
726 :type 'string)
738 empty string for the user name.
744 (string :tag "Method"))))
863 :type 'string)
871 It seems that people using plink under Windows need to send
878 :type 'string)
892 :type '(repeat string))
1002 (defcustom tramp-process-alive-regexp
1004 "Regular expression indicating a process has finished.
1006 check regularly the status of the associated process.
1007 The answer will be provided by `tramp-action-process-alive',
1008 `tramp-multi-action-process-alive' and`tramp-action-out-of-band', which see."
1020 :type 'string)
1024 Some shells send such garbage upon connection setup."
1031 matching the shell file name and ARGS is a string specifying the
1041 '(alist :key-type string :value-type string)
1042 '(repeat (cons string string))))
1049 :type 'string)
1072 :type 'string)
1088 :type 'string)
1104 :type 'string)
1125 :type 'string)
1151 :type 'string)
1189 These numbers are passed directly to `match-string', which see. That
1295 string, but I haven't actually tried what happens if it doesn't..."
1352 :type '(list string string string))
1360 :type 'string)
1381 (tramp-process-alive-regexp tramp-action-process-alive))
1400 (tramp-process-alive-regexp tramp-action-out-of-band))
1413 (tramp-process-alive-regexp tramp-multi-action-process-alive))
1424 "List of commands to send to the first remote shell that we see.
1431 quoting which `tcsh' tries to correct, so we send the command \"unset
1434 :type '(repeat string))
1437 ;; known to have a bug in `process-send-string'; some ssh connections appear
1448 "*If non-nil, chunksize for sending input to local process.
1449 It is necessary only on systems which have a buggy `process-send-string'
1460 (let ((proc (start-process (buffer-name) (current-buffer)
1462 (when (memq (process-status proc) '(run open))
1463 (process-send-string proc (make-string sent ?\\ ))
1464 (process-send-eof proc)
1465 (process-send-eof proc))
1468 (accept-process-output proc 1))
1469 (when (memq (process-status proc) '(run open))
1470 (setq received (string-to-number (match-string 0)))
1471 (delete-process proc)
1508 ;; Emacs on MacOS X has process-connection-type set to nil by default,
1511 (defcustom tramp-process-connection-type t
1512 "Overrides `process-connection-type' for connections from Tramp.
1513 Tramp binds process-connection-type to the value given here before
1530 (lambda (x) (base64-encode-string
1539 (prin1-to-string process-environment)
1540 (current-time-string)
1541 ;; (prin1-to-string
1618 This variable is automatically made buffer-local to each rsh process buffer
1623 This variable is automatically made buffer-local to each rsh process buffer
1628 This variable is automatically made buffer-local to each rsh process buffer
1633 This variable is automatically made buffer-local to each rsh process buffer
1638 This variable is automatically made buffer-local to each rsh process buffer
1644 This variable is automatically made buffer-local to each rsh process buffer
1649 This variable is automatically made buffer-local to each rsh process buffer
1781 This string is passed to `format', so percent characters need to be doubled.
1789 This string is passed to `format', so percent characters need to be doubled.
1821 # Not the fastest method, but it is simple: unpack to binary string, split
1834 This string is passed to `format', so percent characters need to be doubled.")
1880 This string is passed to `format', so percent characters need to be doubled.")
1898 This is used to map a mode number to a permission string.")
1912 (defvar tramp-process-echoes nil
1913 "Whether to process echoes from the remote shell.")
1929 on the FILENAME argument, even if VISIT was a string.")
1967 (process-file . tramp-handle-process-file)
1978 (dired-call-process . tramp-handle-dired-call-process)
2008 (defsubst tramp-message (level fmt-string &rest args)
2012 Calls function `message' with FMT-STRING as control string and the remaining
2017 (apply #'message (concat "tramp: " fmt-string) args)
2029 (concat "# " (apply #'format fmt-string args) "\n"))))))
2032 (multi-method method user host level fmt-string &rest args)
2038 (apply 'tramp-message level fmt-string args)))
2183 (tramp-send-command-and-check
2206 (string-match "\\.elc?\\'" file))
2241 (let* ((steps (tramp-split-string localname "/"))
2244 (is-dir (string= localname localnamedir))
2274 (cond ((string= "." thisstep)
2277 ((string= ".." thisstep)
2289 ;; If the symlink was absolute, we'll get a string like
2301 (append (tramp-split-string symlink-target "/") steps)))
2308 ;; Combine list to form string.
2313 (when (and is-dir (or (string= "" result)
2314 (not (string= (substring result -1) "/"))))
2328 (zerop (tramp-send-command-and-check
2370 (tramp-send-command
2385 (string-match
2390 (small (read (match-string 1 (caddr err))))
2417 ;; 0. t for directory, string (name linked to) for symbolic
2434 ;; 8. File modes, as a string of ten letters or dashes as in ls -l.
2452 (tramp-maybe-send-perl-script multi-method method user host
2455 (tramp-send-command multi-method method user host
2481 (tramp-send-command
2532 (tramp-send-command
2549 (unless (zerop (tramp-send-command-and-check
2639 (tramp-mode-string-to-int
2655 (tramp-send-command-and-check
2718 ;; (eq (string-match tramp-file-name-regexp directory) 0)
2732 (not (string= localname "/")))
2751 (tramp-send-command
2760 (when (or (not match) (string-match match x))
2766 (tramp-send-command multi-method method user host "cd")
2796 (tramp-maybe-send-perl-script multi-method method user host
2799 (tramp-send-command multi-method method user host
2810 (if (and match (not (string-match match (caadr cell))))
2822 (sort (cdr root) (lambda (x y) (string< (car x) (car y))))))))))
2831 (unless (save-match-data (string-match "/" filename))
2845 (tramp-send-command
2864 (tramp-send-command multi-method method user host "cd")
3018 (not (string-match "\\([^#]*\\)#\\(.*\\)" v1-host))
3019 (not (string-match "\\([^#]*\\)#\\(.*\\)" v2-host)))
3100 (tramp-send-command
3113 (zerop (tramp-send-command-and-check
3187 (when (string-match "\\([^#]*\\)#\\(.*\\)" v1-host)
3188 (setq copy-args (cons "-P" (cons (match-string 2 v1-host) copy-args)))
3189 (setq v1-host (match-string 1 v1-host)))
3197 (when (string-match "\\([^#]*\\)#\\(.*\\)" v2-host)
3198 (setq copy-args (cons "-P" (cons (match-string 2 v2-host) copy-args)))
3199 (setq v2-host (match-string 1 v2-host)))
3231 ;; Use an asynchronous process. By this, password can be handled.
3253 (p (apply 'start-process (buffer-name trampbuf) trampbuf
3255 (tramp-set-process-query-on-exit-flag p nil)
3256 (tramp-process-actions p multi-method method user host
3289 (tramp-send-command
3300 (unless (zerop (tramp-send-command-and-check
3321 (tramp-send-command multi-method method user host
3330 (defun tramp-handle-dired-call-process (program discard &rest arguments)
3331 "Like `dired-call-process' for tramp files."
3338 "tramp-handle-dired-call-process: Couldn't `cd %s'"
3340 (tramp-send-command
3351 (buffer-string))))
3354 (tramp-send-command-and-check multi-method method user host nil)
3355 (tramp-send-command multi-method method user host "cd")
3380 (if (string-match (car (car suffixes)) localname)
3389 (when (zerop (tramp-send-command-and-check
3395 (string-match (car suffix) file)
3401 (when (zerop (tramp-send-command-and-check
3436 (when (string-match "^--dired\\s-+" switches)
3458 (tramp-send-command
3473 (tramp-send-command
3497 (buffer-string)))
3505 (tramp-send-command multi-method method user host "cd")
3569 (when (string-match "\\`\\(~[^/]*\\)\\(.*\\)\\'" localname)
3570 (let ((uname (match-string 1 localname))
3571 (fname (match-string 2 localname)))
3578 (when (and (string-equal uname "~")
3579 (string-match
3586 (tramp-send-command
3597 (while (string-match "//" localname)
3618 ;; (if (string-match "^/\\.\\./" localname)
3634 "Global variable keeping asynchronous process object.
3639 This is necessary for handling DISPLAY of `process-file'.")
3650 (asynchronous (string-match "[ \t]*&[ \t]*\\'" command))
3664 ;; process. Instead of, another asynchronous process is opened
3665 ;; which gets the output of the (synchronous) Tramp process
3666 ;; via process-filter. ERROR-BUFFER is disabled.
3670 tramp-async-proc (start-process (buffer-name output-buffer)
3679 ;; Define the process filter
3681 (set-process-filter
3682 (get-buffer-process
3684 '(lambda (process string)
3687 (set-buffer (process-buffer process))
3689 (insert string))
3690 ;; Hand-over output to asynchronous process.
3692 (string-match
3693 (regexp-quote tramp-end-of-output) string)))
3695 (setq string
3696 (substring string 0 (1- (match-beginning 0)))))
3697 (process-send-string tramp-async-proc string)
3699 (set-process-filter process nil)
3700 (process-send-eof tramp-async-proc))))))
3702 (tramp-send-command
3717 (buffer-string))))
3722 (tramp-send-command
3731 (buffer-string)))
3732 (tramp-send-command-and-check
3735 (tramp-send-command multi-method method user host "cd")
3738 (tramp-send-command
3761 (defun tramp-handle-process-file (program &optional infile buffer display &rest args)
3762 "Like `process-file' for Tramp files."
3978 (when (and (string-match (car x) buffer-file-name)
3993 (tramp-subst-strs-in-string
4030 ;; (string= lockname filename))
4135 (tramp-send-command
4144 (tramp-send-string multi-method method user host
4145 (buffer-string))
4150 (tramp-send-command
4154 "Waiting for remote host to process data...")
4302 ((string-match tramp-file-name-regexp (nth 0 args)) (nth 0 args))
4303 ((string-match tramp-file-name-regexp (nth 1 args)) (nth 1 args))
4318 (list 'dired-call-process
4322 'process-file
4324 'dired-print-file 'dired-shell-call-process))
4349 ;; (edebug-trace "%s" (with-output-to-string (backtrace)))
4418 ;; (edebug-trace "%s" (with-output-to-string (backtrace)))
4490 (if (or (string-match "\\*" name)
4491 (string-match "\\?" name)
4492 (string-match "\\[.*\\]" name))
4502 ;;- (tramp-send-command
4506 (tramp-send-command multi-method method user host
4512 (if (string-equal localname bufstr)
4561 ((string-match "^/.*:.*:$" file) nil)
4562 ((string-match
4566 (member (match-string 1 file) (mapcar 'car tramp-methods)))
4769 (when (string-match (nth 0 structure) name)
4771 (match-string (nth 1 structure) name)))
4781 (match-string (nth 2 structure) name)))
4783 (match-string (nth 3 structure) name)))
4785 (match-string (nth 4 structure) name))))
4800 (string-match (concat "^" (regexp-quote partial-method)) method)
4806 "Returns the most expanded string for user and host name completion.
4812 (string-match (concat "^" (regexp-quote partial-host)) host)
4813 (string-equal partial-user (or user partial-user)))
4821 (and user (string-match (concat "^" (regexp-quote partial-user)) user))
4827 (and host (string-match (concat "^" (regexp-quote partial-host)) host))
4868 (setq result (append (list (match-string 3) (match-string 1)))))
4895 (setq result (list nil (match-string 1))))
4924 (setq result (list nil (match-string 1))))
4940 (when (string-match regexp (car files))
4941 (push (list nil (match-string 1 (car files))) result))
4955 (when (string-match regexp (car files))
4956 (push (list nil (match-string 1 (car files))) result))
4983 (setq result (list nil (match-string 1)))))
5018 (setq result (list (match-string 1) "localhost")))
5048 (setq result (list (match-string 3) (match-string 1))))
5055 (defun tramp-maybe-send-perl-script (multi-method method user host script name)
5057 Only send the definition if it has not already been done.
5066 (tramp-send-string multi-method method user host
5096 (tramp-send-command-and-check
5127 (tramp-send-command-and-check
5139 ;; With GNU Emacs, `format-time-string' has an optional
5143 (symbol-function 'format-time-string))))))
5146 (format-time-string "%Y%m%d%H%M.%S" time t)
5147 (format-time-string "%Y%m%d%H%M.%S" time))))
5151 (unless (zerop (tramp-send-command-and-check
5163 (unless (zerop (call-process
5186 string-list)
5188 (setq string-list
5193 string-list))
5197 (apply 'concat (reverse string-list)))))
5246 (tramp-send-command
5254 (tramp-send-command multi-method method user host d))
5256 (tramp-send-command multi-method method user host "EOF")
5278 (tramp-send-command
5338 (tramp-send-command multi-method method user host "echo ~root")
5341 ((string-match "^~root$" (buffer-string))
5354 (when (string-match (car item) shell)
5359 (tramp-send-command
5363 (get-buffer-process (current-buffer))
5371 (process-send-string nil (format "PS1='%s%s%s'; PS2=''; PS3=''%s"
5395 (tramp-send-command-and-check
5441 (process-send-string nil (concat (or user (user-login-name))
5463 (kill-process p)
5468 (kill-process p)
5469 (error "%s" (match-string 1)))
5473 Send \"yes\" to remote process on confirmation, abort otherwise.
5477 (unless (yes-or-no-p (match-string 0))
5478 (kill-process p)
5481 (process-send-string p (concat "yes" tramp-rsh-end-of-line))
5486 Send \"y\" to remote process on confirmation, abort otherwise.
5490 (unless (y-or-n-p (match-string 0))
5491 (kill-process p)
5494 (process-send-string p (concat "y" tramp-rsh-end-of-line))))
5502 (process-send-string nil (concat tramp-terminal-type
5505 (defun tramp-action-process-alive (p multi-method method user host)
5506 "Check whether a process has finished."
5507 (unless (memq (process-status p) '(run open))
5508 (throw 'tramp-action 'process-died)))
5512 (cond ((and (memq (process-status p) '(stop exit))
5513 (zerop (process-exit-status p)))
5516 ((or (and (memq (process-status p) '(stop exit))
5517 (not (zerop (process-exit-status p))))
5518 (memq (process-status p) '(signal)))
5528 (throw 'tramp-action 'process-died)))
5537 (process-send-string p (concat user tramp-rsh-end-of-line)))
5557 (kill-process p)
5561 (defun tramp-multi-action-process-alive (p method user host)
5562 "Check whether a process has finished."
5563 (unless (memq (process-status p) '(run open))
5564 (throw 'tramp-action 'process-died)))
5568 (defun tramp-process-one-action (p multi-method method user host actions)
5574 (tramp-accept-process-output p 1)
5588 (defun tramp-process-actions
5591 (tramp-message 10 "%s" (mapconcat 'identity (process-command p) " "))
5599 (tramp-process-one-action
5601 (tramp-process-one-action
5610 (defun tramp-process-one-multi-action (p method user host actions)
5617 (tramp-accept-process-output p 1)
5631 (defun tramp-process-multi-actions (p method user host actions)
5638 (tramp-process-one-multi-action p method user host actions)
5651 (defun tramp-process-initial-commands (p
5661 (tramp-send-command multi-method method user host cmd nil t)
5698 (let ((process-environment (copy-sequence process-environment)))
5708 (p (apply 'start-process
5722 (tramp-set-process-query-on-exit-flag p nil)
5725 (tramp-process-actions p multi-method method user host
5755 (if (and user (not (string= user "")))
5759 (let ((process-environment (copy-sequence process-environment))
5777 (when (string-match "\\([^#]*\\)#\\(.*\\)" host)
5778 (setq login-args (cons "-p" (cons (match-string 2 host) login-args)))
5779 (setq real-host (match-string 1 host)))
5789 (p (if (and user (not (string= user "")))
5790 (apply #'start-process bufnam buf login-program
5792 (apply #'start-process bufnam buf login-program
5795 (tramp-set-process-query-on-exit-flag p nil)
5798 (tramp-process-actions p multi-method method user host
5821 (unless (or (string-match (concat "^" (regexp-quote host))
5823 (string= "localhost" host)
5824 (string= "" host))
5831 (let ((process-environment (copy-sequence process-environment)))
5841 (p (apply 'start-process
5857 (tramp-set-process-query-on-exit-flag p nil)
5859 (tramp-process-actions p multi-method method user host
5896 (let ((process-environment (copy-sequence process-environment)))
5906 (p (start-process (tramp-buffer-name multi-method method user host)
5911 (tramp-set-process-query-on-exit-flag p nil)
5917 (kill-process p)
5955 (process-send-string p cmd)
5956 (tramp-process-multi-actions p method user host
5981 (process-send-string p cmd)
5982 (tramp-process-multi-actions p method user host
6008 (process-send-string p cmd)
6009 (tramp-process-multi-actions p method user host
6014 (defun tramp-accept-process-output
6015 (&optional process timeout timeout-msecs)
6016 "Like `accept-process-output' for Tramp processes.
6018 for process communication also."
6020 (accept-process-output process timeout timeout-msecs)))
6023 "Wait for a REGEXP to appear from process PROC within TIMEOUT seconds.
6025 the string that matched, or nil. Waits indefinitely if TIMEOUT is
6038 (tramp-accept-process-output proc 1)
6039 (unless (memq (process-status proc) '(run open))
6045 (tramp-accept-process-output proc 1)
6046 (unless (memq (process-status proc) '(run open))
6067 "Wait for the shell prompt to appear from process PROC within TIMEOUT seconds.
6078 Looks at process PROC to see if a shell prompt appears in TIMEOUT
6085 "Prompt for a password and send it to the remote end.
6086 Uses PROMPT as a prompt and sends the password to process P."
6089 (process-send-string
6117 Mainly sets the prompt and the echo correctly. P is the shell process
6124 (tramp-process-initial-commands p multi-method method user host
6138 (tramp-send-command-internal
6153 (tramp-send-command-internal multi-method method user host
6157 (tramp-send-command-internal multi-method method user host
6160 (tramp-send-command-internal multi-method method user host
6163 ;; Check whether the remote host suffers from buggy `send-process-string'.
6164 ;; This is known for FreeBSD (see comment in `send_process', file process.c).
6169 (tramp-message 9 "Checking remote host type for `send-process-string' bug")
6170 (tramp-send-command-internal multi-method method user host
6181 (tramp-send-command-internal multi-method method user host
6186 ;; with the process.
6187 (let* ((cs (or (process-coding-system p) (cons 'undecided 'undecided)))
6199 (set-buffer-process-coding-system cs-decode cs-encode))
6202 ;; We have found a ^M but cannot frob the process coding system
6207 (tramp-send-command-internal multi-method method user host
6212 (tramp-send-command-internal
6217 (tramp-send-command-internal multi-method method user host
6221 (tramp-send-command-internal
6226 (tramp-send-command-internal multi-method method user host
6232 ;; the last time we sent a command, to avoid tramp-send-command to send
6235 (tramp-send-command
6286 (tramp-send-command multi-method method user host
6295 (tramp-send-command multi-method method user host
6298 (tramp-send-command multi-method method user host
6301 (tramp-send-command multi-method method user host
6306 (tramp-send-command multi-method method user host
6314 (tramp-send-command multi-method method user host
6321 (tramp-send-command
6329 (tramp-send-string multi-method method user host tramp-uudecode)
6344 (tramp-send-string
6351 (tramp-send-string
6359 (tramp-send-string
6366 (tramp-send-string
6381 (tramp-send-command multi-method method user host "id -u; id -g")
6397 (magic-string "xyzzy"))
6399 (tramp-kill-process multi-method method user host)
6407 (tramp-send-command
6410 (tramp-shell-quote-argument magic-string) rem-enc rem-dec))
6412 (unless (looking-at (regexp-quote magic-string))
6413 (tramp-kill-process multi-method method user host)
6462 The REMOTE-ENCODING should be a string, giving a command accepting a
6464 output. The REMOTE-DECODING should also be a string, giving a command
6503 (unless (zerop (tramp-send-command-and-check
6510 (unless (zerop (tramp-send-command-and-check
6519 ;; If the local encoder or decoder is a string, the
6562 OUTPUT can be a string (which specifies a filename), or t (which
6565 (call-process
6567 (when (and input (not (string-match "%s" cmd)))
6574 (if (string-match "%s" cmd) (format cmd input) cmd)
6581 (let ((p (get-buffer-process
6585 ;; whether process is still alive. If it isn't, kill it. When
6588 ;; tries to send some data to the remote end. So that's why we
6589 ;; try to send a command from time to time, then look again
6590 ;; whether the process is really alive.
6595 p (processp p) (memq (process-status p) '(run open)))
6596 (tramp-send-command
6598 (unless (and (memq (process-status p) '(run open))
6600 (delete-process p)
6603 (unless (and p (processp p) (memq (process-status p) '(run open)))
6605 (delete-process p))
6606 (let ((process-connection-type tramp-process-connection-type))
6613 (defun tramp-send-command
6633 (setq proc (get-buffer-process (current-buffer)))
6634 (process-send-string proc
6637 (defun tramp-send-command-internal
6641 (tramp-send-command multi-method method user host command t t)
6650 (let ((proc (get-buffer-process (current-buffer)))
6672 (tramp-accept-process-output proc 1)
6673 (unless (memq (process-status proc) '(run open))
6680 (tramp-accept-process-output proc 1)
6681 (unless (memq (process-status proc) '(run open))
6693 (when tramp-process-echoes
6717 (defun tramp-send-command-and-check (multi-method method user host command
6726 (tramp-send-command multi-method method user host
6742 Similar to `tramp-send-command-and-check' but accepts two more arguments
6744 (unless (zerop (tramp-send-command-and-check
6755 (defun tramp-send-string
6756 (multi-method method user host string)
6762 (let ((proc (get-buffer-process
6765 (error "Can't send string to remote host -- not logged in"))
6771 (tramp-insert-with-face 'bold (format "$ %s\n" string))))
6773 (setq string
6775 (split-string string "\n")
6777 (unless (or (string= string "")
6778 (string-equal (substring string -1) tramp-rsh-end-of-line))
6779 (setq string (concat string tramp-rsh-end-of-line)))
6780 ;; send the string
6783 (end (length string)))
6789 (process-send-string
6790 proc (substring string pos (min (+ pos tramp-chunksize) end)))
6793 (process-send-string proc string))))
6795 (defun tramp-send-eof (multi-method method user host)
6798 (let ((proc (get-buffer-process
6801 (error "Can't send EOF to remote host -- not logged in"))
6802 (process-send-eof proc)))
6803 ; (process-send-string proc "\^D")))
6805 (defun tramp-kill-process (multi-method method user host)
6806 "Kill the connection process used by Tramp.
6808 (let ((proc (get-buffer-process
6810 (kill-process proc)))
6817 (while (prog1 (erase-buffer) (tramp-accept-process-output p 0.25))
6825 (defun tramp-mode-string-to-int (mode-string)
6826 "Converts a ten-letter `drwxrwxrwx'-style mode string into mode bits."
6827 (let* ((mode-chars (string-to-vector mode-string))
6881 Convert file mode bits to string and set virtual device number.
6883 ;; Convert file mode bits to string.
6899 (let ((string (tramp-make-tramp-file-name multi-method method user host "")))
6900 (unless (assoc string tramp-devices)
6902 (list string (length tramp-devices))))
6903 (list -1 (nth 1 (assoc string tramp-devices)))))
6906 "Turn an integer representing a file mode into an ls(1)-like string."
6921 "Convert a permission bitset into a string.
6934 "Return a string consisting of the octal digits of I.
6940 (number-to-string (% i 8))))))
6944 ;; "Given a string of octal digits, return a decimal number."
6946 ;; ((string= "" ostr) 0)
6955 "Given a string of octal digits, return a decimal number."
6957 ;; `save-match' is in `tramp-mode-string-to-int' which calls this.
6958 (unless (string-match "\\`[0-7]*\\'" x)
6959 (error "Non-octal junk in string `%s'" x))
6960 (string-to-number ostr 8)))
6962 (defun tramp-shell-case-fold (string)
6969 string
6985 (string-match tramp-file-name-regexp name)))
6995 (let* ((match (string-match (nth 0 tramp-file-name-structure) name))
6998 (if match (match-string (nth 1 tramp-file-name-structure) name)
7000 (string-match
7003 (match-string (nth 1 tramp-multi-file-name-structure) name))))
7010 (let ((user (match-string (nth 2 tramp-file-name-structure) name))
7011 (host (match-string (nth 3 tramp-file-name-structure) name))
7012 (localname (match-string (nth 4 tramp-file-name-structure) name)))
7027 (when (and (string-match (or (nth 0 item) "") (or host ""))
7028 (string-match (or (nth 1 item) "") (or user "")))
7034 "Return the right method string to use.
7053 (unless (string-match (format regexp hop-regexp) name)
7055 (setq method (match-string method-index name))
7056 (setq hops (match-string hops-index name))
7059 (setq localname (match-string localname-index name))
7061 (while (string-match hop-regexp hops index)
7064 (cons (match-string hop-method-index hops) hop-methods))
7066 (cons (match-string hop-user-index hops) hop-users))
7068 (cons (match-string hop-host-index hops) hop-hosts))))
7279 (defun tramp-subst-strs-in-string (alist string)
7280 "Replace all occurrences of the string FROM with TO in STRING.
7287 (while (string-match (regexp-quote from) string)
7288 (setq string (replace-match to t t string)))
7290 string))
7292 (defun tramp-insert-with-face (face string)
7295 (insert string)
7389 (defun tramp-split-string (string pattern)
7390 "Like `split-string' but omit empty strings.
7391 In Emacs, (split-string \"/foo/bar\" \"/\") returns (\"foo\" \"bar\").
7398 (delete "" (split-string string pattern)))
7400 (defun tramp-set-process-query-on-exit-flag (process flag)
7401 "Specify if query is needed for process when Emacs is exited.
7403 exiting if process is running."
7405 (if (fboundp 'set-process-query-on-exit-flag)
7406 (symbol-function 'set-process-query-on-exit-flag)
7407 (symbol-function 'process-kill-without-query))
7408 process flag))
7417 ;; backslash newline. But if, say, the string `a backslash newline b'
7429 ;; This function should produce a string which is grokked by a Unix
7448 (string= (substring result 0 2) "\\~"))
7450 (while (string-match nl result)
7461 ;; ;; connection to help it's dired process. Not that I have any real
7487 (when (string-match "\\[" tramp-prefix-format)
7494 (if (string-match "[[*?]" (tramp-file-name-localname v))
7521 (catch 'dont-send
7617 (string-match
7620 (set varsym (concat "(base64-decode-string \""
7621 (base64-encode-string val)
7627 ;; Remove string quotation.
7631 "\\((base64-decode-string \\)" "\\\\" ;; \2 \
7670 (when (string-match tramp-buf-regexp (buffer-name b)) b))
7706 ;; OK, let's send. First we delete the buffer list.
7719 ;; Don't send. Delete the message buffer.
7723 (throw 'dont-send nil))))))
7787 ;; * Cooperate with PCL-CVS. It uses start-process, which doesn't
7821 ;; strange when doing zerop, we should kill the process and start