mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-03 10:31:37 -08:00
Add new user option project-vc-include-untracked
* doc/emacs/maintaining.texi (Projects): Document it. * lisp/progmodes/project.el (project--vc-list-files): Use it.
This commit is contained in:
parent
db82347269
commit
526971df64
3 changed files with 19 additions and 5 deletions
|
|
@ -1666,6 +1666,9 @@ support additional types of projects.
|
||||||
Which files do or don't belong to a project is also determined by
|
Which files do or don't belong to a project is also determined by
|
||||||
the project back-end. For example, the VC back-end doesn't consider
|
the project back-end. For example, the VC back-end doesn't consider
|
||||||
``ignored'' files (@pxref{VC Ignore}) to be part of the project.
|
``ignored'' files (@pxref{VC Ignore}) to be part of the project.
|
||||||
|
Also, the VC Project back-end considers ``untracked'' files by default.
|
||||||
|
That behavior is controllable with the variable
|
||||||
|
@code{project-vc-include-untracked}.
|
||||||
|
|
||||||
@menu
|
@menu
|
||||||
* Project File Commands:: Commands for handling project files.
|
* Project File Commands:: Commands for handling project files.
|
||||||
|
|
|
||||||
5
etc/NEWS
5
etc/NEWS
|
|
@ -1717,6 +1717,11 @@ Enabling this minor mode turns on hiding header material, like
|
||||||
'elide-head' does; disabling it shows the header. The commands
|
'elide-head' does; disabling it shows the header. The commands
|
||||||
'elide-head' and 'elide-head-show' are now obsolete.
|
'elide-head' and 'elide-head-show' are now obsolete.
|
||||||
|
|
||||||
|
+++
|
||||||
|
*** New user option 'project-vc-include-untracked'.
|
||||||
|
If non-nil, files untracked by a VCS are considered to be part of
|
||||||
|
the project by a VC project based on that VCS.
|
||||||
|
|
||||||
---
|
---
|
||||||
** The autoarg.el library is now marked obsolete.
|
** The autoarg.el library is now marked obsolete.
|
||||||
This library provides the 'autoarg-mode' and 'autoarg-kp-mode' minor
|
This library provides the 'autoarg-mode' and 'autoarg-kp-mode' minor
|
||||||
|
|
|
||||||
|
|
@ -382,6 +382,11 @@ you might have to restart Emacs to see the effect."
|
||||||
:package-version '(project . "0.2.0")
|
:package-version '(project . "0.2.0")
|
||||||
:safe #'booleanp)
|
:safe #'booleanp)
|
||||||
|
|
||||||
|
(defcustom project-vc-include-untracked t
|
||||||
|
"When non-nil, the VC project backend includes untracked files."
|
||||||
|
:type 'boolean
|
||||||
|
:safe #'booleanp)
|
||||||
|
|
||||||
;; FIXME: Using the current approach, major modes are supposed to set
|
;; FIXME: Using the current approach, major modes are supposed to set
|
||||||
;; this variable to a buffer-local value. So we don't have access to
|
;; this variable to a buffer-local value. So we don't have access to
|
||||||
;; the "external roots" of language A from buffers of language B, which
|
;; the "external roots" of language A from buffers of language B, which
|
||||||
|
|
@ -512,8 +517,9 @@ backend implementation of `project-external-roots'.")
|
||||||
(args '("-z"))
|
(args '("-z"))
|
||||||
(vc-git-use-literal-pathspecs nil)
|
(vc-git-use-literal-pathspecs nil)
|
||||||
files)
|
files)
|
||||||
;; Include unregistered.
|
(setq args (append args
|
||||||
(setq args (append args '("-c" "-o" "--exclude-standard")))
|
'("-c" "--exclude-standard")
|
||||||
|
(when project-vc-include-untracked '("-o"))))
|
||||||
(when extra-ignores
|
(when extra-ignores
|
||||||
(setq args (append args
|
(setq args (append args
|
||||||
(cons "--"
|
(cons "--"
|
||||||
|
|
@ -565,9 +571,9 @@ backend implementation of `project-external-roots'.")
|
||||||
(delete-consecutive-dups files)))
|
(delete-consecutive-dups files)))
|
||||||
(`Hg
|
(`Hg
|
||||||
(let ((default-directory (expand-file-name (file-name-as-directory dir)))
|
(let ((default-directory (expand-file-name (file-name-as-directory dir)))
|
||||||
args)
|
(args (list (concat "-mcard" (when project-vc-include-untracked "u"))
|
||||||
;; Include unregistered.
|
"--no-status"
|
||||||
(setq args (nconc args '("-mcardu" "--no-status" "-0")))
|
"-0")))
|
||||||
(when extra-ignores
|
(when extra-ignores
|
||||||
(setq args (nconc args
|
(setq args (nconc args
|
||||||
(mapcan
|
(mapcan
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue