From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tim Visher Newsgroups: gmane.emacs.help Subject: Re: ~/.emacs vs ~/.emacs.d/init.el. Date: Sun, 13 Dec 2020 10:04:27 -0500 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39388"; mail-complaints-to="usenet@ciao.gmane.io" To: emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sun Dec 13 16:05:58 2020 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1koSwg-000A6F-9h for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 13 Dec 2020 16:05:58 +0100 Original-Received: from localhost ([::1]:41586 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1koSwf-0000xW-8j for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 13 Dec 2020 10:05:57 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60848) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1koSvt-0000x8-J7 for help-gnu-emacs@gnu.org; Sun, 13 Dec 2020 10:05:09 -0500 Original-Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]:55335) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1koSvp-0004o0-Rb for help-gnu-emacs@gnu.org; Sun, 13 Dec 2020 10:05:09 -0500 Original-Received: by mail-wm1-x330.google.com with SMTP id x22so11510542wmc.5 for ; Sun, 13 Dec 2020 07:05:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=wAtxFrUx2/PuoONnmuwjiM1mso9yGGITSUx3fYkVkfw=; b=ijcvyzfxnuPeJxjNYhTWqJcDmJyEe9xv+Vb/NFSmTv/+4hqKA+b06A7Y0hJh7lF+lT ZLMUM/sS/NuQV45745mcZLn8IjFrodSl4D/qmX7s7+dsenD9/8ZQ+bg3CMJzWS2gTV92 wwWGjjNtQrZvy8ppy9haRsqG3CRtIPZe3kKSlF4uVh0kh+faHJJl7HVq+IQ9HtbGmtPc hV+ZNtKGqceQd3uLnjW2UMS2gAnAGgB0euii6XjD3gqrasDMcCfxNYyfTOC7U0c0VzgY K/Uh65j8bYVdfIymr8mi7Ru/kyyZDYuktU8MtWsZjBdYUCRiGF/DpI6WDcYhWFji4Cwy 1wTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=wAtxFrUx2/PuoONnmuwjiM1mso9yGGITSUx3fYkVkfw=; b=jAtdsEhvSxbJqmkQegplUjwKjGb0tMb12X/ODNWxxw6lA8m+fitosG8smYPkcpx5Uh PmHumGF5g6LGGYJZz+slpPwYUBLgOF/v4ldBz576+9SGR3G9L2FMrUJl0h18FZnZRP25 i3b5pxec8r6IILWe8n3Gz991cJVyKCfp12kYOYHsjWJmesaJ7syLE4p/IAwmjAptZ1Zl 5PS5FZ1qJE4g5p8x8kF/rJrNa7ttEUr/ejCEYxHs08lJBXkgv+QeWMCby+3TNwer7BLm pLJp3GVGfNjcncarziV3k59TJyboANCi6JVU9g+uZe+iXin2TF5EXre/IXQDGypz0tHy r29A== X-Gm-Message-State: AOAM531lL7LG9tacgP3caZS8GM6RnGi7mULuBDKAmQAcm0jf9thAoBYi FKUqAPJ2l7i2uWVygHCfR2fbfUZfazDAQr8FHta3Kls0rP+hDQ== X-Google-Smtp-Source: ABdhPJw4F+RRXKm5aejjsmfCCXYyJ0ggm6VoAq2zk126BJqwUGKontIPAOXZ3h14uz7XgftHYzmO9EeUr4tGZ47qeFk= X-Received: by 2002:a7b:cbd0:: with SMTP id n16mr23628955wmi.162.1607871903595; Sun, 13 Dec 2020 07:05:03 -0800 (PST) In-Reply-To: Received-SPF: pass client-ip=2a00:1450:4864:20::330; envelope-from=tim.visher@gmail.com; helo=mail-wm1-x330.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:126312 Archived-At: On Sun, Dec 13, 2020 at 9:53 AM <2QdxY4RzWzUUiLuE@potatochowder.com> wrote: > On 2020-12-13 at 22:38:08 +0800, > Hongyi Zhao wrote: > > > On Sun, Dec 13, 2020 at 9:59 PM <2QdxY4RzWzUUiLuE@potatochowder.com> > wrote: > > > > > > On 2020-12-13 at 21:50:37 +0800, > > > Hongyi Zhao wrote: > > > > > > > On Sun, Dec 13, 2020 at 6:09 PM Yuri Khan > wrote: > > > > > > > > > > On Sun, 13 Dec 2020 at 16:00, Hongyi Zhao > wrote: > > > > > > > > > > > As far as the initialization file is concerned, which is more > > > > > > preferable,~/.emacs or ~/.emacs.d/init.el? > > > > > > > > > > If you are choosing between these two, ~/.emacs.d/init.el is > > > > > preferable. Because then you can put the whole .emacs.d into > version > > > > > control separately from your home directory. > > > > > > > > > > However keep in mind that Emacs 27 adds support for XDG-style > > > > > configuration directory, ~/.config/emacs/, which gives you the same > > > > > abilities as ~/.emacs.d with an added benefit of less clutter in > your > > > > > home directory. > > > > > > > > I've tried the following based on your above notes, but it seems that > > > > emacs doesn't pick up the initialization file located under > > > > ~/.config/emacs/ automatically. > > > > > > > > $ mv .emacs.d/init.el ~/.config/emacs/ > > > > > > > > Any hints for this problem? > > > > > > Try removing or renaming ~/.emacs.d, the existence of which might be > > > fooling emacs into *not* searching for ~/.config/emacs. For reference, > > > see: > > > > > > > https://www.gnu.org/software/emacs/manual/html_node/emacs/Find-Init.html > > > > > > > Currently, the ~/.emacs.d directory is used by emacs to store many of > > the user data as shown below: > > > > $ ls ~/.emacs.d/ > > auto-save-list cnfonts eaf elpa init.el network-security.data > rime url > > > > So, if I removed/deleted this folder, then where should I put the > > emacs' user data? > > Presumably, ~/.config/emacs is an alternative to ~/.emacs.d, so you > would move all of that user data from ~/.emacs.d to ~/.config/emacs. > The net result would have been the same if you had renamed ~/.emacs.d to > ~/.config/emacs instead of separating the init file from the other user > data. > LOL 2QdxY4RzWzUUiLuE@potatochowder.com and I are really working in lock-step. xD