all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Chong Yidong <cyd@stupidchicken.com>
Cc: emacs-devel@gnu.org, michael.cadilhac@lrde.org, rms@gnu.org,
	monnier@iro.umontreal.ca, miles@gnu.org
Subject: Re: Use .emacs.d in savehist.el
Date: Sun, 30 Oct 2005 08:59:43 -0500	[thread overview]
Message-ID: <87pspn9kc0.fsf@stupidchicken.com> (raw)
In-Reply-To: <fc339e4a0510292130l6f4f8c9al@mail.gmail.com> (Miles Bader's message of "Sun, 30 Oct 2005 13:30:29 +0900")

Miles Bader <snogglethorpe@gmail.com> writes:

>> I didn't implement Miles' suggestion; it just doesn't seem necessary
>> (unless I'm missing something.)
>
> The point is that are various simple rules and guidelines that apply
> to _every_ customization file, if we allow them to go in either ~ or
> in ~/.emacs.d, and it's silly to duplicate the code for each
> customization file.
>
> Centralizing the policy with a function also allows later changes or
> enhancement to be done more easily and cleanly.

OK, now I see.

It may or may not make sense to use such a function for the init file
(though I agree that it's useful for elsewhere in Emacs.)  The
`command-line' has some strange magic going on in it: instead of
checking whether the file exists and is readable, it sets
`user-init-file' to t, and tries to load the filename
(`user-init-file-1'):

      ;; This tells `load' to store the file name found
      ;; into user-init-file.
      (setq user-init-file t)
      (load user-init-file-1 t t)

If the `load' function succeeds, it automagically binds
`user-init-file' to the loaded filename.  I don't know why this was
written this way, but maybe there is a reason?

Also, if you want to use this function for the init file, you would
have to account for the "_emacs" dotfile name used on MS-DOS and
MS-Windows.  In particular, MS-Windows uses "~/.emacs" by default, but
if that is not available it accepts "~/_emacs" as the dotfile.


Another note: it seems to me that most libraries that use ".emacs.d"
look for it in "~".  Would it make sense to extend the
`init-file-user' variable so that the directory goes into

      (concat "~" init-file-user "/.emacs.d")

instead?  Or should `init-file-user' continue to apply to init files
only?

  reply	other threads:[~2005-10-30 13:59 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-24 15:58 Use .emacs.d in savehist.el Stefan Monnier
2005-10-24 21:22 ` Kim F. Storm
2005-10-25 20:27   ` Richard M. Stallman
2005-10-25  9:30 ` Hrvoje Niksic
2005-10-25 14:30   ` David Kastrup
2005-10-25 14:51   ` Stefan Monnier
2005-10-25 19:13     ` Hrvoje Niksic
     [not found] ` <87oe5e977f.fsf@mahaena.lrde>
2005-10-25  9:59   ` Michael Cadilhac
2005-10-25 14:54     ` Stefan Monnier
2005-10-26 16:46       ` Richard M. Stallman
2005-10-26 23:28         ` Miles Bader
2005-10-27  3:58           ` Richard M. Stallman
2005-10-27 16:53             ` Kevin Rodgers
2005-10-28 16:19               ` Richard M. Stallman
2005-10-28 20:16                 ` Miles Bader
2005-10-29  5:12                   ` Richard M. Stallman
2005-10-29 17:31                     ` Kim F. Storm
2005-10-30  0:03                       ` Miles Bader
2005-10-29  3:51             ` Chong Yidong
2005-10-29 20:33               ` Richard M. Stallman
2005-10-30  4:00                 ` Chong Yidong
2005-10-30  4:30                   ` Miles Bader
2005-10-30 13:59                     ` Chong Yidong [this message]
2005-10-31  1:14                       ` Richard M. Stallman
2005-10-31  2:29                         ` Chong Yidong
2005-11-01  2:14                           ` Richard M. Stallman
2005-11-01  3:43                             ` Chong Yidong
2005-11-01  5:12                               ` Stefan Monnier
2005-11-01 12:54                                 ` Chong Yidong
2005-11-02 10:27                                   ` Richard M. Stallman
2005-11-02 15:54                                     ` Stefan Monnier
2005-11-02 10:26                                 ` Richard M. Stallman
2005-11-02 10:26                               ` Richard M. Stallman
2005-10-27  9:16         ` Kim F. Storm
2005-10-30  4:07       ` Chong Yidong
2005-10-25 15:58 ` Richard M. Stallman

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=87pspn9kc0.fsf@stupidchicken.com \
    --to=cyd@stupidchicken.com \
    --cc=emacs-devel@gnu.org \
    --cc=michael.cadilhac@lrde.org \
    --cc=miles@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=rms@gnu.org \
    /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.