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 08:56:24 -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="36806"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs , Yuri Khan To: Hongyi Zhao Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sun Dec 13 14:59:11 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 1koRu2-0009SX-T6 for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 13 Dec 2020 14:59:10 +0100 Original-Received: from localhost ([::1]:43960 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1koRu1-00030N-VV for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 13 Dec 2020 08:59:10 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51442) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1koRs0-0002jz-6V for help-gnu-emacs@gnu.org; Sun, 13 Dec 2020 08:57:04 -0500 Original-Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]:55028) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1koRry-0008QX-4N for help-gnu-emacs@gnu.org; Sun, 13 Dec 2020 08:57:03 -0500 Original-Received: by mail-wm1-x335.google.com with SMTP id d3so11438611wmb.4 for ; Sun, 13 Dec 2020 05:57:01 -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 :cc; bh=qsw9eeXS4FrR+0bofJhul0rIf6qmooH0C4z+gZm8MV0=; b=AH9Sb9jqNsZH/uMp4BRTGdAqwvLMtkewYKLTErtAZ/xVUXd7mXdfnPQVSvIVFt6y/j /susSyYwceg9myaTKV+aC5O+qEawBEAPHp7pB8mTk2Yo0KT91ZIS7bU48fCTCfrBVE0f bDuSoBDHgsU1SiV7sguVKcSpHYv/sDBDJs68Aq25vnW4A6BiWJsv4KCLR41cDGj9bDN6 8+9TbMDLR5u5oG1gcC4m2Vg2EYQqqRzE/iUn6zVg5AP7540vmQGnB24QoSARWLji7jGK 90boxaAxkuKjnV2+q0yH4ObkrsqcoUrmXdM9a9Ars2DFrrLLhfw4Hq0PicX/WQe5uCj0 m7Ow== 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:cc; bh=qsw9eeXS4FrR+0bofJhul0rIf6qmooH0C4z+gZm8MV0=; b=R9u7m5LBlImmvNMEFt3DYrMMY5X9pU048Sm3+VBrZBRYHs2ygC+5yhIRVYPo3A2pOX LuaIm3agbgPv36ZJrqtPZCGMo1Q6e8oQeV358ZoDwEKMamsiK9AFUPuoBveDiZBrxJAH ZZLjNeeuNq4Q8XgN8As5R6G1ai0N+uVLtQhfeHkltIh0G0n5+7gGwD6UNnHCEY+3kvbe oEKZv8UBqj4pXP7A7+Lj2Fr6lSaVm86s6T9QMBI8vD+MerfNLBYeK9VTsth+aXRj7N4U LcSJzNaVoXTjm4Fydf8u/bSHU1/Nlp4E5ghZ8q/7PY96DnuATue0qSxIiaMoJJISvK4K S4MA== X-Gm-Message-State: AOAM532GuxZ4PYaaPvHsTyUPcRZtFcavoFxQO3Bz+Po/sBdZO6F9awwa PKYHPmu34hmSecZYPlrIVjaJnqRPWA7VPcIpBwQ= X-Google-Smtp-Source: ABdhPJx25/V8tKQjWgM8nFOKU7C+7VDyD3hE/X3NHSgLpnnl+ivs2wCBlT28e+OPrUDX1R8Y6Gw9ilzPKEKG9izFuww= X-Received: by 2002:a7b:cbd0:: with SMTP id n16mr23386132wmi.162.1607867819838; Sun, 13 Dec 2020 05:56:59 -0800 (PST) In-Reply-To: Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=tim.visher@gmail.com; helo=mail-wm1-x335.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:126305 Archived-At: On Sun, Dec 13, 2020 at 8:51 AM 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? > You may find this section in the manual helpful. https://www.gnu.org/software/emacs/manual/html_node/emacs/Find-Init.html#Find-Init My two guesses are: More likely: You still have one of However ~/.emacs.d, ~/.emacs, and ~/.emacs.el are always preferred if they > exist, which means that you must delete or rename them in order to use the > XDG location. Less likely: You have XDG_CONFIG_HOME set somewhere in your environment to something other than ~/.config.