• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.9.5/emacs-92/emacs/lisp/

Lines Matching +defs:find +defs:file +defs:other +defs:window

13 ;; This file is part of GNU Emacs.
26 ;; along with GNU Emacs; see the file COPYING. If not, write to the
70 ;; dired-find-subdir
72 ;; dired-local-variables-file
83 ;; To find out more about these variables, load this file, put your cursor at
89 ;; Function Found in this file of GNU Emacs
92 ;; dired-find-buffer-nocreate ../lisp/dired.el
132 `dired-advertised-find-file', will run rmail."
153 If neither nil nor t, e.g. the symbol `if-file-read-only', only
159 (other :tag "non-writable only" if-file-read-only))
188 (defcustom dired-find-subdir nil ; t is pretty near to DWIM...
190 If nil, Dired finds the directory as a subdirectory in some other buffer
215 a directory. See also `dired-local-variables-file'."
256 (define-key dired-mode-map "F" 'dired-do-find-marked-files)
273 [find-files]
276 dired-do-find-marked-files
337 (define-key global-map "\C-x4\C-j" 'dired-jump-other-window)))
350 \\[dired-info]\t-- run info on file
351 \\[dired-man]\t-- run man on file
352 \\[dired-do-find-marked-files]\t-- visit all marked files simultaneously
355 \\[dired-copy-filename-as-kill]\t-- copy the file or subdir names into the kill ring;
356 \t you can feed it to other commands using \\[yank]
369 `dired-find-subdir'
371 `dired-local-variables-file'
387 `dired-do-find-marked-files'"
400 "Clean up after a deleted file or directory FN.
406 ;; Offer to kill buffer of deleted file FN.
409 (let ((buf (get-file-buffer fn)))
413 (file-name-nondirectory fn)))
416 (let ((buf-list (dired-buffers-for-dir (expand-file-name fn)))
421 (file-name-nondirectory fn)))
454 ;;; Define some unpopular file extensions. Used for cleaning and omitting.
510 (defun dired-jump (&optional other-window)
512 If in a file, dired the current directory and move to file's line.
514 In case the proper dired file line cannot be found, refresh the dired
517 (let* ((file buffer-file-name)
518 (dir (if file (file-name-directory file) default-directory)))
522 (dired-up-directory other-window)
523 (or (dired-goto-file dir)
526 (dired-insert-subdir (file-name-directory dir))
527 (dired-goto-file dir))))
528 (if other-window
529 (dired-other-window dir)
531 (if file
532 (or (dired-goto-file file)
535 (dired-insert-subdir (file-name-directory file))
536 (dired-goto-file file))
541 (dired-goto-file file))))))))
543 (defun dired-jump-other-window ()
544 "Like \\[dired-jump] (`dired-jump') but in other window."
559 against the non-directory part of the file name. Set it to nil if you
560 need to match the entire file name.")
562 ;; \017=^O for Omit - other packages can chose other control characters.
565 Should never be used as marker by the user or other packages.")
646 REGEXP is matched against the entire file name.
679 (file-name-directory filename)))))))
683 ;; return file-exists-p
710 output file, for example one you got from an ftp server. With
711 ange-ftp, you can even dired a directory containing an ls-lR file,
712 visit that file and turn on virtual dired mode. But don't try to save
713 this file, as dired-virtual indents the listing and thus changes the
716 If you have save a Dired buffer in a file you can use \\[dired-virtual] to
732 ;; is no other way to get wildcards. Insert a `wildcard' line by
742 (setq dirname (expand-file-name (file-name-as-directory dirname)))
751 (setq dirname (expand-file-name wildcard default-directory))))
757 (directory-file-name (file-name-directory default-directory))
781 (file-name-as-directory dir)))
786 (file-name-directory
787 (directory-file-name
788 (file-name-as-directory
828 ;;; `default-directory', e.g., `find-file' and `compile'. This is a general
867 ;;; `dired-local-variables-file'
869 ;;; * Check if `dired-local-variables-file' is a non-nil string and is a
872 ;;; * If `dired-local-variables-file' satisfies the above, then temporarily
879 (defvar dired-local-variables-file (convert-standard-filename ".dired")
881 If this file found in current directory, then it will be inserted into dired
887 "Evaluate local variables in `dired-local-variables-file' for dired buffer."
888 (if (and dired-local-variables-file
889 (stringp dired-local-variables-file)
890 (file-exists-p dired-local-variables-file))
900 (insert-file-contents dired-local-variables-file))
902 (let ((buffer-file-name dired-local-variables-file))
906 ;; Delete this stuff: `eobp' is used to find last subdir by dired.el.
910 "Create `dired-local-variables-file' for omitting and reverts directory.
911 Sets `dired-omit-mode' to t in a local variables file that is readable by
914 (if (file-exists-p dired-local-variables-file)
915 (message "File `./%s' already exists." dired-local-variables-file)
917 ;; Create `dired-local-variables-file'.
922 (write-file dired-local-variables-file)
945 ;;; that matches the first file in the file list.
947 ;;; * If the REGEXP matches all the entries of the file list then evaluate
956 ;;; Guess what shell command to apply to a file.
973 (concat "mkdir " (file-name-sans-extension file)
975 (file-name-sans-extension file) " -xvf")
976 (concat "mkdir " (file-name-sans-extension file)
977 "; tar -C " (file-name-sans-extension file) " -xvf"))
1001 (concat "mkdir " (file-name-sans-extension file)
1003 (file-name-sans-extension file) " -zxvf")
1004 (concat "mkdir " (file-name-sans-extension file)
1006 (file-name-sans-extension file) " -xvf -"))
1018 '(concat "mkdir " (file-name-sans-extension file)
1020 (file-name-sans-extension file) " -xvf -")
1089 ;; Some other popular archivers.
1093 " -d " (file-name-sans-extension file)))
1154 (file (car files))
1158 ;; Find the first match in the alist for first file in FILES.
1163 (if (string-match regexp file)
1167 ;; If more than one file, see if all of FILES match regular expression.
1267 (setq file1 (expand-file-name file1)
1268 file2 (expand-file-name file2)
1271 ;; Find common initial file name components:
1289 ;; No common initial file name found
1304 (directory-file-name name1) ; must not link to foo/
1311 Otherwise make a relative symbolic link to the current file.
1318 foo -> /ugly/file/name/that/may/change/any/day/bar/foo
1340 ;;; `dired-do-find-marked-files' is bound to `F' by dired-x.el.
1345 ;;; * Pass FILE-LIST to `dired-simultaneous-find-file' all with
1346 ;;; `dired-do-find-marked-files''s prefix argument NOSELECT.
1348 ;;; * `dired-simultaneous-find-file' runs through FILE-LIST decrementing the
1351 ;;; * If NOSELECT is non-nil then just run `find-file-noselect' on each
1354 ;;; * If NOSELECT is nil then calculate the `size' of the window for each file
1355 ;;; by dividing the `window-height' by length of FILE-LIST. Thus, `size' is
1356 ;;; cognizant of the window-configuration.
1358 ;;; * If `size' is too small abort, otherwise run `find-file' on each element
1359 ;;; of FILE-LIST giving each a window of height `size'.
1361 (defun dired-do-find-marked-files (&optional noselect)
1363 With optional NOSELECT just find files but do not select them.
1365 The current window is split across all files marked, as evenly as possible.
1366 Remaining lines go to bottom-most window. The number of files that can be
1367 displayed this way is restricted by the height of the current window and
1368 `window-min-height'.
1370 To keep dired buffer displayed, type \\[split-window-vertically] first.
1371 To display just marked files, type \\[delete-other-windows] first."
1374 (dired-simultaneous-find-file (dired-get-marked-files) noselect))
1376 (defun dired-simultaneous-find-file (file-list noselect)
1379 The current window is split across all files in FILE-LIST, as evenly as
1380 possible. Remaining lines go to the bottom-most window. The number of
1382 current window and the variable `window-min-height'. With non-nil
1392 (find-file-noselect (car file-list))
1394 ;; We will have to select the buffer. Calculate and check window size.
1395 (setq size (/ (window-height) (length file-list)))
1396 (or (<= window-min-height size)
1398 (find-file (car file-list)))
1401 (setq file-list (cdr file-list))
1403 (while file-list
1407 (find-file-noselect (car file-list))
1409 ;; Vertically split off a window of desired size. Upper window will
1410 ;; have SIZE lines. Select lower (larger) window. We split it again.
1411 (select-window (split-window nil size))
1412 (find-file (car file-list)))
1415 (setq file-list (cdr file-list)))))
1424 "Run man on this file. Display old buffer if buffer name matches filename.
1428 (let* ((file (dired-get-filename))
1431 "Man command: " (list file)))))
1432 (Man-getpage-in-background file)))
1437 "Run info on this file."
1446 (defun vm-visit-folder (file &optional arg)
1450 "Run VM on this file.
1460 (t (vm-visit-folder fil (not (file-writable-p fil)))))
1465 "Run RMAIL on this file."
1482 (or (fboundp 'dired-old-find-buffer-nocreate)
1483 (fset 'dired-old-find-buffer-nocreate
1484 (symbol-function 'dired-find-buffer-nocreate)))
1487 ;;; Redefines dired.el's version of `dired-find-buffer-nocreate'
1488 (defun dired-find-buffer-nocreate (dirname &optional mode)
1489 (if (and dired-find-subdir
1490 ;; don't try to find a wildcard as a subdirectory
1491 (string-equal dirname (file-name-directory dirname)))
1494 (dired-buffers-for-dir (expand-file-name dirname))))
1503 (dired-old-find-buffer-nocreate dirname mode)))
1550 (if dired-find-subdir (dired-goto-subdir dirname)) ; new
1551 (if dired-trivial-filenames (dired-goto-next-nontrivial-file)))
1563 inode [integer] the inode of the file (only for ls -i output)
1564 s [integer] the size of the file for ls -s output
1566 mode [string] file permission bits, e.g. \"-rw-r--r--\"
1567 nlink [integer] number of links to file
1571 size [integer] file size in bytes
1573 name [string] the name of the file
1574 sym [string] if file is a symbolic link, the linked-to name, else \"\"
1595 ;; according to current file line. Returns t for success, nil if
1596 ;; there is no file line. Upon success, all variables are set, either
1650 (format "'%s file" predicate))))
1657 "*Non-nil means don't bind `dired-x-find-file' over `find-file' on keyboard.
1658 Similarly for `dired-x-find-file-other-window' over `find-file-other-window'.
1660 \\[dired-x-bind-find-file].")
1662 ;;; Bind `dired-x-find-file{-other-window}' over wherever
1663 ;;; `find-file{-other-window}' is bound?
1664 (defun dired-x-bind-find-file ()
1665 "Bind `dired-x-find-file' in place of `find-file' \(or reverse\).
1666 Similarly for `dired-x-find-file-other-window' and `find-file-other-window'.
1672 (not (y-or-n-p "Bind dired-x-find-file over find-file? "))))
1674 (substitute-key-definition 'find-file
1675 'dired-x-find-file
1677 (substitute-key-definition 'find-file-other-window
1678 'dired-x-find-file-other-window
1681 (substitute-key-definition 'dired-x-find-file
1682 'find-file
1684 (substitute-key-definition 'dired-x-find-file-other-window
1685 'find-file-other-window
1692 (dired-x-bind-find-file)
1693 (add-hook 'after-init-hook 'dired-x-bind-find-file)
1695 (defun dired-x-find-file (filename)
1696 "Edit file FILENAME.
1697 May create a new window, or reuse an existing one.
1700 Identical to `find-file' except when called interactively, with a prefix arg
1702 Useful for editing file mentioned in buffer you are viewing,
1703 or to test if that file exists. Use minibuffer after snatching filename."
1704 (interactive (list (read-filename-at-point "Find file: ")))
1705 (find-file (expand-file-name filename)))
1707 (defun dired-x-find-file-other-window (filename)
1708 "Edit file FILENAME, in another window.
1709 May create a new window, or reuse an existing one.
1712 Identical to `find-file-other-window' except when called interactively, with a
1714 Useful for editing file mentioned in buffer you are viewing,
1715 or to test if that file exists. Use minibuffer after snatching filename."
1716 (interactive (list (read-filename-at-point "Find file: ")))
1717 (find-file-other-window (expand-file-name filename)))
1756 (error "No file found around point!"))
1759 (expand-file-name (concat prefix (buffer-substring start (point)))))))
1766 (read-file-name prompt
1767 (file-name-directory guess)
1769 nil (file-name-nondirectory guess)))
1770 (read-file-name prompt default-directory)))
1790 'dired-find-subdir
1792 'dired-local-variables-file
1806 Send report on `dired-x-file' version `dired-x-version,' to