From: Eli Zaretskii <eliz@gnu.org>
To: Pete Williamson <petewil@google.com>
Cc: emacs-devel@gnu.org
Subject: Re: [PATCH] for review - Allow expansion of "~" (as opposed to "~user")
Date: Sat, 28 Feb 2015 10:08:27 +0200 [thread overview]
Message-ID: <83r3ta4fwk.fsf@gnu.org> (raw)
In-Reply-To: <CAHsSLHA8R80TC1DUjETkaG=9OcOvCfV95T0aixsRu7k+Ep4TJg@mail.gmail.com>
> Date: Fri, 27 Feb 2015 16:06:02 -0800
> From: Pete Williamson <petewil@google.com>
>
> I'm porting Emacs to run on NaCl (Chrome Native Client) and the Chromebook.
> (You can see slides about this in the FOSDEM 2015 archives).
>
> The NaCl platform does not support expanding the "~user" syntax for filenames
> (where user is the name of the logged in user), but it does support expanding
> "~" in filenames when looking for the init.el file.
>
> I've made a patch to startup.el to check in "~" for .emacs.d/init.el if it is
> not found in "~user". Is taking this patch a good idea? I'm not sure how much
> emacs should adapt to the platform, and how much should be done in a private
> patch that does not affect other platforms, and I would be grateful for any
> guidance.
>
> Currently for the NaCl port, we have a patch in naclports which does OS
> specific fixes, and I can leave this patch in naclports if that is thought by
> others to be a better place, or I would be happy to contribute it back to Gnu
> if it is seen as generally useful.
>
> All comments on the patch welcome.
Simply reuse for NaCl what we already do for MS-Windows:
(if (file-directory-p (expand-file-name
;; We don't support ~USER on MS-Windows
;; and MS-DOS except for the current
;; user, and always load .emacs from
;; the current user's home directory
;; (see below). So always check "~",
;; even if invoked with "-u USER", or
;; if $USER or $LOGNAME are set to
;; something different.
(if (memq system-type '(windows-nt ms-dos))
"~"
(concat "~" init-file-user))))
If you still need something beyond that, please explain why, as the
situation you describe seems to be identical to what happens on
MS-Windows.
next prev parent reply other threads:[~2015-02-28 8:08 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-28 0:06 [PATCH] for review - Allow expansion of "~" (as opposed to "~user") Pete Williamson
2015-02-28 8:08 ` Eli Zaretskii [this message]
2015-03-02 9:44 ` Michal Nazarewicz
2015-03-02 13:50 ` Eli Zaretskii
2015-03-02 20:37 ` Michal Nazarewicz
2015-03-03 15:37 ` Eli Zaretskii
2015-03-03 17:48 ` Michal Nazarewicz
2015-03-03 18:09 ` Eli Zaretskii
2015-03-03 18:20 ` Eli Zaretskii
2015-03-03 18:22 ` Pete Williamson
2015-03-03 18:36 ` Eli Zaretskii
2015-03-03 18:38 ` Pete Williamson
2015-03-03 21:01 ` Michal Nazarewicz
2015-03-03 21:03 ` Michal Nazarewicz
2015-03-04 18:06 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83r3ta4fwk.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=petewil@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.