File: files.el.html

Defines most of Emacs's file- and directory-handling functions, including basic file visiting, backup generation, link handling, ITS-id version control, load- and write-hook handling, and the like.

Defined variables (138)

abbreviated-home-dirRegexp matching the user’s homedir at the beginning of file name.
after-revert-hookNormal hook for ‘revert-buffer’ to run after reverting.
after-save-hookNormal hook that is run after a buffer is saved to its file.
after-set-visited-file-name-hookNormal hook run just after setting visited file name of current buffer.
auto-mode-alistAlist of file name patterns vs corresponding major mode functions.
auto-mode-case-foldNon-nil means to try second pass through ‘auto-mode-alist’.
auto-mode-interpreter-regexpRegexp matching interpreters, for file mode determination.
auto-save--timerTimer for ‘auto-save-visited-mode’.
auto-save-defaultNon-nil says by default do auto-saving of every file-visiting buffer.
auto-save-file-name-transformsTransforms to apply to buffer file name before making auto-save file name.
auto-save-hookNormal hook run just before auto-saving.
auto-save-visited-intervalInterval in seconds for ‘auto-save-visited-mode’.
auto-save-visited-modeNon-nil if Auto-Save-Visited mode is enabled.
auto-save-visited-mode-hookHook run after entering or leaving ‘auto-save-visited-mode’.
auto-save-visited-predicatePredicate function for ‘auto-save-visited-mode’.
backup-by-copyingNon-nil means always use copying to create backup files.
backup-by-copying-when-linkedNon-nil means use copying to create backups for files with multiple names.
backup-by-copying-when-mismatchNon-nil means create backups by copying if this preserves owner or group.
backup-by-copying-when-privileged-mismatchNon-nil means create backups by copying to preserve a privileged owner.
backup-directory-alistAlist of file name patterns and backup directory names.
backup-enable-predicatePredicate that looks at a file name and decides whether to make backups.
backup-inhibitedIf non-nil, backups will be inhibited.
before-hack-local-variables-hookNormal hook run before setting file-local variables.
before-revert-hookNormal hook for ‘revert-buffer’ to run before reverting.
before-save-hookNormal hook that is run before a buffer is saved to its file.
break-hardlink-on-saveWhether to allow breaking hardlinks when saving files.
buffer-auto-revert-by-notificationWhether a buffer can rely on notification in Auto-Revert mode.
buffer-file-numberThe inode number and the device of the file visited in the current buffer.
buffer-file-numbers-uniqueNon-nil means that ‘buffer-file-number’ uniquely identifies files.
buffer-file-read-onlyNon-nil if visited file was read-only when visited.
buffer-offer-saveNon-nil in a buffer means always offer to save buffer on exiting Emacs.
buffer-save-without-queryNon-nil means ‘save-some-buffers’ should save this buffer without asking.
buffer-stale-functionFunction to check whether a buffer needs reverting.
byte-count-to-string-functionFunction that turns a number of bytes into a human-readable string.
cache-long-line-scansNon-nil means that Emacs should use caches in attempt to speedup buffer scans.
cd-pathValue of the CDPATH environment variable, as a list.
change-major-mode-with-file-nameNon-nil means C-x C-w should set the major mode from the file name.
confirm-kill-emacsHow to ask for confirmation when leaving Emacs.
confirm-kill-processesNon-nil if Emacs should confirm killing processes on exit.
confirm-nonexistent-file-or-bufferWhether confirmation is requested before visiting a new file or buffer.
copy-directory-create-symlinkThis option influences the handling of symbolic links in ‘copy-directory’.
delete-old-versionsIf t, delete excess backup versions silently.
dir-local-variables-alistAlist of directory-local variable settings in the current buffer.
dir-locals-class-alistAlist mapping directory-local variable classes (symbols) to variable lists.
dir-locals-directory-cacheList of cached directory roots for directory-local variable classes.
dir-locals-fileFile that contains directory-local variables.
directory-abbrev-alistAlist of abbreviations for file directories.
directory-files-no-dot-files-regexpRegexp matching any file name except "." and "..".
directory-free-space-argsOptions to use when running ‘directory-free-space-program’.
directory-free-space-programProgram to get the amount of free space on a file system.
directory-listing-before-filename-regexpRegular expression to match up to the file name in a directory listing.
dired-kept-versionsWhen cleaning directory, number of versions to keep.
enable-dir-local-variablesNon-nil means enable use of directory-local variables.
enable-local-evalControl processing of the "variable" ‘eval’ in a file’s local variables.
enable-local-variablesControl use of local variables in files you visit.
enable-remote-dir-localsNon-nil means dir-local variables will be applied to remote files.
file-auto-mode-skipRegexp of lines to skip when looking for file-local settings.
file-has-changed-p--hash-tableInternal variable used by ‘file-has-changed-p’.
file-local-variables-alistAlist of file-local variable settings in the current buffer.
file-name-at-point-functionsList of functions to try in sequence to get a file name at point.
file-name-historyHistory list of file names entered in the minibuffer.
file-name-invalid-regexpRegexp recognizing file names that aren’t allowed by the filesystem.
file-name-version-regexpRegular expression matching the backup/version part of a file name.
file-precious-flagNon-nil means protect against I/O errors while saving files.
file-preserve-symlinks-on-saveIf non-nil, saving a buffer visited via a symlink won’t overwrite the symlink.
find-directory-functionsList of functions to try in sequence to visit a directory.
find-file-existing-other-nameNon-nil means find a file under alternative names, in existing buffers.
find-file-hookList of functions to be called after a buffer is loaded from a file.
find-file-hooksList of functions to be called after a buffer is loaded from a file.
find-file-literallyNon-nil if this buffer was made by ‘find-file-literally’ or equivalent.
find-file-not-found-functionsList of functions to be called for ‘find-file’ on nonexistent file.
find-file-run-diredNon-nil means allow ‘find-file’ to visit directories.
find-file-suppress-same-file-warningsNon-nil means suppress warning messages for symlinked files.
find-file-visit-truenameNon-nil means visiting a file uses its truename as the visited-file name.
find-file-wildcardsNon-nil means file-visiting commands should handle wildcards.
find-sibling-rulesRules for finding "sibling" files.
hack-local-variables-hookNormal hook run after processing a file’s local variables specs.
ignored-local-variable-valuesList of variable-value pairs that should always be ignored.
ignored-local-variablesVariables to be ignored in a file’s local variable spec.
inhibit-local-variables-ignore-caseNon-nil means ‘inhibit-local-variables-p’ ignores case.
inhibit-local-variables-regexpsList of regexps matching file names in which to ignore local variables.
inhibit-local-variables-suffixesList of regexps matching suffixes to remove from file names.
insert-directory-programAbsolute or relative name of the ‘ls’-like program.
interpreter-mode-alistAlist mapping interpreter names to major modes.
kept-new-versionsNumber of newest versions to keep when a new numbered backup is made.
kept-old-versionsNumber of oldest versions to keep when a new numbered backup is made.
kill-buffer-hookHook run when a buffer is killed.
kill-emacs-query-functionsFunctions to call with no arguments to query about killing Emacs.
large-file-warning-thresholdMaximum size of file above which a confirmation is requested.
list-directory-brief-switchesSwitches for ‘list-directory’ to pass to ‘ls’ for brief listing.
list-directory-verbose-switchesSwitches for ‘list-directory’ to pass to ‘ls’ for verbose listing.
local-enable-local-variablesLike ‘enable-local-variables’, except for major mode in a -*- line.
locate-dominating-stop-dir-regexpRegexp of directory names that stop the search in ‘locate-dominating-file’.
lock-file-modeNon-nil if Lock-File mode is enabled.
lock-file-mode-hookHook run after entering or leaving ‘lock-file-mode’.
lock-file-name-transformsTransforms to apply to buffer file name before making a lock file name.
magic-fallback-mode-alistLike ‘magic-mode-alist’ but has lower priority than ‘auto-mode-alist’.
magic-mode-alistAlist of buffer beginnings vs. corresponding major mode functions.
magic-mode-regexp-match-limitUpper limit on ‘magic-mode-alist’ regexp matches.
major-mode-remap-alistAlist mapping file-specified mode to actual mode.
make-backup-file-name-functionA function that ‘make-backup-file-name’ uses to create backup file names.
make-backup-filesNon-nil means make a backup of a file the first time it is saved.
mode-require-final-newlineWhether to add a newline at end of file, in certain major modes.
mounted-file-systemsFile systems that ought to be mounted.
null-deviceThe system null device.
out-of-memory-warning-percentageWarn if file size exceeds this percentage of available free memory.
permanently-enabled-local-variablesA list of file-local variables that are always enabled.
query-about-changed-fileIf non-nil, query the user when re-visiting a file that has changed.
remote-file-name-inhibit-auto-save-visitedWhen nil, ‘auto-save-visited-mode’ will auto-save remote files.
remote-file-name-inhibit-cacheWhether to use the remote file-name cache for read access.
remote-file-name-inhibit-locksWhether to use file locks for remote files.
remote-shell-programProgram to use to execute commands on a remote host (i.e. ssh).
require-final-newlineWhether to add a newline automatically at the end of the file.
revert-buffer-functionFunction to use to revert this buffer.
revert-buffer-in-progress-pNon-nil if a ‘revert-buffer’ operation is in progress, nil otherwise.
revert-buffer-insert-file-contents-functionFunction to use to insert contents when reverting this buffer.
revert-buffer-quick-short-answersHow much confirmation to be done by the ‘revert-buffer-quick’ command.
revert-buffer-with-fine-grain-max-secondsMaximum time that ‘revert-buffer-with-fine-grain’ should use.
revert-without-querySpecify which files should be reverted without query.
safe-local-eval-formsExpressions that are considered safe in an ‘eval:’ local variable.
safe-local-variable-valuesList of variable-value pairs that are considered safe.
save-abbrevsNon-nil means save word abbrevs too when files are saved.
save-buffer-coding-systemIf non-nil, use this coding system for saving the buffer.
save-silentlyIf non-nil, avoid messages when saving files.
save-some-buffers-action-alistACTION-ALIST argument used in call to ‘map-y-or-n-p’.
save-some-buffers-default-predicateDefault predicate for ‘save-some-buffers’.
save-some-buffers-functionsFunctions to be run by ‘save-some-buffers’ after saving the buffers.
set-auto-mode--lastRemember the mode we have set via ‘set-auto-mode-0’.
small-temporary-file-directoryThe directory for writing small temporary files.
trash-directoryDirectory for ‘move-file-to-trash’ to move files and directories to.
untrusted-contentNon-nil means that current buffer originated from an untrusted source.
user-emacs-directory-warningNon-nil means warn if unable to access or create ‘user-emacs-directory’.
version-controlControl use of version numbers for backup files.
view-read-onlyNon-nil means buffers visiting files read-only do so in view mode.
write-contents-functionsList of functions to be called before writing out a buffer to a file.
write-contents-hooksList of functions to be called before writing out a buffer to a file.
write-file-functionsList of functions to be called before saving a buffer to a file.
write-file-hooksList of functions to be called before saving a buffer to a file.

Defined functions (206)

abbreviate-file-name(FILENAME)
abort-if-file-too-large(SIZE OP-TYPE FILENAME &optional OFFER-RAW)
after-find-file(&optional ERROR WARN NOAUTO AFTER-FIND-FILE-FROM-REVERT-BUFFER NOMODES)
ange-ftp-completion-hook-function(OP &rest ARGS)
append-to-file(START END FILENAME)
auto-save-file-name-p(FILENAME)
auto-save-visited-mode(&optional ARG)
backup-buffer()
backup-buffer-copy(FROM-NAME TO-NAME MODES EXTENDED-ATTRIBUTES)
backup-extract-version(FN)
backup-file-name-p(FILE)
basic-save-buffer(&optional CALLED-INTERACTIVELY)
buffer-stale--default-function(&optional NOCONFIRM)
cd(DIR)
cd-absolute(DIR)
clear-visited-file-modtime()
conf-mode-maybe()
confirm-nonexistent-file-or-buffer()
convert-standard-filename(FILENAME)
copy-directory(DIRECTORY NEWNAME &optional KEEP-TIME PARENTS COPY-CONTENTS)
create-file-buffer(FILENAME)
delete-auto-save-file-if-necessary(&optional FORCE)
delete-directory(DIRECTORY &optional RECURSIVE TRASH)
dir-locals--all-files(DIRECTORY)
dir-locals--get-sort-score(NODE)
dir-locals--sort-variables(VARIABLES)
dir-locals-collect-mode-variables(MODE-VARIABLES VARIABLES)
dir-locals-collect-variables(CLASS-VARIABLES ROOT VARIABLES &optional PREDICATE)
dir-locals-find-file(FILE)
dir-locals-get-class-variables(CLASS)
dir-locals-read-from-dir(DIR)
dir-locals-read-from-file(DIR)
dir-locals-set-class-variables(CLASS VARIABLES)
dir-locals-set-directory-class(DIRECTORY CLASS &optional MTIME)
directory-abbrev-apply(FILENAME)
directory-abbrev-make-regexp(DIRECTORY)
directory-empty-p(DIR)
directory-files-recursively(DIR REGEXP &optional INCLUDE-DIRECTORIES PREDICATE FOLLOW-SYMLINKS)
exec-path()
executable-find(COMMAND &optional REMOTE)
file-attribute-access-time(ATTRIBUTES)
file-attribute-collect(ATTRIBUTES &rest ATTR-NAMES)
file-attribute-device-number(ATTRIBUTES)
file-attribute-file-identifier(ATTRIBUTES)
file-attribute-group-id(ATTRIBUTES)
file-attribute-inode-number(ATTRIBUTES)
file-attribute-link-number(ATTRIBUTES)
file-attribute-modes(ATTRIBUTES)
file-attribute-modification-time(ATTRIBUTES)
file-attribute-size(ATTRIBUTES)
file-attribute-status-change-time(ATTRIBUTES)
file-attribute-type(ATTRIBUTES)
file-attribute-user-id(ATTRIBUTES)
file-backup-file-names(FILENAME)
file-chase-links(FILENAME &optional LIMIT)
file-equal-p(FILE1 FILE2)
file-expand-wildcards(PATTERN &optional FULL REGEXP)
file-extended-attributes(FILENAME)
file-has-changed-p(FILE &optional TAG)
file-in-directory-p(FILE DIR)
file-local-copy(FILE)
file-local-name(FILE)
file-modes-char-to-right(CHAR &optional FROM)
file-modes-char-to-who(CHAR)
file-modes-number-to-symbolic(MODE &optional FILETYPE)
file-modes-rights-to-number(RIGHTS WHO-MASK &optional FROM)
file-modes-symbolic-to-number(MODES &optional FROM)
file-name-base(FILENAME)
file-name-extension(FILENAME &optional PERIOD)
file-name-history--add(FILE)
file-name-non-special(OPERATION &rest ARGUMENTS)
file-name-parent-directory(FILENAME)
file-name-quote(NAME &optional TOP)
file-name-quoted-p(NAME &optional TOP)
file-name-sans-extension(FILENAME)
file-name-sans-versions(NAME &optional KEEP-BACKUP-VERSION)
file-name-split(FILENAME)
file-name-unquote(NAME &optional TOP)
file-name-with-extension(FILENAME EXTENSION)
file-newest-backup(FILENAME)
file-nlinks(FILENAME)
file-ownership-preserved-p(FILE &optional GROUP)
file-relative-name(FILENAME &optional DIRECTORY)
file-remote-p(FILE &optional IDENTIFICATION CONNECTED)
file-size-human-readable(FILE-SIZE &optional FLAVOR SPACE UNIT)
file-size-human-readable-iec(SIZE)
file-truename(FILENAME)
files--ask-user-about-large-file(SIZE OP-TYPE FILENAME OFFER-RAW)
files--ask-user-about-large-file-help-text(OP-TYPE SIZE)
files--buffers-needing-to-be-saved(PRED)
files--ensure-directory(MKDIR DIR)
files--force(NO-SUCH FN &rest ARGS)
files--make-magic-temp-file(ABSOLUTE-PREFIX &optional DIR-FLAG SUFFIX TEXT)
files--message(FORMAT &rest ARGS)
files--name-absolute-system-p(FILE)
files--splice-dirname-file(DIRNAME FILE)
files--transform-file-name(FILENAME TRANSFORMS PREFIX SUFFIX)
find-alternate-file(FILENAME &optional WILDCARDS)
find-alternate-file-other-window(FILENAME &optional WILDCARDS)
find-backup-file-name(FN)
find-buffer-visiting(FILENAME &optional PREDICATE)
find-file(FILENAME &optional WILDCARDS)
find-file--read-only(FUN FILENAME WILDCARDS)
find-file-existing(FILENAME)
find-file-literally(FILENAME)
find-file-noselect(FILENAME &optional NOWARN RAWFILE WILDCARDS)
find-file-noselect-1(BUF FILENAME NOWARN RAWFILE TRUENAME NUMBER)
find-file-other-frame(FILENAME &optional WILDCARDS)
find-file-other-window(FILENAME &optional WILDCARDS)
find-file-read-args(PROMPT MUSTMATCH)
find-file-read-only(FILENAME &optional WILDCARDS)
find-file-read-only-other-frame(FILENAME &optional WILDCARDS)
find-file-read-only-other-window(FILENAME &optional WILDCARDS)
find-sibling-file(FILE)
find-sibling-file-search(FILE &optional RULES)
get-free-disk-space(DIR)
hack-dir-local--get-variables(PREDICATE)
hack-dir-local-variables()
hack-dir-local-variables-non-file-buffer()
hack-local-variables(&optional HANDLE-MODE INHIBIT-LOCALS)
hack-local-variables--find-variables(&optional HANDLE-MODE)
hack-local-variables-apply()
hack-local-variables-confirm(ALL-VARS UNSAFE-VARS RISKY-VARS DIR-NAME)
hack-local-variables-filter(VARIABLES DIR-NAME)
hack-local-variables-prop-line(&optional HANDLE-MODE)
hack-one-local-variable(VAR VAL)
hack-one-local-variable--obsolete(VAR)
hack-one-local-variable-constantp(EXP)
hack-one-local-variable-eval-safep(EXP)
hack-one-local-variable-quotep(EXP)
inhibit-local-variables-p()
insert-directory(FILE SWITCHES &optional WILDCARD FULL-DIRECTORY-P)
insert-directory-adj-pos(POS ERROR-LINES)
insert-directory-clean(BEG SWITCHES)
insert-directory-safely(FILE SWITCHES &optional WILDCARD FULL-DIRECTORY-P)
insert-directory-wildcard-in-dir-p(DIR)
insert-file(FILENAME)
insert-file-1(FILENAME INSERT-FUNC)
insert-file-contents-literally(FILENAME &optional VISIT BEG END REPLACE)
insert-file-literally(FILENAME)
kill-buffer-ask(BUFFER)
kill-matching-buffers(REGEXP &optional INTERNAL-TOO NO-ASK)
kill-some-buffers(&optional LIST)
list-directory(DIRNAME &optional VERBOSE)
load-file(FILE)
load-library(LIBRARY)
locate-dominating-file(FILE NAME)
locate-file(FILENAME PATH &optional SUFFIXES PREDICATE)
locate-file-completion-table(DIRS SUFFIXES STRING PRED ACTION)
locate-user-emacs-file(NEW-NAME &optional OLD-NAME)
lock-file-mode(&optional ARG)
make-auto-save-file-name()
make-backup-file-name(FILE)
make-backup-file-name--default-function(FILE)
make-backup-file-name-1(FILE)
make-directory(DIR &optional PARENTS)
make-empty-file(FILENAME &optional PARENTS)
make-lock-file-name(FILENAME)
make-nearby-temp-file(PREFIX &optional DIR-FLAG SUFFIX)
make-temp-file(PREFIX &optional DIR-FLAG SUFFIX TEXT)
minibuffer-with-setup-hook(FUN &rest BODY)
move-file-to-trash(FILENAME)
normal-backup-enable-predicate(NAME)
normal-mode(&optional FIND-FILE)
not-modified(&optional ARG)
parse-colon-path(SEARCH-PATH)
prune-directory-list(DIRS &optional KEEP REJECT)
pwd(&optional INSERT)
read-directory-name(PROMPT &optional DIR DEFAULT-DIRNAME MUSTMATCH INITIAL)
read-file-modes(&optional PROMPT ORIG-FILE)
recode-file-name(FILE CODING NEW-CODING &optional OK-IF-ALREADY-EXISTS)
recover-file(FILE)
recover-session()
recover-session-finish()
recover-this-file()
rename-auto-save-file()
rename-uniquely()
rename-visited-file(NEW-LOCATION)
report-errors(FORMAT &rest BODY)
restart-emacs()
revert-buffer(&optional IGNORE-AUTO NOCONFIRM PRESERVE-MODES)
revert-buffer--default(IGNORE-AUTO NOCONFIRM)
revert-buffer-insert-file-contents--default-function(FILE-NAME AUTO-SAVE-P)
revert-buffer-insert-file-contents-delicately(FILE-NAME AUTO-SAVE-P)
revert-buffer-quick(&optional AUTO-SAVE)
revert-buffer-with-fine-grain(&optional IGNORE-AUTO NOCONFIRM)
risky-local-variable-p(SYM &optional IGNORED)
safe-local-variable-p(SYM VAL)
save-buffer(&optional ARG)
save-buffers-kill-emacs(&optional ARG RESTART)
save-buffers-kill-terminal(&optional ARG)
save-some-buffers(&optional ARG PRED)
save-some-buffers-root()
set-auto-mode(&optional KEEP-MODE-IF-SAME)
set-auto-mode--apply-alist(ALIST KEEP-MODE-IF-SAME DIR-LOCAL)
set-auto-mode--dir-local-valid-p(MODE)
set-auto-mode-0(MODE &optional KEEP-MODE-IF-SAME)
set-auto-mode-1()
set-file-extended-attributes(FILENAME ATTRIBUTES)
set-visited-file-name(FILENAME &optional NO-QUERY ALONG-WITH-FILE)
shell-quote-wildcard-pattern(PATTERN)
temporary-file-directory()
version-control-safe-local-p(X)
warn-maybe-out-of-memory(SIZE)
wildcard-to-regexp(WILDCARD)
write-file(FILENAME &optional CONFIRM)

Defined faces (0)