From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Hongyi Zhao Newsgroups: gmane.emacs.help Subject: Re: ~/.emacs vs ~/.emacs.d/init.el. Date: Sun, 13 Dec 2020 22:38:08 +0800 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="5327"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sun Dec 13 15:39:19 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 1koSWs-0001Gf-HE for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 13 Dec 2020 15:39:18 +0100 Original-Received: from localhost ([::1]:34990 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1koSWr-0004zJ-IU for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 13 Dec 2020 09:39:17 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57236) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1koSW1-0004z7-Kf for help-gnu-emacs@gnu.org; Sun, 13 Dec 2020 09:38:25 -0500 Original-Received: from mail-lf1-x12d.google.com ([2a00:1450:4864:20::12d]:38535) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1koSVz-0004c3-2L for help-gnu-emacs@gnu.org; Sun, 13 Dec 2020 09:38:25 -0500 Original-Received: by mail-lf1-x12d.google.com with SMTP id w13so23636134lfd.5 for ; Sun, 13 Dec 2020 06:38:22 -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=ivQtUbQMp2IKTpeNqZLGiM/Q3VZZPlPXeKOZa4hbqsA=; b=X+3NOYzrcKG4Qn250hpUcaVabFzhOIKufAULykapUPM+jGiXAydS0e4YTdibiBfgzw iZO7kSw6AY+/NLWJQa7f8SRHHex9342wvc9tSEgFzxd4aBRN2Yk1c6wmau1SMe3iJx9O 5JbGgt7xmSexc7FndSMAk7N1RJ+VmQt2HhpoIuoOlEMRJiv8XMZ0Js09aP/XKe6sq8tc 9f4ZACZLi2Dc8BhRuBW7xP5d5KUkuW4qaZNs6P31DdSkX/TIKLtN4SF35BcT7MekguQw f9MNtLY6fP/zQP05A7RHRnF+0rTF9o5VSfof5rqGxF8dbtKB3urMhsKNZ11+qnUI3QVp UBMQ== 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=ivQtUbQMp2IKTpeNqZLGiM/Q3VZZPlPXeKOZa4hbqsA=; b=YKGO048wiAFKJ+CU6vG/GqSuL+PtnwqN110PvCl/nf2VMFg5W445r7p/c4OXLIVSaL HhyJBAEmWrylP3rhb9GL1rLBn9yRk0xRwykDLjkdkGLp7vxO0Nrl1k7Q3rXpxyc5d8uM vtOme5bwK7q+XSI2sFby0pxyuCQVhSTIAhqFOlLcfT3Qr2Z4xyLGU5RvEHLnRNOkG5+/ 3HTNwQmzd7QDJmKD+OKy3n5rokR7c/u3Poe+0yVlzbSy0wmoORt3rHXivvNzksEq5dj+ NQwxpwKCfEmTlzLNUtsLMC0d+JaAECY9o2f1Acnto0EFvzb+TgAECd3FK8Ec+R32iKkk gf/A== X-Gm-Message-State: AOAM532OTDJ9IdTF2P7o1cHqx8ioMu9+uhojJ799RXqSCH1cPJnxu5K0 hFBQ8PijO8YJMnQbrB0P6Og3Dha8IZSGEDoh6LQOSxRL+Hs8hLz2 X-Google-Smtp-Source: ABdhPJz82d1hHwbNugCr24DnU3r0G5Gow0vtBohj0OezMOP5OzLSVIiQrbS0qsX4zmgcNQSiI7hYrJBc1cdR3aUU6O4= X-Received: by 2002:a19:8b83:: with SMTP id n125mr8785010lfd.75.1607870300586; Sun, 13 Dec 2020 06:38:20 -0800 (PST) In-Reply-To: Received-SPF: pass client-ip=2a00:1450:4864:20::12d; envelope-from=hongyi.zhao@gmail.com; helo=mail-lf1-x12d.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, 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-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:126309 Archived-At: 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? Regards -- Assoc. Prof. Hongyi Zhao Theory and Simulation of Materials Hebei Polytechnic Vocational and Technical University NO. 552 North Gangtie Road, Xingtai, China