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

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

bug#46056: hardcoded ~/.emacs.d in elpa package excorporate


From: Basil L. Contovounesios
Subject: bug#46056: hardcoded ~/.emacs.d in elpa package excorporate
Date: Sat, 23 Jan 2021 22:31:13 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Gunnar Horrigmo <gnunar@stoffe-pro.net> writes:

> The `excorporate' package hardcodes its diary files to
> ~/.emacs.d/excorporate, instead of honoring user-emacs-directory.

Right.  CCing Thomas, the package's maintainer.

> I've included a small fix:
>
> === begin diff ===
>
> diff --git a/excorporate-diary.el b/excorporate-diary.el
> index 833df3017c..b147bed42d 100644
> --- a/excorporate-diary.el
> +++ b/excorporate-diary.el
> @@ -76,13 +76,17 @@ respectively."
>               #'exco-diary-icalendar--add-diary-entry-around))
>  
>  (defvar excorporate-diary-today-file
> -  "~/.emacs.d/excorporate/diary-excorporate-today"
> +  (concat
> +   (file-name-as-directory user-emacs-directory)
> +   "excorporate/diary-excorporate-today")

Rather than concatenating file names as strings, better to use
locate-user-emacs-file in this case (or expand-file-name in general).
See (info "(elisp) Standard File Names").

[...]

> Am I submitting this the right way?

Ideally the patch would include a ChangeLog-style commit message
referencing this bug number; see the guidelines in the CONTRIBUTE
file[1] at the top of the Emacs source tree.  Otherwise looks fine :).

[1]: https://git.savannah.gnu.org/cgit/emacs.git/tree/CONTRIBUTE

Thanks,

-- 
Basil





reply via email to

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