GNU bug report logs - #47880
[PATCH] Don't hard-code ~/.emacs.d in rcirc.el

Previous Next

Package: emacs;

Reported by: Philip Kaludercic <philipk <at> posteo.net>

Date: Sun, 18 Apr 2021 19:13:02 UTC

Severity: normal

Tags: fixed, patch

Fixed in version 28.1

Done: Stefan Kangas <stefan <at> marxist.se>

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 47880 in the body.
You can then email your comments to 47880 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#47880; Package emacs. (Sun, 18 Apr 2021 19:13:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Philip Kaludercic <philipk <at> posteo.net>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 18 Apr 2021 19:13:02 GMT) Full text and rfc822 format available.

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

From: Philip Kaludercic <philipk <at> posteo.net>
To: bug-gnu-emacs <at> gnu.org
Subject: [PATCH] Don't hard-code ~/.emacs.d in rcirc.el
Date: Sun, 18 Apr 2021 19:12:07 +0000
[Message part 1 (text/plain, inline)]
Hard-coding a file like this should be avoided, ever since Emacs also
supports XDG-compliant configurations paths.

Other than that, it might be better to not even store this under
XDG_CONFIG_HOME but XDG_DATA_HOME, as automatically generated files are
not configurations but data.

-- 
	Philip K.

[0004-lisp-net-rcirc.el-rcirc-log-directory-Use-locate-use.patch (text/x-diff, inline)]
From 620384e1c9f50bcce65cec0771265297678905d2 Mon Sep 17 00:00:00 2001
From: Philip K <philipk <at> posteo.net>
Date: Sun, 18 Apr 2021 20:41:37 +0200
Subject: [PATCH 4/4] * lisp/net/rcirc.el (rcirc-log-directory): Use
 locate-user-emacs-file

Author:
---
 lisp/net/rcirc.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el
index 7bb8ca671c..4fbc8bc4f7 100644
--- a/lisp/net/rcirc.el
+++ b/lisp/net/rcirc.el
@@ -1166,7 +1166,7 @@ rcirc-channel-p
        (or (eq (aref target 0) ?#)
            (eq (aref target 0) ?&))))
 
-(defcustom rcirc-log-directory "~/.emacs.d/rcirc-log"
+(defcustom rcirc-log-directory (locate-user-emacs-file "rcirc-log")
   "Directory to keep IRC logfiles."
   :type 'directory)
 
-- 
2.30.2


Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#47880; Package emacs. (Mon, 19 Apr 2021 07:38:02 GMT) Full text and rfc822 format available.

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

From: Stefan Kangas <stefan <at> marxist.se>
To: Philip Kaludercic <philipk <at> posteo.net>
Cc: 47880 <at> debbugs.gnu.org
Subject: Re: bug#47880: [PATCH] Don't hard-code ~/.emacs.d in rcirc.el
Date: Mon, 19 Apr 2021 07:36:56 +0000
tags 47880 + fixed
close 47880 28.1
thanks

Philip Kaludercic <philipk <at> posteo.net> writes:

> Hard-coding a file like this should be avoided, ever since Emacs also
> supports XDG-compliant configurations paths.

Thanks for the patch!  Pushed to master as commit 869e437c10.

Note that I adapted the commit message slightly and added a :version tag
to the defcustom.




Added tag(s) fixed. Request was from Stefan Kangas <stefan <at> marxist.se> to control <at> debbugs.gnu.org. (Mon, 19 Apr 2021 07:38:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 28.1, send any further explanations to 47880 <at> debbugs.gnu.org and Philip Kaludercic <philipk <at> posteo.net> Request was from Stefan Kangas <stefan <at> marxist.se> to control <at> debbugs.gnu.org. (Mon, 19 Apr 2021 07:38:02 GMT) Full text and rfc822 format available.

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

This bug report was last modified 2 years and 344 days ago.

Previous Next


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