unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Dmitry Gutov <dgutov@yandex.ru>
To: "Simen Heggestøyl" <simenheg@runbox.com>
Cc: "Basil L. Contovounesios" <contovob@tcd.ie>,
	"Philip K." <philip@warpmail.net>,
	emacs-devel <emacs-devel@gnu.org>
Subject: Re: New feature in project.el: Remembering the previously used projects
Date: Sun, 31 May 2020 16:00:12 +0300	[thread overview]
Message-ID: <b5fa3f2c-a521-8e8d-b111-c51ff4c89a39@yandex.ru> (raw)
In-Reply-To: <871rn2ivne.fsf@simenheg@gmail.com>

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
  \f
  ;;; 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))))



  parent reply	other threads:[~2020-05-31 13:00 UTC|newest]

Thread overview: 59+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-28 20:06 New feature in project.el: Remembering the previously used projects Dmitry Gutov
2020-05-28 23:05 ` Basil L. Contovounesios
2020-05-28 23:29   ` Dmitry Gutov
2020-05-29  7:31     ` Philip K.
2020-05-29 13:51       ` Dmitry Gutov
2020-05-29 15:54         ` Simen Heggestøyl
     [not found]         ` <871rn2ivne.fsf@simenheg@gmail.com>
2020-05-30 10:29           ` Philip K.
2020-06-02 17:04             ` Simen Heggestøyl
     [not found]             ` <5ed68784.1c69fb81.61518.35eeSMTPIN_ADDED_BROKEN@mx.google.com>
2020-06-03 11:28               ` Basil L. Contovounesios
2020-05-30 12:38           ` Dmitry Gutov
2020-06-02 17:14             ` Simen Heggestøyl
2020-05-30 21:57           ` Juri Linkov
2020-05-30 23:39             ` Dmitry Gutov
2020-06-01 23:01               ` Juri Linkov
2020-06-02 21:34                 ` Dmitry Gutov
2020-06-03 20:13                   ` Dmitry Gutov
2020-06-03 22:40                     ` Juri Linkov
2020-06-03 23:13                       ` Dmitry Gutov
2020-06-04 21:55                         ` Juri Linkov
2020-06-04 22:37                           ` Dmitry Gutov
2020-06-05  8:33                           ` Philip K.
2020-06-05  8:42                             ` Simen Heggestøyl
2020-06-05 11:44                             ` Dmitry Gutov
2020-06-05 11:59                               ` Philip K.
2020-06-05 13:59                                 ` Philip K.
2020-06-05 17:20                                   ` Dmitry Gutov
2020-06-06  1:24                                   ` Jamie Beardslee
2020-12-19 22:18                                     ` Dmitry Gutov
2020-06-06 23:46                             ` Juri Linkov
2020-06-07  0:40                               ` Dmitry Gutov
2020-06-07 22:38                                 ` Juri Linkov
2020-06-02 17:43             ` Simen Heggestøyl
     [not found]             ` <87a71l2wjf.fsf@simenheg@gmail.com>
2020-06-02 17:57               ` Dmitry Gutov
2020-06-03 22:34               ` Juri Linkov
2020-06-03 23:17                 ` Dmitry Gutov
2020-06-04 18:33                   ` Simen Heggestøyl
2020-06-04 21:58                   ` Juri Linkov
     [not found]             ` <5ed68fe1.1c69fb81.45e50.0c7cSMTPIN_ADDED_BROKEN@mx.google.com>
2020-06-03 11:28               ` Basil L. Contovounesios
2020-05-31 13:00           ` Dmitry Gutov [this message]
2020-06-02 17:51             ` Simen Heggestøyl
     [not found]             ` <87k10picej.fsf@simenheg@gmail.com>
2020-06-02 21:33               ` Dmitry Gutov
     [not found]         ` <5ed13064.1c69fb81.4bf5e.dc8eSMTPIN_ADDED_BROKEN@mx.google.com>
2020-06-03 11:28           ` Basil L. Contovounesios
2020-06-03 11:27     ` Basil L. Contovounesios
2020-06-03 11:47       ` Dmitry Gutov
2020-06-03 13:38         ` Basil L. Contovounesios
2020-06-03 19:15           ` Simen Heggestøyl
     [not found]           ` <87lfl4x8p0.fsf@simenheg@gmail.com>
2020-06-03 20:11             ` Dmitry Gutov
2020-06-04 18:19               ` Simen Heggestøyl
2020-05-29 22:55 ` Kévin Le Gouguec
2020-05-29 23:22   ` Dmitry Gutov
2020-05-29 23:31     ` Dmitry Gutov
2020-05-30  0:42     ` Dmitry Gutov
2020-05-30  6:05       ` Simen Heggestøyl
     [not found]       ` <5ed1f7ae.1c69fb81.9b99b.4ce7SMTPIN_ADDED_BROKEN@mx.google.com>
2020-05-30 12:42         ` Kévin Le Gouguec
2020-05-30 13:17           ` Dmitry Gutov
2020-05-30 17:05             ` Dmitry Gutov
2020-05-30 18:29               ` Kévin Le Gouguec
2020-06-02 17:29           ` Simen Heggestøyl
     [not found]       ` <877dwuc5zu.fsf@simenheg@gmail.com>
2020-05-30 13:21         ` Dmitry Gutov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b5fa3f2c-a521-8e8d-b111-c51ff4c89a39@yandex.ru \
    --to=dgutov@yandex.ru \
    --cc=contovob@tcd.ie \
    --cc=emacs-devel@gnu.org \
    --cc=philip@warpmail.net \
    --cc=simenheg@runbox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).