emacs-devel
[Top][All Lists]
Advanced

[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: Fri, 29 May 2020 02:29:35 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0

On 29.05.2020 02:05, Basil L. Contovounesios wrote:

Please let us know how you like the change, and if you see any new problems.

Only one feature request and some minor questions from me.

Can the project-list file name please be customisable?

Of course. Just an omission.

Could the contents of the project-list file comprise easily readable,
printable, and even extensible sexps?

Could project-switch-project reuse read-multiple-choice or similar?

I'm attaching a patch that makes it use read-multiple-choice, check it out. But I'm not sure the result looks better than what we have now.

Suggestions on "similar" welcome.

Isn't there a race here?

   (defun project--ensure-file-exists (filename)
     "Create an empty file FILENAME if it doesn't exist."
     (unless (file-exists-p filename)
       (with-temp-buffer
         (write-file filename))))

Why not use something like the following instead?

   (ignore-error file-already-exists
     (write-region "" nil filename nil 0 nil 'excl))

Looks good to me. Let's see what Simen says.

In fact, couldn't project--ensure-file-exists be eliminated altogether?
If the file doesn't exist, just don't set project--list, or set it to
nil.

Or that.

Attachment: project-switch-read-multiple.diff
Description: Text Data


reply via email to

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