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

Lines Matching +defs:desktop +defs:buffer +defs:misc

157 This means: if there is a dired buffer displayed in the next window,
158 use its current subdir, instead of the current subdir of this dired buffer.
190 "This hook is run before a dired buffer is read in (created or reverted)."
197 with the buffer narrowed to the listing."
236 "Non-nil means Dired shrinks the display buffer to fit the marked files.")
245 Local to each dired buffer. May be a list, in which case the car is the
250 "The value of `dired-listing-switches' used to make this buffer's text.")
280 "Association list of subdirectories and their buffer positions.
282 The order of elements is the reverse of the order in the buffer.
288 (make-variable-buffer-local 'dired-switches-alist)
339 "Face used to highlight a part of a buffer that needs user attention."
343 "Face name used for a part of a buffer that needs user attention.")
455 `(let (buffer-read-only count)
486 redisplay the dired buffer after each file is processed.
489 Search starts at the beginning of the buffer, thus the car of the list
490 corresponds to the line nearest to the buffer's bottom. This
501 (let (buffer-read-only case-fold-search found results)
545 The list is in the same order as the buffer, that is, the car is the
608 If DIRNAME is already in a dired buffer, that buffer is used without refresh."
611 (switch-to-buffer (dired-noselect dirname switches)))
618 (switch-to-buffer-other-window (dired-noselect dirname switches)))
625 (switch-to-buffer-other-frame (dired-noselect dirname switches)))
629 "Like `dired' but returns the dired buffer as value, does not select it."
657 ;; the directory visited by the current dired buffer has changed on
666 (defun dired-buffer-stale-p (&optional noconfirm)
667 "Return non-nil if current dired buffer needs updating.
679 ;; If there is an existing dired buffer for DIRNAME, just leave
680 ;; buffer as it is (don't even call dired-revert).
684 ;; buffer's old value, so call dired-sort-other, which does
685 ;; revert the buffer.
688 ;; Optional argument MODE is passed to dired-find-buffer-nocreate,
691 buffer
692 ;; note that buffer already is in dired-mode, if found
693 new-buffer-p
694 (old-buf (current-buffer)))
698 ;; Look for an existing buffer.
699 (setq buffer (dired-find-buffer-nocreate dirname mode)
700 new-buffer-p (null buffer))
701 (or buffer
706 (setq buffer (create-file-buffer (directory-file-name dirname)))))
707 (set-buffer buffer)
708 (if (not new-buffer-p) ; existing buffer ...
718 "Directory has changed on disk; type \\[revert-buffer] to update Dired")))))
719 ;; Else a new buffer
730 ;; (buffer-local), so we can call dired-readin:
736 ;; Don't leave an empty buffer around in that case.
737 (if failed (kill-buffer buffer))))
740 (set-buffer old-buf)
741 buffer))
746 ;; killed buffer, it is removed from this list.
749 (defun dired-find-buffer-nocreate (dirname &optional mode)
754 (let (found (blist dired-buffers)) ; was (buffer-list)
757 (if (null (buffer-name (cdr (car blist))))
760 (set-buffer (cdr (car blist)))
775 ;; Read in a new dired buffer
778 "Read in a new dired buffer.
780 wildcards, erases the buffer, and builds the subdir-alist anew
781 \(including making it buffer-local and clearing it first)."
783 ;; default-directory and dired-actual-switches must be buffer-local
795 (if (consp buffer-undo-list)
796 (setq buffer-undo-list nil))
800 (let (buffer-read-only
802 (buffer-undo-list t))
804 (erase-buffer)
807 ;; Must first make alist buffer local and set it to nil because
814 (set-buffer-modified-p nil)
815 ;; No need to narrow since the whole buffer contains just
825 ;; already in dired-directory, assuming a clean buffer.
1030 ;; Reverting a dired buffer
1033 "Reread the dired buffer.
1038 (let ((modflag (buffer-modified-p))
1045 buffer-read-only)
1057 ;; ... run the hook for the whole buffer, and only after markers
1067 (unless modflag (restore-buffer-modified-p nil)))
1070 ;;; (setq buffer-read-only t)
1079 (let (buffer-read-only)
1222 (define-key map "g" 'revert-buffer)
1254 ;; misc
1263 (define-key map "\C-tj" 'image-dired-jump-thumbnail-buffer)
1329 (define-key map [menu-bar immediate revert-buffer]
1330 '(menu-item "Refresh" revert-buffer
1542 ;; Autoload cookie needed by desktop.el
1552 and insert subdirectories into the same buffer. You can \"mark\"
1569 (or dired it in another buffer, if it is a directory).
1571 Type \\[dired-maybe-insert-subdir] to Insert a subdirectory in this buffer.
1575 Type \\[revert-buffer] to read all currently expanded directories aGain.
1579 If Dired ever gets confused, you can either type \\[revert-buffer] \
1583 subdirectory, or type \\[dired-build-subdir-alist] to parse the buffer
1586 Customization variables (rename this buffer and type \\[describe-variable] on each line
1616 buffer-read-only t
1618 mode-line-buffer-identification
1619 (propertized-buffer-identification "%17b"))
1620 (set (make-local-variable 'revert-buffer-function)
1622 (set (make-local-variable 'buffer-stale-function)
1623 (function dired-buffer-stale-p))
1628 ;; list-buffers uses this to display the dir being edited in this buffer.
1637 (set (make-local-variable 'desktop-save-buffer)
1638 'dired-desktop-buffer-misc-data)
1658 "Undo in a dired buffer.
1659 This doesn't recover lost files, it just undoes changes in the buffer itself.
1662 (let (buffer-read-only)
1665 (message "Change in dired buffer undone.
1701 Find the parent directory either in this buffer or another buffer.
1702 Creates a buffer if necessary."
1707 ;; Only try dired-goto-subdir if buffer has more than one dir.
1729 (error "File no longer exists; type `g' to update dired buffer")))))
1742 "In Dired, visit this file or directory instead of the dired buffer."
1744 (set-buffer-modified-p nil)
1758 (set-buffer (window-buffer window))
1772 When file is a directory, show it in this buffer if it is inserted.
1773 Otherwise, display it in another buffer."
1790 (display-buffer (find-file-noselect (dired-get-file-for-visit))))
1800 it occurs in the buffer, and a value of t means construct name relative to
1810 (if (setq file (and p1 p2 (buffer-substring p1 p2)))
1911 ;;; Functions for finding the file name in a dired buffer line.
2013 With \\[universal-argument], use the file name relative to the dired buffer's
2047 ;; The list is in reverse order of buffer creation, most recent last.
2055 (if (buffer-name buf)
2057 (with-current-buffer buf
2066 ;; else buffer is killed - clean up:
2111 (if (memq (current-buffer) (dired-buffers-for-dir expanded-default))
2114 (cons (cons expanded-default (current-buffer))
2118 ;; Remove DIR from the buffer alist in variable dired-buffers.
2119 ;; This has the effect of removing any buffer whose main directory is DIR.
2121 ;; Removing is also done as a side-effect in dired-buffer-for-dir.
2202 "Build `dired-subdir-alist' by parsing the buffer.
2210 (buffer-read-only nil)
2211 (buffer-undo-list t)
2233 (buffer-substring-no-properties (point) (match-end 1))
2253 ;; We don't need to sort it because it is in buffer order per
2280 "Go to line describing file FILE in this dired buffer."
2284 ;; either inserts "?" or "\\007" into the buffer, so we won't find
2285 ;; it in the buffer.
2353 ;; probably because called in a non-dired buffer
2354 (error "No subdir-alist in %s" (current-buffer))))
2368 ;; before the beginning of the next header line (or end of buffer).
2460 ;; L is an alist of files to delete, with their buffer positions.
2463 ;; (car L) *must* be the *last* (bottommost) file in the dired buffer.
2464 ;; That way as changes are made in the buffer they do not shift the
2480 (let (buffer-read-only)
2506 ;; If the buffer has a wildcard pattern, check that it matches FILE.
2513 (with-current-buffer buf
2515 (setq success-list (cons (buffer-name buf) success-list)))))
2522 (let (buffer-read-only)
2558 (defun dired-pop-to-buffer (buf)
2559 ;; Pop up buffer BUF.
2562 (pop-to-buffer (get-buffer-create buf))
2577 (set-buffer buf)
2586 (setq w2 (display-buffer buf))
2591 (set-window-buffer w2 buf)
2614 Displays the file names in a buffer named BUFNAME;
2616 This uses function `dired-pop-to-buffer' to do that.
2631 (with-current-buffer (get-buffer-create bufname)
2632 (erase-buffer)
2640 (dired-pop-to-buffer bufname)
2645 ;; i.e., (car files) = first file in buffer.
2704 "Move to the next marked file, wrapping around the end of the buffer."
2721 "Move to the previous marked file, wrapping around the end of the buffer."
2735 (let (buffer-read-only)
2760 (let (buffer-read-only)
2795 (let (buffer-read-only)
2852 (let ((prebuf (get-file-buffer fn)))
2857 (with-current-buffer prebuf
2861 (with-temp-buffer
2976 (buffer-read-only))
2988 "Remove all marks from all files in the dired buffer."
3001 buffer-read-only case-fold-search query
3025 (defvar dired-log-buffer "*Dired log*")
3028 "Pop up a buffer with error log output from Dired.
3032 (if (get-buffer dired-log-buffer)
3034 (window (display-buffer (get-buffer dired-log-buffer))))
3045 ;; Log a message or the contents of a buffer.
3049 ;; this inserts the current time and buffer at the start of the page,
3051 (let ((obuf (current-buffer)))
3052 (with-current-buffer (get-buffer-create dired-log-buffer)
3060 (insert-buffer-substring log))
3066 "\tBuffer `" (buffer-name obuf) "'\n")
3071 "State a summary of a command's failures, in echo area and log buffer.
3077 (with-current-buffer dired-log-buffer
3081 (buffer-substring (point) (point-max))))
3117 The idea is to set this buffer-locally in special dired buffers.")
3138 "Toggle between sort by date/name and refresh the dired buffer.
3142 (error "Cannot sort this dired buffer"))
3149 ;; Toggle between sort by date/name. Reverts the buffer.
3169 (revert-buffer))
3185 "Specify new `ls' SWITCHES for current dired buffer.
3192 (or no-revert (revert-buffer)))
3196 (make-variable-buffer-local 'dired-subdir-alist-pre-R)
3318 (eval-when-compile (require 'desktop))
3320 (defun dired-desktop-buffer-misc-data (desktop-dirname)
3321 "Auxiliary information to be saved in desktop file."
3326 (cons (desktop-file-name (car dired-directory) desktop-dirname)
3329 (desktop-file-name dired-directory desktop-dirname))
3334 (function (lambda (f) (desktop-file-name (car f) desktop-dirname)))
3337 (defun dired-restore-desktop-buffer (desktop-buffer-file-name
3338 desktop-buffer-name
3339 desktop-buffer-misc)
3340 "Restore a dired buffer specified in a desktop file."
3341 ;; First element of `desktop-buffer-misc' is the value of `dired-directory'.
3344 (let* ((dired-dir (car desktop-buffer-misc))
3349 ;; The following elements of `desktop-buffer-misc' are the keys
3351 (mapcar 'dired-maybe-insert-subdir (cdr desktop-buffer-misc))
3352 (current-buffer))
3354 (when desktop-missing-file-warning (sit-for 1))
3357 (add-to-list 'desktop-buffer-mode-handlers
3358 '(dired-mode . dired-restore-desktop-buffer))