From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gunnar Horrigmo Newsgroups: gmane.emacs.bugs Subject: bug#46056: hardcoded ~/.emacs.d in elpa package excorporate Date: Sun, 24 Jan 2021 03:45:17 +0100 Message-ID: References: <878s8jz3ny.fsf@tcd.ie> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35780"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Thomas Fitzsimmons , 46056@debbugs.gnu.org To: "Basil L. Contovounesios" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jan 24 03:46:12 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l3VPn-00099x-GB for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 24 Jan 2021 03:46:11 +0100 Original-Received: from localhost ([::1]:40372 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l3VPl-0005oe-VZ for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 23 Jan 2021 21:46:09 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54494) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l3VPe-0005oJ-PK for bug-gnu-emacs@gnu.org; Sat, 23 Jan 2021 21:46:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:52388) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l3VPe-0000mE-HG for bug-gnu-emacs@gnu.org; Sat, 23 Jan 2021 21:46:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1l3VPe-00058u-EI for bug-gnu-emacs@gnu.org; Sat, 23 Jan 2021 21:46:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Gunnar Horrigmo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 24 Jan 2021 02:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46056 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 46056-submit@debbugs.gnu.org id=B46056.161145633419729 (code B ref 46056); Sun, 24 Jan 2021 02:46:02 +0000 Original-Received: (at 46056) by debbugs.gnu.org; 24 Jan 2021 02:45:34 +0000 Original-Received: from localhost ([127.0.0.1]:35701 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l3VPC-000588-0h for submit@debbugs.gnu.org; Sat, 23 Jan 2021 21:45:34 -0500 Original-Received: from aibo.runbox.com ([91.220.196.211]:38808) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l3VP9-00057z-Pi for 46056@debbugs.gnu.org; Sat, 23 Jan 2021 21:45:33 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=runbox.no; s=selector2; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From; bh=EuhaYKowuI5fa1psWJFXZ7V15r2X8j2T8pPYW8GRnWE=; b=TAF6+X4AvWk7SCjeaM/XCbbKnm pJaO+wgJbwlVM0bV7v84m9UMojfuUYt4LAaKlmNQK+5jvFmwrszHckZXfXtOrR6g2f8JkqB+W8eqY zOetWQyvh5j3Iob1Qw6VoDGjqdLVG1/Pv7gACvYBkQFdxG7ykeYOgsd3UgQBHtdotF00Q5M4lq0Mr Nq2jCS81O60xR8ygx6yeXgneH9/ad6R6zdeEyl/pZId5fiU+2qigEYUlbByGrHib/8i0TtawVUEUk koNf757kK66Ya0gO3UN2yBLG8HMVi9SpYnOG8OYxvnf/3Cy5/Xt3QZRIkfy72+xne7UI0X0mqf/g9 G7+ipZYw==; Original-Received: from [10.9.9.73] (helo=submission02.runbox) by mailtransmit03.runbox with esmtp (Exim 4.86_2) (envelope-from ) id 1l3VP7-0007uf-Lt; Sun, 24 Jan 2021 03:45:29 +0100 Original-Received: by submission02.runbox with esmtpsa [Authenticated alias (9149)] (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) id 1l3VOv-00012y-Ur; Sun, 24 Jan 2021 03:45:17 +0100 In-Reply-To: <878s8jz3ny.fsf@tcd.ie> (Basil L. Contovounesios's message of "Sat, 23 Jan 2021 22:31:13 +0000") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:198492 Archived-At: "Basil L. Contovounesios" 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