From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Thomas Fitzsimmons Newsgroups: gmane.emacs.bugs Subject: bug#46056: hardcoded ~/.emacs.d in elpa package excorporate Date: Sat, 23 Jan 2021 22:16:20 -0500 Message-ID: References: <878s8jz3ny.fsf@tcd.ie> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39814"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1.90 (gnu/linux) Cc: "Basil L. Contovounesios" , 46056-done@debbugs.gnu.org To: Gunnar Horrigmo Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jan 24 04:17:15 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 1l3Vtr-000ACb-3k for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 24 Jan 2021 04:17:15 +0100 Original-Received: from localhost ([::1]:49978 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l3Vtp-0006V0-NF for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 23 Jan 2021 22:17:13 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57372) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l3Vte-0006Um-V0 for bug-gnu-emacs@gnu.org; Sat, 23 Jan 2021 22:17:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:52409) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l3Vte-0001vq-N4 for bug-gnu-emacs@gnu.org; Sat, 23 Jan 2021 22:17:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1l3Vte-0005tP-HY for bug-gnu-emacs@gnu.org; Sat, 23 Jan 2021 22:17:02 -0500 Resent-From: Thomas Fitzsimmons Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Sun, 24 Jan 2021 03:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 46056 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Mail-Followup-To: 46056@debbugs.gnu.org, fitzsim@fitzsim.org, gnunar@stoffe-pro.net Original-Received: via spool by 46056-done@debbugs.gnu.org id=D46056.161145819122602 (code D ref 46056); Sun, 24 Jan 2021 03:17:02 +0000 Original-Received: (at 46056-done) by debbugs.gnu.org; 24 Jan 2021 03:16:31 +0000 Original-Received: from localhost ([127.0.0.1]:35722 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l3Vt9-0005sU-5C for submit@debbugs.gnu.org; Sat, 23 Jan 2021 22:16:31 -0500 Original-Received: from mail-qv1-f48.google.com ([209.85.219.48]:36279) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l3Vt7-0005sF-56 for 46056-done@debbugs.gnu.org; Sat, 23 Jan 2021 22:16:29 -0500 Original-Received: by mail-qv1-f48.google.com with SMTP id es14so869910qvb.3 for <46056-done@debbugs.gnu.org>; Sat, 23 Jan 2021 19:16:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fitzsim-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=g17CJfivoema522oFsEP4toa269bH963fjFJTJpDhpk=; b=X01TN+mjASU6FPyCf9oFx7J4F5l4DIqTM7xGgaW2/Yj/ZFv5Rs4gpwVAW4bk+aL8NS nOtum6VlEHPccdd8X+opEcZu+1xZNQZxUJ4HfAqF0ytwsRG39oLm9DaFD0MryXgyFHbl fJK3fKKLos/7jDXObeA+uCk7TBhar/EIkEbFJfUme49q03V5iFmP0GkcoLH9CU8sJlym 3FLMJ2SIdjEjhyWyiLgQzX8OX0kT3lmw+jTqyUo7mFx8IR3qN6+8n+7ygfk7H7RdOlKq eLILpwSkCal2Ia4aSacfF/dhTEfXDERs22ghhgzRiMMqUzuYyUKmIAoq9EDxZ8N7ydhB MROw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=g17CJfivoema522oFsEP4toa269bH963fjFJTJpDhpk=; b=N1B2nUf0Cfr4mWg8XHQiBipvJ6LCzkZRfzXhIGBN/MlWn/OXlwVRLStWtgKGqJwa+E ccSO7lEo25lgyjOwr0GxukEaH920XIK7rRq/RT7QXR492ODdj7nrz34GkvZfcEkIiISb CsrojX9lMmaHpFh/wmPqXUXWdkHvIE22K460tsDa03Gt2AHkH/+sFj8dNphdeMCXJ4Zj Trc2LkivMgVMSg17UeEAz+caJGRZiXhxSpd0eSWKLBeTtIUydHwOcX/vK/VPm/7Rrwbq Tc3ZM+h3CXBqN3y4r3Z+H2y/q1GNb7UXshi1YNs8swAotEjCprRvahh3qxUDKOtknr6a 6+GQ== X-Gm-Message-State: AOAM530IbFWFW2/Bv4Y9qb4fUHQ2TPyjRQGRHH22BJBt970lGFJul979 V10jLNMvbGO8jHOu5y09upDf6/1mcIDNoA== X-Google-Smtp-Source: ABdhPJwYSjdl6zTNYw3O6nHL61IaUgcp8BXumRK41qjf3rqdmAkgCCzOVv6xLbRW7sZBqbqAQk1OHw== X-Received: by 2002:a0c:c489:: with SMTP id u9mr467328qvi.31.1611458183142; Sat, 23 Jan 2021 19:16:23 -0800 (PST) Original-Received: from localhost.localdomain (69-165-165-189.dsl.teksavvy.com. [69.165.165.189]) by smtp.gmail.com with ESMTPSA id z16sm8209273qtb.73.2021.01.23.19.16.21 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 23 Jan 2021 19:16:21 -0800 (PST) In-Reply-To: (Gunnar Horrigmo's message of "Sun, 24 Jan 2021 03:45:17 +0100") 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:198494 Archived-At: --=-=-= Content-Type: text/plain Hi Gunnar, Gunnar Horrigmo writes: > "Basil L. Contovounesios" 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 --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-Do-not-hard-code-diary-directory.patch >From 58d808a71893ec2a953151eb80f1ef88f25ef80f Mon Sep 17 00:00:00 2001 From: Gunnar Horrigmo 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 --=-=-=--