[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: New feature in project.el: Remembering the previously used projects
From: |
Dmitry Gutov |
Subject: |
Re: New feature in project.el: Remembering the previously used projects |
Date: |
Sun, 31 May 2020 16:00:12 +0300 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 |
On 29.05.2020 18:54, Simen Heggestøyl wrote:
On 29.05.2020 02:05, Basil L. Contovounesios wrote:
Can the project-list file name please be customisable?
Of course. Just an omission.
Yup.
Simen what do you say?
diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el
index 2d0b6c4a21..70ee8d11ed 100644
--- a/lisp/progmodes/project.el
+++ b/lisp/progmodes/project.el
@@ -93,6 +93,10 @@
(require 'cl-generic)
(eval-when-compile (require 'subr-x))
+(defgroup project nil
+ "Operations on the current project."
+ :group 'tools)
+
(defvar project-find-functions (list #'project-try-vc)
"Special hook to find the project containing a given directory.
Each functions on this hook is called in turn with one
@@ -249,6 +253,7 @@ project-vc-merge-submodules
After changing this variable (using Customize or .dir-locals.el)
you might have to restart Emacs to see the effect."
:type 'boolean
+ :version "28.1"
:package-version '(project . "0.2.0")
:safe 'booleanp)
@@ -601,6 +606,7 @@ project-read-file-name-function
(const :tag "Read with completion from absolute names"
project--read-file-absolute)
(function :tag "Custom function" nil))
+ :group 'project
:version "27.1")
(defun project--read-file-cpd-relative (prompt
@@ -716,6 +722,11 @@ project-compile
;;; Project list
+(defcustom project-list-file (locate-user-emacs-file "project-list")
+ "File to save the list of known projects list."
+ :type 'string
+ :group 'project)
+
(defvar project--list 'unset
"List of known project directories.")
@@ -727,7 +738,7 @@ project--ensure-file-exists
(defun project--read-project-list ()
"Initialize `project--list' from the project list file."
- (let ((filename (locate-user-emacs-file "project-list")))
+ (let ((filename project-list-file))
(project--ensure-file-exists filename)
(with-temp-buffer
(insert-file-contents filename)
@@ -746,7 +757,7 @@ project--ensure-read-project-list
(defun project--write-project-list ()
"Persist `project--list' to the project list file."
- (let ((filename (locate-user-emacs-file "project-list")))
+ (let ((filename project-list-file))
(with-temp-buffer
(insert (string-join project--list "\n"))
(write-region nil nil filename nil 'silent))))
- New feature in project.el: Remembering the previously used projects, Dmitry Gutov, 2020/05/28
- Re: New feature in project.el: Remembering the previously used projects, Basil L. Contovounesios, 2020/05/28
- Re: New feature in project.el: Remembering the previously used projects, Dmitry Gutov, 2020/05/28
- Re: New feature in project.el: Remembering the previously used projects, Philip K., 2020/05/29
- Re: New feature in project.el: Remembering the previously used projects, Dmitry Gutov, 2020/05/29
- Re: New feature in project.el: Remembering the previously used projects, Simen Heggestøyl, 2020/05/29
- Re: New feature in project.el: Remembering the previously used projects, Philip K., 2020/05/30
- Re: New feature in project.el: Remembering the previously used projects, Dmitry Gutov, 2020/05/30
- Re: New feature in project.el: Remembering the previously used projects, Juri Linkov, 2020/05/30
- Re: New feature in project.el: Remembering the previously used projects, Dmitry Gutov, 2020/05/30
- Re: New feature in project.el: Remembering the previously used projects,
Dmitry Gutov <=
Re: New feature in project.el: Remembering the previously used projects, Kévin Le Gouguec, 2020/05/29
- Re: New feature in project.el: Remembering the previously used projects, Dmitry Gutov, 2020/05/29
- Message not available
- Re: New feature in project.el: Remembering the previously used projects, Kévin Le Gouguec, 2020/05/30
- Re: New feature in project.el: Remembering the previously used projects, Dmitry Gutov, 2020/05/30
- Re: New feature in project.el: Remembering the previously used projects, Dmitry Gutov, 2020/05/30
- Re: New feature in project.el: Remembering the previously used projects, Kévin Le Gouguec, 2020/05/30