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

Lines Matching +defs:find +defs:operation +defs:coding +defs:system

1 ;;; -*- mode: Emacs-Lisp; coding: iso-2022-7bit; -*-
62 ;; via CVS. You can find instructions about this at the following URL:
145 (unless (memq system-type '(cygwin windows-nt))
246 (if (memq system-type '(windows-nt))
615 See the variable `tramp-coding-commands' for details.
698 (let ((e-f (fboundp 'executable-find)))
701 ((and e-f (funcall 'executable-find "pscp"))
709 ((and e-f (funcall 'executable-find "scp"))
716 ;; Under Emacs 20, `executable-find' does not exists. So we
748 (unless (memq system-type '(windows-nt))
755 (unless (memq system-type '(windows-nt))
772 (unless (memq system-type '(windows-nt))
778 (unless (memq system-type '(windows-nt))
982 (defcustom tramp-operation-not-permitted-regexp
1443 (memq system-type '(hpux)))
1502 Please raise a bug report via \"M-x tramp-bug\" if your system needs
1510 ;; for an override of the system default.
1532 (t (error "Couldn't find an `md5' function")))
1704 on the remote file system.")
1860 # If we find one or two =, we have reached the end and
1897 "A list of file types returned from the `stat' system call.
1900 (defvar tramp-dos-coding-system
1901 (if (and (fboundp 'coding-system-p)
1902 (funcall 'coding-system-p '(dos)))
1905 "Some Emacsen know the `dos' coding system, others need `undecided-dos'.")
1921 ;; I use instead of find-operation-coding-system in XEmacs?
1923 (when (fboundp 'find-operation-coding-system)
1924 (let ((file-coding-system-alist '(("test" emacs-mule))))
1925 (funcall (symbol-function 'find-operation-coding-system)
1927 "Internal variable to say if `write-region' chooses the right coding.
1928 Older versions of Emacs chose the coding system for `write-region' based
1974 (find-backup-file-name . tramp-handle-find-backup-file-name)
2348 ;; file exists, find out stuff
2409 ;; if symlink, find out file name pointed to
2431 '(0 0) '(0 0) '(0 0) ;CCC how to find out?
2469 coding-system-used)
2474 (when (boundp 'last-coding-system-used)
2475 (setq coding-system-used (symbol-value 'last-coding-system-used)))
2490 (when (boundp 'last-coding-system-used)
2491 (set 'last-coding-system-used coding-system-used))
2826 ;; directories), and `find . -type d \! -name . -prune' to get a list
2923 ;; Otherwise, use tramp from local system.
2939 ;; Otherwise, use tramp from local system.
2953 OP must be `copy' or `rename' and indicates the operation to perform.
2964 (error "Unknown operation `%s', must be `copy' or `rename'" op))
3023 ;; file first. If the operation was `rename', we go
3057 First arg OP is either `copy' or `rename' and indicates the operation.
3071 (let ((coding-system-for-write 'binary)
3081 ;; If the operation was `rename', delete the original file.
3087 "Invokes `cp' or `mv' on the remote system.
3097 "Unknown operation `%s', must be `copy' or `rename'"
3112 (re-search-forward tramp-operation-not-permitted-regexp nil t))
3151 method (tramp-find-method
3171 method (tramp-find-method
3235 (when (and (fboundp 'executable-find)
3236 (not (executable-find copy-program)))
3237 (error "Cannot find copy program: %s" copy-program))
3265 ;; If the operation was `rename', delete the original file.
3323 ;; Wait for the remote system to return to us...
3534 locally on a remote file name. When the local system is a W32 system
3535 but the remote system is Unix, this introduces a superfluous drive
3566 ;; groks tilde expansion! The function `tramp-find-shell' is
3567 ;; supposed to find such a shell on the remote host. Please
3568 ;; tell me about it when this doesn't work on your system.
3581 (tramp-find-method multi-method method user host)))
3608 multi-method (or method (tramp-find-default-method user host))
3646 ;; for `find-grep-dired' and `find-name-dired' in Emacs 22.
3746 (error "Couldn't find exit status of `%s'" command))
3845 (let ((coding-system-for-write 'binary))
3856 (tramp-call-local-coding-command
3895 ;; jka-compr. By let-binding inhibit-file-name-operation, we
3896 ;; propagate that care to the file-local-copy operation.
3898 (let ((inhibit-file-name-operation
3899 (when (eq inhibit-file-name-operation
3903 coding-system-used result)
3912 ;; Now `last-coding-system-used' has right value. Remember it.
3913 (when (boundp 'last-coding-system-used)
3914 (setq coding-system-used (symbol-value 'last-coding-system-used)))
3919 (when (boundp 'last-coding-system-used)
3920 (set 'last-coding-system-used coding-system-used))
3925 (defun tramp-handle-find-backup-file-name (filename)
3926 "Like `find-backup-file-name' for tramp files."
3966 (tramp-run-real-handler 'find-backup-file-name (list filename)))))
4004 ;; it is not a magic file name operation (since Emacs 22).
4033 ;; XEmacs takes a coding system as the seventh argument, not `confirm'
4047 ;; We use this to save the value of `last-coding-system-used'
4049 ;; we set `last-coding-system-used' to this saved value.
4050 ;; This way, any intermediary coding systems used while
4053 coding-system-used
4070 ;; Now, `last-coding-system-used' has the right value. Remember it.
4071 (when (boundp 'last-coding-system-used)
4072 (setq coding-system-used (symbol-value 'last-coding-system-used)))
4123 (unless (equal 0 (tramp-call-local-coding-command
4179 ;; Make `last-coding-system-used' have the right value.
4180 (when (boundp 'last-coding-system-used)
4181 (set 'last-coding-system-used coding-system-used))
4190 ;; operation.
4204 ;; (defun tramp-run-real-handler (operation args)
4213 ;; (and (eq inhibit-file-name-operation operation)
4215 ;; (inhibit-file-name-operation operation))
4216 ;; (apply operation args)))
4219 (progn (defun tramp-run-real-handler (operation args)
4229 ,(and (eq inhibit-file-name-operation operation)
4231 (inhibit-file-name-operation operation))
4232 (apply operation args))))
4239 (progn (defun tramp-completion-run-real-handler (operation args)
4248 ,(and (eq inhibit-file-name-operation operation)
4250 (inhibit-file-name-operation operation))
4251 (apply operation args))))
4260 (defun tramp-file-name-for-operation (operation &rest args)
4265 ((member operation
4277 'file-writable-p 'find-backup-file-name 'find-file-noselect
4293 ((member operation
4306 ((eq operation 'write-region)
4309 ((member operation
4317 ((member operation
4327 (t (error "unknown file I/O primitive: %s" operation))))
4329 (defun tramp-find-foreign-file-name-handler (filename)
4345 (defun tramp-file-name-handler (operation &rest args)
4351 (let* ((filename (apply 'tramp-file-name-for-operation operation args))
4353 (foreign (tramp-find-foreign-file-name-handler filename)))
4358 ((and completion (memq operation '(expand-file-name)))
4359 (tramp-run-real-handler operation args))
4361 (memq operation '(file-exists-p file-directory-p)))
4364 (foreign (apply foreign operation args))
4366 (t (tramp-run-real-handler operation args)))))))
4378 ;; processing of a single file operation, so we need to allow
4396 (defun tramp-sh-file-name-handler (operation &rest args)
4407 (let ((fn (assoc operation tramp-file-name-handler-alist)))
4410 (tramp-run-real-handler operation args))))))
4414 (progn (defun tramp-completion-file-name-handler (operation &rest args)
4419 (let ((fn (assoc operation tramp-completion-file-name-handler-alist)))
4422 (tramp-completion-run-real-handler operation args)))))
4616 (m (tramp-find-method multi-method method user host))
5082 (eq (tramp-find-foreign-file-name-handler (buffer-file-name))
5086 (add-hook 'find-file-hooks 'tramp-set-auto-save t)
5089 (remove-hook 'find-file-hooks 'tramp-set-auto-save)))
5092 "Run `test' on the remote system, given a SWITCH and a FILENAME.
5103 "Run `test'-like PROGRAM on the remote system, given FILE1, FILE2.
5172 (let ((method (tramp-find-method multi-method method user host)))
5211 (let ((method (tramp-find-method multi-method method user host)))
5224 (defun tramp-find-executable (multi-method method user host
5287 (defun tramp-find-file-exists-command (multi-method method user host)
5306 ;; command we find that seems to work.
5331 (error "Couldn't find command to check if file exists"))))
5335 (defun tramp-find-shell (multi-method method user host)
5343 (or (tramp-find-executable multi-method method user host
5345 (tramp-find-executable multi-method method user host
5348 (error "Couldn't find a shell which groks tilde expansion"))
5364 60 "Couldn't find remote `%s' prompt" shell)
5410 ;; It would be better to use the CL function `find', but
5419 (defun tramp-find-ls-command (multi-method method user host)
5522 (if (re-search-forward tramp-operation-not-permitted-regexp nil t)
5705 (coding-system-for-read (unless (and (not (featurep 'xemacs))
5707 tramp-dos-coding-system))
5713 (tramp-find-method multi-method method user host)
5718 (tramp-find-method multi-method method user host)
5764 (tramp-find-method multi-method method user host)
5772 (tramp-find-method multi-method method user host)
5786 (coding-system-for-read (unless (and (not (featurep 'xemacs))
5788 tramp-dos-coding-system))
5822 (system-name))
5838 (coding-system-for-read (unless (and (not (featurep 'xemacs))
5840 tramp-dos-coding-system))
5846 (tramp-find-method multi-method method user host)
5853 (tramp-find-method multi-method method user host)
5903 (coding-system-for-read (unless (and (not (featurep 'xemacs))
5905 tramp-dos-coding-system))
5918 (error "Couldn't find local shell prompt"))
6017 This is needed in order to hide `last-coding-system-used', which is set
6019 (let (last-coding-system-used)
6176 ;; Try to set up the coding system correctly.
6180 (tramp-message 9 "Determining coding system")
6187 (let* ((cs (or (process-coding-system p) (cons 'undecided 'undecided)))
6194 (setq cs-encode (tramp-coding-system-change-eol-conversion
6197 (setq cs-decode (tramp-coding-system-change-eol-conversion
6199 (set-buffer-process-coding-system cs-decode cs-encode))
6202 ;; We have found a ^M but cannot frob the process coding system
6247 tries to find an `ls' command which groks the `-n' option, sets the
6257 (tramp-find-shell multi-method method user host)
6260 ;; output of (tramp-find-shell) to show up along with the output of
6261 ;; (tramp-find-ls-command) testing.
6264 ;; call in (tramp-find-shell) *should* make this not happen, I thought.
6266 ;; After much debugging I couldn't find any problem with the implementation
6272 (tramp-find-file-exists-command multi-method method user host)
6274 (setq tramp-ls-command (tramp-find-ls-command multi-method method user host))
6278 "Danger! Couldn't find ls which groks -n. Muddling through anyway")
6280 (tramp-find-executable multi-method method user host
6283 (error "Fatal error: Couldn't find remote executable `ls'"))
6309 ;; Does `test A -nt B' work? Use abominable `find' construct if it
6324 "test -n \"`find $1 -prune -newer $2 -print`\"" tramp-rsh-end-of-line
6335 (or (tramp-find-executable multi-method method user host
6337 (tramp-find-executable multi-method method user host
6375 (let ((ln (tramp-find-executable multi-method method user host
6391 (tramp-find-inline-encoding multi-method method user host))
6438 (defvar tramp-coding-commands
6457 "List of coding commands for inline transfer.
6479 (defun tramp-find-inline-encoding (multi-method method user host)
6481 Goes through the list `tramp-coding-commands'."
6482 (let ((commands tramp-coding-commands)
6525 (unless (zerop (tramp-call-local-coding-command
6532 (unless (zerop (tramp-call-local-coding-command
6540 ;; Did we find something? If not, issue error. If so,
6543 (error "Couldn't find an inline transfer encoding"))
6557 (defun tramp-call-local-coding-command (cmd input output)
6609 (tramp-find-method multi-method method user host)
6735 (error "Couldn't find exit status of `%s'" command))
7008 ;; Normal method. First, find out default method.
7020 (defun tramp-find-default-method (user host)
7033 (defun tramp-find-method (multi-method method user host)
7038 (or multi-method method (tramp-find-default-method user host)))
7119 (tramp-find-method multi-method method user host)
7130 (error "Couldn't find remote `ls' command")))
7144 (error "Couldn't find remote `test -e' command")))
7152 (error "Couldn't find remote `ln' command")))
7218 (assoc (tramp-find-method multi-method method user host)
7227 (defun tramp-exists-file-name-handler (operation &rest args)
7230 (check-file-name-operation operation)
7234 '(lambda (operation &rest args)
7236 (if (equal check-file-name-operation operation)
7237 operation
7239 (apply operation args))))))))
7240 (eq (apply operation args) operation)))
7340 (lhost (or host (tramp-file-name-host v) (system-name)))
7370 (defun tramp-coding-system-change-eol-conversion (coding-system eol-type)
7371 "Return a coding system like CODING-SYSTEM but with given EOL-TYPE.
7373 (cond ((fboundp 'coding-system-change-eol-conversion)
7374 (apply #'coding-system-change-eol-conversion
7375 (list coding-system eol-type)))
7376 ((fboundp 'subsidiary-coding-system)
7378 #'subsidiary-coding-system
7379 (list coding-system
7431 ;; kludges section, we bind `system-type' in such a way that
7443 (let ((system-type 'not-windows))
7469 ;; ;; not to call defadvice unless it's necessary. How do we find out whether
7480 ;; `find-file-wildcards' is non-nil, and then barfs because no
7558 tramp-coding-commands
7784 ;; * Separate local `tramp-coding-commands' from remote ones. Connect
7815 ;; * Test remote ksh or bash for tilde expansion in `tramp-find-shell'?
7846 ;; gets confused about the file locking status. Try to find out why
7863 ;; operating system (windows-nt) in `tramp-completion-function-alist'.