GNU bug report logs -
#41741
[PATCH] Save project list as lisp data
Previous Next
Reported by: Simen Heggestøyl <simenheg <at> runbox.com>
Date: Sat, 6 Jun 2020 18:58:02 UTC
Severity: normal
Tags: patch
Done: Simen Heggestøyl <simenheg <at> runbox.com>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 41741 <at> debbugs.gnu.org (full text, mbox):
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.
This bug report was last modified 4 years and 345 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.