emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] Change references to "~/.emacs.d" into `user-emacs-directory' ?
@ 2013-01-09 16:09 Nicolas Richard
  2013-01-09 16:59 ` Bastien
  0 siblings, 1 reply; 4+ messages in thread
From: Nicolas Richard @ 2013-01-09 16:09 UTC (permalink / raw)
  To: emacs-orgmode

Hi,

Not sure if this is of any importance, but since the variable
user-emacs-directory (a defconst) exists, maybe org-mode could use it
instead of "~/.emacs.d". It seems only relevant for MS-DOS systems,
though.

Nico.

From 4fb0ecaef07ca9d10e5a57bef19f3201a2c90097 Mon Sep 17 00:00:00 2001
From: Nicolas Richard <theonewiththeevillook@yahoo.fr>
Date: Wed, 9 Jan 2013 16:41:12 +0100

* lisp/org-id.el (org-id-locations-file):
* contrib/lisp/org-track.el (org-track-directory):
* lisp/org-clock.el (org-clock-persist-file): Fix hardcoded reference to "~/.emacs.d".
---
 contrib/lisp/org-track.el | 2 +-
 lisp/org-clock.el         | 2 +-
 lisp/org-id.el            | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/contrib/lisp/org-track.el b/contrib/lisp/org-track.el
index d058135..a44472e 100644
--- a/contrib/lisp/org-track.el
+++ b/contrib/lisp/org-track.el
@@ -72,7 +72,7 @@ time to time."
   :version "22.1"
   :group 'org)
 
-(defcustom org-track-directory "~/.emacs.d/org/lisp"
+(defcustom org-track-directory (concat user-emacs-directory "org/lisp")
   "Directory where your org-mode/ directory lives.
 If that directory does not exist, it will be created."
   :type 'directory)
diff --git a/lisp/org-clock.el b/lisp/org-clock.el
index 823eac8..92168bc 100644
--- a/lisp/org-clock.el
+++ b/lisp/org-clock.el
@@ -194,7 +194,7 @@ Emacs initialization file."
 	  (const :tag "No persistence" nil)))
 
 (defcustom org-clock-persist-file (convert-standard-filename
-				   "~/.emacs.d/org-clock-save.el")
+				   (concat user-emacs-directory "org-clock-save.el"))
   "File to save clock data to."
   :group 'org-clock
   :type 'string)
diff --git a/lisp/org-id.el b/lisp/org-id.el
index 5d8e5b0..b35ea5e 100644
--- a/lisp/org-id.el
+++ b/lisp/org-id.el
@@ -186,7 +186,7 @@ the link."
   :type 'boolean)
 
 (defcustom org-id-locations-file (convert-standard-filename
-				  "~/.emacs.d/.org-id-locations")
+				  (concat user-emacs-directory ".org-id-locations"))
   "The file for remembering in which file an ID was defined.
 This variable is only relevant when `org-id-track-globally' is set."
   :group 'org-id
-- 
1.8.1

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

* Re: [PATCH] Change references to "~/.emacs.d" into `user-emacs-directory' ?
  2013-01-09 16:09 [PATCH] Change references to "~/.emacs.d" into `user-emacs-directory' ? Nicolas Richard
@ 2013-01-09 16:59 ` Bastien
  2013-01-12 16:45   ` Achim Gratz
  0 siblings, 1 reply; 4+ messages in thread
From: Bastien @ 2013-01-09 16:59 UTC (permalink / raw)
  To: Nicolas Richard; +Cc: emacs-orgmode

Hi Nicolas,

"Nicolas Richard" <theonewiththeevillook@yahoo.fr> writes:

> Not sure if this is of any importance, but since the variable
> user-emacs-directory (a defconst) exists, maybe org-mode could use it
> instead of "~/.emacs.d". It seems only relevant for MS-DOS systems,
> though.

Applied, thanks.

-- 
 Bastien

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

* Re: [PATCH] Change references to "~/.emacs.d" into `user-emacs-directory' ?
  2013-01-09 16:59 ` Bastien
@ 2013-01-12 16:45   ` Achim Gratz
  2013-01-12 17:24     ` Bastien
  0 siblings, 1 reply; 4+ messages in thread
From: Achim Gratz @ 2013-01-12 16:45 UTC (permalink / raw)
  To: emacs-orgmode

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

Bastien writes:
>> Not sure if this is of any importance, but since the variable
>> user-emacs-directory (a defconst) exists, maybe org-mode could use it
>> instead of "~/.emacs.d". It seems only relevant for MS-DOS systems,
>> though.
>
> Applied, thanks.

This introduces a regression, since XEmacs doesn't have that variable.
This patch fixes it (apply on master):


[-- Attachment #2: 0001-Compatibility-XEmacs-does-not-have-user-emacs-direct.patch --]
[-- Type: text/x-patch, Size: 1072 bytes --]

From 59d70e47484db7cdebd9c8ac0fe2124cbe7db4b0 Mon Sep 17 00:00:00 2001
From: Achim Gratz <Stromeko@Stromeko.DE>
Date: Sat, 12 Jan 2013 12:06:20 +0100
Subject: [PATCH] Compatibility: XEmacs does not have user-emacs-directory, use
 user-init-directory instead
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

* lisp/org-compat.el (user-emacs-directory): If not bound, define as an alias to
  `user-init-directory´ so that XEmacs continues to be happy with Org.
---
 lisp/org-compat.el | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/lisp/org-compat.el b/lisp/org-compat.el
index 687b81f..2d200b7 100644
--- a/lisp/org-compat.el
+++ b/lisp/org-compat.el
@@ -113,6 +113,11 @@ (defun org-version-check (version feature level)
 \f
 ;;;; Emacs/XEmacs compatibility
 
+(eval-and-compile
+  (when (and (not (boundp 'user-emacs-directory))
+	     (boundp 'user-init-directory))
+    (defvaralias 'user-emacs-directory 'user-init-directory)))
+
 ;; Keys
 (defconst org-xemacs-key-equivalents
   '(([mouse-1] . [button1])
-- 
1.8.1


[-- Attachment #3: Type: text/plain, Size: 192 bytes --]



Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

SD adaptation for Waldorf rackAttack V1.04R1:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada

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

* Re: [PATCH] Change references to "~/.emacs.d" into `user-emacs-directory' ?
  2013-01-12 16:45   ` Achim Gratz
@ 2013-01-12 17:24     ` Bastien
  0 siblings, 0 replies; 4+ messages in thread
From: Bastien @ 2013-01-12 17:24 UTC (permalink / raw)
  To: Achim Gratz; +Cc: emacs-orgmode

Achim Gratz <Stromeko@nexgo.de> writes:

> This introduces a regression, since XEmacs doesn't have that variable.
> This patch fixes it (apply on master):

Applied, thanks.

-- 
 Bastien

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

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

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-09 16:09 [PATCH] Change references to "~/.emacs.d" into `user-emacs-directory' ? Nicolas Richard
2013-01-09 16:59 ` Bastien
2013-01-12 16:45   ` Achim Gratz
2013-01-12 17:24     ` Bastien

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

	https://git.savannah.gnu.org/cgit/emacs/org-mode.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).