GNU bug report logs - #46056
hardcoded ~/.emacs.d in elpa package excorporate

Previous Next

Package: emacs;

Reported by: Gunnar Horrigmo <gnunar <at> stoffe-pro.net>

Date: Sat, 23 Jan 2021 21:25:02 UTC

Severity: normal

Tags: patch

Done: Thomas Fitzsimmons <fitzsim <at> fitzsim.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 46056 in the body.
You can then email your comments to 46056 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#46056; Package emacs. (Sat, 23 Jan 2021 21:25:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Gunnar Horrigmo <gnunar <at> stoffe-pro.net>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 23 Jan 2021 21:25:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Gunnar Horrigmo <gnunar <at> stoffe-pro.net>
To: bug-gnu-emacs <at> gnu.org
Subject: hardcoded ~/.emacs.d in elpa package excorporate
Date: Sat, 23 Jan 2021 19:13:44 +0100
The `excorporate' package hardcodes its diary files to
~/.emacs.d/excorporate, instead of honoring user-emacs-directory.

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")
   "The diary file where Excorporate should save today's meetings.
 This file will be #include'd in `diary-file' by
 `excorporate-diary-enable'.")
 
 (defvar excorporate-diary-transient-file
-  "~/.emacs.d/excorporate/diary-excorporate-transient"
+  (concat
+   (file-name-as-directory user-emacs-directory)
+   "excorporate/diary-excorporate-transient")
   "The diary file where Excorporate should save retrieved meetings.
 This file will be #include'd in `diary-file' by
 `excorporate-diary-enable'.")
[gunnar <at> titanium excorporate]$ git diff -u
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")
   "The diary file where Excorporate should save today's meetings.
 This file will be #include'd in `diary-file' by
 `excorporate-diary-enable'.")
 
 (defvar excorporate-diary-transient-file
-  "~/.emacs.d/excorporate/diary-excorporate-transient"
+  (concat
+   (file-name-as-directory user-emacs-directory)
+   "excorporate/diary-excorporate-transient")
   "The diary file where Excorporate should save retrieved meetings.
 This file will be #include'd in `diary-file' by
 `excorporate-diary-enable'.")
=== end diff ===


Am I submitting this the right way?

-- 
Gunnar




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#46056; Package emacs. (Sat, 23 Jan 2021 22:32:01 GMT) Full text and rfc822 format available.

Message #8 received at 46056 <at> debbugs.gnu.org (full text, mbox):

From: "Basil L. Contovounesios" <contovob <at> tcd.ie>
To: Gunnar Horrigmo <gnunar <at> stoffe-pro.net>
Cc: Thomas Fitzsimmons <fitzsim <at> fitzsim.org>, 46056 <at> debbugs.gnu.org
Subject: Re: bug#46056: hardcoded ~/.emacs.d in elpa package excorporate
Date: Sat, 23 Jan 2021 22:31:13 +0000
Gunnar Horrigmo <gnunar <at> 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




Added tag(s) patch. Request was from "Basil L. Contovounesios" <contovob <at> tcd.ie> to control <at> debbugs.gnu.org. (Sat, 23 Jan 2021 22:33:01 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#46056; Package emacs. (Sun, 24 Jan 2021 02:46:02 GMT) Full text and rfc822 format available.

Message #13 received at 46056 <at> debbugs.gnu.org (full text, mbox):

From: Gunnar Horrigmo <horrigmo <at> runbox.no>
To: "Basil L. Contovounesios" <contovob <at> tcd.ie>
Cc: Thomas Fitzsimmons <fitzsim <at> fitzsim.org>, 46056 <at> debbugs.gnu.org
Subject: Re: bug#46056: hardcoded ~/.emacs.d in elpa package excorporate
Date: Sun, 24 Jan 2021 03:45:17 +0100
"Basil L. Contovounesios" <contovob <at> tcd.ie> writes:

> Right.  CCing Thomas, the package's maintainer.

Thank you.


> 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").

Good advice! 


> 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

Not that Thomas needs my help, but just for my own excercise, is this
what you prefer?

Subject: [PATCH] Use `locate-user-emacs-file' instead of hardcoded paths to
 diary files

---
 excorporate-diary.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/excorporate-diary.el b/excorporate-diary.el
index 833df3017c..d936f6494c 100644
--- a/excorporate-diary.el
+++ b/excorporate-diary.el
@@ -76,13 +76,13 @@ respectively."
              #'exco-diary-icalendar--add-diary-entry-around))
 
 (defvar excorporate-diary-today-file
-  "~/.emacs.d/excorporate/diary-excorporate-today"
+  (locate-user-emacs-file "excorporate/diary-excorporate-today")
   "The diary file where Excorporate should save today's meetings.
 This file will be #include'd in `diary-file' by
 `excorporate-diary-enable'.")
 
 (defvar excorporate-diary-transient-file
-  "~/.emacs.d/excorporate/diary-excorporate-transient"
+  (locate-user-emacs-file "excorporate/diary-excorporate-transient")
   "The diary file where Excorporate should save retrieved meetings.
 This file will be #include'd in `diary-file' by
 `excorporate-diary-enable'.")
-- 
2.30.0

-- 
Gunnar




Reply sent to Thomas Fitzsimmons <fitzsim <at> fitzsim.org>:
You have taken responsibility. (Sun, 24 Jan 2021 03:17:02 GMT) Full text and rfc822 format available.

Notification sent to Gunnar Horrigmo <gnunar <at> stoffe-pro.net>:
bug acknowledged by developer. (Sun, 24 Jan 2021 03:17:02 GMT) Full text and rfc822 format available.

Message #18 received at 46056-done <at> debbugs.gnu.org (full text, mbox):

From: Thomas Fitzsimmons <fitzsim <at> fitzsim.org>
To: Gunnar Horrigmo <horrigmo <at> runbox.no>
Cc: "Basil L. Contovounesios" <contovob <at> tcd.ie>, 46056-done <at> debbugs.gnu.org
Subject: Re: bug#46056: hardcoded ~/.emacs.d in elpa package excorporate
Date: Sat, 23 Jan 2021 22:16:20 -0500
[Message part 1 (text/plain, inline)]
Hi Gunnar,

Gunnar Horrigmo <horrigmo <at> runbox.no> writes:

> "Basil L. Contovounesios" <contovob <at> tcd.ie> writes:
>
>> Right.  CCing Thomas, the package's maintainer.

Thanks Basil, I might not have seen this otherwise (see postscript).

> Thank you.
>
>> 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").
>
> Good advice! 
>
>> 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
>
> Not that Thomas needs my help, but just for my own excercise, is this
> what you prefer?

Thanks for the fix.  I wrote up the ChangeLog and pushed the change, see
attached.  It will be released when Excorporate 0.9.2 hits GNU ELPA
tomorrow or the day after.

Thomas

P.S. The results of the following steps don't include this bug report; I
wonder why:

M-x debbugs-gnu-search RET
Enter search phrase: excorporate RET
Enter attribute: RET

[0001-Do-not-hard-code-diary-directory.patch (text/x-diff, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#46056; Package emacs. (Sun, 24 Jan 2021 09:22:02 GMT) Full text and rfc822 format available.

Message #21 received at 46056 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: 46056 <at> debbugs.gnu.org
Cc: fitzsim <at> fitzsim.org, gnunar <at> stoffe-pro.net
Subject: Re: bug#46056: hardcoded ~/.emacs.d in elpa package excorporate
Date: Sun, 24 Jan 2021 10:21:09 +0100
Thomas Fitzsimmons <fitzsim <at> fitzsim.org> writes:

> Hi Gunnar,

Hi Thomas,

> P.S. The results of the following steps don't include this bug report; I
> wonder why:
>
> M-x debbugs-gnu-search RET
> Enter search phrase: excorporate RET
> Enter attribute: RET

I suppose it takes time to add this bug to the hyperestraier index. See
(info "(debbugs-ug) Searching Bugs")

--8<---------------cut here---------------start------------->8---
   The search engine uses an index over the bug database.  This index
is refreshed daily; search hits may not include recent changes made
the same day.
--8<---------------cut here---------------end--------------->8---


> Thomas

Best regards, Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#46056; Package emacs. (Sun, 24 Jan 2021 11:59:01 GMT) Full text and rfc822 format available.

Message #24 received at 46056 <at> debbugs.gnu.org (full text, mbox):

From: "Basil L. Contovounesios" <contovob <at> tcd.ie>
To: Gunnar Horrigmo <horrigmo <at> runbox.no>
Cc: Thomas Fitzsimmons <fitzsim <at> fitzsim.org>, 46056 <at> debbugs.gnu.org
Subject: Re: bug#46056: hardcoded ~/.emacs.d in elpa package excorporate
Date: Sun, 24 Jan 2021 11:58:25 +0000
Gunnar Horrigmo <horrigmo <at> runbox.no> writes:

> "Basil L. Contovounesios" <contovob <at> tcd.ie> writes:
>
>> 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
>
> Not that Thomas needs my help, but just for my own excercise, is this
> what you prefer?

Yes, see also Thomas' final version.

Thanks,

-- 
Basil




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#46056; Package emacs. (Sun, 24 Jan 2021 12:05:01 GMT) Full text and rfc822 format available.

Message #27 received at 46056 <at> debbugs.gnu.org (full text, mbox):

From: "Basil L. Contovounesios" <contovob <at> tcd.ie>
To: Thomas Fitzsimmons <fitzsim <at> fitzsim.org>
Cc: Gunnar Horrigmo <horrigmo <at> runbox.no>, 46056 <at> debbugs.gnu.org
Subject: Re: bug#46056: hardcoded ~/.emacs.d in elpa package excorporate
Date: Sun, 24 Jan 2021 12:04:13 +0000
Thomas Fitzsimmons <fitzsim <at> fitzsim.org> writes:

> From 58d808a71893ec2a953151eb80f1ef88f25ef80f Mon Sep 17 00:00:00 2001
> From: Gunnar Horrigmo <horrigmo <at> runbox.no>
> Date: Sat, 23 Jan 2021 21:57:57 -0500
> Subject: [PATCH] Do not hard code diary directory
>
> * excorporate-diary.el (excorporate-diary-today-file): Use
> `locate-user-emacs-file' instead of hardcoded paths to diary files.
> (excorporate-diary-transient-file): Likewise. (Bug#45623)

FWIW, instead of likewise/ditto you can also write in the form

  * A (B, C): D.
  * E (F, G)
  (H, I): J.
  * K (L):
  * M (N): O.

if you prefer.

Thanks,

-- 
Basil




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#46056; Package emacs. (Sun, 24 Jan 2021 12:49:02 GMT) Full text and rfc822 format available.

Message #30 received at 46056-done <at> debbugs.gnu.org (full text, mbox):

From: Gunnar Horrigmo <horrigmo <at> runbox.no>
To: Thomas Fitzsimmons <fitzsim <at> fitzsim.org>
Cc: "Basil L. Contovounesios" <contovob <at> tcd.ie>, 46056-done <at> debbugs.gnu.org
Subject: Re: bug#46056: hardcoded ~/.emacs.d in elpa package excorporate
Date: Sun, 24 Jan 2021 13:48:11 +0100
Thomas Fitzsimmons <fitzsim <at> fitzsim.org> writes:

> Thanks for the fix.  I wrote up the ChangeLog and pushed the change, see
> attached.  It will be released when Excorporate 0.9.2 hits GNU ELPA
> tomorrow or the day after.

Thank you. :)


-- 
Gunnar




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#46056; Package emacs. (Sun, 24 Jan 2021 17:35:02 GMT) Full text and rfc822 format available.

Message #33 received at 46056 <at> debbugs.gnu.org (full text, mbox):

From: Thomas Fitzsimmons <fitzsim <at> fitzsim.org>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: gnunar <at> stoffe-pro.net, 46056 <at> debbugs.gnu.org
Subject: Re: bug#46056: hardcoded ~/.emacs.d in elpa package excorporate
Date: Sun, 24 Jan 2021 12:34:26 -0500
Michael Albinus <michael.albinus <at> gmx.de> writes:

> Thomas Fitzsimmons <fitzsim <at> fitzsim.org> writes:
>
>> Hi Gunnar,
>
> Hi Thomas,
>
>> P.S. The results of the following steps don't include this bug report; I
>> wonder why:
>>
>> M-x debbugs-gnu-search RET
>> Enter search phrase: excorporate RET
>> Enter attribute: RET
>
> I suppose it takes time to add this bug to the hyperestraier index. See
> (info "(debbugs-ug) Searching Bugs")
>
>    The search engine uses an index over the bug database.  This index
> is refreshed daily; search hits may not include recent changes made
> the same day.

OK, thanks for the explanation.  I do see this bug report in the results
now.  I didn't have the Debbugs UG manual installed until just now when
I upgraded to 0.27.  Looks nice!

Is this daily refresh already using incremental registration [1]?  Is
performing incremental registration of each bug report as it is filed
infeasible?

Thomas

1. https://dbmx.net/hyperestraier/intro-en.html#deployment




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#46056; Package emacs. (Sun, 24 Jan 2021 17:41:02 GMT) Full text and rfc822 format available.

Message #36 received at 46056 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Thomas Fitzsimmons <fitzsim <at> fitzsim.org>
Cc: gnunar <at> stoffe-pro.net, 46056 <at> debbugs.gnu.org
Subject: Re: bug#46056: hardcoded ~/.emacs.d in elpa package excorporate
Date: Sun, 24 Jan 2021 18:40:19 +0100
Thomas Fitzsimmons <fitzsim <at> fitzsim.org> writes:

Hi Thomas,

> Is this daily refresh already using incremental registration [1]?  Is
> performing incremental registration of each bug report as it is filed
> infeasible?

Don't know. This is rather a question to the debbugs people from the
Debian project.

> Thomas

Best regards, Michael.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 22 Feb 2021 12:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 113 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.