emacs-devel
[Top][All Lists]
Advanced

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

Re: user-directory: New library to find user {conf, data, state, ...} fi


From: Stefan Kangas
Subject: Re: user-directory: New library to find user {conf, data, state, ...} files
Date: Sun, 7 Nov 2021 21:35:15 -0600

Stefan Kangas <stefan@marxist.se> writes:

> I also think we should consider adding some heuristics to `user-file' to
> be able to find the old name if it exists.  I considered some
> alternatives, but I thought I'd see what people think first.  Currently,
> application code would say:
>
>     (user-file 'cache "image-dired"
>                        (locate-user-emacs-file "image-dired"))
>
> Which could, if we want to be smart, be simplified to:
>
>     (user-file 'cache "image-dired" "image-dired")

I have implemented the above simplification now, see my recent commit to
features/user-directory.  We could take it even further if we want to of
course, to support the below as well:

> Or even:
>
>     (user-file 'cache "image-dired")
>
> Unfortunately, in this case I think it's harder to be smart:
>
>     (user-file 'data "bookmarks"
>                      (locate-user-emacs-file "bookmarks" ".emacs.bmk"))
>
> But perhaps we can think of something even for that.



reply via email to

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