1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-20 20:50:53 -08:00
Commit graph

350 commits

Author SHA1 Message Date
Dmitry Gutov
4ca13d98c9 project-switch-to-buffer: Don't filter based on default-directory
* lisp/progmodes/project.el (project-switch-to-buffer):
Don't filter based on default-directory
(https://lists.gnu.org/archive/html/emacs-devel/2020-07/msg00075.html).
(project-switch-to-buffer): Ditto.
2020-07-06 00:51:24 +03:00
Basil L. Contovounesios
89c744c380 ; Fix recent indentation in project.el
* lisp/progmodes/project.el (project-ignores, project-find-file-in)
(project-eshell, project--read-project-list): Fix indentation.
2020-06-26 09:37:52 +01:00
Dmitry Gutov
96ff641cd9 project--read-project-list: Add structure verification
* lisp/progmodes/project.el (project--list): Update docstring.
(project--read-project-list): Add structure verification.
2020-06-26 03:43:14 +03:00
Dmitry Gutov
733921edfe project-known-roots: Rename and improve
* lisp/progmodes/project.el (project-known-project-roots):
Rename from 'project-known-roots'.  Update the docstring.  Make
sure the returned value is a list of strings.  Update the caller
(bug#41821).
2020-06-26 03:43:14 +03:00
Dmitry Gutov
beaff813e1 Rename project-kill-buffers-{skip-conditions,ignores}
* lisp/progmodes/project.el (project-kill-buffers-ignores):
Rename from project-kill-buffers-skip-conditions (bug#41868).
Update both references.
Add a :package-version attribute.
2020-06-26 03:43:14 +03:00
Juri Linkov
bfd96e995d M-n in read-directory-name of vc commands gets project dirs (bug#41821)
* lisp/progmodes/project.el (project-known-roots): New autoloaded function.

* lisp/vc/vc-hooks.el (vc-known-roots): New function.

* lisp/vc/vc.el (vc-root-diff, vc-print-root-log):
* lisp/vc/vc-dir.el (vc-dir): Use 'vc-known-roots' for default
values for read-directory-name.
2020-06-24 02:59:31 +03:00
Dmitry Gutov
bea5eb77b3 project-switch-to-buffer: Improve Ido compatibility
* lisp/progmodes/project.el (project-switch-to-buffer):
Check that the entry contains a non-nil CDR.
2020-06-22 16:58:02 +03:00
Dmitry Gutov
2be719827f project-switch-to-buffer: Do not require matching input
* lisp/progmodes/project.el (project-switch-to-buffer):
Do not require matching input, to allow creating buffers as well
(bug#41879).
2020-06-22 16:48:43 +03:00
Theodor Thornhill
a1686c00d0 Forward declare eshell-buffer-name in project-eshell
* lisp/progmodes/project.el: Forward declare 'eshell-buffer-name' so
that 'project-eshell' can use dynamically scoping with it.
2020-06-22 01:49:20 +03:00
Dmitry Gutov
7221d844b1 ; project-shell, project-eshell: Doc fixes 2020-06-22 01:47:55 +03:00
Eli Zaretskii
8df2957df1 Improve doc strings of 'project-shell' and 'project-eshell'
* lisp/progmodes/project.el (project-shell, project-eshell): Doc
fixes.
2020-06-21 19:20:37 +03:00
Basil L. Contovounesios
a4d3897d8f Replace some uses of cl-mapcan with mapcan
* lisp/progmodes/project.el (project-files, project-files):
* lisp/progmodes/xref.el (xref-backend-references)
(xref--convert-hits):
* test/lisp/emacs-lisp/package-tests.el
(package-test-strip-version): Replace cl-mapcan with equivalent
calls to mapcan.
2020-06-21 14:33:16 +01:00
Dmitry Gutov
a1b487eac0 ; project-shell, project-eshell: Docstring tweaks 2020-06-21 04:19:29 +03:00
Theodor Thornhill
c1056b0387 Pop to an existing Eshell buffer by default
* lisp/progmodes/project.el (project-shell): Improve docstring to
include information about an implementation detail.

* list/progmodes/project.el (project-eshell): Modelled after
'project-shell', change default behavior such that we don't create too
many eshell buffers by default.  Use universal argument to create
subsequent buffers.
2020-06-21 04:07:44 +03:00
Theodor Thornhill
be5d0c0f63 project-shell: Pop to an existing shell buffer by default
* lisp/progmodes/project.el (project-shell):
Pop to an existing shell buffer by default.
If there's none, or if universal argument is used, open a subsequent
shell buffer and jump to it.  Prefix shell buffer name with the base
name of project root directory. (Bug#41858)
2020-06-20 04:02:18 +03:00
Eli Zaretskii
2eda8199bf Fix last change in doc strings of project.el
* lisp/progmodes/project.el (project-switch-to-buffer): More accurate
doc string.
2020-06-19 21:50:30 +03:00
Eli Zaretskii
1e3b0f2d95 Improve doc strings of project.el
* lisp/progmodes/project.el (project-dired, project-shell)
(project-eshell, project-switch-to-buffer, project-kill-buffers)
(project-list-file, project--read-project-list)
(project--ensure-read-project-list, project--write-project-list)
(project--add-to-project-list-front)
(project--remove-from-project-list, project-prompt-project-dir)
(project-switch-commands, project-switch-project): Fix wording and
formatting of doc strings.
2020-06-19 10:52:00 +03:00
Andrii Kolomoiets
6fe5c21c72 project-switch-to-buffer: Use the "other buffer" as default
* lisp/progmodes/project.el
(project-switch-to-buffer): Pass the "other buffer" as DEF to
read-buffer if it belongs to the current project (bug#41879).
2020-06-19 03:44:01 +03:00
Dmitry Gutov
363d981811 Add binding for project-kill-buffers
* lisp/progmodes/project.el (project-prefix-map):
Add binding for project-kill-buffers (bug#41868).
2020-06-18 18:42:38 +03:00
Philip K
7c177ecb84 New command: project-kill-buffers
* lisp/progmodes/project.el
(project-kill-buffers-skip-conditions): New variable.
(project--buffer-list): New function.
(project-kill-buffers): New command (bug#41868).
2020-06-18 04:04:13 +03:00
Dmitry Gutov
4b9b9cb43a ; Add a heading and a binding 2020-06-18 02:11:51 +03:00
Theodor Thornhill
eb3b03c1c6 New command: project-switch-to-buffer
* lisp/progmodes/project.el (project-switch-to-buffer): New command.
2020-06-18 02:09:41 +03:00
Theodor Thornhill
2f231fcfb7 Add global bindings for project commands
* lisp/progmodes/project.el
(project-prefix-map): New variable.
Add the new keymap to ctl-x-map.
2020-06-18 02:05:31 +03:00
Dmitry Gutov
2cc48d3d10 Fix setting project-vc-merge-submodules via .dir-locals.el
* lisp/progmodes/project.el
(project--vc-merge-submodules-p): New function.
(project-try-vc, project--vc-list-files): Use it.
2020-06-18 01:30:32 +03:00
Dmitry Gutov
3bff583337 Bump the project.el package version
* lisp/progmodes/project.el: Bump the package version.
2020-06-17 01:27:37 +03:00
Dmitry Gutov
1d2c0a2527 Change the key for project-find-regexp
* lisp/progmodes/project.el (project-switch-commands):
Change the key for 'project-find-regexp' to 'g', which seems to be
the consensus.
2020-06-17 01:24:40 +03:00
Dmitry Gutov
6e777a6639 Make project file name completion adhere to customization
* lisp/progmodes/project.el (project-find-file-in):
Bind completion-ignore-case to the value of
read-file-name-completion-ignore-case (bug#41902).
2020-06-17 01:24:40 +03:00
Basil L. Contovounesios
9e04d0f289 ; Simplify last change
* lisp/progmodes/project.el (project--read-project-list): We are
already at BOB after insert-file-contents.
2020-06-10 01:00:01 +01:00
Simen Heggestøyl
d4e7087b68 Save project list as lisp data
Save the project list file as lisp data instead of line separated
strings to make it more extendable in the future.

* lisp/progmodes/project.el (project--read-project-list)
(project--write-project-list, project--add-to-project-list-front)
(project--remove-from-project-list): Adjust to `project--list' now
being an alist.
2020-06-09 20:45:55 +02:00
Simen Heggestøyl
f4568bac56 Change default project list filename to "projects"
* lisp/progmodes/project.el (project-list-file): Change the default
filename to "projects".
2020-06-04 20:16:54 +02:00
Simen Heggestøyl
e7fb0a48a6 Use characters for keys in project-switch-commands
* lisp/progmodes/project.el (project-switch-commands): Use
characters for keys instead of string for better future
compatibility with 'read-multiple-choice'.
(project-switch-project): Adjust to above change.
2020-06-04 20:14:02 +02:00
Simen Heggestøyl
b41be0ee83 ; Small cleanup in project.el
* lisp/progmodes/project.el (project--add-to-project-list-front):
Minor simplification after recent changes.
2020-06-04 20:11:58 +02:00
Basil L. Contovounesios
74966904b0 ; Clean up recent project.el additions
* lisp/progmodes/project.el (project): Add :version tag.
(project-list-file): Fix custom :type and add :version tag.
2020-06-03 11:45:54 +01:00
Dmitry Gutov
1fe1c84b18 Small cleanup
* lisp/progmodes/project.el (project--add-to-project-list-front):
Small simplification.
(project--remove-from-project-list): Remove oudated comment.
2020-06-03 00:33:14 +03:00
Dmitry Gutov
8b71bfb891 project-list-file: New user option
* lisp/progmodes/project.el (project): New custom group.
(project-vc): Use it as parent.
(project-vc-merge-submodules): Tag with Emacs version.
(project-read-file-name-function): Assign to the 'project' group.
(project-list-file): New user option (bug#41600).
(project--write-project-list, project--read-project-list): Use it.
2020-06-03 00:27:29 +03:00
Simen Heggestøyl
9afcf2bd39 Write project list to file only when changed
* lisp/progmodes/project.el (project--add-to-project-list-front):
Write the project list to file only when it has changed.
2020-06-02 19:27:55 +02:00
Simen Heggestøyl
e7065459d9 Remove 'project--ensure-file-exists'
* lisp/progmodes/project.el (project--ensure-file-exists): Remove.
(project--read-project-list): Set 'project--list' to nil when the
project list file doesn't exist.
2020-06-02 19:12:19 +02:00
Juri Linkov
2c1e5b9e77 * lisp/progmodes/project.el (project-vc-dir, project-shell): New commands.
(project-compile): Add args and interactive spec like in 'compile'.
(project-switch-commands): Bind project-vc-dir to "v",
project-shell to "s", and rebind project-find-regexp from "s" to "r".

* doc/emacs/maintaining.texi (Project File Commands):
Describe project-vc-dir and project-shell.
2020-06-02 02:01:25 +03:00
Dmitry Gutov
780f674a82 Don't return transient projects with MAYBE-PROMPT=nil
* lisp/progmodes/project.el (project-current): Only return
transient projects when called with non-nil MAYBE-PROMPT.
Also only update the known projects lists in this case.
(https://lists.gnu.org/archive/html/emacs-devel/2020-05/msg03375.html).
2020-05-30 19:57:38 +03:00
Dmitry Gutov
ba292ea330 project-prompt-project-dir: Use more consistent prompts
* lisp/progmodes/project.el (project-prompt-project-dir):
Use more consistent prompts.
2020-05-29 21:37:12 +03:00
Dmitry Gutov
7af4e72de2 ; project.el: Update TODO 2020-05-29 02:05:05 +03:00
Simen Heggestøyl
b7dffcb501 Simplify the previous commit
* lisp/progmodes/project.el (project--read-project-list): Simplify the
previous commit by utilizing the optional OMIT-NULLS argument to
'split-string'.
2020-05-27 17:26:25 +02:00
Simen Heggestøyl
449810bbe9 Avoid adding the empty string to the project list
* lisp/progmodes/project.el (project--read-project-list): Avoid adding
the empty string to the project list.
2020-05-26 17:42:32 +02:00
Simen Heggestøyl
5a48ede3ac Adapt project functions to the new 'project-root'
* lisp/progmodes/project.el (project-dired, project-eshell)
(project--read-project-list, project--write-project-list)
(project--add-to-project-list-front)
(project--remove-from-project-list): Adapt to the new 'project-root'.
2020-05-26 17:42:24 +02:00
Dmitry Gutov
0b057ca9bc Teach project-current to inhibit the prompt
* lisp/progmodes/project.el:
(project-current-inhibit-prompt): New variable.
(project-current, project-switch-project): Use it.
2020-05-26 17:41:45 +02:00
Simen Heggestøyl
70824683fd Rename 'project-switch-menu' to 'project-switch-commands'
* lisp/progmodes/project.el (project-switch-commands): Rename from
'project-switch-menu'.
(project--keymap-prompt, project-switch-project): Update after the
renaming.
2020-05-26 17:41:24 +02:00
Simen Heggestøyl
c6e80fdb65 Simplify 'project--keymap-prompt' a bit
* lisp/progmodes/project.el: Remove seq requirement.
(project--keymap-prompt): Simplify with 'mapconcat'.
2020-05-26 17:41:24 +02:00
Simen Heggestøyl
c6f56bd279 Turn project switch menu var into a public alist
* lisp/progmodes/project.el: Require seq.
(project--switch-alist): Remove in favor of the public
'project-switch-menu'.
(project-add-switch-command): Remove; not needed now that
'project-switch-menu' is a public alist.
(project-switch-menu): New variable mapping keys to project switching
menu entries.
(project--keymap-prompt, project-switch-project): Adjust to the new
'project-switch-menu' format.
2020-05-26 17:41:24 +02:00
Simen Heggestøyl
46bb2cbd00 Change dispatch binding of 'project-find-regexp'
* lisp/progmodes/project.el: Change default dispatch binding of
'project-find-regexp' to 's'.
2020-05-26 17:41:24 +02:00
Dmitry Gutov
02e1ee95a8 Integrate project-switch-project with project-find-regexp
* lisp/progmodes/project.el:
(project-find-regexp): Add to the list of 'switch' commands.
(project-switch-project): Use call-interactively so that the
former can read its arguments.
2020-05-26 17:41:24 +02:00