The setting
(setq feeds-file (expand-file-name "notes.org" org-directory ))
is perfect for emacs internal usage. It gives "D:/my_data/notes.org"
with forward-slashes.
The relevant section of the emacs manual is G.3 File Names on MS-Windows. It says:
MS-Windows and MS-DOS normally use a backslash, ‘\’, to separate name units within a file name, instead of the slash used on other systems. Emacs on MS-DOS/MS-Windows permits use of either slash or backslash, and also knows about drive letters in file names.
There is another section on file names in the elisp manual:
On MS-DOS and MS-Windows, these functions (like the function that
actually operate on files) accept MS-DOS or MS-Windows file-name syntax,
where backslashes separate the components, as well as POSIX syntax; but
they always return POSIX syntax. This enables Lisp programs to specify
file names in POSIX syntax and work properly on all systems without
change.
If you really need to convert the standard file name into the operating system dependent format you can use convert-standard-filename
on file names in standard format.
If you need the windows separator ?\\
instead of /
you can replace it by
(subst-char-in-string ?/ ?\\ standard-path)
where standard-path
is the file name with /
as path component separator.
Also be aware of the footnote in the Section "File Names" of the elisp manual that mentions the two functions cygwin-convert-file-name-from-windows
and cygwin-convert-file-name-to-windows
for converting file names under cygwin.
[1] In MS-Windows versions of Emacs compiled for the Cygwin environment, you can use the functions cygwin-convert-file-name-to-windows and cygwin-convert-file-name-from-windows to convert between the two file-name syntaxes.