I've a problem with this statement:
(setq org-mobile-directory "~/Dropbox/MobileOrg")
It works in Linux (and maybe in OSX too), because the tilde is expanded in /home/<me>/Dropbox/MobileOrg
. It doesn't in Windows, because emacs expand the tilde into C:\Users\<me>\AppData\Roaming\
while Dropbox refers to the %USERPROFILE%
environmental variable, which is expanded into C:\Users\<me>\
.
I already know I can use two different files depending to the OS, or introduce a condition. But I'm wondering if I can somehow avail of some variable I did not take in consideration. Any clue?
Thanks in advance.
(setenv "USERPROFILE" (or (getenv "USERPROFILE") (getenv "HOME"))
, and then write(setq org-mobile-directory "$USERPROFILE/Dropbox/MobileOrg")
. I.e. Linux doesn't haveUSERPROFILE
variable, so setting it would have no effect on anything else, but Emacs would know to expand it to the same path as yourHOME
directory.