-
How can I pin a specific project to the list of recent projects? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 2 replies
-
No, there is no such a feature. However, you can organize the project list yourself so targeted projects are always on top on the list. Hope that helps! ;) |
Beta Was this translation helpful? Give feedback.
-
Could you please point me to the relevant part of the documentation for that? |
Beta Was this translation helpful? Give feedback.
-
My ELisp is rusty. Could you please point to a specific line in that function?
Sort? Why sort? Would it be possible to add to the top (or the end) of the list of projects? |
Beta Was this translation helpful? Give feedback.
-
Yes, you can. I use
(defun project-known-project-roots ()
"Return the list of root directories of all known projects."
(project--ensure-read-project-list)
(mapcar #'car project--list)) ; See `project--list`, this is the variable you want to modify! Try to print the variable, and see what's the value: (message "%s" project--list) ; Returns -> (("path/to/project1") ("path/to/project2")) Now, all you need to do is to sort this variable in the correct order.
You could but you might have duplicated items in the list. 🤔 Here is the documentation about the sorting functions, see https://www.gnu.org/software/emacs/manual/html_node/eintr/Sorting.html. |
Beta Was this translation helpful? Give feedback.
Yes, you can. I use
project.el
(notprojectile
) so I will use this backend as the example:project-known-project-roots
(L1206) is the function that returns a list of project roots. Let's see the function's definition:Try to print the variable, and see what's the value:
Now, all you need to do is to sort this variabl…