bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#41741: [PATCH] Save project list as lisp data


From: Dmitry Gutov
Subject: bug#41741: [PATCH] Save project list as lisp data
Date: Sun, 7 Jun 2020 01:59:10 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0

Hi Simen,

On 06.06.2020 19:40, Simen Heggestøyl wrote:
I'm attaching a suggested patch for changing project.el's project list
format from a line based one to proper Lisp data as discussed in the
"New feature in project.el: Remembering the previously used projects"
thread on emacs-devel.

Some comments below.

No metadata is added at this point, but it makes it extensible for the
future.

I'm not sure we'd really be able to store metadata in it. The list is more or less transient: the entries are added automatically, and removed automatically as well. If someone needs to know something about a project, it's better to leave that to an overridable method, and maybe add a project-vc- variable (if that value needs to be user-customizable).

For that reason, we should probably opt for storing directories only.

-  "Initialize `project--list' from the project list file."
+  "Initialize `project--list' from the file `project-list-file'."

I think the previous string was okay.

-          (when (file-exists-p filename)
+          (when (file-readable-p filename)

What's the difference? File exists, but belongs to another account? I'm not sure we'd want to silently fail in that case (kinda puzzling behavior), and writing to the file is likely to fail later too.

+              (car (read-from-string (buffer-string))))))))

AKA:

     (goto-char (point-min))
     (read (current-buffer))

Though the practical difference will be tiny.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]