Variable: filesets-data

filesets-data is a customizable variable defined in filesets.el.gz.

Value

nil

Documentation

Fileset definitions.

A fileset is either a list of files, a file pattern, a base directory and a search pattern (for files), or a base file. Changes to this variable will take effect after rebuilding the menu.

Caveat: Fileset names have to be unique.

Example definition:
      '(("My Wiki"
(:ingroup "~/Etc/My-Wiki/WikiContents"))
("My Homepage"
(:pattern "~/public_html/" "^.+\\\\.html$")
(:open filesets-find-file))
("User Configuration"
(:files "~/.xinitrc"
"~/.bashrc"
"~/.bash_profile"))
("HOME"
(:tree "~" "^[^.].*[^~]$")
(:filter-dirs-flag t)))

filesets-data is a list of (NAME-AS-STRING . DEFINITION), DEFINITION being an association list with the fields:

:files FILE-1 .. FILE-N ... a list of files belonging to a fileset.

:ingroup FILE-NAME ... an inclusion group's base file.

:tree ROOT-DIR PATTERN ... a base directory and a file pattern.

:pattern DIR PATTERN ... a base directory and a regexp matching
                         files in that directory. Usually,
                         PATTERN has the form ^REGEXP$. Unlike
                         :tree, this form does not descend
                         recursively into subdirectories.

:filter-dirs-flag BOOLEAN ... is only used in conjunction with :tree.

:tree-max-level INTEGER ... recurse into directories this many levels
(see filesets-tree-max-level for a full explanation).

:dormant-flag BOOLEAN ... non-nil means don't show this item in the
menu; dormant filesets can still be manipulated via commands available from the minibuffer -- e.g. filesets-open, filesets-close, or filesets-run-cmd.

:dormant-p FUNCTION ... a function returning :dormant-flag.

:open FUNCTION ... the function used to open file belonging to this
fileset. The function takes a file name as argument.

:save FUNCTION ... the function used to save file belonging to this
fileset; it takes no arguments, but works on the current buffer.

Either :files, :pattern, :tree, or :ingroup must be supplied. :files overrules :tree, :tree overrules :pattern, :pattern overrules :ingroup, i.e. these tags are mutually exclusive. The fields :open and :save are optional.

In conjunction with the :tree tag, :save is void. :open refers to the function used for opening files in a directory, not for opening the directory. For browsing directories, filesets-browse-dir-function is used.

Before using :ingroup, make sure that the file type is already defined in filesets-ingroup-patterns.

Source Code

;; Defined in /usr/src/emacs/lisp/filesets.el.gz
(defcustom filesets-data nil
  "Fileset definitions.

A fileset is either a list of files, a file pattern, a base directory
and a search pattern (for files), or a base file.  Changes to this
variable will take effect after rebuilding the menu.

Caveat: Fileset names have to be unique.

Example definition:
      \\='((\"My Wiki\"
	 (:ingroup \"~/Etc/My-Wiki/WikiContents\"))
	(\"My Homepage\"
	 (:pattern \"~/public_html/\" \"^.+\\\\.html$\")
	 (:open filesets-find-file))
	(\"User Configuration\"
	 (:files \"~/.xinitrc\"
		 \"~/.bashrc\"
		 \"~/.bash_profile\"))
	(\"HOME\"
	 (:tree \"~\" \"^[^.].*[^~]$\")
	 (:filter-dirs-flag t)))

`filesets-data' is a list of (NAME-AS-STRING . DEFINITION), DEFINITION
being an association list with the fields:

:files FILE-1 .. FILE-N ... a list of files belonging to a fileset.

:ingroup FILE-NAME ... an inclusion group's base file.

:tree ROOT-DIR PATTERN ... a base directory and a file pattern.

:pattern DIR PATTERN ... a base directory and a regexp matching
                         files in that directory.  Usually,
                         PATTERN has the form `^REGEXP$'.  Unlike
                         :tree, this form does not descend
                         recursively into subdirectories.

:filter-dirs-flag BOOLEAN ... is only used in conjunction with :tree.

:tree-max-level INTEGER ... recurse into directories this many levels
\(see `filesets-tree-max-level' for a full explanation).

:dormant-flag BOOLEAN ... non-nil means don't show this item in the
menu; dormant filesets can still be manipulated via commands available
from the minibuffer -- e.g. `filesets-open', `filesets-close', or
`filesets-run-cmd'.

:dormant-p FUNCTION ... a function returning :dormant-flag.

:open FUNCTION ... the function used to open file belonging to this
fileset.  The function takes a file name as argument.

:save FUNCTION ... the function used to save file belonging to this
fileset; it takes no arguments, but works on the current buffer.

Either :files, :pattern, :tree, or :ingroup must be supplied.  :files
overrules :tree, :tree overrules :pattern, :pattern overrules :ingroup,
i.e. these tags are mutually exclusive.  The fields :open and :save are
optional.

In conjunction with the :tree tag, :save is void.  :open refers to the
function used for opening files in a directory, not for opening the
directory.  For browsing directories, `filesets-browse-dir-function'
is used.

Before using :ingroup, make sure that the file type is already
defined in `filesets-ingroup-patterns'."
  :set #'filesets-data-set-default
  :risky t
  :type '(repeat
	  (cons :tag "Fileset"
		(string :tag "Name" :value "")
		(repeat :tag "Data"
			(choice
			 :tag "Type" :value nil
			 (list :tag "Pattern"
			       :value (:pattern "~/"  "^.+\\.suffix$")
			       (const :format "" :value :pattern)
			       (directory :tag "Dir")
			       (regexp :tag "Pattern"))
			 (cons :tag "Files"
			       :value (:files)
			       (const :format "" :value :files)
			       (repeat :tag "Files" file))
			 (list :tag "Single File"
			       :value (:file "~/")
			       (const :format "" :value :file)
			       (file :tag "File"))
			 (list :tag "Inclusion group"
			       :value (:ingroup "~/")
			       (const :format "" :value :ingroup)
			       (file :tag "File" :value "~/"))
			 (list :tag "Directory Tree"
			       :value (:tree "~/"  "^.+\\.suffix$")
			       (const :format "" :value :tree)
			       (directory :tag "Dir")
			       (regexp :tag "Pattern"))
			 (list :tag "Filter directories"
			       :value (:filter-dirs-flag)
			       (const :format "" :value :filter-dirs-flag)
			       (boolean :tag "Boolean" :value nil))
			 (list :tag "Scanning depth"
			       :value (:tree-max-level 3)
			       (const :format "" :value :tree-max-level)
			       (integer :tag "Integer"))
			 (list :tag "Verbosity"
			       :value (:verbosity 1)
			       (const :format "" :value :verbosity)
			       (integer :tag "Integer"))
			 (list :tag "Conceal fileset (Flag)"
			       :value (:dormant-flag)
			       (const :format "" :value :dormant-flag)
			       (boolean :tag "Boolean"))
			 (list :tag "Conceal fileset (Function)"
			       :value (:dormant-p)
			       (const :format "" :value :dormant-p)
			       (function :tag "Function"))
			 (list :tag "Save function"
			       :value (:save)
			       (const :format "" :value :save)
			       (function :tag "Function"))
			 (list :tag "Open function"
			       :value (:open)
			       (const :format "" :value :open)
			       (function :tag "Function")))))))