unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#47880: [PATCH] Don't hard-code ~/.emacs.d in rcirc.el
@ 2021-04-18 19:12 Philip Kaludercic
  2021-04-19  7:36 ` Stefan Kangas
  0 siblings, 1 reply; 2+ messages in thread
From: Philip Kaludercic @ 2021-04-18 19:12 UTC (permalink / raw)
  To: 47880

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


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.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0004-lisp-net-rcirc.el-rcirc-log-directory-Use-locate-use.patch --]
[-- Type: text/x-diff, Size: 770 bytes --]

From 620384e1c9f50bcce65cec0771265297678905d2 Mon Sep 17 00:00:00 2001
From: Philip K <philipk@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


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

* bug#47880: [PATCH] Don't hard-code ~/.emacs.d in rcirc.el
  2021-04-18 19:12 bug#47880: [PATCH] Don't hard-code ~/.emacs.d in rcirc.el Philip Kaludercic
@ 2021-04-19  7:36 ` Stefan Kangas
  0 siblings, 0 replies; 2+ messages in thread
From: Stefan Kangas @ 2021-04-19  7:36 UTC (permalink / raw)
  To: Philip Kaludercic; +Cc: 47880

tags 47880 + fixed
close 47880 28.1
thanks

Philip Kaludercic <philipk@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.





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

end of thread, other threads:[~2021-04-19  7:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-18 19:12 bug#47880: [PATCH] Don't hard-code ~/.emacs.d in rcirc.el Philip Kaludercic
2021-04-19  7:36 ` Stefan Kangas

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