Commit graph

181 commits

Author SHA1 Message Date
Lars Ingebrigtsen
8fb761af6b Fix undefined function in project-compile
* lisp/progmodes/project.el (project-compile): Require compile.el
before using functions from the file (bug#44009).
2020-10-15 13:20:22 +02:00
Dmitry Gutov
0a5e9cf262 Mention two more functions in the commentary
* lisp/progmodes/project.el:
Mention two more functions in the commentary (bug#43595).
2020-10-08 02:41:12 +03:00
Stefan Kangas
462dbc1cb2 ; Fix typos 2020-09-21 14:26:42 +02:00
Stefan Kangas
3b79ff6179 Fix typo in project-kill-buffers
* lisp/progmodes/project.el (project-kill-buffers): Fix typo.
Reported by Manuel Uberti <manuel.uberti@inventati.org>
2020-09-18 20:32:15 +02:00
Dmitry Gutov
1283d3a5b2 Fix typo, reported by Manuel Uberti
* lisp/progmodes/project.el (project-kill-buffer-conditions):
Fix typo.
2020-09-18 12:15:46 +03:00
João Távora
5142149758 Unbreak project.el, the GNU Elpa package, for Emacs 26.3
Fixes: bug#43164

* lisp/progmodes/project.el: Bump to 0.5.2
(bound-and-true-p): Check that tab-prefix-map is bound before binding.
2020-09-03 13:42:55 +01:00
Stefan Kangas
8d3160ec08 Add commands to run shell commands in project root
* lisp/progmodes/project.el (project-async-shell-command)
(project-shell-command): New commands to run 'async-shell-command'
and 'shell-command' in project's root directory.
(project-prefix-map): Bind commands to '!' and '&'.
* doc/emacs/maintaining.texi (Project File Commands): Document the
new commands.
* etc/NEWS: Announce the new commands.
2020-08-28 19:27:47 +02:00
Dmitry Gutov
319463920c Unbreak project-find-regexp in Emacs 26.3 (bug#42765)
* lisp/progmodes/project.el: Depend on xref.  Bump the version.

* lisp/progmodes/xref.el: Remove 'project' from the list of
dependencies.  Depending on Emacs 26.3 already ensures that some
version is available.  Bump the version.
(xref--process-file-region): Move from project.el with a rename.
Update the sole caller.
(xref-backend-references): Make compatible with old project.el.
Update the docstring.
2020-08-14 17:21:55 +03:00
Philip K
cc365ca6d8 Remove usages of assoc-delete-all in project.el
assoc-delete-all is not available for users who have installed
project.el via ELPA on older Emacs versions (bug#42668).

* lisp/progmodes/project.el
(project-remember-project, project--remove-from-project-list):
Replace assoc-delete-all with equivalent alternatives.
2020-08-06 17:49:53 +03:00
Philip K
2ab66c9f9b Replace project-kill-buffers-ignores with project-kill-buffer-conditions
* lisp/progmodes/project.el (project-kill-buffer-conditions):
Replace the project-kill-buffers-ignores user option.
(project--kill-buffer-check): New function.
(project--buffers-to-kill): New function.
(project-kill-buffers): Use them.  Add the NO-CONFIRM argument.
2020-07-29 01:21:56 +03:00
Dmitry Gutov
4d195bb7d0 Fix argument reference
* lisp/progmodes/project.el
(project-display-buffer-other-frame): Fix argument reference.
2020-07-27 03:05:16 +03:00
Dmitry Gutov
33667e02e6 Move project--value-in-dir to a different section
* lisp/progmodes/project.el (project--value-in-dir):
Move closer to its uses.
2020-07-27 03:04:09 +03:00
Dmitry Gutov
7551aff22c Bind switch-to-buffer-obey-display-actions to t
* lisp/progmodes/project.el (project--other-place-command):
Bind switch-to-buffer-obey-display-actions to t, so that
project-other-window-command and friends can affect
project-switch-to-buffer.
2020-07-27 02:57:06 +03:00
Sean Whitton
b63c5a7efc Add project other place commands
* lisp/progmodes/project.el (project-other-window-map,
project-other-frame-map, project--other-place-command,
project-other-window-command, project-other-frame-command,
project-other-tab-command): Add these functions and maps.
* lisp/progmodes/project.el: Bind project-other-window-command to C-x
4 p, project-other-frame-command to C-x 5 p and
project-other-tab-command to C-x t p (bug#42210).
2020-07-27 02:56:50 +03:00
Sean Whitton
e3614fcc62 Add project-display-buffer and project-display-buffer-other-frame
* lisp/progmodes/project.el (project-display-buffer,
project-display-buffer-other-frame): Add commands.
2020-07-27 02:52:10 +03:00
Sean Whitton
7479c11b4e Factor out project--read-project-buffer from project-switch-buffer
* lisp/progmodes/project.el (project--read-project-buffer): New
function extracted from project-switch-buffer.
* lisp/progmodes/project.el (project-switch-buffer): Instead of
unconditionally reading a project buffer from the user, add
buffer-or-name argument, and populate it using
project--read-project-buffer when called interactively.  Update
docstring.
2020-07-27 02:52:10 +03:00
Dmitry Gutov
19064761ad project-remember-project: New public function
* lisp/progmodes/project.el (project-remember-project):
Rename from project--add-to-project-list-front (bug#42332).
And autoload it.
2020-07-25 03:17:47 +03:00
Dmitry Gutov
4c08c2f45b ; project.el: Talk about equality 2020-07-20 04:07:11 +03:00
Dmitry Gutov
7259377d70 project.el: Add more docs and two new key bindings
* lisp/progmodes/project.el:
Add a longer description of the package and how to use it.
(project-prefix-map): Add entries for
'project-or-external-find-file' and
'project-or-external-find-regexp'.
2020-07-20 03:58:08 +03:00
Philipp Stephani
f700fc1482 Add missing 'require'.
* lisp/progmodes/project.el: Require seq.el explicitly as
'seq-every-p' isn't autoloaded in Emacs 26.3.
2020-07-19 10:32:51 +02:00
Eli Zaretskii
0339325d53 ;* lisp/progmodes/project.el (project-current): Doc fix. 2020-07-12 21:48:39 +03:00
Dmitry Gutov
96173fbfab ; Roll back certain doc changes; clarify what "transient" is 2020-07-12 20:55:23 +03:00
Eli Zaretskii
f5bc508be5 Fix last doc changes in project.el
* lisp/progmodes/project.el (project-find-functions)
(project-current): Add back information which was recently
removed.
2020-07-12 16:57:40 +03:00
Dmitry Gutov
4a467f7591 project-kill-buffers: Update the docstring too
* lisp/progmodes/project.el (project-kill-buffers):
Copy a sentence over from project-switch-to-buffer.
2020-07-12 03:46:37 +03:00
Dmitry Gutov
ebcbd50c53 More docstring updates in project.el
* lisp/progmodes/project.el (project-find-functions)
(project-current, project-switch-to-buffer):
More docstring updates.
2020-07-12 03:39:16 +03:00
Eli Zaretskii
d8e17a4c4e Another minor improvement of project.el doc strings
* lisp/progmodes/project.el (project-find-functions)
(project-current, project-switch-to-buffer): Doc fix.
(project-current): Rename the argument DIR to DIRECTORY.
2020-07-11 15:33:51 +03:00
Dmitry Gutov
86c860f1a1 project-switch-to-buffer: Reword the docstring
* lisp/progmodes/project.el (project-switch-to-buffer):
Reword the docstring, copying the style from project-kill-buffers.
2020-07-11 04:39:58 +03:00
Dmitry Gutov
10a0941f4d ; Revert "; Add a note about a bottleneck"
This reverts commit 9f9ce631a2.

It's still a bottleneck, but so are mapcar (with its effect on GC) and
concat. So our limits show in several places at once.
2020-07-06 04:29:52 +03:00
Dmitry Gutov
9f9ce631a2 ; Add a note about a bottleneck 2020-07-06 03:50:59 +03:00
Dmitry Gutov
3c7bae2337 * lisp/progmodes/project.el: Bump the version. 2020-07-06 00:51:24 +03:00
Dmitry Gutov
bcde7952b3 ; Add a couple of FIXMEs 2020-07-06 00:51:24 +03:00
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