unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#46056: hardcoded ~/.emacs.d in elpa package excorporate
@ 2021-01-23 18:13 Gunnar Horrigmo
  2021-01-23 22:31 ` Basil L. Contovounesios
  0 siblings, 1 reply; 10+ messages in thread
From: Gunnar Horrigmo @ 2021-01-23 18:13 UTC (permalink / raw)
  To: 46056


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@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





^ permalink raw reply related	[flat|nested] 10+ messages in thread

* bug#46056: hardcoded ~/.emacs.d in elpa package excorporate
  2021-01-23 18:13 bug#46056: hardcoded ~/.emacs.d in elpa package excorporate Gunnar Horrigmo
@ 2021-01-23 22:31 ` Basil L. Contovounesios
  2021-01-24  2:45   ` Gunnar Horrigmo
  0 siblings, 1 reply; 10+ messages in thread
From: Basil L. Contovounesios @ 2021-01-23 22:31 UTC (permalink / raw)
  To: Gunnar Horrigmo; +Cc: Thomas Fitzsimmons, 46056

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





^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#46056: hardcoded ~/.emacs.d in elpa package excorporate
  2021-01-23 22:31 ` Basil L. Contovounesios
@ 2021-01-24  2:45   ` Gunnar Horrigmo
  2021-01-24  3:16     ` Thomas Fitzsimmons
  2021-01-24 11:58     ` Basil L. Contovounesios
  0 siblings, 2 replies; 10+ messages in thread
From: Gunnar Horrigmo @ 2021-01-24  2:45 UTC (permalink / raw)
  To: Basil L. Contovounesios; +Cc: Thomas Fitzsimmons, 46056

"Basil L. Contovounesios" <contovob@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





^ permalink raw reply related	[flat|nested] 10+ messages in thread

* bug#46056: hardcoded ~/.emacs.d in elpa package excorporate
  2021-01-24  2:45   ` Gunnar Horrigmo
@ 2021-01-24  3:16     ` Thomas Fitzsimmons
  2021-01-24  9:21       ` Michael Albinus
                         ` (2 more replies)
  2021-01-24 11:58     ` Basil L. Contovounesios
  1 sibling, 3 replies; 10+ messages in thread
From: Thomas Fitzsimmons @ 2021-01-24  3:16 UTC (permalink / raw)
  To: Gunnar Horrigmo; +Cc: Basil L. Contovounesios, 46056-done

[-- Attachment #1: Type: text/plain, Size: 1180 bytes --]

Hi Gunnar,

Gunnar Horrigmo <horrigmo@runbox.no> writes:

> "Basil L. Contovounesios" <contovob@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


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Do-not-hard-code-diary-directory.patch --]
[-- Type: text/x-diff, Size: 1412 bytes --]

From 58d808a71893ec2a953151eb80f1ef88f25ef80f Mon Sep 17 00:00:00 2001
From: Gunnar Horrigmo <horrigmo@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)
---
 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 @@ (unless (string-match "omit-trailing-space" (documentation 'diary-make-entry))
 	      #'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


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* bug#46056: hardcoded ~/.emacs.d in elpa package excorporate
  2021-01-24  3:16     ` Thomas Fitzsimmons
@ 2021-01-24  9:21       ` Michael Albinus
  2021-01-24 17:34         ` Thomas Fitzsimmons
  2021-01-24 12:04       ` Basil L. Contovounesios
  2021-01-24 12:48       ` Gunnar Horrigmo
  2 siblings, 1 reply; 10+ messages in thread
From: Michael Albinus @ 2021-01-24  9:21 UTC (permalink / raw)
  To: 46056; +Cc: fitzsim, gnunar

Thomas Fitzsimmons <fitzsim@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.





^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#46056: hardcoded ~/.emacs.d in elpa package excorporate
  2021-01-24  2:45   ` Gunnar Horrigmo
  2021-01-24  3:16     ` Thomas Fitzsimmons
@ 2021-01-24 11:58     ` Basil L. Contovounesios
  1 sibling, 0 replies; 10+ messages in thread
From: Basil L. Contovounesios @ 2021-01-24 11:58 UTC (permalink / raw)
  To: Gunnar Horrigmo; +Cc: Thomas Fitzsimmons, 46056

Gunnar Horrigmo <horrigmo@runbox.no> writes:

> "Basil L. Contovounesios" <contovob@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





^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#46056: hardcoded ~/.emacs.d in elpa package excorporate
  2021-01-24  3:16     ` Thomas Fitzsimmons
  2021-01-24  9:21       ` Michael Albinus
@ 2021-01-24 12:04       ` Basil L. Contovounesios
  2021-01-24 12:48       ` Gunnar Horrigmo
  2 siblings, 0 replies; 10+ messages in thread
From: Basil L. Contovounesios @ 2021-01-24 12:04 UTC (permalink / raw)
  To: Thomas Fitzsimmons; +Cc: Gunnar Horrigmo, 46056

Thomas Fitzsimmons <fitzsim@fitzsim.org> writes:

> From 58d808a71893ec2a953151eb80f1ef88f25ef80f Mon Sep 17 00:00:00 2001
> From: Gunnar Horrigmo <horrigmo@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





^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#46056: hardcoded ~/.emacs.d in elpa package excorporate
  2021-01-24  3:16     ` Thomas Fitzsimmons
  2021-01-24  9:21       ` Michael Albinus
  2021-01-24 12:04       ` Basil L. Contovounesios
@ 2021-01-24 12:48       ` Gunnar Horrigmo
  2 siblings, 0 replies; 10+ messages in thread
From: Gunnar Horrigmo @ 2021-01-24 12:48 UTC (permalink / raw)
  To: Thomas Fitzsimmons; +Cc: Basil L. Contovounesios, 46056-done

Thomas Fitzsimmons <fitzsim@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





^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#46056: hardcoded ~/.emacs.d in elpa package excorporate
  2021-01-24  9:21       ` Michael Albinus
@ 2021-01-24 17:34         ` Thomas Fitzsimmons
  2021-01-24 17:40           ` Michael Albinus
  0 siblings, 1 reply; 10+ messages in thread
From: Thomas Fitzsimmons @ 2021-01-24 17:34 UTC (permalink / raw)
  To: Michael Albinus; +Cc: 46056, gnunar

Michael Albinus <michael.albinus@gmx.de> writes:

> Thomas Fitzsimmons <fitzsim@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





^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#46056: hardcoded ~/.emacs.d in elpa package excorporate
  2021-01-24 17:34         ` Thomas Fitzsimmons
@ 2021-01-24 17:40           ` Michael Albinus
  0 siblings, 0 replies; 10+ messages in thread
From: Michael Albinus @ 2021-01-24 17:40 UTC (permalink / raw)
  To: Thomas Fitzsimmons; +Cc: 46056, gnunar

Thomas Fitzsimmons <fitzsim@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.





^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2021-01-24 17:40 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-23 18:13 bug#46056: hardcoded ~/.emacs.d in elpa package excorporate Gunnar Horrigmo
2021-01-23 22:31 ` Basil L. Contovounesios
2021-01-24  2:45   ` Gunnar Horrigmo
2021-01-24  3:16     ` Thomas Fitzsimmons
2021-01-24  9:21       ` Michael Albinus
2021-01-24 17:34         ` Thomas Fitzsimmons
2021-01-24 17:40           ` Michael Albinus
2021-01-24 12:04       ` Basil L. Contovounesios
2021-01-24 12:48       ` Gunnar Horrigmo
2021-01-24 11:58     ` Basil L. Contovounesios

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).